Data Uploading Method, Device, Computer Equipment and Storage Medium
By detecting data update operations on the client and determining the target incremental data, the problems of wasted computer resources and poor user experience caused by full upload in the prior art are solved, efficient data upload and update are achieved, and user experience is improved.
Patent Information
- Application Number
- CN202111150393.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-29
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2041-09-29
AI Technical Summary
In the existing online editing technology, the user's edited content is uploaded to the server, resulting in wasted computer resources and poor user experience, especially in frequent uploads.
By detecting the user's data update operation, the target incremental data is determined, which contains location indication information and data update information. After detecting the data upload instruction, the target incremental data is uploaded to the server, so that the server updates the data to be edited based on the data.
It reduces the number of data uploads, improves the efficiency of data uploads, saves computer resources, avoids waste of duplicate content caused by full uploads, reduces browser lag, and improves user experience.
Smart Images

Figure CN113886408B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technologies, and in particular, to a data uploading method, apparatus, computer device, and storage medium. Background Art
[0002] With the rapid development of the Internet industry, users can upload and publish corresponding content through the Internet. For example, users can perform online creation on a website or a client and publish the created content online. However, in existing online editing technical solutions, when uploading the content edited by a user, it is usually necessary to upload the entire edited content to the server. However, the method of full - volume uploading is likely to waste computer resources, especially when the user frequently uploads the content he / she edits. When the amount of data for full - volume uploading is large, it may also cause the client to freeze, resulting in a poor user experience. Summary of the Invention
[0003] Embodiments of the present disclosure at least provide a data uploading method, apparatus, computer device, and storage medium.
[0004] In a first aspect, an embodiment of the present disclosure provides a data uploading method, which is applied to a client and includes: detecting a data update operation of a user on data to be edited; determining target incremental data based on operation information of the data update operation; the target incremental data includes position indication information for indicating a data update position in the data to be edited and data update information corresponding to the position indication information; in response to a data uploading instruction for the data to be edited after the data update operation is executed, uploading the target incremental data to a server, so that the server updates the data to be edited based on the target incremental data.
[0005] In an optional implementation, determining the target incremental data based on the operation information of the data update operation includes: determining an operation position of the data update operation in the data to be edited; determining a target character before the operation position in the data to be edited, and determining the position indication information based on the number of characters of the target character; and determining the data update information corresponding to the position indication information based on the operation type of the data update operation.
[0006] In an alternative embodiment, determining the position indication information based on the number of characters of the target character includes: determining the number of characters of the target character as the position indication information; and / or determining a first character and a second character in the target character, and determining the position indication information based on the number of characters between the first character and the second character, where the first character is the character in the data to be edited that is before the data update position corresponding to the update operation, and the second character is the marker character in the data to be edited that is before the first character.
[0007] In an alternative embodiment, the method further includes: obtaining version identification information of the data to be edited; uploading the version identification information to the server so that the server updates the data to be edited based on the target incremental data and the version identification information.
[0008] In an alternative embodiment, the method further includes: after determining the target incremental data based on the operation information of the data update operation, creating time identification information for the target incremental data, where the time identification information is used to indicate the operation time information of the data update operation; uploading the target incremental data to the server includes: transmitting the target incremental data carrying the time identification information to the server.
[0009] In an alternative embodiment, the method further includes: after determining the target incremental data based on the operation information of the data update operation, determining, in the incremental data to be transmitted, incremental data that matches the target incremental data, where the data update positions corresponding to the matching incremental data and the target incremental data are the same; summarizing the target incremental data and the matching incremental data according to the time identification information, and transmitting the summarized incremental data to the server.
[0010] In an alternative embodiment, detecting a data upload instruction for the data to be edited after performing the update operation includes at least one of the following: determining that the data upload instruction is detected when a storage instruction for the data to be edited after performing the data update operation is detected; and / or determining that the data upload instruction is detected after detecting that the data update operation has ended.
[0011] In an alternative embodiment, the method further includes: sending a data acquisition request for the uploaded data to be displayed to the server, where the version identification information of the uploaded data is carried in the data acquisition request; obtaining the uploaded data fed back by the server based on the data acquisition request.
[0012] Second aspect, embodiments of the present disclosure provide another data uploading method, which is applied to a server and includes: obtaining target incremental data of to-be-edited data uploaded by a client, where the target incremental data includes position indication information for indicating a data update position in the to-be-edited data and data update information corresponding to the position indication information; and updating the to-be-edited data based on the target incremental data.
[0013] In the embodiments of the present disclosure, the method of uploading the target incremental data obtained by the user's data update operation on the to-be-edited data to the server enables the server to update the to-be-edited data according to the target incremental data, improving the efficiency of data transmission, greatly reducing the waste of computer resources caused by the duplication of content between the to-be-edited data on the client and the to-be-edited data in the server during full-volume uploading, reducing the lag of the browser, and thus improving the user experience.
[0014] In an optional implementation manner, the updating the to-be-edited data based on the target incremental data includes: obtaining and loading uploaded data corresponding to the target incremental data; determining a data update position in the uploaded data based on the position indication information in the target incremental data; and performing a data update operation at the data update position in the uploaded data based on the data update information in the target incremental data.
[0015] In an optional implementation manner, the obtaining and loading the uploaded data corresponding to the target incremental data includes: obtaining version identification information corresponding to the target incremental data sent by the client; and searching for uploaded data matching the version identification information in a database and determining the matching uploaded data as the uploaded data corresponding to the target incremental data.
[0016] In an optional implementation manner, the updating the to-be-edited data based on the target incremental data includes: obtaining the target incremental data carrying time identification information sent by the client, where the time identification information is used to indicate operation time information for the client to perform a data update operation on the to-be-edited data; sorting the target incremental data according to the time identification information to obtain a target sorting sequence; and updating the to-be-edited data based on the target sorting sequence.
[0017] In an alternative embodiment, the method further includes: when receiving a data acquisition request sent by the client, determining the uploaded data that matches the version identification information carried in the data acquisition request; the data acquisition request is a request for displaying the uploaded data; and sending the uploaded data that matches the version identification information carried in the data acquisition request to the client for display.
[0018] In a third aspect, an embodiment of the present disclosure further provides a data uploading device, which is applied to a client and includes: a detection module, configured to detect a data update operation of a user on data to be edited; a determination module, configured to determine target incremental data based on the operation information of the data update operation; the target incremental data includes position indication information for indicating a data update position in the data to be edited and data update information corresponding to the position indication information; and an upload module, configured to, in response to a data upload instruction for the data to be edited after the data update operation is executed, upload the target incremental data to a server, so that the server updates the data to be edited based on the target incremental data.
[0019] In a fourth aspect, an embodiment of the present disclosure further provides another data uploading device, which is applied to a server and includes: an acquisition module, configured to acquire target incremental data of data to be edited uploaded by a client, the target incremental data includes position indication information for indicating a data update position in the data to be edited and data update information corresponding to the position indication information; and an update module, configured to update the data to be edited based on the target incremental data.
[0020] In a fifth aspect, an embodiment of the present disclosure further provides a computer device, including: a processor, a memory, and a bus, where the memory stores machine-readable instructions executable by the processor. When the computer device runs, the processor communicates with the memory through the bus. When the machine-readable instructions are executed by the processor, the steps in the first aspect, or any possible implementation manner in the first aspect are executed.
[0021] In a sixth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, the steps in the first aspect, or any possible implementation manner in the first aspect are executed.
[0022] Embodiments of the present disclosure provide a data upload method, apparatus, computer device, and storage medium. In the embodiments of the present disclosure, first, a data update operation of a user on data to be edited is detected, and then target incremental data is determined based on the operation information of the data update operation. After detecting a data upload instruction, the target incremental data is uploaded to a server so that the server updates the data to be edited based on the target incremental data. Compared with the prior art method of uploading all the data edited by a user on a client to the server in full volume, the embodiments of the present disclosure can reduce the amount of data uploaded by uploading the target incremental data including the position indication information indicating the data update position in the data to be edited and the data update information corresponding to the position indication information to the server, thereby improving the data upload efficiency. At the same time, computer resources can be saved, thus avoiding the serious problem of waste of computer resources caused by a large amount of duplicate content in the full-volume data upload method. At the same time, the lag of the browser can be reduced, thereby improving the user experience.
[0023] To make the above objects, features, and advantages of the present disclosure more obvious and understandable, the following specifically enumerates preferred embodiments and, in conjunction with the accompanying drawings, provides a detailed description as follows. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] To more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following briefly introduces the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of this specification. These drawings illustrate embodiments consistent with the present disclosure and, together with the specification, are used to explain the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate some embodiments of the present disclosure and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0025] Figure 1 Shows a flowchart of a data upload method provided by an embodiment of the present disclosure;
[0026] Figure 2 Shows a flowchart of another data upload method provided by an embodiment of the present disclosure;
[0027] Figure 3 Shows the process of a client requesting uploaded data with corresponding version identification information from a server in the data upload method provided by an embodiment of the present disclosure;
[0028] Figure 4 Shows a flowchart of another data upload method provided by an embodiment of the present disclosure;
[0029] Figure 5Shows a schematic diagram of a data upload device provided by an embodiment of the present disclosure;
[0030] Figure 6 Shows a schematic diagram of another data upload device provided by an embodiment of the present disclosure;
[0031] Figure 7 Shows a schematic diagram of a computer device provided by an embodiment of the present disclosure;
[0032] Figure 8 Shows a schematic diagram of another computer device provided by an embodiment of the present disclosure. Detailed implementation manners
[0033] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure. Apparently, the described embodiments are only some of the embodiments of the present disclosure, rather than all the embodiments. Components of the embodiments of the present disclosure described and illustrated herein usually can be arranged and designed in various different configurations. Therefore, the detailed description of the embodiments of the present disclosure provided in the accompanying drawings herein is not intended to limit the scope of the claimed present disclosure, but merely represents selected embodiments of the present disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of the present disclosure without creative efforts shall fall within the scope of protection of the present disclosure.
[0034] It should be noted that: Similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.
[0035] The term "and / or" in this article merely describes an association relationship and indicates that three relationships may exist. For example, A and / or B may represent: A exists alone, both A and B exist simultaneously, and B exists alone. In addition, the term "at least one" in this article means any one of a plurality or any combination of at least two of a plurality. For example, including at least one of A, B, and C may represent including any one or more elements selected from the set composed of A, B, and C.
[0036] It has been found through research that when uploading the content edited by a user, it is usually necessary to upload the edited content in full to the server. However, the full upload method is prone to wasting computer resources, especially when the user frequently uploads the content he / she edits. When the amount of data uploaded in full is large, it may also cause the client to freeze, resulting in a poor user experience.
[0037] Based on the above research, the present disclosure provides a data uploading method, apparatus, computer device, and storage medium. By uploading target incremental data including position indication information for indicating the data update position in the data to be edited and data update information corresponding to the position indication information to the server, the embodiments of the present disclosure can reduce the amount of data uploaded, thereby improving the data uploading efficiency. At the same time, computer resources can be saved, thus avoiding the serious problem of waste of computer resources caused by a large amount of duplicate content in the full-volume data uploading method. Moreover, the lag of the browser can be reduced, thereby improving the user experience.
[0038] To facilitate the understanding of this embodiment, first, a data uploading method disclosed in the embodiments of the present disclosure will be introduced in detail. The execution subject of the data uploading method provided by the embodiments of the present disclosure is generally a computer device with certain computing capabilities, which can support users to perform data editing and can realize data interaction with the server. In some possible implementation manners, the data uploading method can be implemented by a processor invoking computer-readable instructions stored in a memory.
[0039] See Figure 1 As shown in the figure, it is a flowchart of a data uploading method provided by the embodiments of the present disclosure. The method includes steps S101 to S105, where:
[0040] S101: Detect a data update operation of the user on the data to be edited.
[0041] In the embodiments of the present disclosure, the user can perform online editing on the data to be edited through a client indicating a data editing function. For example, the client can be a client for reading a certain novel. The creator (i.e., the user) can perform online creation (i.e., perform online editing on the data to be edited) through the online editing function of the client. Among them, the data to be edited can be a novel chapter created by the creator.
[0042] It should be understood that the above online creation of the data to be edited can be a data update operation on the data to be edited in the above client, where the data update operation can be operations such as data deletion, data modification, and data addition (or insertion) on the data to be edited.
[0043] Before performing step S101 to detect the data update operation of the user on the data to be edited, the data saved by the user in the client (i.e., the data to be edited) can be retrieved in response to the retrieval instruction of the user on the data to be edited.
[0044] In an alternative embodiment, the data to be edited can be retrieved from the local storage file of the client; alternatively, a data acquisition request can be sent to the server to request the data to be edited.
[0045] S103: Determine target incremental data based on the operation information of the data update operation; the target incremental data includes position indication information for indicating the data update position in the data to be edited and data update information corresponding to the position indication information.
[0046] In the embodiments of the present disclosure, after detecting a data update operation of the user on the data to be edited, the target incremental data corresponding to the data update operation can be determined.
[0047] Here, the operation information of the data update operation can include the operation position and / or the operation type. At this time, the target incremental data can be determined based on the operation position and / or the operation type.
[0048] In the embodiments of the present disclosure, the position indication information is used to indicate the data update position in the data to be edited. Among them, the position indication information can be represented by any of the following methods: the number of characters, the page number, paragraph, line number, etc. of the data update position in the data to be edited.
[0049] For example, the data update position in the data to be edited is the Nth character; for another example, the data update position in the data to be edited is the Pth character of the Kth line of the Lth paragraph on the Mth page.
[0050] Here, the data update information includes the data content updated at the data update position and the update type of the update operation performed by the user. For example, types such as data addition, data deletion, data modification, data replacement, etc.
[0051] S105: In response to a data upload instruction for the data to be edited after performing the data update operation, upload the target incremental data to the server, so that the server updates the data to be edited based on the target incremental data.
[0052] In the embodiments of the present disclosure, after detecting an upload instruction for the data to be edited after the user performs a data update operation, the target incremental data can be uploaded to the server. Here, the data upload instruction can be a storage instruction for the data to be edited after performing the data update operation.
[0053] In the embodiments of the present disclosure, by uploading the position indication information for indicating the data update position in the data to be edited and the target incremental data of the data update information corresponding to the position indication information to the server, the number of data uploads can be reduced, thereby improving the data upload efficiency. At the same time, computer resources can be saved, thus avoiding the serious problem of waste of computer resources caused by a large amount of duplicate content in the full data upload method. At the same time, the lag of the browser can be reduced, thereby improving the user experience.
[0054] In an alternative embodiment, step S103 of determining the target incremental data based on the operation information of the data update operation specifically includes the following process:
[0055] S1031, determine the operation position of the data update operation in the data to be edited.
[0056] In the embodiments of the present disclosure, this operation position is used to indicate the character in the data to be edited corresponding to this data update operation.
[0057] S1032, determine the target character in the data to be edited before the operation position, and determine the position indication information based on the number of characters of the target character;
[0058] S1033, determine the data update information corresponding to the position indication information based on the operation type of the data update operation.
[0059] In the embodiments of the present disclosure, after determining the operation position, the target character in the data to be edited before this operation position can be determined, and the number of characters of the target character can be counted, and then the above position indication information can be determined according to the number of characters of the target character.
[0060] For example, if the number of characters of the above target character is 36, the above position indication information can be determined as retain(36), where retain(36) is used to indicate moving the cursor 36 characters to the right. retain(36) can also be understood as the user performing a data update operation on the data to be edited at the position after moving the cursor 36 characters.
[0061] After determining the position indication information, the data update information corresponding to the position indication information can be determined. Specifically, in implementation, the data update information can be determined based on the operation type of the data update operation. The operation type can be: data addition, data modification, data deletion, data replacement, etc.
[0062] Specifically, if the operation type is data addition, then the data update information can be insert(str), where str is a string, and insert(str) means inserting the string str at the position indicated by the position indication information. If the string is "hello", then the data update information can be insert(hello), which means inserting the string "hello" at the position indicated by the position indication information.
[0063] After determining the position indication information and the data update information in the manner described above, the target incremental data can be determined based on the position indication information and the data update information. For example, they can be combined to obtain the target incremental data.
[0064] For example, if the above position indication information is retain(36) and the data update information is insert(hello), then the target incremental data can be expressed as: retain(36), insert(hello), which means the user inserts the string "hello" at the position after moving the cursor 36 characters.
[0065] If the operation type is data deletion, then the data update information can be delete(n), where n is a positive integer, which means deleting n characters after the current cursor position. If n is "7", then the data update information can be delete(7), which means deleting 7 characters at the position indicated by the position indication information.
[0066] After determining the position indication information and the data update information in the manner described above, the target incremental data can be determined based on the position indication information and the data update information. For example, they can be combined to obtain the target incremental data.
[0067] For example, if the above position indication information is retain(36) and the data update information is delete(7), then the target incremental data can be expressed as: retain(36), insert(hello), which means the user deletes 7 characters at the position after moving the cursor 36 characters.
[0068] From the above description, it can be seen that by determining the position indication information according to the number of characters of the target character before the operation position in the data to be edited and determining the data update information according to the operation type, the target incremental data can be reflected with less data volume, thereby reducing the amount of data uploaded, improving the efficiency of data upload, avoiding data loss caused by lag during data upload, and at the same time reducing the consumption of computer resources.
[0069] In an optional implementation manner, the above S1032, determining the position indication information based on the number of characters of the target character, specifically includes the following two methods:
[0070] Method 1: determining the number of the target characters as the position indication information.
[0071] In an embodiment of the present disclosure, the number of target characters can be counted through the character counting function of the client, and then the number of target characters can be determined as position indication information. For example, the position indication information can be retain(n1): n1 is a positive integer, which means that the user has performed a data update operation on the data to be edited after moving the cursor n1 characters.
[0072] For example, the position indication information may be retain(36), indicating that the user has performed a data update operation on the to-be-edited data after moving the cursor 36 characters.
[0073] Method 2: Determine a first character and a second character in the target character, and determine the position indication information based on the number of characters between the first character and the second character, wherein the first character is a character in the data to be edited that is located before the data update position corresponding to the update operation, and the second character is a marking character in the data to be edited that is located before the first character.
[0074] Here, the second character may be a mark character in the target characters, and the first character may be the first character before the data update position, that is, the last character in the target characters.
[0075] In the disclosed embodiment, the marking character may be the first character in the data to be edited. The marking character may also be an identifying character pre-set by the user in the data to be edited, for example, the first character of the Nth paragraph. The marking character may also be a character that is located before the first character in the data to be edited and is closest to the first character and is updated by the user.
[0076] In this case, when determining the above position indication information, the position indication information may be determined by the number of characters between the first character and the second character.
[0077] By using the above-described method of determining the position indication information, the method of determining the position indication information can be enriched to meet the user's more diverse needs. At the same time, the editing position of the user for the data to be edited can be accurately located on the basis of reducing the amount of data uploaded.
[0078] In an alternative embodiment, in step S105, a data upload instruction for the to-be-edited data after performing the update operation is detected, where the detection method of the upload instruction includes at least one of the following cases:
[0079] Case 1: When a storage instruction for the to-be-edited data after performing the data update operation is detected, it is determined that the data upload instruction is detected.
[0080] In the embodiments of the present disclosure, the storage instruction may be the following two types of storage instructions: active storage and passive storage.
[0081] Method 1: Active storage
[0082] In the embodiments of the present disclosure, after the user performs a data update operation on the to-be-edited data, the storage button in the client can be triggered by a click operation. After detecting the click operation on the storage button, it can be determined that the data upload instruction for the to-be-edited data after the update is detected.
[0083] Method 2: Passive storage
[0084] In an alternative embodiment, the storage instruction can also be set to be automatically triggered. Specifically, the trigger time of the storage instruction can be set, for example, triggered once every ten minutes. Among them, in the client, after detecting an open operation on the to-be-edited data, the trigger time of the storage instruction starts to be timed.
[0085] Case 2: After detecting that the data update operation is executed, it is determined that the data upload instruction is detected.
[0086] In this case, when it is detected that the user performs the next data update operation, it is determined that the current data update operation is executed, and at this time, it can be determined that the data upload instruction is detected.
[0087] Detecting that the data update operation is executed specifically includes at least one of the following:
[0088] When a logout instruction for the editing page of the to-be-edited data is detected by the user, it is determined that the data update operation is executed;
[0089] When it is detected that the data update operation of the user for a certain position ends, it is determined that the data update operation is executed;
[0090] When it is detected that the user opens a new editing page in the client, it is determined that the data update operation is executed.
[0091] As can be seen from the above description, by setting the trigger condition of the data upload instruction described above, flexible upload of target incremental data can be achieved, so as to meet the more diverse upload requirements of users, save the data edited by users to the greatest extent possible, and avoid data loss caused by users' incorrect operations.
[0092] In an optional embodiment, after determining the target incremental data based on the operation information of the data update operation, the following process may further be executed:
[0093] (1) Obtain the version identification information of the data to be edited.
[0094] (2) Upload the version identification information to the server so that the server updates the data to be edited based on the target incremental data and the version identification information.
[0095] In the embodiments of the present disclosure, as Figure 2 shown is the data transmission process between the terminal device and the server, wherein the terminal device is a device installed with a client that supports online editing of the data to be edited.
[0096] S201, determine the target incremental data according to the operation information of the data update operation;
[0097] S202, obtain the version identification information of the data to be edited;
[0098] S203, transmit the version identification information of the data to be edited to the server;
[0099] S204, the server determines the corresponding uploaded data according to the version identification information;
[0100] S205, the server updates the uploaded data;
[0101] S206, the server updates the version identification information of the uploaded data.
[0102] According to Figure 2 it can be known that after the client determines the above target incremental data, it can obtain the version identification information of the data to be edited, so as to determine the version identification information of the data to be edited. For example, the version identification information is n.
[0103] After determining the above version identification information of the data to be edited, the version identification information of the data to be edited can be transmitted to the server so that the server determines the corresponding uploaded data according to the version identification information and updates the uploaded data. After the server updates the uploaded data, it can update the version identification information of the uploaded data. For example, the version identification information is updated to n + 1.
[0104] In an embodiment of the present disclosure, after detecting an exit instruction for an editing page in a client, corresponding version identification information is created for the to-be-edited data after the update. It is also possible to create corresponding version identification information for the to-be-edited data after detecting an addition instruction from the user for the version identification information of the to-be-edited data. It is also possible to create corresponding version identification information for the to-be-edited data after detecting the end of a data update operation. The present disclosure does not specifically limit the method of adding version identification information.
[0105] As can be seen from the above description, by uploading the version identification information of the to-be-edited data to the server so that the server determines the version of the to-be-edited data corresponding to the target incremental data according to the version identification information, it is possible to update multiple versions of the to-be-edited data.
[0106] In an alternative embodiment, the method includes the following process:
[0107] (1) After determining the target incremental data based on the operation information of the data update operation, create time identification information for the target incremental data, where the time identification information is used to indicate the operation time information of the data update operation.
[0108] (2) Uploading the target incremental data to the server includes: transmitting the target incremental data carrying the time identification information to the server.
[0109] In an embodiment of the present disclosure, after determining the above target incremental data, it is also possible to obtain the creation time corresponding to the target incremental data, so as to obtain the time identification information of the target incremental data. For example, if the creation time corresponding to the target incremental data is 9:21 am on September 26, 2021, the time identification information of the target incremental data can be 21 / 09 / 26 09:21:00 am.
[0110] After detecting the above data upload instruction, the target incremental data and the time identification information corresponding to the target incremental data can be uploaded to the server. After that, the server can restore the target incremental data according to the time identification information to obtain the updated data.
[0111] As can be seen from the above description, by determining the corresponding creation time identification information according to the creation time of the target incremental data and transmitting the target incremental data carrying the time identification information to the server, it is possible to update the to-be-edited data according to the time identification information, thereby ensuring the accuracy of data update.
[0112] In an alternative embodiment, the method further includes the following process:
[0113] (1) After determining the target incremental data based on the operation information of the data update operation, determine the incremental data that matches the target incremental data in the incremental data to be transmitted, where the data update positions corresponding to the matching incremental data and the target incremental data are the same.
[0114] (2) Summarize the target incremental data and the matching incremental data according to the time identification information, and transmit the summarized incremental data to the server.
[0115] In the embodiment of the present disclosure, after determining the target incremental data and the time identification information of each target incremental data, it is possible to determine the incremental data in the incremental data to be transmitted that has the same data update position as the target incremental data A1, and then determine this incremental data as the incremental data that matches the target incremental data A1.
[0116] After determining the matching incremental data, the target incremental data and the matching incremental data can be sorted according to the time identification information of each incremental data, so as to realize the summarization of the target incremental data and the matching incremental data.
[0117] Specifically, during implementation, the editing time of each incremental data can be determined based on the time identification information, and then the target incremental data and the matching incremental data can be sorted according to the editing time, so as to obtain the summarized incremental data.
[0118] For example, if the target incremental data is retain(36), insert(hello), and the incremental data that matches the target incremental data in the incremental data to be transmitted is: retain(36), delete(4); and retain(36), insert(my). Among them, the time identification information corresponding to retain(36), insert(hello) is 21 / 09 / 26 09:00:00 AM; the time identification information corresponding to retain(36), delete(4) is 21 / 09 / 26 09:01:00 AM; the time identification information corresponding to retain(36), insert(my) is 21 / 09 / 26 09:02:00 AM.
[0119] At this time, the target incremental data and the matching incremental data can be sorted based on this time identification information, and the sorting result is shown as follows:
[0120] retain(36), insert(hello); retain(36), delete(4); retain(36), insert(my).
[0121] The above sorting result can be understood as the incremental data after summarization. After obtaining the incremental data after summarization, the server can perform a data update operation on the data update position indicated by retain(36) in chronological order, so as to obtain the data to be edited after update.
[0122] Since the user may repeatedly modify a position, therefore, by sorting and summarizing the incremental data according to the time identification information, and then updating and restoring the data to be edited according to the incremental data after summarization, the accuracy of the data to be edited after update and restoration can be guaranteed.
[0123] In an optional embodiment, the method further includes the following process:
[0124] (1) Send a data acquisition request for the uploaded data to be displayed to the server, where the version identification information of the uploaded data is carried in the data acquisition request.
[0125] (2) Acquire the uploaded data fed back by the server based on the data acquisition request.
[0126] In the embodiments of the present disclosure, the user can view the historical version information of the data he edits (i.e., the version identification information of the uploaded data) in the client. When wanting to restore the data to a certain version, the version identification information can be specified for data restoration.
[0127] In the real-time of the present disclosure, first, it is necessary to determine the version identification information of the uploaded data requested by the user to be displayed; then, check whether there is cached data of the version identification information (i.e., the uploaded data of the version identification information) in the local file of the client. If not, send a data acquisition request for the uploaded data to be displayed to the server; if so, directly acquire the uploaded data to be displayed from the local file.
[0128] After the client acquires the uploaded data requested to be displayed, it can also acquire the latest version identification information of the uploaded data at the current moment, and then create a new version identification information for the requested uploaded data according to the latest version identification information. For example, if the latest version identification information is n, then the new version identification information created for the requested uploaded data is n + 1.
[0129] In an optional embodiment, the above process can be described as the Figure 3 process shown below, which specifically includes the following steps:
[0130] S301, the client obtains the version identification information (i.e., version number) of the uploaded data requested by the user for viewing;
[0131] S302, the client sends a data acquisition request carrying the version identification information to the server;
[0132] S303, the server locates the corresponding uploaded data based on the version identification information;
[0133] S304, the server updates the version identification information of the uploaded data;
[0134] S304, the server returns the located uploaded data to the client for display.
[0135] In the embodiments of the present disclosure, when the client displays the received uploaded data, it can adjust the display mode according to user needs. For example, the user can choose to create a new display window in the client to display the uploaded data, or replace the data content of the data to be edited with the data content of the uploaded data in the current display window for the data to be edited. The present disclosure does not limit the specific display mode of the uploaded data.
[0136] As can be seen from the above description, in the embodiments of the present disclosure, a data acquisition request for the uploaded data can be sent to the server, so as to obtain the uploaded data, so that the user can flexibly obtain different versions of the uploaded data according to needs, improving the user experience.
[0137] See Figure 4 As shown in the flowchart of another data upload method provided by the embodiments of the present disclosure, the method includes steps S401 to S403, where:
[0138] S401: used to obtain the target incremental data of the data to be edited uploaded by the client, where the target incremental data contains position indication information for indicating the data update position in the data to be edited and data update information corresponding to the position indication information.
[0139] S403: update the data to be edited based on the target incremental data.
[0140] In the embodiments of the present disclosure, after the server obtains the target incremental data uploaded by the client, it can parse the target incremental data to obtain the position indication information of the data update position in the data to be edited and the data update information.
[0141] For example, if the data to be edited is the text "hello!", and the above target incremental data is retain(5), delete(1), insert(world!), then the data to be edited after updating the data to be edited according to the target incremental data is "hello world!". Among them, the target incremental data is used to represent that starting from the character 'h', after the user moves the cursor 5 characters to the right, one character '!' is deleted, and the string "world!" is added.
[0142] As can be seen from the above description, in the embodiments of the present disclosure, by uploading the target incremental data indicating the data update position in the data to be edited and the data update information corresponding to the position indication information to the server, the amount of data uploaded can be reduced, thereby improving the data upload efficiency. At the same time, computer resources can be saved, thus avoiding the serious problem of waste of computer resources caused by a large amount of duplicate content in the full-volume data upload method. At the same time, the lag of the browser can be reduced, thereby improving the user experience.
[0143] In the embodiments of the present disclosure, in S403, updating the data to be edited based on the target incremental data specifically includes the following processes:
[0144] S4031. Obtain and load the uploaded data corresponding to the target incremental data.
[0145] Here, the data to be edited obtained by the client is the uploaded data in the server.
[0146] S4032. Determine the data update position in the uploaded data based on the position indication information in the target incremental data.
[0147] S4033. Perform a data update operation at the data update position in the uploaded data based on the data update information in the target incremental data.
[0148] In the embodiments of the present disclosure, after determining the uploaded data corresponding to the target incremental data, the data update position can be determined in the uploaded data based on the target incremental data. For example, if the uploaded data is "hello!", and the target incremental data is retain(5), insert(world), then the data update position indicated by the target incremental data is retain(5), that is, the position after moving the cursor 5 characters to the right starting from the character 'h', that is, the position corresponding to the character 'o'. The data update information is insert(world). At this time, it can be understood that the string "world" is inserted after the character 'o'.
[0149] As can be seen from the above description, by updating the uploaded data based on the data update position and data update information indicated by the target incremental data, the amount of data transmission is reduced, thereby improving the efficiency of data transmission to achieve rapid update of the uploaded data.
[0150] In an alternative embodiment, step S4031, obtaining and loading the uploaded data corresponding to the target incremental data, specifically includes the following process:
[0151] (1) Obtaining the version identification information corresponding to the target incremental data sent by the client.
[0152] (2) Searching in the database for the uploaded data that matches the version identification information, and determining the matched uploaded data as the uploaded data corresponding to the target incremental data.
[0153] In the embodiments of the present disclosure, after the client determines the above target incremental data, it can obtain the version identification information of the data to be edited. For example, the version identification information is n.
[0154] After determining the version identification information of the data to be edited, the version identification information n of the data to be edited can be transmitted to the server. After the server obtains the version identification information, it can search in the database for the uploaded data that matches the version identification information, and determine the matched uploaded data as the uploaded data corresponding to the target incremental data.
[0155] As can be seen from the above description, by determining the version of the data to be edited corresponding to the target incremental data according to the version identification information, it is possible to update the data to be edited of multiple versions.
[0156] In an alternative embodiment, S403, updating the data to be edited based on the target incremental data, specifically further includes the following process:
[0157] (1) Obtaining the target incremental data carrying time identification information sent by the client, where the time identification information is used to indicate the operation time information for the client to perform a data update operation on the data to be edited.
[0158] (2) Sorting the target incremental data according to the time identification information to obtain a target sorting sequence; and updating the data to be edited based on the target sorting sequence.
[0159] In an embodiment of the present disclosure, after the client determines the above-mentioned target incremental data, it can also obtain the creation time corresponding to the target incremental data, so as to obtain the time identification information of the target incremental data. For example, if the creation time corresponding to the target incremental data is 9:21 am on September 26, 2021, the time identification information of the target incremental data can be 21 / 09 / 26 09:21:00 am.
[0160] After the client detects the above data upload instruction, it can upload the target incremental data and the time identification information corresponding to the target incremental data to the server. After that, the server can restore the target incremental data according to the time identification information, so as to obtain the updated data.
[0161] When the server restores the target incremental data according to the time identification information, it can sort the target incremental data according to the time identification information to obtain a target sorting sequence; and then update the data to be edited based on the target sorting sequence.
[0162] Suppose the target incremental data is retain(30), insert(hello); retain(32), delete(4); and retain(36), insert(my), where the time identification information corresponding to retain(30), insert(hello) is 21 / 09 / 26 09:00:00 am; the time identification information corresponding to retain(32), delete(4) is 21 / 09 / 26 09:01:00 am; the time identification information corresponding to retain(36), insert(my) is 21 / 09 / 26 09:02:00 am.
[0163] At this time, the target incremental data can be sorted based on the time identification information, and the sorting result is as follows:
[0164] retain(30), insert(hello); retain(32), delete(4); and retain(36), insert(my).
[0165] After obtaining the above sorting result, the server can update the data to be edited according to the sorting result.
[0166] As can be seen from the above description, through the above processing method, the data to be edited can be updated according to the time identification information, so as to ensure the accuracy of data update.
[0167] In an optional embodiment, the method further includes the following process:
[0168] (1) When receiving the data acquisition request sent by the client, determine the uploaded data that matches the version identification information carried in the data acquisition request; the data acquisition request is a request for displaying the uploaded data.
[0169] (2) Send the uploaded data that matches the version identification information carried in the data acquisition request to the client for display.
[0170] In the embodiment of the present disclosure, the client acquires the version identification information (i.e., version number) of the uploaded data requested by the user to view; the client sends a data acquisition request carrying the version identification information to the server; the server searches for the corresponding uploaded data based on the version identification information; the server updates the version identification information of the uploaded data; the server returns the found uploaded data to the client for display.
[0171] It can be seen from the above description that, in response to the version identification information sent by the user, the corresponding version of the uploaded data can be searched, and the determined uploaded data can be sent to the client, which can facilitate the user to flexibly obtain different versions of the uploaded data according to needs and improve the user experience.
[0172] Those skilled in the art can understand that in the above method of the specific implementation manner, the writing order of each step does not mean a strict execution order and does not constitute any limitation to the implementation process. The specific execution order of each step should be determined according to its function and possible internal logic.
[0173] Based on the same inventive concept, in the embodiment of the present disclosure, a data upload device corresponding to the data upload method is further provided. Since the principle of solving problems by the device in the embodiment of the present disclosure is similar to the above data upload method in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0174] Refer to Figure 5 As shown, it is a schematic diagram of a data upload device provided by an embodiment of the present disclosure. The device includes: a detection module 51, a determination module 52, and an upload module 53; wherein,
[0175] The detection module 51 is configured to detect a data update operation of the user on the data to be edited;
[0176] The determination module 52 is configured to determine target incremental data based on the operation information of the data update operation; the target incremental data includes position indication information for indicating the data update position in the data to be edited and data update information corresponding to the position indication information;
[0177] An upload module 53, configured to upload the target incremental data to a server in response to a data upload instruction for the to-be-edited data after the data update operation is performed, so that the server updates the to-be-edited data based on the target incremental data.
[0178] In an embodiment of the present disclosure, by uploading the target incremental data including the position indication information for indicating the data update position in the to-be-edited data and the data update information corresponding to the position indication information to the server, the quantity of data upload can be reduced, thereby improving the data upload efficiency. Meanwhile, computer resources can be saved, thus avoiding the serious problem of waste of computer resources caused by a large amount of duplicate content in the full-volume data upload method. At the same time, the lag of the browser can be reduced, thereby improving the user experience.
[0179] In a possible implementation manner, the determination module 52 is further configured to: determine the operation position of the data update operation in the to-be-edited data; determine the target character before the operation position in the to-be-edited data, and determine the position indication information based on the number of characters of the target character; and determine the data update information corresponding to the position indication information based on the operation type of the data update operation.
[0180] In a possible implementation manner, the determination module 52 is further configured to: determine the number of characters of the target character as the position indication information; and / or; determine a first character and a second character in the target character, and determine the position indication information based on the number of characters between the first character and the second character, where the first character is the character before the data update position corresponding to the update operation in the to-be-edited data, and the second character is the marker character before the first character in the to-be-edited data.
[0181] In a possible implementation manner, the apparatus is further configured to: obtain the version identification information of the to-be-edited data; upload the version identification information to the server, so that the server updates the to-be-edited data based on the target incremental data and the version identification information.
[0182] In a possible implementation manner, the determination module 52 is further configured to: create time identification information for the target incremental data after determining the target incremental data based on the operation information of the data update operation, where the time identification information is used to indicate the operation time information of the data update operation; the uploading the target incremental data to the server includes: transmitting the target incremental data carrying the time identification information to the server.
[0183] In a possible implementation, the determining module 52 is further configured to: after determining the target incremental data based on the operation information of the data update operation, determine the incremental data that matches the target incremental data in the incremental data to be transmitted, where the data update positions corresponding to the matching incremental data and the target incremental data are the same; summarize the target incremental data and the matching incremental data according to the time identification information, and transmit the summarized incremental data to the server.
[0184] In a possible implementation, the uploading module 53 detects a data upload instruction for the data to be edited after the update operation, including at least one of the following: determining that the data upload instruction is detected when detecting a storage instruction for the data to be edited after the data update operation; and / or determining that the data upload instruction is detected after detecting that the data update operation is completed.
[0185] In a possible implementation, the apparatus is further configured to: send a data acquisition request for the uploaded data to be displayed to the server, where the version identification information of the uploaded data is carried in the data acquisition request; and acquire the uploaded data fed back by the server based on the data acquisition request.
[0186] Refer to Figure 6 As shown, it is a schematic diagram of a data upload apparatus provided by an embodiment of the present disclosure. The apparatus includes: an acquisition module 61 and an update module 62; where
[0187] The acquisition module 61 is configured to acquire the target incremental data of the data to be edited uploaded by the client. The target incremental data includes position indication information for indicating the data update position in the data to be edited and data update information corresponding to the position indication information.
[0188] The update module 62 is configured to update the data to be edited based on the target incremental data.
[0189] In a possible implementation, the update module 62 is further configured to: acquire and load the uploaded data corresponding to the target incremental data; determine the data update position in the uploaded data based on the position indication information in the target incremental data; and perform a data update operation at the data update position in the uploaded data based on the data update information in the target incremental data.
[0190] In the embodiments of the present disclosure, by uploading the position indication information for indicating the data update position in the data to be edited and the target incremental data of the data update information corresponding to the position indication information to the server, the number of data uploads can be reduced, thereby improving the data upload efficiency. At the same time, computer resources can be saved, thus avoiding the serious problem of waste of computer resources caused by a large amount of duplicate content in the full data upload method. At the same time, the lag of the browser can also be reduced, thereby improving the user experience.
[0191] In a possible implementation manner, the update module 62 is further configured to: obtain the version identification information corresponding to the target incremental data sent by the client; search for the uploaded data that matches the version identification information in the database, and determine the matched uploaded data as the uploaded data corresponding to the target incremental data.
[0192] In a possible implementation manner, the update module 62 is further configured to: obtain the target incremental data carrying the time identification information sent by the client, where the time identification information is used to indicate the operation time information when the client performs a data update operation on the data to be edited; sort the target incremental data according to the time identification information to obtain a target sorting sequence; and update the data to be edited based on the target sorting sequence.
[0193] In a possible implementation manner, the device is further configured to: when receiving a data acquisition request sent by the client, determine the uploaded data that matches the version identification information carried in the data acquisition request; the data acquisition request is a request for displaying the uploaded data; and send the uploaded data that matches the version identification information carried in the data acquisition request to the client for display.
[0194] Corresponding to Figure 1 the data upload method in, the embodiments of the present disclosure further provide a computer device 700, as Figure 7 shown, which is a schematic structural diagram of the computer device 700 provided by the embodiments of the present disclosure, including:
[0195] A processor 71, a memory 72, and a bus 73; the memory 72 is used to store execution instructions, including an internal memory 721 and an external memory 722; here, the internal memory 721 is also called the main memory, which is used to temporarily store the operation data in the processor 71 and the data exchanged with the external memory 722 such as a hard disk. The processor 71 exchanges data with the external memory 722 through the internal memory 721. When the computer device 700 runs, the processor 71 communicates with the memory 72 through the bus 73, so that the processor 71 executes the following instructions:
[0196] Detect a data update operation of a user on data to be edited;
[0197] Determine target incremental data based on operation information of the data update operation; the target incremental data includes position indication information for indicating a data update position in the data to be edited and data update information corresponding to the position indication information;
[0198] In response to a data upload instruction for the data to be edited after performing the data update operation, upload the target incremental data to a server, so that the server updates the data to be edited based on the target incremental data.
[0199] Corresponding to Figure 1 in the data upload method, an embodiment of the present disclosure further provides another computer device 800, as Figure 8 shown, which is a schematic structural diagram of the computer device 800 provided by an embodiment of the present disclosure, including:
[0200] A processor 81, a memory 82, and a bus 83; the memory 82 is used to store execution instructions, including an internal memory 821 and an external memory 822; the internal memory 821 here is also called the main memory, which is used to temporarily store operation data in the processor 81 and data exchanged with the external memory 822 such as a hard disk. The processor 81 exchanges data with the external memory 822 through the internal memory 821. When the computer device 800 runs, the processor 81 communicates with the memory 82 through the bus 83, so that the processor 81 executes the following instructions:
[0201] Obtain target incremental data of data to be edited uploaded by a client, where the target incremental data includes position indication information for indicating a data update position in the data to be edited and data update information corresponding to the position indication information;
[0202] Update the data to be edited based on the target incremental data.
[0203] An embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, it executes the steps of the data upload method described in the above method embodiment. Among them, the storage medium may be a volatile or non-volatile computer-readable storage medium.
[0204] An embodiment of the present disclosure further provides a computer program product, which carries program code. The instructions included in the program code can be used to execute the steps of the data upload method described in the above method embodiment. For details, please refer to the above method embodiment and will not be elaborated here.
[0205] Among them, the above computer program product can be specifically implemented by means of hardware, software, or a combination thereof. In an alternative embodiment, the computer program product is specifically embodied as a computer storage medium. In another alternative embodiment, the computer program product is specifically embodied as a software product, such as a Software Development Kit (SDK), and so on.
[0206] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described system and device can refer to the corresponding processes in the foregoing method embodiments, which will not be elaborated herein. In several embodiments provided in the present disclosure, it should be understood that the disclosed system, device, and method can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation. For another example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some communication interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical, mechanical, or other form.
[0207] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place, or can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0208] In addition, in each embodiment of the present disclosure, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.
[0209] When the above-mentioned functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such an understanding, the technical solution of the present disclosure, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present disclosure. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.
[0210] Finally, it should be noted that the above-mentioned embodiments are only specific implementation manners of the present disclosure, used to illustrate the technical solutions of the present disclosure, rather than limiting them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: any person skilled in the art within the technical scope disclosed by the present disclosure can still modify the technical solutions recorded in the foregoing embodiments, or can easily think of changes, or perform equivalent replacements on some of the technical features; and these modifications, changes, or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should all be covered by the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.
Claims
1. A data upload method, characterized in that, applied to a client, including: detecting a data update operation of a user on data to be edited; determining target incremental data based on the operation information of the data update operation; the target incremental data includes position indication information for indicating the data update position in the data to be edited and data update information corresponding to the position indication information; in response to a data upload instruction for the data to be edited after the data update operation is executed, uploading the target incremental data to a server, so that the server updates the data to be edited based on the target incremental data; wherein, after determining the target incremental data based on the operation information of the data update operation, creating time identification information for the target incremental data, wherein the time identification information is used to indicate the operation time information of the data update operation; determining, in the incremental data to be transmitted, incremental data that matches the target incremental data, wherein the data update positions corresponding to the matching incremental data and the target incremental data are the same, and the number of the matching incremental data is greater than or equal to 1; summarizing the target incremental data and the matching incremental data according to the time identification information, and transmitting the summarized incremental data to the server; wherein, when the number of the matching incremental data is greater than 1, the summarizing the target incremental data and the matching incremental data according to the time identification information further includes: determining the editing time of each matching incremental data according to the time identification information; sorting the matching incremental data in chronological order according to the editing time of each matching incremental data, so that the server updates the data to be edited according to the matching incremental data in chronological order.
2. The method according to claim 1, characterized in that, the determining the target incremental data based on the operation information of the data update operation includes: determining the operation position of the data update operation in the data to be edited; determining target characters in the data to be edited before the operation position, and determining the position indication information based on the number of characters of the target characters determining the data update information corresponding to the position indication information based on the operation type of the data update operation.
3. The method according to claim 2, characterized in that, the determining the position indication information based on the number of characters of the target characters includes: determining the number of characters of the target characters as the position indication information; and / or determining a first character and a second character in the target characters, and determining the position indication information based on the number of characters between the first character and the second character, wherein the first character is a character in the data to be edited before the data update position corresponding to the update operation, and the second character is a marker character in the data to be edited before the first character.
4. The method according to claim 1, characterized in that, the method further includes: Obtain the version identification information of the data to be edited; Upload the version identification information to the server, so that the server updates the data to be edited based on the target incremental data and the version identification information.
5. The method according to claim 1, characterized in that, the method further includes: The uploading the target incremental data to the server includes: transmitting the target incremental data carrying the time identification information to the server.
6. The method according to claim 1, characterized in that, Detecting a data upload instruction for the data to be edited after performing the update operation includes at least one of the following: When detecting a storage instruction for the data to be edited after performing the data update operation, determining that the data upload instruction is detected; and / or After detecting that the data update operation is completed, determining that the data upload instruction is detected.
7. The method according to claim 1, characterized in that, the method further includes: Sending a data acquisition request for the uploaded data to be displayed to the server, where the data acquisition request carries the version identification information of the uploaded data; Obtain the uploaded data fed back by the server based on the data acquisition request.
8. A data upload method, characterized in that, applied to a server, includes: Obtain the target incremental data of the data to be edited uploaded by the client and the corresponding time identification information, where the target incremental data contains position indication information for indicating the data update position in the data to be edited and data update information corresponding to the position indication information; wherein, the time identification information is used to indicate the operation time information of the user's data update operation on the data to be edited; wherein, the method further includes: obtaining the summarized incremental data; wherein, the summarized incremental data is obtained by summarizing the target incremental data and the incremental data matching the target incremental data according to the time identification information, and the matching incremental data is determined from the incremental data to be transmitted to the server, wherein the data update positions corresponding to the matching incremental data and the target incremental data are the same, and the number of the matching incremental data is greater than or equal to 1; wherein, when the number of the matching incremental data is greater than 1, the summarization includes: determining the editing time of each matching incremental data according to the time identification information; sorting the matching incremental data in chronological order according to the editing time of each matching incremental data; Update the data to be edited based on the target incremental data; wherein, updating the data to be edited based on the target incremental data further includes: Updating the data to be edited according to the matching incremental data in chronological order.
9. The method according to claim 8, characterized in that, The updating the data to be edited based on the target incremental data includes: Obtain and load the uploaded data corresponding to the target incremental data; Determine a data update location in the uploaded data based on the location indication information in the target incremental data; Perform a data update operation at the data update location of the uploaded data based on the data update information in the target incremental data.
10. The method according to claim 9, wherein, the obtaining and loading the uploaded data corresponding to the target incremental data includes: obtaining the version identification information corresponding to the target incremental data sent by the client; searching in the database for the uploaded data that matches the version identification information, and determining the matched uploaded data as the uploaded data corresponding to the target incremental data.
11. The method according to claim 8, wherein, the updating the data to be edited based on the target incremental data includes: obtaining the target incremental data carrying time identification information sent by the client, wherein the time identification information is used to indicate the operation time information of the client for performing a data update operation on the data to be edited; sorting the target incremental data according to the time identification information to obtain a target sorting sequence; and updating the data to be edited based on the target sorting sequence.
12. The method according to claim 8, wherein, the method further includes: when receiving a data acquisition request sent by the client, determining the uploaded data that matches the version identification information carried in the data acquisition request; the data acquisition request is a request for displaying the uploaded data; sending the uploaded data that matches the version identification information carried in the data acquisition request to the client for display.
13. A data upload device, wherein, applied to a client, includes: a detection module for detecting a user's data update operation on the data to be edited; A determination module, configured to determine target incremental data based on operation information of the data update operation; the target incremental data includes position indication information for indicating a data update position in the data to be edited and data update information corresponding to the position indication information; the determination module is further configured to: determine an operation position of the data update operation in the data to be edited, determine target characters in the data to be edited that are before the operation position, and determine the position indication information based on the number of characters of the target characters; the determination module is further configured to, after determining the target incremental data based on the operation information of the data update operation, create time identification information for the target incremental data, where the time identification information is used to indicate operation time information of the data update operation; determine, in the incremental data to be transmitted, incremental data that matches the target incremental data, where the matching incremental data and the target incremental data have the same data update position, and the number of the matching incremental data is greater than or equal to 1; summarize the target incremental data and the matching incremental data according to the time identification information; an upload module, configured to, in response to a data upload instruction for the data to be edited after the data update operation is performed, upload the target incremental data to a server, so that the server updates the data to be edited based on the target incremental data; the upload module is further configured to transmit the summarized incremental data to the server; Wherein, when the number of the matching incremental data is greater than 1, the determination module is further configured to: Determine the editing time of each matching incremental data according to the time identification information; Sort the matching incremental data in chronological order according to the editing time of each matching incremental data, so that the server updates the data to be edited according to the matching incremental data in chronological order.
14. A data upload device Characterized in that Applied to a server, including: An acquisition module, configured to acquire target incremental data of data to be edited uploaded by a client and corresponding time identification information, where the target incremental data includes position indication information for indicating a data update position in the data to be edited and data update information corresponding to the position indication information; wherein, the time identification information is used to indicate operation time information of a data update operation by a user on the data to be edited; Wherein, the acquisition module is further configured to: acquire the summarized incremental data; Wherein, the summarized incremental data is obtained by summarizing the target incremental data and incremental data that matches the target incremental data according to the time identification information, and the matching incremental data is determined in the incremental data to be transmitted to the server, where the matching incremental data and the target incremental data have the same data update position, and the number of the matching incremental data is greater than or equal to 1; Wherein, when the number of the matched incremental data is greater than 1, the summarization includes: determining the editing time of each matched incremental data according to the time identification information; sorting the matched incremental data in chronological order according to the editing time of each matched incremental data; an update module, configured to update the data to be edited based on the target incremental data; Wherein, the update module is further configured to update the data to be edited according to the matched incremental data in chronological order.
15. A computer device, characterized in that it includes: a processor, a memory and a bus, the memory stores machine-readable instructions executable by the processor, when the computer device runs, the processor communicates with the memory through the bus, and when the machine-readable instructions are executed by the processor, the steps of the data uploading method according to any one of claims 1 to 12 are executed.
16. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is run by a processor, the steps of the data uploading method according to any one of claims 1 to 12 are executed.
Citation Information
Patent Citations
Method and device for updating application
CN106095455A
Data increment synchronization method and device, electronic device and storage medium
CN108683718A