CN-121681488-B - Multi-terminal data synchronization and secure storage method, device, program product and medium
Abstract
A multi-terminal data synchronization and safe storage method, equipment, a program product and a medium relate to the technical field of mobile Internet, and the system can accurately position a data version needing synchronization by dividing learning data into dynamic interaction data and static resource data and managing change history of the dynamic interaction data through a version index tree. When the second terminal requests data synchronization, the system only transmits necessary target data, and realizes the on-demand access of the static resource through an access token mechanism, thereby avoiding the repeated transmission of large-scale resource files. The data classification and increment synchronization based mode remarkably reduces network transmission overhead and improves the efficiency of multi-terminal data synchronization. Meanwhile, by separating the access control of the static resource data from the synchronous transmission of the dynamic interaction data, the safe use of the electronic resource is ensured, and the requirement of the user for flexibly switching and learning among multiple terminals is met.
Inventors
- LI CHANGSEN
- Guo Mianchen
Assignees
- 全联图书出版发行有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20251208
Claims (8)
- 1. A multi-terminal data synchronization and secure storage method, the method comprising: Acquiring learning data of a user at a first terminal, and dividing the learning data into dynamic interaction data and static resource data; Establishing a version index tree of the dynamic interaction data, wherein the version index tree comprises version nodes and inheritance relations among the nodes, each version node records corresponding data change content and time information, and the inheritance relations represent evolution paths of the data; when a data synchronization request initiated by a second terminal is received, determining target data to be synchronized based on the data synchronization request and the version index tree, and generating a corresponding access token based on a storage position of the static resource data; Transmitting the target data and the access token to the second terminal so as to enable the second terminal to complete data synchronization; wherein determining target data to be synchronized based on the data synchronization request and the version index tree, and generating a corresponding access token based on a storage location of the static resource data, comprises: Analyzing the data synchronization request to obtain target version information; Determining a target node corresponding to the target version information and a starting node corresponding to the current version information of the second terminal in the version index tree; Determining a version evolution path from the starting node to the target node based on inheritance relationships in the version index tree; Extracting data change contents recorded by each version node on the version evolution path, and merging the data change contents into the target data; Acquiring storage position information and access right information of static resource data referenced by the target data; generating an access token based on the storage location information and the access rights information; Wherein generating an access token based on the storage location information and the access rights information comprises: Acquiring a storage path identifier and a resource partition identifier in the storage position information; constructing a permission grading table based on the access permission information, wherein the permission grading table comprises a resource access level and an operation permission set; Performing segmented encryption processing on the storage path identifier and the resource partition identifier to generate a position ciphertext; Performing hierarchical coding on the resource access level and the operation authority set to generate an authority ciphertext; And generating a token signature based on the position ciphertext and the permission ciphertext, and combining the position ciphertext, the permission ciphertext and the token signature into the access token.
- 2. The multi-terminal data synchronization and security storage method according to claim 1, wherein the first terminal stores the learning data according to a first storage policy, the second terminal stores the target data and the access token according to a second storage policy, the first storage policy refers to storing the dynamic interaction data into a version control storage area, storing the static resource data into a resource reference storage area, the version control storage area and the resource reference storage area have a mapping relationship, the second storage policy refers to storing the target data into an increment storage area, storing the access token into a permission storage area, and the increment storage area and the permission storage area have a corresponding relationship.
- 3. The multi-terminal data synchronization and secure storage method according to claim 1, wherein the dividing the learning data into dynamic interactive data and static resource data comprises: The method comprises the steps of obtaining version identifiers of data items in learning data, wherein the version identifiers comprise data creation time and update times; dividing the data items with the update times larger than a preset threshold into the dynamic interaction data; Dividing the data items, of which the update times are smaller than or equal to the preset threshold value and the data creation time is earlier than the last data synchronization time, into the static resource data; Marking data items, of which the update times are smaller than or equal to the preset threshold value and the data creation time is later than the latest data synchronization time, as data to be confirmed, acquiring the data access frequency of the data to be confirmed, dividing the data to be confirmed, of which the access frequency is higher than a frequency threshold value, into the dynamic interaction data, and dividing the data to be confirmed, of which the access frequency is lower than or equal to the frequency threshold value, into the static resource data; and establishing a reference association table of the dynamic interaction data and the static resource data, wherein the reference association table records the dependency relationship of the dynamic interaction data on the static resource data.
- 4. The method for synchronizing and securely storing multi-terminal data according to claim 1, wherein said creating a version index tree of said dynamic interaction data comprises: calculating data similarity between adjacent versions in the dynamic interaction data, wherein the data similarity is determined based on the change proportion of the data change content; constructing a version association network based on the data similarity, wherein the version association network comprises a strong association path and a weak association path, the strong association path corresponds to a version node with the data similarity larger than a first threshold value, and the weak association path corresponds to a version node with the data similarity larger than a second threshold value and smaller than the first threshold value; And converting the version association network into a version index tree, converting the strong association path into a parent-child inheritance relationship, and converting the weak association path into a cross reference relationship.
- 5. The multi-terminal data synchronization and secure storage method of claim 1, wherein the sending the target data and the access token to the second terminal comprises: performing block processing on the target data to generate a data block sequence, wherein each data block comprises a block identifier and data content; Calculating a check code of each data block, wherein the check code is used for verifying the data integrity; establishing a transmission priority queue of the data block sequence, wherein the transmission priority is determined based on the dependency relationship of the data blocks; And sequentially sending the data block, the corresponding check code and the token fragment to the second terminal according to the transmission priority queue.
- 6. An electronic device for multi-terminal data synchronization and secure storage, characterized in that the electronic device comprises one or more processors and a memory coupled to the one or more processors, the memory for storing computer program code comprising computer instructions that the one or more processors invoke to cause the electronic device to perform the method of any of claims 1-5.
- 7. A computer program product comprising instructions which, when run on a multi-terminal data synchronization and secure storage electronic device, cause the electronic device to perform the method of any of claims 1-5.
- 8. A computer readable storage medium comprising instructions which, when run on a multi-terminal data synchronization and secure storage electronic device, cause the electronic device to perform the method of any of claims 1-5.
Description
Multi-terminal data synchronization and secure storage method, device, program product and medium Technical Field The application relates to the technical field of mobile internet, in particular to a multi-terminal data synchronization and safe storage method, equipment, a program product and a medium. Background In the current context of the rapid development of the mobile internet, multi-terminal learning has become an important way of modern education and self-promotion. With the popularization of intelligent devices, users are switched and learned among different terminals such as mobile phones, tablets and computers to be normal. In particular in the field of digital libraries, an increasing number of readers are required to access the electronic resources and learning services of the library through various terminal devices. Modern libraries not only provide basic resources such as electronic books, journal papers and the like, but also support readers to learn online, make notes and share knowledge. At present, a library digital resource service system generally adopts a full-scale data copying mode to realize multi-terminal data synchronization. When a reader logs in on a new device, the system downloads all data of the user again, and the contents such as books and notes need to be frequently updated due to the large volume of resource files such as electronic books, so that the transmission of a large amount of repeated data is caused by the total transmission, thereby not only occupying excessive network bandwidth, but also affecting the data synchronization efficiency. Disclosure of Invention In view of the above, the present application provides a multi-terminal data synchronization and secure storage method, apparatus, program product and medium. In a first aspect, the present application provides a method for synchronizing and securely storing multi-terminal data, the method comprising: Acquiring learning data of a user at a first terminal, and dividing the learning data into dynamic interaction data and static resource data; Establishing a version index tree of the dynamic interaction data, wherein the version index tree comprises version nodes and inheritance relations among the nodes, each version node records corresponding data change content and time information, and the inheritance relations represent evolution paths of the data; when a data synchronization request initiated by a second terminal is received, determining target data to be synchronized based on the data synchronization request and the version index tree, and generating a corresponding access token based on a storage position of the static resource data; and sending the target data and the access token to the second terminal so as to enable the second terminal to complete data synchronization. By adopting the technical scheme, the learning data is divided into the dynamic interaction data and the static resource data, and the change history of the dynamic interaction data is managed through the version index tree, so that the system can accurately position the data version needing to be synchronized. When the second terminal requests data synchronization, the system only transmits necessary target data, and realizes the on-demand access of the static resource through an access token mechanism, thereby avoiding the repeated transmission of large-scale resource files. The data classification and increment synchronization based mode remarkably reduces network transmission overhead and improves the efficiency of multi-terminal data synchronization. Meanwhile, by separating the access control of the static resource data from the synchronous transmission of the dynamic interaction data, the safe use of the electronic resource is ensured, the requirement of the user for flexibly switching and learning among multiple terminals is met, and more efficient and safe technical support is provided for the multi-terminal service of the digital resource of the library. Optionally, the first terminal stores the learning data according to a first storage policy, the second terminal stores the target data and the access token according to a second storage policy, where the first storage policy refers to storing the dynamic interaction data to a version control storage area, storing the static resource data to a resource reference storage area, a mapping relationship is provided between the version control storage area and the resource reference storage area, the second storage policy refers to storing the target data to an increment storage area, storing the access token to a permission storage area, and a correspondence relationship is provided between the increment storage area and the permission storage area. Optionally, the dividing the learning data into dynamic interaction data and static resource data includes: The method comprises the steps of obtaining version identifiers of data items in learning data, wherein the version identifie