Data processing method and system based on multiple clients
By building a directional acyclic graph to analyze user-side data modification in multi-user-side scenarios, the data loss problem caused by data conflicts in cloud synchronization technology is solved, and the accurate modification and storage of cloud data is achieved, and the user experience is improved.
Patent Information
- Application Number
- CN202410429489.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-10
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-04-10
AI Technical Summary
Existing cloud synchronization technology is prone to data conflicts in multiple user scenarios, resulting in data loss and cannot effectively ensure the accuracy and compatibility of cloud data.
When a modification operation is detected in a multi-user-end scenario, the intermediate data information of each user side is obtained, the directed acyclic graph is constructed according to the version number, the graph structure is analyzed to determine the target intermediate data information, and compared it with the original data information, obtain the data modification information, and finally update the original data information to generate the target data information.
It realizes accurate modification and storage of cloud data in multi-user scenarios, improves the accuracy and compatibility of cloud data, and thus improves the user experience.
Smart Images

Figure CN118283055B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data synchronization, and in particular to a data processing method and system based on multiple user terminals. Background Art
[0002] With the development of cloud synchronization technology, the need to record information through cloud documents is becoming more and more common. Users can view and modify the data recorded in cloud documents at any time through multiple user terminals. However, existing cloud synchronization technology usually uses the version number or timestamp of the cloud document as the latest version of the cloud document. When multiple users modify the cloud document through different user terminals, conflicts will occur between the modification operations of different user terminals. Usually, only the modification results of one user terminal can be recorded, resulting in data loss. Summary of the invention
[0003] The main purpose of this application is to provide a multi-client based data processing method and system, aiming to improve the accuracy of cloud data.
[0004] In a first aspect, the present application provides a data processing method based on multiple clients, the data processing method based on multiple clients comprising the following steps:
[0005] In the case where at least two first user terminals simultaneously open the original data information, if it is detected that the first user terminals perform a modification operation on the original data information, obtaining at least one intermediate data information obtained by each of the first user terminals performing the modification operation on the original data information;
[0006] Determining a directed acyclic graph formed by each of the intermediate data information according to the version number corresponding to each of the intermediate data information;
[0007] Analyzing the directed acyclic graph, and determining target intermediate data information corresponding to each of the first user terminals from the intermediate data information according to the analysis result of the analysis;
[0008] Respectively comparing each of the target intermediate data information with the original data information to obtain data modification information corresponding to each of the target intermediate data information;
[0009] The original data information is updated according to the data modification information to obtain target data information corresponding to the original data information.
[0010] In a second aspect, the present application also provides a multi-user terminal-based data processing system, the multi-user terminal-based data processing system comprising: at least two first user terminals and a data processing server, the data processing server being used to execute the multi-user terminal-based data processing method as described in any one of the embodiments of the present application.
[0011] The present application provides a data processing method and system based on multiple clients. In the case where at least two first clients open the original data information at the same time, if it is detected that the first client performs a modification operation on the original data information, at least one intermediate data information obtained by each first client performing a modification operation on the original data information is obtained; according to the version number corresponding to each intermediate data information, a directed acyclic graph formed by each intermediate data information is determined; the directed acyclic graph is analyzed, and according to the analysis result of the analysis, the target intermediate data information corresponding to each first client is determined from the intermediate data information; each target intermediate data information is compared with the original data information to obtain the data modification information corresponding to each target intermediate data information; the original data information is updated according to the data modification information to obtain the target data information corresponding to the original data information. The modification and storage of cloud data in the multi-client scenario is realized, and the accuracy and compatibility of cloud data are improved, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0013] Figure 1 A flowchart of a data processing method based on multiple clients provided in one embodiment of the present application;
[0014] Figure 2 A schematic diagram of the structure of a multi-client based data processing system provided in one embodiment of the present application. DETAILED DESCRIPTION
[0015] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0016] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0017] The embodiments of the present application provide a data processing method and system based on multiple clients.
[0018] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0019] Please refer to Figure 1 , Figure 1 A flowchart of a multi-client-based data processing method provided for an embodiment of the present application. The multi-client-based data processing method can be used in a terminal or a server, wherein the terminal can be an electronic device such as a mobile phone, a tablet computer, a laptop computer, a desktop computer, a personal digital assistant, and a wearable device; the server can be an independent server, or a server cluster, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0020] like Figure 1 As shown, the multi-client based data processing method includes steps S101 to S105.
[0021] Step S101: when at least two first user terminals simultaneously open original data information, if it is detected that the first user terminals perform a modification operation on the original data information, at least one intermediate data information obtained by each of the first user terminals performing the modification operation on the original data information is obtained.
[0022] In the related art, a user can open original data information through multiple user terminals respectively, and modify the original data information through multiple user terminals, where the original data information may be a cloud document, etc. For example, if the original data information is opened on multiple user terminals at the same time, and multiple users modify the original data information on different user terminals respectively, conflicts may arise between the modification operations of the multiple user terminals, and usually only the modification result of one of the first user terminals can be saved, resulting in data loss of the cloud document.
[0023] In the data processing method based on multiple user terminals provided in an embodiment of the present application, in order to ensure the accuracy of the data, when it is detected that multiple first user terminals perform modification operations on the original data information, intermediate data information obtained by the multiple first user terminals performing modification operations on the original data information are obtained respectively.
[0024] Step S102: Determine a directed acyclic graph formed by each piece of intermediate data information according to the version number corresponding to each piece of intermediate data information.
[0025] Exemplarily, during the process of each first user terminal performing a modification operation on the original data information, different versions of the intermediate data information can usually be obtained at different times, and each version of the intermediate data information is distinguished by a version number.
[0026] For example, after the first user terminal A performs a modification operation on the original data information to obtain intermediate data information A, the modification operation is continued on the intermediate data information A to obtain intermediate data information B, and so on. In order to better represent the transformation relationship between different versions of intermediate data information, the intermediate data information of each version is further arranged according to the relationship between the version numbers to obtain a directed acyclic graph.
[0027] In some embodiments, if it is detected that the first user terminal performs a modification operation on the original data information, at least one intermediate data information obtained by each first user terminal performing the modification operation on the original data information is obtained, including: if it is detected that the first user terminal performs a modification operation on the original data information, the original data information after performing the modification operation is saved as intermediate data information at every preset time interval, and the version number of the intermediate data information is determined, and the version number includes the modification time of the intermediate data information and the first user terminal identifier.
[0028] Exemplarily, in order to improve the identification function and interpretability of the version number, the version number of the intermediate data information can be determined according to the modification time and the first user terminal identifier of the corresponding first user terminal. For example, a modification time field for indicating the modification time and an identification field for indicating the first user terminal identifier are preset in the version number, the time when the modification operation is performed in the system is converted into hexadecimal as the modification time field, and the IP address of the first user terminal identifier that performs the modification operation is used as the identification field to obtain the version number of the intermediate data information.
[0029] In some embodiments, the directed acyclic graph formed by each intermediate data information is determined based on the version number corresponding to each intermediate data information, including: determining the intermediate data information corresponding to the same first user terminal identifier as a group of branch paths in the directed acyclic graph; determining the arrangement order of the intermediate data information in the branch path based on the corresponding modification time of the intermediate data information belonging to the same branch path, to obtain the directed acyclic graph.
[0030] Exemplarily, when determining a directed acyclic graph, the intermediate data information from the same first user terminal is determined as a branch path in the directed acyclic graph. For example, if the intermediate data information A and the intermediate data information B are both from the first user terminal A, then the intermediate data information A and the intermediate data information B belong to the same branch path in the directed acyclic graph.
[0031] Exemplarily, the arrangement order of each intermediate data information of the same branch path is determined according to the modification time indicated by the version number of the intermediate data information. For example, if intermediate data information B is obtained by performing a modification operation on intermediate data information A, then the modification time of intermediate data information B is later than that of intermediate data information A, and the arrangement order of intermediate data information B is after intermediate data information A. Therefore, the branch path corresponding to the first user terminal A includes at least: intermediate data information A→intermediate data information B.
[0032] Step S103: Analyze the directed acyclic graph, and determine target intermediate data information corresponding to each of the first user terminals from the intermediate data information according to the analysis result.
[0033] Exemplarily, after obtaining the directed acyclic graph formed by the intermediate data information in step S102, the target intermediate data information corresponding to each first user terminal is determined from each intermediate data information according to the directed acyclic graph, so as to determine the modification results obtained by each first user terminal performing the modification operation on the original data information.
[0034] In some embodiments, the directed acyclic graph is analyzed, and the target intermediate data information corresponding to each of the first user terminals is determined from the intermediate data information according to the analysis results, including: traversing each branch path corresponding to the directed acyclic graph to obtain the path vertices of each branch path; and determining the intermediate data information corresponding to each of the path vertices as the target intermediate data information of the first user terminal corresponding to the branch path.
[0035] Exemplarily, the path vertex is the node at the end of each branch path in the directed acyclic graph. Other nodes cannot be reached through the path vertex. Therefore, the intermediate data information corresponding to the path vertex of the branch path of the first user terminal is the target intermediate data information corresponding to the first user terminal.
[0036] Exemplarily, the branch paths of each first user terminal are traversed, and when a vertex that cannot be traversed further is reached, the node is determined as the path vertex of the branch path.
[0037] Step S104: Compare each of the target intermediate data information with the original data information to obtain data modification information corresponding to each of the target intermediate data information.
[0038] Exemplarily, after the target intermediate data information is determined in step S103, data modification information of each target intermediate data information relative to the original data information is determined, that is, the modification made by each user of the first user terminal to the original data information.
[0039] In some embodiments, the data modification information includes: an operation object and an operation type; respectively comparing each of the target intermediate data information with the original data information to obtain the data modification information corresponding to each of the target intermediate data information includes: comparing the target intermediate data information with the original data information to obtain the operation object and operation type corresponding to the target intermediate data information, and the operation types include: an insertion operation, a deletion operation, and a format modification operation.
[0040] Exemplarily, each target intermediate data information is compared with the original data information to obtain data modification information, where the data modification information includes an operation object and an operation type, wherein the operation type includes an insert operation, a delete operation, and a format modification operation.
[0041] Exemplarily, the operation object is used to indicate the location and content of the data modification operation. For example, if the operation type is an insert operation, the operation object is used to indicate the location and content of the information inserted by the user; if the operation type is a delete operation, the operation object is used to indicate the location and content of the information deleted by the user; if the operation type is a format modification operation, the operation object is used to indicate the location and target format of the format modified by the user.
[0042] Step S105: Update the original data information according to the data modification information to obtain target data information corresponding to the original data information.
[0043] Exemplarily, the original data information is updated according to the data modification information, and the modifications of each target intermediate data information with respect to the original data information are integrated into the original data information to obtain the target data information.
[0044] In some embodiments, updating the original data information according to the data modification information to obtain target data information corresponding to the original data information includes: obtaining data modification information whose operation type is an insert operation, and inserting the operation object into the original data information according to the data modification information; obtaining data modification information whose operation type is a delete operation, and deleting the operation object in the original data information according to the data modification information; obtaining data modification information whose operation type is a format modification operation, and modifying the format of the operation object in the original data information according to the data modification information.
[0045] Exemplarily, based on the operation type corresponding to the data modification information, different operations are performed according to the operation object based on the original data information, such as inserting the content indicated by the operation object, deleting the content indicated by the operation object, or formatting the content indicated by the operation object.
[0046] In some embodiments, the method also includes: when there are at least two first user terminals opening the original data information at the same time and the first user terminals perform modification operations on the original data information, if a viewing request for the original data information by a second user terminal is detected, obtaining at least one current target intermediate data information; and according to the selection operation of the second user terminal on the target intermediate data information, displaying the target intermediate data information selected by the second user terminal to the user.
[0047] Exemplarily, if a second user terminal requests to view the original data information during the process of multiple first user terminals viewing and modifying the original data information, the target intermediate data information corresponding to each first user terminal in the current situation can be obtained, and the current target intermediate data information can be displayed to the user of the second user terminal, so that the user of the second user terminal can choose which target intermediate data information he wants to open, so that the user can selectively choose the data information he wants to view while other users are modifying the data, thereby improving the flexibility of data processing.
[0048] In some implementations, after determining the target intermediate data information corresponding to each of the first user terminals from the intermediate data information according to the analysis result, the method further includes:
[0049] Acquire multiple first data slices of the target intermediate data information, wherein the data slices are obtained by segmenting the target intermediate data information by the first user data terminal based on a preset segmentation order; acquire second data slices of the target intermediate data information, wherein the second data slices include encrypted segmentation order information, and the segmentation order information is used to indicate the preset segmentation order; decrypt the second data slices based on the public key sent to the first user terminal and the private key sent by the first user terminal to obtain the segmentation order information; and reconstruct the first data slices according to the segmentation order information to obtain the target intermediate data information.
[0050] In the data processing method based on multiple users provided in the embodiment of the present application, the target intermediate data information needs to be sent multiple times, for example, so that the server can integrate multiple target intermediate data information. In order to avoid data leakage and security risks caused by sending the target intermediate data information, the data processing method provided in the embodiment of the present application sends the target intermediate data in pieces, so that a third party cannot steal all the data of the target intermediate data information at one time.
[0051] Exemplarily, in order to prevent a third party from stealing all data slices of the target intermediate data information and thereby reconstructing the target intermediate data information, the data processing method provided in the embodiment of the present application will disrupt the order of the data slices during the process of sending the data slices. Specifically, the target intermediate data information is divided into a plurality of first data slices, the order of the first data slices is changed to send the first data slices, and the original order of the first data slices is recorded in the second data slices. After receiving all the first data slices and the second data slices, the first data slices are arranged according to the order recorded in the second data slices, thereby reconstructing the target intermediate data information.
[0052] Exemplarily, in order to improve the data security level, the first client encrypts the second data slice using the public key acquired in advance and the private key generated by itself, wherein the public key is generated by the data processing server and sent to each first client. In the process of sending the first data slice and the second data slice, the first client sends the generated private key to the data processing server, so that the data processing server decrypts the second data slice using the public key stored by itself and the private key sent by the first client.
[0053] In this case, even if a third party steals all the first data fragments, it cannot reassemble the first data fragments; even if it steals the second data fragments, it cannot decrypt the sequence information recorded in the second data fragments, thereby improving the security of the data processing method based on multiple users.
[0054] In some embodiments, the reconstructing the first data slices according to the segmentation order information to obtain the target intermediate data information includes: determining the arrangement order of each of the first data slices according to the segmentation data information; arranging the first data slices based on a preset arrangement direction according to the arrangement order to obtain data information to be read; reading the data information to be read based on a preset reading direction to obtain the target intermediate data information, wherein the preset reading direction is different from the preset arrangement direction.
[0055] Exemplarily, the reading order of the target intermediate data information is different from the segmentation order, so when the target intermediate data information is arranged, it is necessary to arrange it based on an order different from the reading order.
[0056] For example, if the preset reading direction of the target intermediate data information is horizontal, the segmentation direction of the target intermediate data is vertical. When reconstructing the target intermediate data information, the first data segments are arranged based on a preset arrangement direction different from the preset reading direction.
[0057] The data processing method and system based on multiple users provided in the embodiment of the present application, when there are at least two first users opening the original data information at the same time, if it is detected that the first user terminal performs a modification operation on the original data information, at least one intermediate data information obtained by each first user terminal performing the modification operation on the original data information is obtained; according to the version number corresponding to each intermediate data information, the directed acyclic graph formed by each intermediate data information is determined; the directed acyclic graph is analyzed, and according to the analysis result of the analysis, the target intermediate data information corresponding to each first user terminal is determined from the intermediate data information; each target intermediate data information is compared with the original data information to obtain the data modification information corresponding to each target intermediate data information; the original data information is updated according to the data modification information to obtain the target data information corresponding to the original data information. The modification and storage of cloud data in the multi-user scenario is realized, the accuracy and compatibility of cloud data are improved, and thus the user experience is improved.
[0058] See also Figure 2 , Figure 2 A schematic diagram of the structure of a multi-client based data processing system provided in one embodiment of the present application.
[0059] like Figure 2 As shown, the multi-client-based data processing system 100 includes: at least two first clients 110 and a data processing server 120. The data processing server 120 includes:
[0060] The data operation module 121 is used for, when at least two first user terminals open the original data information at the same time, if it is detected that the first user terminals perform a modification operation on the original data information, obtaining at least one intermediate data information obtained by each of the first user terminals performing the modification operation on the original data information;
[0061] A directed acyclic graph generating module 122, configured to determine a directed acyclic graph formed by each of the intermediate data information according to a version number corresponding to each of the intermediate data information;
[0062] A directed acyclic graph analysis module 123, configured to analyze the directed acyclic graph, and determine target intermediate data information corresponding to each of the first user terminals from the intermediate data information according to the analysis result of the analysis;
[0063] The data comparison module 124 is used to compare each of the target intermediate data information with the original data information to obtain the data modification information corresponding to each of the target intermediate data information;
[0064] The data updating module 125 is used to update the original data information according to the data modification information to obtain the target data information corresponding to the original data information.
[0065] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0066] It should also be understood that the term "and / or" used in the specification of this application and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.
[0067] The serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments. The above description is only a specific implementation mode of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A data processing method based on multiple clients, characterized in that: The method comprises: In the case where at least two first user terminals simultaneously open the original data information, if it is detected that the first user terminals perform a modification operation on the original data information, obtaining at least one intermediate data information obtained by each of the first user terminals performing the modification operation on the original data information; Determining a directed acyclic graph formed by each of the intermediate data information according to the version number corresponding to each of the intermediate data information; Analyzing the directed acyclic graph, and determining target intermediate data information corresponding to each of the first user terminals from the intermediate data information according to the analysis result of the analysis; Comparing each of the target intermediate data information with the original data information respectively to obtain data modification information corresponding to each of the target intermediate data information; The original data information is updated according to the data modification information to obtain target data information corresponding to the original data information; If it is detected that the first user terminal performs a modification operation on the original data information, obtaining at least one intermediate data information obtained by each first user terminal performing a modification operation on the original data information includes: If it is detected that the first user terminal performs a modification operation on the original data information, the original data information after the modification operation is performed is saved as intermediate data information at a preset time interval, and a version number of the intermediate data information is determined, where the version number includes the modification time of the intermediate data information and the first user terminal identifier; Determining the directed acyclic graph formed by each piece of intermediate data information according to the version number corresponding to each piece of intermediate data information includes: Determine the intermediate data information corresponding to the same first user terminal identifier as a group of branch paths in the directed acyclic graph; Determine the arrangement order of the intermediate data information in the branch path according to the corresponding modification time of the intermediate data information belonging to the same branch path, and obtain the directed acyclic graph; The step of analyzing the directed acyclic graph and determining target intermediate data information corresponding to each of the first user terminals from the intermediate data information according to the analysis result of the analysis includes: Traversing each branch path corresponding to the directed acyclic graph to obtain a path vertex of each branch path, wherein the path vertex is the node at the end of each branch path in the directed acyclic graph, and other nodes cannot be reached through the path vertex; Determine the intermediate data information corresponding to each of the path vertices as the target intermediate data information of the first user end corresponding to the branch path; The method further comprises: In the case where at least two first user terminals simultaneously open the original data information and the first user terminals perform a modification operation on the original data information, if a viewing request for the original data information from a second user terminal is detected, obtaining at least one current target intermediate data information; According to the selection operation of the second user terminal on the target intermediate data information, the target intermediate data information selected by the second user terminal is displayed to the user.
2. The multi-client based data processing method according to claim 1, characterized in that: The data modification information includes: an operation object and an operation type; and the data modification information corresponding to each of the target intermediate data information is obtained by comparing each of the target intermediate data information with the original data information, including: The target intermediate data information is compared with the original data information to obtain an operation object and an operation type corresponding to the target intermediate data information, wherein the operation type includes: an insert operation, a delete operation, and a format modification operation.
3. The multi-client based data processing method according to claim 2, characterized in that: The updating of the original data information according to the data modification information to obtain the target data information corresponding to the original data information includes: Acquire data modification information of an insert operation type, and insert the operation object into the original data information according to the data modification information; Acquire data modification information whose operation type is a deletion operation, and delete the operation object in the original data information according to the data modification information; The data modification information of the operation type being a format modification operation is obtained, and the format of the operation object is modified in the original data information according to the data modification information.
4. The multi-client based data processing method according to any one of claims 1 to 3, characterized in that: After determining the target intermediate data information corresponding to each of the first user terminals from the intermediate data information according to the analysis result of the analysis, the method further includes: Acquire a plurality of first data slices of the target intermediate data information, wherein the data slices are obtained by the first user data end segmenting the target intermediate data information based on a preset segmentation order; Acquire a second data fragment of the target intermediate data information, wherein the second data fragment includes encrypted fragmentation sequence information, and the fragmentation sequence information is used to indicate the preset fragmentation sequence; Decrypting the second data segment based on the public key sent to the first client and the private key sent by the first client to obtain the segmentation sequence information; The first data slices are reconstructed according to the segmentation sequence information to obtain the target intermediate data information.
5. The multi-client based data processing method according to claim 4, characterized in that: The reconstructing the first data slice according to the segmentation sequence information to obtain the target intermediate data information includes: Determining an arrangement order of each of the first data fragments according to the segmentation order information; Arrange the first data slices according to the arrangement sequence based on a preset arrangement direction to obtain data information to be read; The data information to be read is read based on a preset reading direction to obtain the target intermediate data information, wherein the preset reading direction is different from the preset arrangement direction.
6. A data processing system based on multiple clients, characterized in that: The multi-client-based data processing system comprises: at least two first client terminals and a data processing server, wherein the data processing server is used to execute the multi-client-based data processing method as described in any one of claims 1-5.
Citation Information
Patent Citations
Management system and management method for shortening machine account data synchronization duration of information system
CN115617767A