Object operation method, electronic device and storage medium
View Patent ↗Embodiments of the disclosure disclose an operation method for an object, an operation apparatus for an object, an electronic device, and a storage medium, and the method is applied to a first client and includes: performing a first operation on a first object of the first client in response to a preset event; reporting an effective message to a server in response to the performing of the first operation taking effect, to trigger the server to generate a notification message, and trigger the notification message to be sent to the first client and at least one second client that is in real-time communication with the first client, to enable the at least one second client to perform the first operation on the first object; and in response to receiving the notification message, maintaining the first operation that has taken effect.
1 . An operation method for an object, applied to a first client, comprising:
performing a first operation on a first object of the first client in real-time communication with at least one second client, wherein the first operation comprises an operation for adding an effect on an image of a user of the first client;
reporting an effective message to a server in response to the performing of the first operation taking effect, to trigger the server to generate a notification message, and trigger the notification message to be sent to the first client and the at least one second client that is in the real-time communication with the first client, to enable the at least one second client to perform the first operation on the first object;
in response to receiving the notification message, maintaining the first operation that has taken effect; and
in response to determining that the notification message corresponding to the effective message sent by the server is not received within a first time interval from a moment of reporting the effective message, prompting an operation failure message and canceling the first operation that has taken effect.
2 . The method according to claim 1 , wherein a preset event comprises at least one of the following:
receiving an operation instruction input to the first client; or
providing feedback with an approval message for a first request sent by any one of the at least one second client, wherein the first request represents a request to perform the first operation on the first object.
3 . The method according to claim 1 , further comprising:
in response to determining that a reporting time interval between every adjacent two of at least two effective messages is less than a second time interval, triggering the server to generate the notification message based on a last effective message among the at least two effective messages, wherein each of the at least two effective messages comprises a first operation number indicative of an order of operations performed by the first client, and the at least two effective messages are sorted based on respective first operation numbers of the at least two effective messages.
4 . The method according to claim 1 , further comprising:
determining a target client from the at least one second client; and
sending a second request to the target client, so that in response to the target client providing feedback with an approval message for the second request, a second operation is performed on a second object of the target client, wherein the second request represents a request to perform the second operation on the second object.
5 . The method according to claim 4 , after sending the second request to the target client, further comprising:
performing the second operation on the second object according to the second request;
in response to determining that a notification message corresponding to the second request sent by the server is received within a third time interval from a moment of sending the second request, prompting a request success message, and maintaining an effective second operation; and
in response to determining that the notification message corresponding to the second request sent by the server is not received within the third time interval from the moment of sending the second request, prompting a request failure message, and canceling the effective second operation.
6 . The method according to claim 4 , further comprising:
in response to determining that a sending time interval between every adjacent two of at least two second requests is less than a fourth time interval, forwarding a last second request among the at least two second requests to the target client by the server, wherein each of the at least two second requests comprises a first operation number indicative of an order of operations performed by the first client, and the at least two second requests are sorted based on respective first operation numbers of the at least two second requests.
7 . The method according to claim 1 , further comprising:
in response to determining that a sending time interval between every adjacent two of at least two notification messages for a same target object is less than a fifth time interval, performing an operation on the target object according to a last notification message among the at least two notification messages, wherein each of the at least two notification messages comprises a second operation number that is maintained by the server and indicates an order of global operations performed by clients, and the at least two notification messages are sorted based on respective second operation numbers of the at least two notification messages.
8 . The method according to claim 1 , wherein the first client and the at least one second client are multimedia communication clients respectively, the first object comprises multimedia data, and the first operation comprises an operation of adding a special effect.
9 . An electronic device, comprising:
one or more processors; and
a storage apparatus, configured to store one or more programs,
wherein the one or more programs, when executed by the one or more processors, enable the one or more processors to implement acts comprising:
performing a first operation on a first object of the first client in real-time communication with at least one second client, wherein the first operation comprises an operation for adding an effect on an image of a user of the first client;
reporting an effective message to a server in response to the performing of the first operation taking effect, to trigger the server to generate a notification message, and trigger the notification message to be sent to the first client and the at least one second client that is in the real-time communication with the first client, to enable the at least one second client to perform the first operation on the first object;
in response to receiving the notification message, maintaining the first operation that has taken effect; and
in response to determining that the notification message corresponding to the effective message sent by the server is not received within a first time interval from a moment of reporting the effective message, prompting an operation failure message and canceling the first operation that has taken effect.
10 . The electronic device according to claim 9 , wherein a preset event comprises at least one of the following:
receiving an operation instruction input to the first client; or
providing feedback with an approval message for a first request sent by any one of the at least one second client, wherein the first request represents a request to perform the first operation on the first object.
11 . The electronic device according to claim 9 , the acts further comprising:
in response to determining that a reporting time interval between every adjacent two of at least two effective messages is less than a second time interval, triggering the server to generate the notification message based on a last effective message among the at least two effective messages, wherein each of the at least two effective messages comprises a first operation number indicative of an order of operations performed by the first client, and the at least two effective messages are sorted based on respective first operation numbers of the at least two effective messages.
12 . The electronic device according to claim 9 , wherein the acts further comprise:
determining a target client from the at least one second client; and
sending a second request to the target client, so that in response to the target client providing feedback with an approval message for the second request, a second operation is performed on a second object of the target client, wherein the second request represents a request to perform the second operation on the second object.
13 . The electronic device according to claim 12 , wherein after sending the second request to the target client, the acts further comprise:
performing the second operation on the second object according to the second request;
in response to determining that a notification message corresponding to the second request sent by the server is received within a third time interval from a moment of sending the second request, prompting a request success message, and maintaining an effective second operation; and
in response to determining that the notification message corresponding to the second request sent by the server is not received within the third time interval from the moment of sending the second request, prompting a request failure message, and canceling the effective second operation.
14 . The electronic device according to claim 12 , the acts further comprising:
in response to determining that a sending time interval between every adjacent two of at least two second requests is less than a fourth time interval, forwarding a last second request among the at least two second requests to the target client by the server, wherein each of the at least two second requests comprises a first operation number indicative of an order of operations performed by the first client, and the at least two second requests are sorted based on respective first operation numbers of the at least two second requests.
15 . The electronic device according to claim 9 , the acts further comprising:
in response to determining that a sending time interval between every adjacent two of at least two notification messages for a same target object is less than a fifth time interval, performing an operation on the target object according to a last notification message among the at least two notification messages, wherein each of the at least two notification messages comprises a second operation number that is maintained by the server and indicates an order of global operations performed by clients, and the at least two notification messages are sorted based on respective second operation numbers of the at least two notification messages.
16 . The electronic device according to claim 9 , wherein the first client and the at least one second client are multimedia communication clients respectively, the first object comprises multimedia data, and the first operation comprises an operation of adding a special effect.
17 . A non-transitory storage medium, comprising computer-executable instructions, wherein the computer-executable instructions, when executed by a computer processor, are configured to perform acts comprising:
performing a first operation on a first object of the first client in real-time communication with at least one second client, wherein the first operation comprises an operation for adding an effect on an image of a user of the first client;
reporting an effective message to a server in response to the performing of the first operation taking effect, to trigger the server to generate a notification message, and trigger the notification message to be sent to the first client and the at least one second client that is in the real-time communication with the first client, to enable the at least one second client to perform the first operation on the first object;
in response to receiving the notification message, maintaining the first operation that has taken effect; and
in response to determining that the notification message corresponding to the effective message sent by the server is not received within a first time interval from a moment of reporting the effective message, prompting an operation failure message and canceling the first operation that has taken effect.
18 . The non-transitory storage medium according to claim 17 , the acts further comprising:
in response to determining that a reporting time interval between every adjacent two of at least two effective messages is less than a second time interval, triggering the server to generate the notification message based on a last effective message among the at least two effective messages, wherein each of the at least two effective messages comprises a first operation number indicative of an order of operations performed by the first client, and the at least two effective messages are sorted based on respective first operation numbers of the at least two effective messages.
19 . The non-transitory storage medium according to claim 17 , the acts further comprising:
determining a target client from the at least one second client; and
sending a second request to the target client, so that in response to the target client providing feedback with an approval message for the second request, a second operation is performed on a second object of the target client, wherein the second request represents a request to perform the second operation on the second object.
20 . The non-transitory storage medium according to claim 17 , the acts further comprising:
in response to determining that a sending time interval between every adjacent two of at least two notification messages for a same target object is less than a fifth time interval, performing an operation on the target object according to a last notification message among the at least two notification messages, wherein each of the at least two notification messages comprises a second operation number that is maintained by the server and indicates an order of global operations performed by clients, and the at least two notification messages are sorted based on respective second operation numbers of the at least two notification messages.