A method for achieving inter-platform data sharing based on caching
By utilizing caching on the server side to process data sharing between platforms, the problem of low data sharing efficiency is solved, enabling more efficient data processing and reducing system crashes, thereby improving the real-time performance and stability of data sharing.
Patent Information
- Application Number
- CN202311711170.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-13
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2043-12-13
AI Technical Summary
In the process of data sharing between platforms, existing technologies result in low efficiency in data push, processing and synchronization, leading to system crashes and the inability to modify data in real time.
By adopting a caching-based approach, data is processed on the server side through a transit gateway, indexes and mapping relationships are established, and data is stored in the cache, reducing disk storage and improving data processing speed and efficiency.
It improved data processing volume and speed, reduced browser lag and crashes, and enabled faster data sharing and processing.
Smart Images

Figure CN117714543B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data processing technology, specifically a method for achieving data sharing between platforms based on caching. Background Technology
[0002] With the development of technology and networks, application platform systems are becoming increasingly numerous and widely used. When updating data between platforms, more efficient management is needed. In the process of sharing data, the sending platform processes the data and pushes it to a relay gateway. The relay gateway receives the data from the platform, performs adaptation processing, and finally synchronizes the data to the receiving platform. As usage time increases, data accumulates within the platforms, leading to a surge in the amount of data that needs to be shared between platforms. This inefficiency in data push, processing, and synchronization becomes apparent. When the data exceeds the processing limits of existing functional modules, the program may crash due to the inability to handle the large volume of data, rendering real-time data modification unusable. This results in inefficient and potentially disastrous data sharing between platforms. Summary of the Invention
[0003] The purpose of this invention is to provide a method for achieving data sharing between platforms based on caching, so as to solve the problems mentioned in the background art.
[0004] To achieve the above objectives, the present invention provides the following technical solution: a method for inter-platform data sharing based on caching:
[0005] The method and process for achieving inter-platform data sharing based on caching is as follows:
[0006] A1: Organize the data that needs to be shared in the platform and send the shared data;
[0007] A2 pushes the organized shared data to the relay gateway;
[0008] A3 receives data pushed to the relay gateway and obtains shared data;
[0009] A4, based on the index and mapping relationship, is stored in the cache;
[0010] A5, the interactive interface retrieves and displays shared data through index pagination;
[0011] A6 will send the displayed data to the platform using the unique primary key as the identifier, create a lock, and process the data;
[0012] A7 allows for batch processing of data or processing of single data entries, updating the cache through a duplicate data index list;
[0013] A8. If the duplicate data index list contains elements, obtain the index through the duplicate data index list, then obtain the specific data through the index, and then process the data one by one.
[0014] A9. If the duplicate data index list contains elements, the data is not synchronized. If the duplicate data index list does not contain elements, the processed data is retrieved from the cache, written in batches, and released by the lock created by the unique primary key of the sending platform.
[0015] Preferably, the method flow for A4 is as follows;
[0016] B1: Index the acquired shared data and store it in the cache;
[0017] B2 establishes a mapping relationship between the original primary key and the index of the acquired shared data and stores it in the cache.
[0018] Preferably, the batch data processing method in A7 is as follows:
[0019] C1, iterate through all the shared data obtained;
[0020] C2, create a new primary key and modify the corresponding field data;
[0021] C3, if the new primary key is duplicated, add it to the duplicate data index list and store it in the cache;
[0022] C4 creates a hash set for the new primary key and stores it in the cache.
[0023] Preferably, the method for processing a single data entry in A7 is as follows:
[0024] D1 is compared with the primary keys of all devices on the receiving platform to perform a uniqueness check;
[0025] D2 is compared with the new primary key hash set of the batch processed data to perform uniqueness verification;
[0026] D3, verify uniqueness, add the new primary key to the hash set and update the cache content;
[0027] D4, check for duplicates, add to the duplicate data index list, and then update the cache.
[0028] Preferably, the shared data is data processed by the platform, and this shared data is unique.
[0029] Preferably, the shared data is indexed using an array data structure, which improves the efficiency of the interactive interface during queries.
[0030] Preferably, the shared data uses a primary key and index, wherein the relationship is established using a mapping data structure to quickly locate the data and modify it.
[0031] The beneficial effects of this invention are as follows:
[0032] This invention addresses the issue that existing sharing methods require the full data transfer between the browser and the server. This causes browser lag and even crashes whenever the data sharing function is used. This technology employs a caching-based method for inter-platform data sharing, where all data flow and processing (A1, A2, A3, A4, A6, A7, A9) occurs on the server side. Data is never stored on disk, reducing the need for manual reading and storage. Furthermore, data is only stored in the cache, significantly improving data processing capacity and speed. This reduces browser crashes and unresponsiveness when users modify data in real-time. Combined with a superior data structure, it enables faster and more real-time processing of shared data. Attached Figure Description
[0033] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation
[0034] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0035] like Figure 1 As shown in the figure, this embodiment of the invention provides a method for achieving inter-platform data sharing based on caching:
[0036] The method and process for achieving inter-platform data sharing based on caching is as follows:
[0037] A1: Organize the data that needs to be shared in the platform and send the shared data;
[0038] A2 pushes the organized shared data to the relay gateway;
[0039] A3 receives data pushed to the relay gateway and obtains shared data;
[0040] A4, based on the index and mapping relationship, is stored in the cache;
[0041] A5, the interactive interface retrieves and displays shared data through index pagination;
[0042] A6 will send the displayed data to the platform using the unique primary key as the identifier, create a lock, and process the data;
[0043] A7 allows for batch processing of data or processing of single data entries, updating the cache through a duplicate data index list;
[0044] A8. If the duplicate data index list contains elements, obtain the index through the duplicate data index list, then obtain the specific data through the index, and then process the data one by one.
[0045] A9. If the duplicate data index list contains elements, the data is not synchronized. If the duplicate data index list does not contain elements, the processed data is retrieved from the cache, written in batches, and released by the lock created by the unique primary key of the sending platform.
[0046] The steps involved are as follows: Step 1, organize the data to be shared on the platform and send the organized data to the platform; Step 2, push the organized shared data to the relay gateway; Step 3, receive the shared data pushed to the relay gateway from the receiving platform and retrieve the shared data from the relay gateway; Step 4, store the data in the cache according to the index and the mapping relationship; Step 5, the interactive interface retrieves and displays the shared data through the above index pagination; Step 6, create a lock using the unique primary key of the sending platform as the identifier. Then, the shared data is processed; Step 7: Batch processing or single data processing is performed on the data, and a duplicate data index list is created. The data is then stored in the cache or the cache is updated as needed; Step 8: If the duplicate data index list contains elements, the interactive interface retrieves the index by querying the duplicate data index list, and then retrieves the specific data from the shared data using the index, performing manual processing on each individual data item; Step 9: If the duplicate data index list contains elements, data synchronization is not allowed. If the duplicate data index list does not contain elements, the server retrieves the processed shared data from the cache, writes it in batches to the receiving platform's data storage service, and finally releases the lock created by the sending platform using its unique primary key.
[0047] Existing sharing methods require the full data to be transferred between the browser and the server. Whenever the data sharing function is used, the browser will lag or even crash. This technology uses a caching-based method to achieve inter-platform data sharing. In this method, all data flow and processing (A1, A2, A3, A4, A6, A7, A9) are performed on the server side. The data is not stored on disk storage media, which reduces the need for reading and storing data. Furthermore, data is only stored on disk storage media in the cache, which greatly improves the amount and speed of data processing. This reduces the likelihood of the browser crashing or becoming unresponsive when users modify data content in real time. Combined with a better data structure, it enables faster and more real-time processing of shared data.
[0048] The method flow for A4 is as follows:
[0049] B1: Index the acquired shared data and store it in the cache;
[0050] B2 establishes a mapping relationship between the original primary key and the index of the acquired shared data and stores it in the cache.
[0051] The shared data is indexed and stored in the cache. A mapping relationship is established between the original primary key of the shared data and the index, and then stored in the cache.
[0052] The batch data processing method in A7 is as follows:
[0053] C1, iterate through all the shared data obtained;
[0054] C2, create a new primary key and modify the corresponding field data;
[0055] C3, if the new primary key is duplicated, add it to the duplicate data index list and store it in the cache;
[0056] C4 creates a hash set for the new primary key and stores it in the cache.
[0057] If batch processing is used, the entire shared data is traversed, a new primary key is created, and the corresponding field data is modified. If duplicates occur in the new primary key, the duplicate data index is added to the duplicate data index list and stored in the cache. Then, a hash set of the new primary key is created and stored in the cache.
[0058] The method for processing a single data entry in A7 is as follows:
[0059] D1 is compared with the primary keys of all devices on the receiving platform to perform a uniqueness check;
[0060] D2 is compared with the new primary key hash set of the batch processed data to perform uniqueness verification;
[0061] D3, verify uniqueness, add the new primary key to the hash set and update the cache content;
[0062] D4, check for duplicates, add to the duplicate data index list, and then update the cache.
[0063] If using a single data processing method, the primary key of the incoming data is first checked for uniqueness. The check rules are as follows: 1. Check for uniqueness with the primary keys of all devices on the receiving platform. 2. Check for uniqueness with the hash set of the new primary key from step 7.1 above. If unique, add the new primary key to the hash set and update the cache content. If duplicated, add the duplicate data index to the duplicate data index list and then update the cache.
[0064] The shared data refers to the data processed by the platform, and this shared data is unique.
[0065] By sharing data, the platform sends out unique, processed shared data.
[0066] Among them, shared data is indexed, and the data structure used is an array, which is used to improve the efficiency of the interactive interface when querying.
[0067] The index is built using shared data and the data structure is an array. This is intended to improve the efficiency of pagination queries in the interactive interface, thereby increasing the overall efficiency of this method.
[0068] The shared data includes the original primary key and index. The relationship is established using a mapping data structure, which allows for quick location of the data and modification.
[0069] By establishing a relationship between the original primary key and index of shared data using a mapping data structure, the function of which is to quickly find the index value of data that has passed the uniqueness check in the single data processing step, and at the same time speed up the location of the data and modification.
[0070] Working principle and usage process:
[0071] The steps involved are as follows: Step 1, organize the data to be shared on the platform and send the organized data to the platform; Step 2, push the organized shared data to the relay gateway; Step 3, receive the shared data pushed to the relay gateway from the receiving platform and retrieve the shared data from the relay gateway; Step 4, store the data in the cache according to the index and the mapping relationship; Step 5, the interactive interface retrieves and displays the shared data through the above index pagination; Step 6, create a lock using the unique primary key of the sending platform as the identifier. Then, the shared data is processed; Step 7: Batch processing or single data processing is performed on the data, and a duplicate data index list is created. The data is then stored in the cache or the cache is updated as needed; Step 8: If the duplicate data index list contains elements, the interactive interface retrieves the index by querying the duplicate data index list, and then retrieves the specific data from the shared data using the index, performing manual processing on each individual data item; Step 9: If the duplicate data index list contains elements, data synchronization is not allowed. If the duplicate data index list does not contain elements, the server retrieves the processed shared data from the cache, writes it in batches to the receiving platform's data storage service, and finally releases the lock created by the sending platform using its unique primary key.
[0072] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0073] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for implementing inter-platform data sharing based on cache, characterized in that: The method and steps are as follows; A1: Organize the data that needs to be shared in the platform and send the shared data; A2 pushes the organized shared data to the relay gateway; A3 receives data pushed to the relay gateway and obtains shared data; A4, based on the index and mapping relationship, is stored in the cache; A5, the interactive interface retrieves and displays shared data through index pagination; A6 will send the displayed data to the platform using the unique primary key as the identifier, create a lock, and process the data; A7 allows for batch processing of data or processing of single data entries, updating the cache through a duplicate data index list; The batch data processing method in A7 is as follows: C1, iterate through all the shared data obtained; C2, create a new primary key and modify the corresponding field data; C3, if the new primary key is duplicated, add it to the duplicate data index list and store it in the cache; C4: Create a hash set for the new primary key and store it in the cache; The method for processing a single data entry in A7 is as follows: D1 is compared with the primary keys of all devices on the receiving platform to perform a uniqueness check; D2 is compared with the new primary key hash set of the batch processed data to perform uniqueness verification; D3, verify uniqueness, add the new primary key to the hash set and update the cache content; D4, check for duplicates, add to the duplicate data index list, and then update the cache; A8. If the duplicate data index list contains elements, obtain the index through the duplicate data index list, then obtain the specific data through the index, and then process the data one by one. A9. If the duplicate data index list contains elements, the data is not synchronized. If the duplicate data index list does not contain elements, the processed data is retrieved from the cache, written in batches, and released by the lock created by the unique primary key of the sending platform.
2. The method for inter-platform data sharing based on caching according to claim 1, characterized in that: The specific process for A4 is as follows: B1: Index the acquired shared data and store it in the cache; B2 establishes a mapping relationship between the original primary key and the index of the acquired shared data and stores it in the cache.
3. The method for inter-platform data sharing based on caching according to claim 1, characterized in that: The shared data refers to data processed by the platform, and this shared data is unique.
4. The method for inter-platform data sharing based on caching according to claim 2, characterized in that: The shared data is indexed, and the data structure used is an array.
5. The method for inter-platform data sharing based on caching according to claim 2, characterized in that: The shared data uses the original primary key and index, and the relationship is established using a mapping data structure to quickly locate the data and make modifications.
Citation Information
Patent Citations
Method, system and device for processing shared cache synchronization message and medium
CN111221826A
Method, device and equipment for embedding parameter cache and storage medium
CN114428797A
