Data processing method and device
By processing video editing requests from multiple clients on the draft editing queue on the server side, real-time collaborative editing is realized for multiple people, solving the problem of inefficient video production in the existing technology, and improving the efficiency and accuracy of editing.
Patent Information
- Application Number
- CN202110944010.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-17
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2041-08-17
AI Technical Summary
The existing technology lacks a collaborative approach for multiple people to edit videos in real time, resulting in inefficient video production.
By implementing the draft editing queue on the server side, receiving draft editing requests from multiple clients, extracting and processing draft information to be responded to, generating target story drafts, and real-time collaborative editing by multiple people.
It realizes real-time collaborative editing by multiple people, improves the efficiency and accuracy of video production, and avoids conflicts during real-time editing.
Smart Images

Figure CN115706811B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a data processing method. The present application also relates to a data processing device, a computing device, and a computer-readable storage medium. Background Art
[0002] With the continuous development of computer technology, many document programs have the function of multi-person collaboration, which improves office efficiency by processing the same document by multiple people; currently, mainstream document programs have the function of multi-person collaboration, and the final output is the document, while the production of videos is as complicated and time-consuming as the processing of documents, and the current video production methods are mostly independent production or offline phased cooperation. Multi-person collaborative documents improve office efficiency through collaboration, but lack a collaborative method of real-time collaborative editing of videos and the final output of the edited videos.
[0003] How to enable multiple people to edit videos in real time has become an urgent problem that technical personnel need to solve. Summary of the invention
[0004] In view of this, the embodiment of the present application provides a data processing method. The present application also relates to a data processing device, a computing device, and a computer-readable storage medium to solve the problem of the lack of a data processing method for multiple people to edit data in real time in the prior art.
[0005] According to a first aspect of an embodiment of the present application, a data processing method is provided, which is applied to a server and includes:
[0006] receiving draft editing requests for an initial story draft sent by at least two clients, and adding the draft editing request sent by each client to a draft editing queue;
[0007] Extracting a first draft editing request of a first client for the initial story draft from the draft editing queue, obtaining first draft information to be responded to in the first draft editing request, and editing the initial story draft based on the first draft information to be responded to, to obtain an initial modified story draft;
[0008] Extracting a second draft editing request from a second client for the initial story draft from the draft editing queue, obtaining second draft information to be responded to in the second draft editing request, and generating draft information to be responded to according to the first draft information to be responded to and the second draft information to be responded to;
[0009] The initial modified story draft is edited based on the draft information to be responded to, to obtain a target story draft.
[0010] According to a second aspect of an embodiment of the present application, a data processing method is provided, which is applied to a client and includes:
[0011] Receive the initial story draft sent by the server;
[0012] In response to the draft editing request, editing the initial story draft to obtain information of the draft to be submitted;
[0013] In response to the information submission request, submit the draft information to be submitted to the server to obtain the draft information to be responded to;
[0014] When receiving the response information returned by the server, determining that the draft information to be responded to is draft modification information;
[0015] A client draft is generated based on the draft modification information and the initial story draft.
[0016] According to a third aspect of an embodiment of the present application, there is provided a data processing device, applied to a server, comprising:
[0017] An adding module, configured to receive draft editing requests for an initial story draft sent by at least two clients, and add the draft editing request sent by each client to a draft editing queue;
[0018] an extraction module configured to extract a first draft editing request from a first client for the initial story draft from the draft editing queue, obtain first draft information to be responded to in the first draft editing request, and edit the initial story draft based on the first draft information to be responded to, to obtain an initial modified story draft;
[0019] A first generating module is configured to extract a second draft editing request from a second client for the initial story draft from the draft editing queue, obtain second draft information to be responded to in the second draft editing request, and generate draft information to be responded to according to the first draft information to be responded to and the second draft information to be responded to;
[0020] The first editing module is configured to edit the initial modified story draft based on the draft information to be responded to, to obtain a target story draft.
[0021] According to a fourth aspect of an embodiment of the present application, a data processing device is provided, which is applied to a client and includes:
[0022] A receiving module, configured to receive an initial story draft sent by a server;
[0023] A second editing module is configured to edit the initial story draft in response to the draft editing request and obtain the draft information to be submitted;
[0024] A submission module, configured to submit the draft information to be submitted to the server in response to the information submission request, and obtain the draft information to be responded to;
[0025] A determination module, configured to determine, upon receiving the response information returned by the server, that the draft information to be responded to is draft modification information;
[0026] The second generating module is configured to generate a client draft based on the draft modification information and the initial story draft.
[0027] According to a fifth aspect of an embodiment of the present application, a computing device is provided, comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein the processor implements the steps of the data processing method when executing the computer instructions.
[0028] According to a sixth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores computer instructions, and when the computer instructions are executed by a processor, the steps of the data processing method are implemented.
[0029] The data processing method provided by the present application receives draft editing requests for an initial story draft sent by at least two clients, and adds the draft editing request sent by each client to a draft editing queue; extracts a first draft editing request for the initial story draft from the draft editing queue, obtains first draft information to be responded to in the first draft editing request, edits the initial story draft based on the first draft information to be responded to, and obtains an initial modified story draft; extracts a second draft editing request for the initial story draft from the draft editing queue, obtains second draft information to be responded to in the second draft editing request, generates draft information to be responded to according to the first draft information to be responded to and the second draft information to be responded to; edits the initial modified story draft based on the draft information to be responded to, and obtains a target story draft.
[0030] An embodiment of the present application obtains draft editing requests in a draft editing queue to process draft editing requests according to the order in which they are received; obtains draft information to be responded to in draft editing requests to further edit the initial story draft; responds to draft editing requests from different clients for the initial story draft in the order in the draft editing queue, and filters draft information with the same attributes in the draft information to be responded to of different clients, thereby avoiding conflicts when modifying the draft in real time, and achieving efficient processing of draft editing information sent by multiple people in real time. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 This is a flow chart of a method for processing server data provided by an embodiment of the present application;
[0032] Figure 2 This is a flow chart of a method for processing client data provided by an embodiment of the present application;
[0033] Figure 3 This is a schematic diagram of client data storage provided by an embodiment of the present application;
[0034] Figure 4a is a flow chart of a data processing method applied to a client 5 provided in an embodiment of the present application;
[0035] Figure 4b It is a flowchart of a data processing method applied to the client 5 provided in one embodiment of the present application;
[0036] Figure 5 It is a structural diagram of a data processing device applied to a server provided by an embodiment of the present application;
[0037] Figure 6 It is a structural diagram of a data processing device applied to a client provided by an embodiment of the present application;
[0038] Figure 7 It is a structural block diagram of a computing device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0039] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.
[0040] The terms used in one or more embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present application. The singular forms of "a", "said" and "the" used in one or more embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to and includes any or all possible combinations of one or more associated listed items.
[0041] It should be understood that, although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0042] First, the terms involved in one or more embodiments of the present application are explained.
[0043] JSON: JSON is a data format that is widely used in WEB application development. It stores data in the form of key-value pairs, and currently mainstream programming languages support the generation and parsing of JSON format data. JSON is widely used in scenarios such as data exchange and storage.
[0044] Diff: Diff is an algorithm used to compare two files and output the differences. The output difference file usually has a .patch extension.
[0045] Patch: Patch refers to the file difference information generated by the diff algorithm. In this application, a data structure named Patch is defined to describe this difference.
[0046] In the present application, a data processing method is provided. The present application also relates to a data processing apparatus, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.
[0047] Figure 1 A flow chart of a data processing method applied to a server according to an embodiment of the present application is shown, which specifically includes the following steps:
[0048] Step 102: Receive draft editing requests for the initial story draft sent by at least two clients, and add the draft editing request sent by each client to a draft editing queue.
[0049] Among them, the client refers to the terminal device used by the user to edit the initial story draft; the initial story draft refers to the story draft saved in the current server, and the story draft is the data structure of the storyboard video editor; the draft editing request refers to the request to edit the initial story draft; the draft editing queue refers to the queue that saves the draft editing requests sent by the client.
[0050] Specifically, the server receives draft editing requests for a target story draft sent by multiple clients, and stores the draft editing request of each client in the draft editing queue in sequence according to the order in which the server receives the draft editing requests.
[0051] In a specific implementation of the present application, taking draft A as an example, draft editing requests from client 1, client 2, client 3 and client 4 for draft A are received; the draft editing requests from each client 1, client 2, client 3 and client 4 are added to the draft editing queue.
[0052] The server adds the received draft editing instruction to the draft editing queue, so as to determine what modifications to make to the initial story draft and the modification order based on the draft editing requests in the draft editing queue.
[0053] In an actual application, receiving draft editing requests for an initial story draft sent by at least two clients, and adding the draft editing request sent by each client to a draft editing queue, includes:
[0054] Determine a request time point for receiving a draft edit request for an initial story draft sent by a client;
[0055] Adding the draft editing request for the initial story draft from each client to the draft editing queue according to the request time point.
[0056] The request time point refers to the time point at which the server receives the draft edit request. The request time point at which the server receives the draft edit request sent by each client is obtained, and the draft edit request received by the server is added to the draft edit queue according to the request time point.
[0057] In a specific implementation of the present application, following the above example, the server receives a draft editing request for draft A sent by each client, and records the time point of receiving each draft editing request. For example, the time point of receiving the draft editing request for draft A from client 1 is 2 hours, 3 minutes and 15 seconds, and the time point of receiving the draft editing request for draft A from client 2 is 2 hours, 3 minutes and 14 seconds. Then, according to the recorded time points, the draft editing request for draft A sent by client 2 is first added to the draft editing queue, and then the draft editing request for draft A sent by client 1 is added to the draft editing queue.
[0058] By adding the draft edit request to the draft edit queue based on the time point when the server receives the draft edit request, it is convenient to determine the order of processing the draft edit request based on the time point when the server receives the draft edit request.
[0059] Step 104: extract the first draft editing request of the first client for the initial story draft from the draft editing queue, obtain the first draft information to be responded to in the first draft editing request, edit the initial story draft based on the first draft information to obtain an initial modified story draft.
[0060] Among them, the first client refers to a client that has a draft editing request for the initial story draft, and is one of the clients among multiple clients that have draft editing requests for the initial story draft; the first draft editing request refers to a request sent by the first client to edit the initial story draft; the first draft information to be responded to refers to the information for editing the initial story draft obtained from the first draft editing request; the initial modified story draft refers to the draft obtained by modifying the initial story draft according to the first draft information to be responded to.
[0061] Specifically, the draft editing queue contains draft editing information for the initial story draft, and the draft editing information for the initial story draft is obtained in the draft editing queue in sequence. After obtaining the first draft editing request for the initial story draft sent by the first client, the first draft information to be responded to in the first draft editing request is extracted, and the initial story draft is modified according to the first draft information to be responded to, for example, a new draft is added to the initial story draft, a draft is deleted, and so on; the initial story draft is modified based on the first draft information to be responded to, and the initial modified story draft is obtained.
[0062] In a specific implementation of the present application, taking client 3 as an example, the draft editing request of client 3 for draft B is extracted from the draft editing queue, the draft editing information in the draft editing request is obtained, and draft B is edited based on the obtained draft editing information to obtain the edited draft B.
[0063] By obtaining the draft information to be responded to in the draft editing request, the initial story draft is modified to update the content of the initial story draft in the server, so that the server can synchronize the real-time editing information of the initial story draft to the client participating in editing the initial story draft.
[0064] Step 106: extract the second draft editing request of the second client for the initial story draft from the draft editing queue, obtain the second draft information to be responded to in the second draft editing request, and generate draft information to be responded to according to the first draft information to be responded to and the second draft information to be responded to.
[0065] Among them, the second client refers to a client that has a draft editing request for the initial story draft, and is a client other than the first client among multiple clients that have draft editing requests for the initial story draft; the second draft editing request refers to a request for editing the initial story draft sent by the second client; the second draft information to be responded to refers to the request for editing the initial story draft obtained from the second draft editing request; the draft information to be responded to refers to the information obtained based on the first draft information to be responded to and the second draft information to be responded to.
[0066] Specifically, after obtaining the second draft editing request for the initial story draft sent by the second client in the draft queue, extract the second draft information to be responded to in the second draft editing request; generate the draft information to be responded to based on the first draft information to be responded to and the second draft information to be responded to.
[0067] In a specific implementation of the present application, following the above example, the draft editing request of client 4 for draft B is extracted from the draft editing queue, and the draft editing information in the draft editing request is extracted; the draft editing information in the draft editing request of client 3 for draft B is obtained, and based on the draft editing information in the draft editing request of client 3 for draft B and the draft editing information in the draft editing request of client 4 for draft B, the draft information to be responded to is obtained.
[0068] In practical applications, a specific method for generating the draft information to be responded to according to the first draft information to be responded to and the second draft information to be responded to includes:
[0069] The second draft information to be responded to is filtered based on a preset conflict strategy and the first draft information to be responded to, to obtain the draft information to be responded to.
[0070] The preset conflict strategy refers to a strategy for processing conflicting information between the first draft information to be responded to and the second draft information to be responded to. For example, the preset conflict strategy is to determine the same attribute parameters or different attribute parameters between the first draft information to be responded to and the second draft information to be responded to.
[0071] By presetting the conflict strategy and the first draft information to be responded to, the target attribute parameters in the second draft information to be responded to are screened, so as to facilitate further processing of the second draft information to be responded to.
[0072] In an actual application, the second draft information to be responded to is filtered based on a preset conflict strategy and the first draft information to be responded to, to obtain the draft information to be responded to, including:
[0073] Determine the target attribute parameter in the second draft information to be responded to based on the preset conflict strategy and the first draft information to be responded to;
[0074] The draft information corresponding to the target attribute parameter in the second draft information to be responded is deleted to generate draft information to be responded.
[0075] The target attribute parameter refers to the parameter of the attribute that conflicts between the first draft information to be responded to and the second draft information to be responded to; the draft information corresponding to the target attribute parameter refers to the parameter value corresponding to the target attribute parameter.
[0076] Specifically, based on the preset conflict strategy, the target attribute parameters in the first draft information to be responded to and the second draft information to be responded to are determined to be the same, and the draft information corresponding to the target attribute parameters in the second draft information to be responded to is deleted to obtain the attribute information to be responded to.
[0077] In a specific implementation of the present application, taking the target attribute parameter as the title of the first shot as an example, the version number corresponding to the initial story draft is V1, and the information in the initial story draft is shown in Table 1 below.
[0078] Table 1
[0079]
[0080] The server receives pending response information 1 and pending response information 2 sent by two clients. The receiving time of pending response information 1 is T1, and the receiving time of pending response information 2 is T2. T1 is earlier than T2. The specific modifications to the initial story draft in pending response information 1 and pending response information 2 are shown in Table 2 below.
[0081] Table 2
[0082]
[0083] The response information 1 modifies the title of the first shot and the title of the second shot, and the response information 2 modifies the title of the first shot and the target information of the first shot. The preset conflict strategy is to determine the target attribute parameters that are the same in the response information 1 and the response information 2, and the target attribute parameters can be determined to be "the title of the first shot".
[0084] The server first receives the pending response information 1, modifies the initial story draft V1 based on the pending response information 1, and obtains the initial modified story draft V2, as shown in Table 3 below.
[0085] Table 3
[0086]
[0087] The modification of the information to be responded to 2 is based on the initial story draft of version V1. The information to be responded to 2 modifies the title of the first shot and the description information of the first shot in the initial story draft of version V1. At this time, the title of the first shot in version V2 is different from that in version V1, and the description information of the first shot is the same in version V2 and version V1. Then, the modification of the title of the first shot in the information to be responded to 2 is rejected, and the modification of the description information of the first shot in the information to be responded to 2 is received, that is, the draft editing information "playground" of the title of the first shot in the information to be responded to 2 is deleted, and the modified information to be responded to 2 is obtained; the modified information to be responded to 2 containing only the description information of the first shot "there are many people exercising on the playground" is used as the information to be responded to after deleting the draft information corresponding to the same attribute parameters.
[0088] By filtering the target attribute parameters in the second draft information to be responded to based on the preset conflict strategy and the first draft information to be responded to, and deleting the draft information corresponding to the target attribute parameters in the second draft information to be responded to, the filtering of the second draft information to be responded to is achieved, which facilitates further modification of the draft based on the draft information to be responded to obtained by filtering, thereby avoiding request conflicts.
[0089] Step 108: Edit the initial modified story draft based on the draft information to be responded to, and obtain a target story draft.
[0090] The draft information to be responded to refers to information obtained by editing the initial modified story draft based on the first draft information to be responded to and the second draft information to be responded to; the target story draft refers to the draft obtained by editing the initial modified story draft according to the draft information to be responded to.
[0091] Specifically, after obtaining the information to be responded to based on the first information to be responded to and the second information to be responded to, the initial modification information edited according to the first information to be responded to is edited based on the information to be responded to, to obtain a target story draft.
[0092] In a specific implementation of the present application, following the above example, the initial modified story draft is edited based on the pending response information containing the description information of the first shot "there are many people exercising on the playground" to obtain the target story draft V3. At this time, the target story draft V3 is obtained, as shown in Table 4 below.
[0093] Table 4
[0094]
[0095]
[0096] The initial modified story draft is further modified through the obtained draft information to be responded to, so as to deal with the conflict when different users process the same attribute, and realize the real-time collaboration of multiple people to edit the draft.
[0097] In practical applications, before receiving the draft editing requests for the initial story draft sent by at least two clients, the method further includes:
[0098] Establishing a communication connection with at least two clients;
[0099] The initial story draft is sent to the at least two clients based on the communication connection.
[0100] Specifically, in order to achieve real-time synchronization of draft editing information between the client and the server, the server first establishes a communication connection with the client that has an editing request for the initial story draft, and performs real-time two-way transmission of information between the client and the server based on the established communication connection, thereby achieving real-time synchronization of information. After receiving the draft editing request for the initial story draft sent by the client, the server transmits the current version of the initial story draft of the server back to the client that sent the draft editing request through the communication connection.
[0101] By establishing a communication connection between the server and the client, real-time two-way transmission of data between the server and the client can be achieved, thereby achieving real-time synchronization of draft versions between the server and the client.
[0102] After establishing a communication connection between the server and at least two clients, the draft information to be responded to generated by the server can be sent to the client based on the established communication connection. That is, after obtaining the target story draft, the data processing method of the present application also includes:
[0103] The draft information to be responded to is transmitted to the at least two clients based on the communication connection.
[0104] Specifically, in order to achieve synchronization of the draft editing information in the server with the draft editing information of each client, after the server receives the draft editing information from the client and updates the server's draft based on the draft editing information, the pending response draft information obtained during the draft update process is synchronized to other clients through a communication connection, so that the client can make further modifications to the latest version of the draft.
[0105] By transmitting the draft information to be responded to to at least two clients via a communication connection, real-time transmission of the draft information to be responded to is achieved, thereby achieving an effect of multiple people editing the draft in real time.
[0106] The data processing method of the present application realizes processing of draft editing requests according to the order in which the draft editing requests are received; further editing of the initial story draft is realized by obtaining the draft information to be responded to in the draft editing request; by responding to the draft editing requests of the initial story draft from different clients in the order in the draft editing queue, and screening out the draft information with the same attributes in the draft information to be responded to from different clients, conflicts that occur when the draft is modified in real time are avoided, and efficient processing of the draft editing information sent by multiple people in real time is realized.
[0107] Figure 2 A flowchart of a data processing method applied to a client according to an embodiment of the present application is shown, which specifically includes the following steps:
[0108] Step 202: Receive the initial story draft sent by the server.
[0109] The request to edit the initial story draft received by the client is forwarded to the server. The server responds to the draft editing request and returns the server's current draft information, i.e., the initial story draft, to the client. The client receives the initial story draft sent by the server and saves it locally on the client. Subsequent users can edit the initial story draft received by the client.
[0110] In a specific implementation of the present application, the client includes storage spaces A, X, and Y as an example, wherein storage space A stores the draft data that has been synchronized between the client and the server, storage space X stores the draft data that has been submitted to the server but has not received a response from the server, and storage space Y stores the draft information that has been modified locally but not submitted to the server. Figure 3 As shown in a, Figure 3 This is a schematic diagram of client data storage provided in a specific embodiment of the present application. The client receives an initial story draft sent by a server and stores it in storage space A.
[0111] In practical applications, after receiving the initial story draft sent by the server, the method further includes:
[0112] The initial story draft is loaded into a storyboard draft editor.
[0113] The storyboard draft editor is a draft editor with storyboard function. You can plan and design the storyboard in the storyboard editor, and shoot the corresponding material resources based on the storyboard. Upload the initial story draft to the storyboard draft editor, and edit the initial story draft based on the designed storyboard structure in the scenes, shots and other structures of the draft contained in the draft editor.
[0114] By uploading the initial story draft to the storyboard draft editor, it is convenient to edit the initial story draft according to the storage structure of the draft in the storyboard.
[0115] Step 204: In response to the draft editing request, the initial story draft is edited to obtain information of the draft to be submitted.
[0116] The draft editing request refers to a request to edit the initial story draft; and the draft information to be submitted refers to the draft editing information generated during the editing process of the initial story draft.
[0117] A draft editing request is generated based on the user's modification of the initial story draft; the client receives the editing request for the initial story draft and edits the initial story draft; in the process of editing the initial story draft, draft editing information of the initial story draft, i.e., draft information to be submitted, is generated.
[0118] In a specific implementation of the present application, following the above example, the client receives a draft editing request for an initial story draft and edits the initial story draft; in the process of editing the initial story draft, the draft information data1 for editing the initial story draft is obtained, such as Figure 3 As shown in b, the draft information data1 to be submitted is stored in the storage space Y of the client.
[0119] By acquiring the draft information to be submitted obtained by editing the initial story draft based on the draft editing request, it is convenient to subsequently transmit the draft information to be submitted to the server, and the server handles conflicts among the draft information to be submitted received by multiple clients.
[0120] In practical applications, the specific method of editing the initial story draft and obtaining the draft information to be submitted includes:
[0121] Editing said initial story draft to obtain a draft to be submitted;
[0122] The difference information between the draft to be submitted and the initial story draft is calculated, and the difference information is determined as the draft to be submitted information.
[0123] The draft to be submitted refers to the draft obtained after editing the initial story draft; and the difference information refers to the different draft editing information between the draft to be submitted and the initial story draft.
[0124] Specifically, in response to the draft editing request, the initial story draft is edited to generate a draft to be submitted; the initial story draft and the draft to be submitted are obtained, and the difference information patch between the initial story draft and the draft to be submitted is calculated by a diff algorithm or other algorithms that can achieve the same effect.
[0125] Step 206: In response to the information submission request, submit the draft information to be submitted to the server to obtain the draft information to be responded to.
[0126] Based on the submission operation of the draft after editing, an information submission request is generated, and in response to the information submission request, the draft information to be submitted is uploaded to the server.
[0127] In a specific implementation of the present application, following the above example, an information submission request is received, and the information to be submitted is uploaded to the server. At this time, the server has not yet responded to the submission request, such as Figure 3 As shown in c, the draft information data1 to be submitted is merged from storage space Y to storage space X, and storage space Y is cleared.
[0128] In practical applications, the method for submitting the draft information to be submitted to the server includes:
[0129] Based on the communication connection between the server and the client, the draft information to be submitted is transmitted to the server.
[0130] The draft information to be submitted generated by the client can be synchronized to the server in real time through the communication connection.
[0131] Step 208: When receiving the response information returned by the server, determine that the draft information to be responded to is draft modification information.
[0132] After the server responds to the pending response draft information, it will return the response success information; after the pending response draft information responds successfully, the successfully responded pending response draft information will be used as the draft modification information.
[0133] In a specific implementation of the present application, following the above example, the response information to the draft information to be responded to is received from the server, and it is determined that the draft information to be responded to data1 is the draft modification information; Figure 3 As shown in d in FIG. 1 , the draft modification information is merged from storage space X to storage space A, and storage space X is cleared.
[0134] Step 210: Generate a client story draft based on the draft modification information and the initial story draft.
[0135] Among them, the client draft refers to the draft obtained by modifying the initial story draft.
[0136] After the client determines the draft modification information, the initial story draft is modified based on the determined draft modification information, and the client draft is obtained after the initial story draft is modified.
[0137] In actual applications, when the client is processing the initial data, the server can receive draft editing instructions sent by other clients, thereby modifying the initial story draft contained in the server. In this case, in order to enable the client to modify the latest version of the draft, it is necessary to edit the draft based on the draft editing instructions. The specific methods include:
[0138] Receiving the draft information to be responded to sent by the server;
[0139] The initial story draft is updated based on the draft information to be responded to.
[0140] Specifically, the draft information to be responded to is received from the server; and the initial story draft received by the client is updated based on the draft information to be responded to, so as to ensure the consistency of the draft versions in the client and the server.
[0141] In a specific implementation of the present application, following the above example, after the client receives the initial story draft, it receives the draft modification information serverdata of other clients sent by the server, such as Figure 3 As shown in e, the draft modification information serverdata is merged into storage space A.
[0142] The data processing method of the present application obtains the draft information to be submitted generated during the draft editing process, uploads the draft information to be submitted to the server, and synchronizes the client's draft editing information to the server, so that the server can process the submitted draft editing information and synchronize it to other clients, thereby realizing real-time collaborative editing of the draft by multiple people.
[0143] The following combination Figure 4a and Figure 4b , taking the application of the data processing method provided by the present application in the client 5 as an example, the data processing method is further described. Figure 4a A processing flow chart of a data processing method applied to a client 5 provided in an embodiment of the present application is shown. Figure 4b A processing flow diagram of a data processing method applied to a client 5 provided in an embodiment of the present application is shown, which specifically includes the following steps:
[0144] Step 402: Edit the initial story draft and obtain a draft to be submitted.
[0145] In a specific implementation of the present application, taking client 5 as an example, client 5 receives the initial story draft sent by the server and uploads it to the storyboard draft editor. The draft editing room G includes three clients {client 3, client 4, client 5} that have editing requests for the initial story draft. The user uses client 5 to edit the initial story draft in the storyboard editor, including modifying the draft structure, and obtains the edited initial story draft as the draft to be submitted. The main editor module synchronizes the modification of the draft structure of the initial story draft to the draft management module.
[0146] Step 404: Calculate the difference information between the initial story draft and the draft to be submitted.
[0147] In a specific implementation of the present application, following the above example, the draft management module includes an initial story draft and a draft to be submitted; the draft management module synchronizes the draft to be submitted to the Diff module, and uses the diff algorithm to calculate the difference information patch between the initial story draft and the draft to be submitted, that is, what editing operations can be performed on the initial story draft to obtain the draft to be submitted.
[0148] Step 406: Send the difference information to the synchronization management module.
[0149] In a specific implementation of the present application, following the above example, the difference information patch calculated using the diff algorithm is sent to the synchronization management module for synchronizing the current draft of the client 5 and is stored in the client as draft information to be responded to. Before a submission request is received, w is in a state to be submitted.
[0150] Step 408: Send the difference information to the server based on the communication connection.
[0151] In a specific implementation of the present application, following the above example, based on the communication connection established between the server and the client 5, the difference information is sent to the server, specifically, the difference information is encapsulated and sent to the server according to the http protocol.
[0152] Step 410: The server receives the difference information and distributes it to the corresponding draft editing room.
[0153] In a specific implementation of the present application, following the above example, the processing module in the server receives the difference information and distributes the received difference information to the draft editing room G corresponding to the difference information.
[0154] Step 412: Merge the received difference information to obtain merged edit information.
[0155] In a specific implementation of the present application, following the above example, the server will receive difference information sent by client 3, client 4 and client 5. If there is a conflict between the difference information, the Room management collaboration module will handle the conflict, that is, merge the single-threaded difference information. For example, if client 4 and client 5 make different modifications to the same attribute in the initial story draft, it is determined to be a conflict. At this time, the server processes the first submitted difference information, that is, the difference information submitted by client 5, and rejects the modification of the same attribute in the difference information of client 4, thereby obtaining merged editing information.
[0156] Step 414: Edit the initial revised story draft based on the merged editing information.
[0157] In a specific implementation of the present application, following the above example, after the server responds to the difference information submitted by client 5, it processes the initial story draft to obtain an initial modified story draft; the sub-coroutine further modifies the initial modified story draft based on the obtained merged editing information, thereby completing the response to the difference information submitted by client 5 and client 4.
[0158] Step 416: Return the merged information to the client based on the communication connection.
[0159] In a specific implementation of the present application, following the above example, the draft editing information submitted by the client 5 is returned as being successfully edited.
[0160] Step 418: Synchronize the merged edit information to other clients.
[0161] In a specific implementation of the present application, the above example is used to synchronize the merged editing information to client 3 and client 4 located in the same draft editing room as client 5.
[0162] The data processing method of the present embodiment is applied to the client 5. The draft is edited in the storyboard draft editor by storing the draft in the draft storage structure according to the scene and shot, so that the user can edit the draft logically. The real-time synchronization of the draft editing information is achieved by converting the draft storage structure into json format and handling the conflict of the draft editing information. The synchronous transmission of the draft editing information and the asynchronous synchronous transmission of the corresponding media resources are achieved by calculating the difference editing information in the draft before and after editing.
[0163] Corresponding to the above method embodiment, the present application also provides a data processing device embodiment, Figure 5 A schematic diagram of the structure of a data processing device applied to a server provided in one embodiment of the present application is shown.
[0164] like Figure 5 As shown, the device comprises:
[0165] An adding module 502 is configured to receive draft editing requests for an initial story draft sent by at least two clients, and add the draft editing request sent by each client to a draft editing queue;
[0166] The extraction module 504 is configured to extract a first draft editing request from the first client for the initial story draft from the draft editing queue, obtain first draft information to be responded to in the first draft editing request, and edit the initial story draft based on the first draft information to be responded to, to obtain an initial modified story draft;
[0167] A first generating module 506 is configured to extract a second draft editing request from a second client for the initial story draft from the draft editing queue, obtain second draft information to be responded to in the second draft editing request, and generate draft information to be responded to according to the first draft information to be responded to and the second draft information to be responded to;
[0168] The first editing module 508 is configured to edit the initial modified story draft based on the draft information to be responded to, to obtain a target story draft.
[0169] In a specific implementation of the present application, the adding module 502 is further configured as follows:
[0170] Determine a request time point for receiving a draft edit request for an initial story draft sent by a client;
[0171] Adding the draft editing request for the initial story draft from each client to the draft editing queue according to the request time point.
[0172] The first generating module 506 is further configured to:
[0173] The second draft information to be responded to is filtered based on a preset conflict strategy and the first draft information to be responded to, to obtain the draft information to be responded to.
[0174] The first generating module 506 is further configured to:
[0175] Determine the target attribute parameter in the second draft information to be responded to based on the preset conflict strategy and the first draft information to be responded to;
[0176] The draft information corresponding to the target attribute parameter in the second draft information to be responded is deleted to generate draft information to be responded.
[0177] The apparatus further comprises a establishing module configured to:
[0178] Establishing a communication connection with at least two clients;
[0179] The initial story draft is sent to the at least two clients based on the communication connection.
[0180] The device also includes a transmission module configured to:
[0181] The draft information to be responded to is transmitted to the at least two clients based on the communication connection.
[0182] The present application is applied to a data processing device of a server, including an adding module, receiving draft editing requests for an initial story draft sent by at least two clients, and adding the draft editing request sent by each client to a draft editing queue; an extracting module, extracting a first draft editing request for the initial story draft from the draft editing queue by a first client, and obtaining first draft information to be responded to in the first draft editing request, editing the initial story draft based on the first draft information to be responded to, and obtaining an initial modified story draft; a first generating module, extracting a second draft editing request for the initial story draft from the draft editing queue by a second client, and obtaining second draft information to be responded to in the second draft editing request, and generating draft information to be responded to according to the first draft information to be responded to and the second draft information to be responded to; a first editing module, editing the initial modified story draft based on the draft information to be responded to, and obtaining a target story draft.
[0183] The data processing device applied to the server of the present application realizes processing of draft editing requests according to the order in which the draft editing requests are received; further editing of the initial story draft is realized by obtaining the draft information to be responded to in the draft editing request; by responding to the draft editing requests of different clients for the initial story draft in the order in the draft editing queue, and screening the draft information with the same attributes in the draft information to be responded to of different clients, conflicts occurring when the draft is modified in real time are avoided, and efficient processing of the draft editing information sent by multiple people in real time is realized.
[0184] Corresponding to the above method embodiment, the present application also provides a data processing device embodiment, Figure 6 A schematic diagram of the structure of a data processing device applied to a client provided in one embodiment of the present application is shown.
[0185] like Figure 6 As shown, the device comprises:
[0186] The receiving module 602 is configured to receive the initial story draft sent by the server;
[0187] The second editing module 604 is configured to edit the initial story draft in response to the draft editing request and obtain the draft information to be submitted;
[0188] The submission module 606 is configured to submit the draft information to be submitted to the server in response to the information submission request, and obtain the draft information to be responded to;
[0189] The determination module 608 is configured to determine, upon receiving the response information returned by the server, that the draft information to be responded to is the draft modification information;
[0190] The second generating module 610 is configured to generate a client draft based on the draft modification information and the initial story draft.
[0191] In a specific implementation of the present application, the second editing module 604 is further configured as follows:
[0192] Editing said initial story draft to obtain a draft to be submitted;
[0193] The difference information between the draft to be submitted and the initial story draft is calculated, and the difference information is determined as the draft to be submitted information.
[0194] The submitting module 606 is further configured to:
[0195] Based on the communication connection between the server and the client, the draft information to be submitted is transmitted to the server.
[0196] The device also includes an updating module configured to:
[0197] Receiving the draft information to be responded to sent by the server;
[0198] The initial story draft is updated based on the draft information to be responded to.
[0199] The device also includes a loading module configured to:
[0200] The initial story draft is loaded into a storyboard draft editor.
[0201] The present application is applied to a data processing device on a client, including a receiving module, which receives an initial story draft sent by a server; a second editing module, which edits the initial story draft in response to a draft editing request and obtains draft information to be submitted; a submission module, which submits the draft information to be submitted to the server in response to an information submission request and obtains draft information to be responded to; a determination module, which determines that the draft information to be responded to is draft modification information upon receiving a response information returned by the server; and a second generation module, which generates a client draft based on the draft modification information and the initial story draft. The present application is applied to a data processing device on a client, which obtains the draft information to be submitted generated during the draft editing process, uploads the draft information to be submitted to the server, and synchronizes the client's draft editing information to the server, so that the server can process the submitted draft editing information and synchronize it to other clients, thereby realizing real-time collaboration among multiple people to edit the draft.
[0202] The above is a schematic scheme of a data processing device of this embodiment. It should be noted that the technical scheme of the data processing device and the technical scheme of the above data processing method belong to the same concept, and the details of the technical scheme of the data processing device that are not described in detail can be referred to the description of the technical scheme of the above data processing method.
[0203] Figure 7 The structure block diagram of a computing device 700 provided according to an embodiment of the present application is shown. The components of the computing device 700 include but are not limited to a memory 710 and a processor 720. The processor 720 is connected to the memory 710 via a bus 730, and the database 450 is used to store data.
[0204] The computing device 700 also includes an access device 740 that enables the computing device 700 to communicate via one or more networks 460. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 740 may include one or more of any type of network interface (e.g., a network interface card (NIC)) whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Wide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.
[0205] In one embodiment of the present application, the above components of the computing device 700 and Figure 7 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 7The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of the present application. Those skilled in the art may add or replace other components as needed.
[0206] The computing device 700 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. The computing device 700 may also be a mobile or stationary server.
[0207] When the processor 720 executes the computer instructions, the steps of the data processing method are implemented.
[0208] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above data processing method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above data processing method.
[0209] An embodiment of the present application further provides a computer-readable storage medium storing computer instructions, which implement the steps of the data processing method as described above when executed by a processor.
[0210] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above data processing method belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above data processing method.
[0211] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0212] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0213] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0214] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0215] The preferred embodiments of the present application disclosed above are only used to help explain the present application. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the present application. The present application selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can understand and use the present application well. The present application is only limited by the claims and their full scope and equivalents.
Claims
1. A data processing method, characterized in that: Applicable to servers, including: receiving draft editing requests for an initial story draft sent by at least two clients, and adding the draft editing request sent by each client to a draft editing queue; Extracting a first draft editing request of a first client for the initial story draft from the draft editing queue, obtaining first draft information to be responded to in the first draft editing request, and editing the initial story draft based on the first draft information to be responded to, to obtain an initial modified story draft; Extracting a second draft editing request from a second client for the initial story draft from the draft editing queue, obtaining second draft information to be responded to in the second draft editing request, and generating draft information to be responded to according to the first draft information to be responded to and the second draft information to be responded to; Edit the initial modified story draft based on the draft information to be responded to, and obtain a target story draft; The step of generating the draft information to be responded to according to the first draft information to be responded to and the second draft information to be responded to comprises: Filtering the second draft information to be responded to based on a preset conflict strategy and the first draft information to be responded to, to obtain the draft information to be responded to; The method of filtering the second draft information to be responded to based on the preset conflict strategy and the first draft information to be responded to to obtain the draft information to be responded to includes: Determine the target attribute parameter in the second draft information to be responded to based on the preset conflict strategy and the first draft information to be responded to; Deleting the draft information corresponding to the target attribute parameter in the second draft information to be responded to, and generating draft information to be responded to; The target attribute parameter refers to a parameter of an attribute that conflicts between the first draft information to be responded to and the second draft information to be responded to, and the draft information corresponding to the target attribute parameter refers to a parameter value corresponding to the target attribute parameter.
2. The data processing method according to claim 1, characterized in that: Receiving draft edit requests for an initial story draft from at least two clients, and adding the draft edit request sent by each client to a draft edit queue, including: Determine a request time point for receiving a draft edit request for an initial story draft sent by a client; Adding the draft editing request for the initial story draft from each client to the draft editing queue according to the request time point.
3. The data processing method according to claim 1, characterized in that: Before receiving the draft editing requests for the initial story draft sent by at least two clients, the method further includes: Establishing a communication connection with at least two clients; The initial story draft is sent to the at least two clients based on the communication connection.
4. The data processing method according to claim 3, characterized in that: After obtaining the target story draft, the method further includes: The draft information to be responded to is transmitted to the at least two clients based on the communication connection.
5. A data processing device, characterized in that: Applicable to servers, including: An adding module, configured to receive draft editing requests for an initial story draft sent by at least two clients, and add the draft editing request sent by each client to a draft editing queue; an extraction module configured to extract a first draft editing request from a first client for the initial story draft from the draft editing queue, obtain first draft information to be responded to in the first draft editing request, and edit the initial story draft based on the first draft information to be responded to, to obtain an initial modified story draft; A first generating module is configured to extract a second draft editing request from a second client for the initial story draft from the draft editing queue, obtain second draft information to be responded to in the second draft editing request, and generate draft information to be responded to according to the first draft information to be responded to and the second draft information to be responded to; A first editing module is configured to edit the initial modified story draft based on the draft information to be responded to, to obtain a target story draft; The step of generating the draft information to be responded to according to the first draft information to be responded to and the second draft information to be responded to comprises: Filtering the second draft information to be responded to based on a preset conflict strategy and the first draft information to be responded to, to obtain the draft information to be responded to; The method of filtering the second draft information to be responded to based on the preset conflict strategy and the first draft information to be responded to to obtain the draft information to be responded to includes: Determine the target attribute parameter in the second draft information to be responded to based on the preset conflict strategy and the first draft information to be responded to; Deleting the draft information corresponding to the target attribute parameter in the second draft information to be responded to, and generating draft information to be responded to; The target attribute parameter refers to a parameter of an attribute that conflicts between the first draft information to be responded to and the second draft information to be responded to, and the draft information corresponding to the target attribute parameter refers to a parameter value corresponding to the target attribute parameter.
6. A computing device comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, characterized in that: When the processor executes the computer instructions, the steps of the method according to any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium storing computer instructions, characterized in that: When the computer instructions are executed by a processor, the steps of the method described in any one of claims 1 to 4 are implemented.
8. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the steps of the method described in any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Method, device and system for online document edition
CN103914439A
Document collaborative editing method and device, computer device and storage medium
CN111914520A