Data processing method and apparatus
This application provides techniques for processing data. The techniques includes receiving requests for editing an initial story draft from at least two client devices, and adding each request to a draft editing queue; extracting a first request for editing the initial story draft by a first client device from the draft editing queue, obtaining first draft editing information in the first request, and editing the initial story draft based on the first draft editing information to obtain an initial modified story draft; extracting a second request for editing the initial story draft by a second client device from the draft editing queue, obtaining second draft editing information in the second request, and generating to-be-responded draft information according to the first draft editing information and the second draft editing information; and editing the initial modified story draft based on the to-be-responded draft information to generate a target story draft.
1 . A method of processing data, applied to a server device, and comprising:
receiving draft editing requests for editing an initial story draft from at least two client devices, and adding each of the draft editing requests to a draft editing queue, wherein a story draft comprises a data structure of a storyboard video editor, and wherein the draft editing queue is configured to sequentially store a plurality of draft editing requests from a plurality client devices based on time points of receiving the plurality of draft editing requests;
extracting a first draft editing request for editing the initial story draft by a first client device from the draft editing queue, and obtaining first draft editing information in the first draft editing request;
editing the initial story draft based on the first draft editing information to obtain an initial modified story draft, wherein the first client device is among the at least two client devices;
extracting a second draft editing request for editing the initial story draft by a second client device from the draft editing queue, and obtaining second draft editing information in the second draft editing request;
determining that a portion of the second draft editing information is associated with an attribute parameter and that a portion of the first draft editing information is associated with the same attribute parameter;
deleting, based on a preset conflict policy, the portion of the second draft editing information, wherein the second draft editing information without the portion of the second draft editing information comprises screened second draft editing information;
generating to-be-responded draft information based on the first draft editing information and the screened second draft editing information, wherein the second client device is among the at least two client devices; and
editing the initial modified story draft based on the to-be-responded draft information to generate an updated story draft.
2 . The method according to claim 1 , wherein the portion of the second draft information associated with the attribute parameter comprises a parameter value of the attribute parameter.
3 . The method according to claim 1 , wherein before receiving the draft editing requests for editing the initial story draft from the at least two client devices, the method further comprises:
establishing communication connections with the at least two client devices; and
sending the initial story draft to the at least two client devices based on the communication connections.
4 . The method according to claim 1 , wherein the method further comprises:
establishing communication connections with the at least two client devices; and
implementing real-time data transmission between the server and the at least two client devices based on the communication connections.
5 . A method of processing data, comprising:
receiving, at a client device, an initial story draft sent from a server device;
loading the initial story draft to a storyboard draft editor, wherein the storyboard draft editor is configured to plan a storyboard and shoot material resources based on the storyboard;
editing the initial story draft via the storyboard draft editor;
generating to-be-submitted draft information during the editing the initial story draft, wherein the to-be-submitted draft information comprises first draft editing information for the initial story draft;
synchronizing the to-be-submitted draft information to the server device in real time;
receiving draft modification information from the server device, wherein the draft modification information comprises second draft editing information synchronized to the server device by one or more other client devices, and wherein the client device and the one or more other client devices are performing real-time collaboration of editing the same story draft;
receiving an indication that a portion of the first draft editing information was not applied to the initial story draft, wherein the portion of the first draft editing information is associated with a same target parameter as a portion of the draft modification information received from the server device, and wherein a preset conflict policy caused the portion of the first draft editing information to be deleted; and
generating a client story draft based on the draft modification information and the initial story draft.
6 . The method according to claim 5 , wherein the generating to-be-submitted draft information comprises:
editing the initial story draft to obtain a to-be-submitted story draft;
calculating difference information between the to-be-submitted story draft and the initial story draft; and
identifying the difference information as the to-be-submitted draft information.
7 . The method according to claim 5 , wherein the synchronizing the to-be-submitted draft information to the server device comprises:
transmitting the to-be-submitted draft information to the server device based on a communication connection between the server device and each client device.
8 . A server computing device, comprising a memory, a processor, wherein computer instructions are stored in the memory and executable by the processor, and wherein the computer instructions, upon execution by the processor, cause the processor to implement operations comprising:
receiving draft editing requests for editing an initial story draft from at least two client devices, and adding each of the draft editing requests to a draft editing queue, wherein a story draft comprises a data structure of a storyboard video editor, and wherein the draft editing queue is configured to sequentially store a plurality of draft editing requests from a plurality client devices based on time points of receiving the plurality of draft editing requests;
extracting a first draft editing request for editing the initial story draft by a first client device from the draft editing queue, and obtaining first draft editing information in the first draft editing request;
editing the initial story draft based on the first draft editing information to obtain an initial modified story draft, wherein the first client device is among the at least two client devices;
extracting a second draft editing request for editing the initial story draft by a second client device from the draft editing queue, and obtaining second draft editing information in the second draft editing request;
determining a portion of the second draft editing information is associated with an attribute parameter and a portion of the first draft editing information is associated with the same attribute parameter;
deleting, based on a preset conflict policy, the portion of the second draft editing information, wherein the second draft editing information without the portion of the second draft editing information comprises screened second draft editing information;
generating to-be-responded draft information based on the first draft editing information and the screened second draft editing information, wherein the second client device is among the at least two client devices; and
editing the initial modified story draft based on the to-be-responded draft information to generate an updated story draft.
9 . The server computing device according to claim 8 , wherein the portion of the second draft information associated with the attribute parameter comprises a parameter value of the attribute parameter.
10 . The server computing device according to claim 8 , wherein before receiving the draft editing requests for editing the initial story draft from the at least two client devices, the method further comprises:
establishing communication connections with the at least two client devices; and
sending the initial story draft to the at least two client devices based on the communication connections.
11 . The server computing device according to claim 8 , wherein the operations further comprise:
establishing communication connections with the at least two client devices; and
implementing real-time data transmission between the server and the at least two client devices based on the communication connections.
12 . A client computing device, comprising a memory, a processor, wherein computer instructions are stored in the memory and executable by the processor, and wherein the computer instructions, upon execution by the processor, cause the processor to implement operations comprising:
receiving an initial story draft sent from a server device;
loading the initial story draft to a storyboard draft editor, wherein the storyboard draft editor is configured to plan a storyboard and shoot material resources based on the storyboard;
editing the initial story draft via the storyboard draft editor;
generating to-be-submitted draft information during the editing the initial story draft, wherein the to-be-submitted draft information comprises first draft editing information for the initial story draft;
synchronizing the to-be-submitted draft information to the server device in real time;
receiving draft modification information from the server device, wherein the draft modification information comprises second draft editing information synchronized to the server device by one or more other client computing devices, and wherein the client computing device and the one or more other client computing devices are performing real-time collaboration of editing the same story draft;
receiving an indication that a portion of the first draft editing information was not applied to the initial story draft, wherein the portion of the first draft editing information is associated with a same target parameter as a portion of the draft modification information received from the server device, and wherein a preset conflict policy caused the portion of the first draft editing information to be deleted; and
generating a client story draft based on the draft modification information and the initial story draft.
13 . The client computing device according to claim 12 , wherein the generating to-be-submitted draft information comprises:
editing the initial story draft to obtain a to-be-submitted story draft;
calculating difference information between the to-be-submitted story draft and the initial story draft; and
identifying the difference information as the to-be-submitted draft information.
14 . The client computing device according to claim 12 , wherein the synchronizing the to-be-submitted draft information to the server device comprises:
transmitting the to-be-submitted draft information to the server device based on a communication connection between the server device and the client computing device.