Cross-platform data sharing method and device, computer equipment and readable storage medium
By building multiple models and utilizing optimal control theory and entropy optimization methods, the data transmission, synchronization and storage paths of cross-platform data sharing are optimized, and the problem of low sharing efficiency in the existing technology is solved and more efficient data sharing is achieved.
Patent Information
- Application Number
- CN202510335505.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-06-24
AI Technical Summary
The existing cross-platform data sharing solutions have the problem of low sharing efficiency, and it is difficult to take into account data transmission delay, energy consumption and storage load at the same time.
By building platform attribute model, platform requirement model and cross-platform data flow model, data transmission path, synchronization path and storage path are optimized, and path selection is dynamically adjusted to meet latency, energy consumption and load constraints using optimal control theory and entropy optimization methods.
It improves the efficiency of cross-platform data sharing, ensures latency, energy consumption and load balancing during data transmission, and improves the overall performance and resource utilization of the system.
Smart Images

Figure CN120201039A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data storage and sharing, and particularly to a cross-platform data sharing method, apparatus, computer device, computer-readable storage medium, and computer program product. Background Art
[0002] With the rapid development of information technology and the continuous evolution of the way of working, digital office has become an important means for modern enterprises to improve efficiency and competitiveness. In a digital office environment, data synchronization and sharing are key factors to ensure collaboration efficiency and information consistency.
[0003] However, current cross-platform data sharing solutions usually only focus on the optimization of a certain factor, and there is a problem of low sharing efficiency. Summary of the Invention
[0004] Based on this, in view of the above technical problems, it is necessary to provide a cross-platform data sharing method, apparatus, computer device, computer-readable storage medium, and computer program product that can improve sharing efficiency.
[0005] In a first aspect, the present application provides a cross-platform data sharing method, including:
[0006] In response to a request to share the data stored in the source data storage platform to each target data storage platform, obtain the data transmission delay and data transmission energy consumption generated when data sharing is achieved between each data storage platform at the current moment, and the storage load of each data storage platform; where each data storage platform includes the source data storage platform and each target data storage platform;
[0007] According to the platform attribute model and platform requirement model pre-constructed for each data storage platform, and the cross-platform data flow model pre-constructed for the data flow cost generated by data sharing, obtain the corresponding data transmission delay constraint, data transmission energy consumption constraint, and storage load constraint;
[0008] Input the data transmission delay, data transmission energy consumption, and storage load into the pre-constructed data transmission path optimization model to obtain a target data transmission path that satisfies the data transmission delay constraint, data transmission energy consumption constraint, and storage load constraint;
[0009] Obtain a corresponding target data synchronization path based on the target data transmission path, and obtain a corresponding target data storage path according to the target data transmission path;
[0010] Use the target data transmission path, target synchronization path, and target data storage path to share the data stored in the source data storage platform to each target data storage platform.
[0011] In one embodiment, obtaining a corresponding target data synchronization path based on a target data transmission path includes:
[0012] Obtaining the data status and data occurrence probability of each data storage platform;
[0013] Based on the data status and data occurrence probability of each, determining a candidate data synchronization path from multiple target data transmission paths;
[0014] Obtaining the data synchronization delay and data synchronization energy consumption corresponding to the candidate data synchronization path, and determining the target data synchronization path from the candidate data synchronization paths according to the data synchronization delay and data synchronization energy consumption.
[0015] In one embodiment, determining a target data synchronization path from candidate data synchronization paths according to data synchronization delay and data synchronization energy consumption includes:
[0016] Calculating the synchronization path cost corresponding to the candidate data synchronization path according to the data synchronization delay and data synchronization energy consumption;
[0017] Determining the candidate data synchronization path corresponding to the lowest synchronization path cost as the target data synchronization path.
[0018] In one embodiment, obtaining a corresponding target data storage path according to a target data transmission path includes:
[0019] Obtaining the target data transmission delay, target data transmission energy consumption, and load capacity corresponding to the target data transmission path;
[0020] Generating a data transmission cost corresponding to the target data transmission path according to the target data transmission delay, target data transmission energy consumption, and load capacity;
[0021] Determining the target data transmission path corresponding to the lowest data transmission cost as the target data storage path.
[0022] In an exemplary embodiment, the request includes a data storage request, and the method further includes:
[0023] In response to a data storage request for storing the data stored in the source data storage platform to each target data storage platform, obtaining the data to be stored in the source data storage platform;
[0024] Performing a hash calculation on the data to be stored to obtain a target data fingerprint corresponding to the data to be stored;
[0025] In the case where the target data fingerprint is different from any data fingerprint stored in each target data storage platform, storing the data to be stored into each target data storage platform through the target data storage path.
[0026] In one embodiment, the request further includes a data synchronization request, and the method further includes:
[0027] In response to a data synchronization request for synchronizing the data stored in the source data storage platform to each target data storage platform, obtain the timestamp information corresponding to the data saved by each data storage platform at the current moment;
[0028] Determine the data corresponding to the latest timestamp information as the data to be synchronized, and synchronize the data to be synchronized to each data storage platform using the target data synchronization path.
[0029] In a second aspect, the present application further provides a cross-platform data sharing device, including:
[0030] A request response module, configured to, in response to a request for sharing the data stored in the source data storage platform to each target data storage platform, obtain the data transmission delay, data transmission energy consumption generated when data sharing is achieved between each data storage platform at the current moment, and the storage load of each data storage platform; wherein, each data storage platform includes the source data storage platform and each target data storage platform;
[0031] A constraint construction module, configured to obtain corresponding data transmission delay constraints, data transmission energy consumption constraints, and storage load constraints according to the platform attribute model and platform requirement model pre-constructed for each data storage platform, and the cross-platform data flow model pre-constructed for the data flow cost generated by data sharing;
[0032] A first path determination module, input the data transmission delay, data transmission energy consumption, and storage load into a pre-constructed data transmission path optimization model, and obtain a target data transmission path that satisfies the data transmission delay constraints, data transmission energy consumption constraints, and storage load constraints;
[0033] A second path determination module, configured to obtain a corresponding target data synchronization path based on the target data transmission path, and obtain a corresponding target data storage path according to the target data transmission path;
[0034] A data sharing module, configured to use the target data transmission path, target synchronization path, and target data storage path to share the data stored in the source data storage platform to each target data storage platform.
[0035] In a third aspect, the present application further provides a computer device, including a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0036] In response to a request to share the data stored in the source data storage platform with each target data storage platform, obtain the data transmission delay and data transmission energy consumption generated when data is shared between each data storage platform at the current moment, as well as the storage load of each data storage platform; where each data storage platform includes the source data storage platform and each target data storage platform;
[0037] According to the platform attribute model and platform requirement model pre-constructed for each data storage platform, and the cross-platform data flow model pre-constructed for the data flow cost generated by data sharing, obtain the corresponding data transmission delay constraint, data transmission energy consumption constraint, and storage load constraint;
[0038] Input the data transmission delay, data transmission energy consumption, and storage load into the pre-constructed data transmission path optimization model to obtain the target data transmission path that satisfies the data transmission delay constraint, data transmission energy consumption constraint, and storage load constraint;
[0039] Based on the target data transmission path, obtain the corresponding target data synchronization path, and based on the target data transmission path, obtain the corresponding target data storage path;
[0040] Use the target data transmission path, target synchronization path, and target data storage path to share the data stored in the source data storage platform with each target data storage platform.
[0041] In a fourth aspect, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0042] In response to a request to share the data stored in the source data storage platform with each target data storage platform, obtain the data transmission delay and data transmission energy consumption generated when data is shared between each data storage platform at the current moment, as well as the storage load of each data storage platform; where each data storage platform includes the source data storage platform and each target data storage platform;
[0043] According to the platform attribute model and platform requirement model pre-constructed for each data storage platform, and the cross-platform data flow model pre-constructed for the data flow cost generated by data sharing, obtain the corresponding data transmission delay constraint, data transmission energy consumption constraint, and storage load constraint;
[0044] Input the data transmission delay, data transmission energy consumption, and storage load into the pre-constructed data transmission path optimization model to obtain the target data transmission path that satisfies the data transmission delay constraint, data transmission energy consumption constraint, and storage load constraint;
[0045] Obtain a corresponding target data synchronization path based on the target data transmission path, and obtain a corresponding target data storage path according to the target data transmission path;
[0046] Utilize the target data transmission path, the target synchronization path, and the target data storage path to share the data stored in the source data storage platform to each target data storage platform.
[0047] In a fifth aspect, the present application also provides a computer program product, including a computer program, which when executed by a processor implements the following steps:
[0048] In response to a request to share the data stored in the source data storage platform to each target data storage platform, obtain the data transmission delay and data transmission energy consumption generated when data sharing is achieved between each data storage platform at the current moment, as well as the storage load of each data storage platform; wherein, each data storage platform includes the source data storage platform and each target data storage platform;
[0049] According to the platform attribute model and platform requirement model pre-constructed for each data storage platform, and the cross-platform data flow model pre-constructed for the data flow cost generated by data sharing, obtain the corresponding data transmission delay constraint, data transmission energy consumption constraint, and storage load constraint;
[0050] Input the data transmission delay, data transmission energy consumption, and storage load into the pre-constructed data transmission path optimization model to obtain a target data transmission path that satisfies the data transmission delay constraint, data transmission energy consumption constraint, and storage load constraint;
[0051] Obtain a corresponding target data synchronization path based on the target data transmission path, and obtain a corresponding target data storage path according to the target data transmission path;
[0052] Utilize the target data transmission path, the target synchronization path, and the target data storage path to share the data stored in the source data storage platform to each target data storage platform.
[0053] The above cross-platform data sharing method, device, computer device, computer-readable storage medium, and computer program product, in response to a request to share the data stored in the source data storage platform with each target data storage platform, obtain the data transmission delay and data transmission energy consumption generated when data is shared between each data storage platform at the current moment, as well as the storage load of each data storage platform, where each data storage platform includes the source data storage platform and each target data storage platform. According to the platform attribute model and platform requirement model pre-constructed for each data storage platform, and the cross-platform data flow model pre-constructed for the data flow cost generated by data sharing, obtain the corresponding data transmission delay constraint, data transmission energy consumption constraint, and storage load constraint. Input the data transmission delay, data transmission energy consumption, and storage load into the pre-constructed data transmission path optimization model to obtain the target data transmission path that meets the data transmission delay constraint, data transmission energy consumption constraint, and storage load constraint. Based on the target data transmission path, obtain the corresponding target data synchronization path and target data storage path, and use the target data transmission path, target data synchronization path, and target data storage path to share the data stored in the source data storage platform with each target data storage platform. By simultaneously considering the data transmission delay, data transmission energy consumption, and the storage load of the platform itself when data is shared across multiple platforms, the data transmission path is optimized, and the data synchronization path and data storage path are optimized according to the optimized data transmission path. The optimized paths are used to achieve data sharing between the source data storage platform and each target data storage platform, thereby improving the efficiency of data sharing. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] To more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments of the present application or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other related drawings can also be obtained based on these drawings.
[0055] Figure 1 It is an application environment diagram of the cross-platform data sharing method in an embodiment;
[0056] Figure 2 It is a flowchart of the cross-platform data sharing method in an embodiment;
[0057] Figure 3 It is a flowchart of the cross-platform data sharing method in another embodiment;
[0058] Figure 4 It is a system architecture diagram of the cross-platform data sharing method in an embodiment;
[0059] Figure 5 It is the architecture diagram of the data security module in an embodiment;
[0060] Figure 6 It is the structural block diagram of the cross-platform data sharing device in an embodiment;
[0061] Figure 7 It is the internal structure diagram of a computer device in an embodiment. Detailed implementation manners
[0062] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0063] The cross-platform data sharing method provided by the embodiments of the present application can be applied to an application environment as Figure 1 shown. Among them, the source data storage platform 102 shares data with the target data storage platforms 104. There are multiple target data storage platforms, and each platform is associated with a data storage system for storing the received data. The target data storage platforms can communicate with each other. In response to the request to share the data stored in the source data storage platform with each target data storage platform, the source data storage platform 102 obtains the data transmission delay and data transmission energy consumption generated when data is shared between each data storage platform at the current moment, as well as the storage load of each data storage platform, where each data storage platform includes the source data storage platform and each target data storage platform; according to the platform attribute model and platform requirement model pre-constructed for each data storage platform, and the cross-platform data flow model pre-constructed for the data flow cost generated by data sharing, obtain the corresponding data transmission delay constraint, data transmission energy consumption constraint and storage load constraint, input the data transmission delay, data transmission energy consumption and storage load into the pre-constructed data transmission path optimization model, obtain the target data transmission path that meets the data transmission delay constraint, data transmission energy consumption constraint and storage load constraint, then obtain the corresponding target data synchronization path based on the target data transmission path, and obtain the corresponding target data storage path according to the target data transmission path. Finally, use the target data transmission path, target synchronization path and target data storage path to share the data stored in the source data storage platform 102 with each target data storage platform.
[0064] In an exemplary embodiment, as Figure 2 shown, a cross-platform data sharing method is provided. Taking the source data storage platform 102 in Figure 1 as an example, the method includes the following steps from step S201 to step S205. Among them:
[0065] Step S201: In response to a request to share the data stored in the source data storage platform with each target data storage platform, obtain the data transmission delay and data transmission energy consumption generated when data sharing is achieved between each data storage platform at the current moment, as well as the storage load of each data storage platform; wherein, each data storage platform includes the source data storage platform and each target data storage platform.
[0066] Among them, data sharing can be understood as the data flow between data storage platforms, including operations such as data transmission, data synchronization, and data storage. Data transmission delay can be understood as the delay when data is transmitted from one platform to another. Similarly, data transmission energy consumption can be understood as the resources consumed when data is transmitted from one platform to another. A data storage platform can be understood as a technology and system for storing, managing, and retrieving data, which can be hardware, software, or a combination of both.
[0067] Exemplarily, in response to a request to share the data stored in the source data storage platform 102 with each target data storage platform, the source data storage platform 102 obtains the data transmission delay and data transmission energy consumption generated when data sharing is achieved between each data storage platform at the current moment, as well as the storage load of the source data storage platform 102 and the storage load of each target data storage platform. By responding to the received data sharing request and obtaining the multi-source data generated by data sharing between platforms, it lays a data foundation for optimizing the data sharing path subsequently.
[0068] Step S202: According to the platform attribute model and platform requirement model pre-constructed for each data storage platform, and the cross-platform data flow model pre-constructed for the data flow cost generated by data sharing, obtain the corresponding data transmission delay constraint, data transmission energy consumption constraint, and storage load constraint.
[0069] Among them, platform attributes can be understood as the key attributes that affect data transmission efficiency, storage space utilization, and the overall performance of the system, including storage capacity, network bandwidth, delay, and load capacity; platform requirements can be understood as data transmission requirements, storage requirements, and security requirements.
[0070] Optionally, according to the platform attribute model constructed in advance for the key attributes of each data storage platform, the platform requirement model constructed in advance for the data transmission requirements, storage requirements, and security requirements of each data storage platform, and the cross-platform data flow model constructed in advance for the data transmission path from the source data storage platform to the target data storage platform and related parameters, mainly the generated data flow cost, corresponding data transmission delay constraints, data transmission energy consumption constraints, and storage load constraints are obtained. By modeling in advance the content involved in the data sharing process, corresponding constraint conditions are constructed, providing constraint conditions for the subsequent optimization of the data transmission path, data synchronization path, and data storage path, and ensuring the effectiveness and high efficiency of the path optimization.
[0071] Step S203, input the data transmission delay, data transmission energy consumption, and storage load into the pre-constructed data transmission path optimization model, and obtain the target data transmission path that satisfies the data transmission delay constraint, data transmission energy consumption constraint, and storage load constraint.
[0072] Exemplarily, in the data transmission path optimization, first, a target function needs to be constructed; this target function aims to minimize the sum of the data transmission delay, storage load, and energy consumption; the data transmission delay satisfies the data transmission delay constraint, the data transmission energy consumption satisfies the data transmission energy consumption constraint, and the storage load satisfies the storage load constraint; the formula is as follows:
[0073]
[0074] Where: J is the target function, representing the comprehensive cost of optimization, and the system needs to optimize the data transmission path by minimizing this target function; α1, α2, α3 are weight coefficients, representing the weights of network delay, storage load, and energy consumption in the target function respectively; in different application scenarios, these weights may be different; f1(x(t)) represents the change of network delay with time, and x(t) is the data transmission delay at time t; f2(y(t)) represents the storage load, and y(t) is the storage load at time t; f3(z(t)) represents the energy consumption, and z(t) is the energy consumption at time t.
[0075] Through the design of the above target function, the system not only focuses on the data transmission speed but also comprehensively considers delay, load, and energy consumption to ensure that the optimization scheme is globally optimal.
[0076] Next, the optimal path is solved through the Hamilton-Jacobi-Bellman equation (HJB) in the optimal control theory; the HJB equation is used to describe the optimization process of a dynamic system and can calculate the optimal control strategy under given constraint conditions; specifically, the form of the HJB equation is:
[0077]
[0078] Where: V(t) is the value function, representing the total cost (i.e., cost) of the system at time t; through the value function, the cost of selecting a specific path in a certain state can be measured. is the state dynamics of the system, describing the impact of path selection on delay, load, and energy consumption; u is the control variable, representing the current data transmission path selection; f(u,t) is the objective function, that is, the cost function in the data transmission process, which synthesizes delay, load, and energy consumption.
[0079] By solving the HJB equation, the optimal path selection strategy at each moment can be obtained, thereby optimizing the entire data transmission process. Through the optimal control theory and the HJB equation, the system can realize the intelligent selection of data transmission paths in practical applications; compared with the traditional fixed path selection method, this optimization method not only considers the current network state but also can dynamically adapt to environmental changes; by comprehensively considering factors such as delay, storage load, and energy consumption, the system makes a choice among multiple transmission paths, thus ensuring the efficiency of data transmission and the reasonable use of resources.
[0080] Step S204, obtain the corresponding target data synchronization path based on the target data transmission path, and obtain the corresponding target data storage path according to the target data transmission path.
[0081] Step S205, use the target data transmission path, the target synchronization path, and the target data storage path to share the data stored in the source data storage platform to each target data storage platform.
[0082] Exemplarily, based on the target data transmission path determined in step S203, the data synchronization path and the data storage path are further optimized to obtain the target data synchronization path and the target data storage path. Finally, using the target data transmission path, the data stored in the source data storage platform is transmitted to each target data storage platform, the latest data stored in the data storage platform is synchronized to the remaining data storage platforms using the target data synchronization path, and the data stored in the source data storage platform is stored in each target data storage platform through the target data storage path. By further optimizing the path of the already optimized and determined target data transmission path, the target data synchronization path for data synchronization and the target data storage path for data storage are obtained. Finally, the target data transmission path is used to realize the data transmission between multiple data storage platforms, the target data synchronization path is used to realize the data synchronization between multiple data storage platforms, and the target data storage path is used to realize the data storage between multiple data storage platforms. First, the secondary optimization of the path improves the accuracy of the data synchronization path and the data storage path; secondly, specific paths are used to realize the corresponding data sharing between data storage platforms, avoiding the path chaos caused by different data sharing, and ensuring the operation stability of the system.
[0083] In the above cross-platform data sharing method, in response to the request to share the data stored in the source data storage platform to each target data storage platform, the data transmission delay and data transmission energy consumption generated when data is shared between each data storage platform at the current moment, and the storage load of each data storage platform are obtained, where each data storage platform includes the source data storage platform and each target data storage platform. According to the platform attribute model and platform requirement model pre-constructed for each data storage platform, and the cross-platform data flow model pre-constructed for the data flow cost generated by data sharing, the corresponding data transmission delay constraint, data transmission energy consumption constraint, and storage load constraint are obtained. The data transmission delay, data transmission energy consumption, and storage load are input into the pre-constructed data transmission path optimization model to obtain the target data transmission path that satisfies the data transmission delay constraint, data transmission energy consumption constraint, and storage load constraint. Based on the target data transmission path, the corresponding target data synchronization path and target data storage path are obtained. Using the target data transmission path, target data synchronization path, and target data storage path, the data stored in the source data storage platform is shared to each target data storage platform. By simultaneously considering the data transmission delay, data transmission energy consumption, and the storage load of the platform itself when data is shared on multiple platforms, the data transmission path is optimized, and the data synchronization path and data storage path are optimized according to the optimized data transmission path. The optimized path is used to realize the data sharing between the source data storage platform and each target data storage platform, thereby improving the efficiency of data sharing.
[0084] In one embodiment, obtaining a corresponding target data synchronization path based on a target data transmission path includes: obtaining the data status and data occurrence probability of each data storage platform; determining a candidate data synchronization path from multiple target data transmission paths based on each data status and data occurrence probability; obtaining the data synchronization delay and data synchronization energy consumption corresponding to the candidate data synchronization path, and determining the target data synchronization path from the candidate data synchronization paths according to the data synchronization delay and data synchronization energy consumption.
[0085] Among them, the data status describes the data content stored on the data storage platform, and the data occurrence probability is used to represent the occurrence probability of data on this data storage platform.
[0086] Optionally, based on the foregoing target data transmission path, the data consistency is quantified by the entropy optimization method, and the data synchronization path is further optimized to ensure that the cross-platform data always maintains consistency during the synchronization process; this step is one of the key links of the entire system and is closely connected to step S302 (optimization of the data transmission path); in step S302, the data transmission path has been optimized to ensure that the data can be efficiently transmitted to the target platform; however, only optimizing the transmission path cannot completely solve the data consistency problem; therefore, in this step, the focus is on how to maintain the data consistency between platforms and avoid data inconsistency problems caused by delays, uneven loads or transmission conflicts during data transmission and storage; by optimizing the data synchronization path and combining the data consistency maintenance mechanism, the data synchronization between multiple storage platforms is ensured to be accurate and timely, preventing data conflicts caused by network fluctuations or load changes.
[0087] In order to measure the degree of data consistency between multiple storage platforms, the entropy optimization method is adopted, and the formula is as follows:
[0088]
[0089] Among them: H(X) represents the entropy value of data consistency; p(x i ) is the probability distribution of data on platform i, representing the occurrence probability of data on this platform; x i is the data status on platform i, describing the data content stored on the platform.
[0090] Determine a candidate data synchronization path from the target data transmission path according to the calculated data consistency entropy value, and then obtain the data synchronization delay L ij and the data synchronization energy consumption E ij , and according to the data synchronization delay L ij and the data synchronization energy consumption E ij, a target data synchronization path is determined from the candidate data synchronization paths. By minimizing the entropy value, the system can reduce the differences between data on different platforms and ensure data consistency among multiple platforms; the entropy optimization method provides a quantitative and operable way and also provides an operable optimization mechanism for cross-platform data synchronization, thereby reducing data inconsistency problems caused by network latency, uneven load, or transmission conflicts. Secondly, the target data transmission path is screened according to the data consistency entropy value to obtain candidate data synchronization paths, and further, the target data synchronization path is determined according to the synchronization latency and synchronization energy consumption corresponding to the candidate data synchronization paths, which speeds up the determination speed of the target data synchronization path.
[0091] In one embodiment, determining a target data synchronization path from candidate data synchronization paths according to data synchronization latency and data synchronization energy consumption includes: calculating a synchronization path cost corresponding to the candidate data synchronization paths according to data synchronization latency and data synchronization energy consumption; determining the candidate data synchronization path corresponding to the lowest synchronization path cost as the target data synchronization path.
[0092] Exemplarily, the data synchronization path can be represented by a weighted graph model in graph theory; the nodes in the graph represent storage platforms, and the weights of the edges represent the data synchronization latency between platforms; in actual operation, the weights of the edges may include factors such as latency, bandwidth limitation, and storage load; through the shortest path algorithm in graph theory (such as Dijkstra's algorithm), the system can select an appropriate path to optimize the synchronization process.
[0093] The basic formula for synchronizing path optimization is as follows:
[0094] W ij =L ij +λ·E ij
[0095] Where: W ij represents the synchronization path cost from platform i to platform j; L ij represents the synchronization latency from platform i to platform j; E ij represents the synchronization energy consumption from platform i to platform j; λ is a weight coefficient that adjusts the importance of latency and energy consumption in synchronization path selection.
[0096] Determining the synchronization path with the lowest synchronization path cost as the target data synchronization path, by selecting the optimal synchronization path, the system can minimize the latency and energy consumption that may occur during the data synchronization process, thereby ensuring the efficiency of data synchronization.
[0097] In an exemplary embodiment, obtaining a corresponding target data storage path according to a target data transmission path includes: obtaining the target data transmission delay, target data transmission energy consumption, and load capacity corresponding to the target data transmission path; generating a data transmission cost corresponding to the target data transmission path according to the target data transmission delay, target data transmission energy consumption, and load capacity; and determining the target data transmission path with the lowest data transmission cost as the target data storage path.
[0098] Optionally, in general, the selection of a data storage path not only needs to consider factors such as the capacity, bandwidth, and delay of the storage platform, but also the load situation and energy consumption of each platform; through a graph theory model, the system can abstract each platform and its connection relationship into a weighted graph, where nodes represent storage platforms and the weights of edges represent the transmission costs between platforms (such as delay, energy consumption, and load); through the shortest path algorithm, the system can select the optimal storage path, reduce data redundancy, and improve the efficiency of storage and data transmission.
[0099] To optimize the data storage path, it is first necessary to establish a weighted graph model; each node in the graph represents a storage platform, and the edges represent the connection relationships between platforms; the weight of each edge is defined according to the delay, energy consumption, and load capacity between platforms; in this way, the system can select the optimal storage path based on these weights.
[0100] In a specific implementation, the node P of the graph i represents the storage platform i, and the weight W of the edge ij can be calculated according to the following formula:
[0101] W ij = L ij + λ1·E ij + λ2·F ij
[0102] where: W ij represents the transmission cost from platform P i to platform P j ; L ij is the network transmission delay from platform P i to platform P j ; E ij is the transmission energy consumption from platform P i to platform P j ; F ij is the load capacity from platform P i to platform P j , usually represented by the current load of the platform; λ1 and λ2 are the weight coefficients of energy consumption and load in the selection of the storage path, respectively.
[0103] Through this weighted graph model, the system can comprehensively consider multiple factors and optimize the selection of storage paths.
[0104] To achieve optimal path selection, this application adopts the shortest path algorithm in graph theory, such as Dijkstra's algorithm or A* algorithm, to calculate the data transfer path from one platform to another; the goal of the shortest path algorithm is to find a path with the minimum cost according to the edge weights between nodes. By avoiding concentrating too much data load on a single platform, it can effectively prevent a platform from experiencing performance degradation or response latency due to overload, thereby improving the stability and reliability of the overall system.
[0105] In one embodiment, the request includes a data storage request, and the method further includes: in response to the data storage request to store the data stored in the source data storage platform into each target data storage platform, obtaining the data to be stored in the source data storage platform; performing a hash calculation on the data to be stored to obtain the target data fingerprint corresponding to the data to be stored; in the case where the target data fingerprint is not the same as any data fingerprint stored in each target data storage platform, storing the data to be stored into each target data storage platform through the target data storage path.
[0106] Exemplarily, in multi-platform storage, the same data copy may be stored multiple times, resulting in waste of space; to avoid this situation, the system checks for the existence of duplicate data copies during data synchronization; if it is found that the same data copy already exists in the target platform, the system will skip the storage operation to avoid redundant storage.
[0107] Specifically, before data transfer or storage, the system uniquely identifies the data through a hash algorithm to generate the fingerprint of the data; each time data is stored, the system first calculates the hash value of the data and compares it with the data already stored on the target platform; if the hash values match, it means that the same data copy already exists on the target platform, and the system will avoid duplicate storage.
[0108] For example, in some embodiments, the hash value of the data can be calculated using the SHA-256 algorithm (Secure Hash Algorithm 256-bit) to ensure that each data copy has a unique identifier; in this way, the system can significantly reduce redundant storage, thereby saving storage space and improving storage efficiency.
[0109] The formula for deduplication is as follows:
[0110] H(x) = SHA-256(x)
[0111] Where: H(x) represents the hash value of data x, generating a unique identifier; x is the data to be stored, and the hash value is used to determine whether the data has been stored.
[0112] Through the above method, data redundancy is effectively reduced in a multi-platform storage environment, the utilization rate of storage space is improved, data conflicts between different platforms are avoided, and data synchronization and consistency are ensured.
[0113] In one embodiment, the request further includes a data synchronization request, and the method further includes: in response to a data synchronization request for synchronizing the data stored in the source data storage platform to each target data storage platform, obtaining the timestamp information corresponding to the data saved by each data storage platform at the current moment; determining the data corresponding to the latest timestamp information as the data to be synchronized, and synchronizing the data to be synchronized to each data storage platform using the target data synchronization path.
[0114] Among them, the timestamp information can be understood as the latest update time of the data and the corresponding data version information.
[0115] Optionally, in a multi-platform environment, data copies on different platforms may be updated simultaneously, resulting in data conflicts; to avoid this situation, this embodiment adopts a version control mechanism to manage the update order of data copies through timestamp information.
[0116] In version control, the system assigns a timestamp information to each data update to record the time of the update operation; when data is synchronized from one platform to another, the system will determine which copy is the latest based on the timestamp information and select the data copy with the latest timestamp information for synchronization; in this way, the system can ensure that the latest version is always retained when synchronizing between multiple platforms.
[0117] Specifically, the system tracks the version of data by maintaining an association relationship between a version number and timestamp information; when the data on a certain platform changes, the system attaches a timestamp information to the data and updates its version number; if the timestamp information of the target platform is earlier, the system will synchronize the latest version of the data over to ensure data synchronization and consistency across platforms.
[0118] The formulas for version control and timestamp information management are as follows:
[0119] V(x)=(t x , ver x )
[0120] Where: V(x) represents the version information of data x, including the timestamp information t x and the version number ver x ; tx is the timestamp information of data update, verx is the data version number.
[0121] When multiple platforms update data simultaneously, the system selects the latest version of the data copy by comparing the timestamp information t x to select the latest version of the data copy.
[0122] Through version control and timestamp information management, the system can ensure that the latest data copy is always used. By adding timestamp and version number information, data conflicts that may occur when multiple platforms update the same data copy simultaneously can be avoided.
[0123] In an exemplary embodiment, as Figure 3 shown, a specific implementation method for cross-platform data sharing is provided, including steps S301 to S305, where:
[0124] Step S301, system modeling and requirements analysis: Model the cross-platform storage and sharing data, determine each storage platform and its attributes, and obtain the constraint conditions of data transmission delay, data transmission energy consumption, and storage load:
[0125] In this step, all platforms participating in cross-platform data storage and sharing need to be identified first. The attributes of each platform are crucial for system modeling; the key attributes of the storage platform include storage capacity, network bandwidth, latency, load capacity, etc.; specifically, the attributes of these platforms affect the efficiency of data transmission, the utilization of storage space, and the overall performance of the system; the following are the definitions of common attributes and their impacts on the system:
[0126] Storage capacity: The size of the space available for storing data on the storage platform; this parameter is very important for data storage management because it limits the amount of data stored.
[0127] Bandwidth: The network bandwidth limit of each storage platform directly affects the data transmission rate; when transmitting data between different platforms, bandwidth becomes an important performance bottleneck.
[0128] Latency: The latency when data is transmitted from one platform to another; this depends not only on the network quality but also on the hardware performance and load of the storage platform.
[0129] Load capacity: The maximum bearing capacity of each platform during concurrent data processing and storage operations; when the load is too high, the response speed of the system will decrease, affecting the efficiency of data transmission.
[0130] After establishing the attribute model of the storage platform, the next step is to construct a cross-platform data flow model. In this model, the transmission path of data from the source platform to the target platform and related parameters (such as latency, bandwidth, storage capacity, etc.) need to be clearly defined. The data flow model can help analyze the cost of data transmission between different platforms, thus providing a basis for data path optimization and redundancy management.
[0131] For example, the following formula can be used to describe the cost of data flow between different platforms:
[0132] D ij = L ij + λ·C ij
[0133] Where: D ij represents the data transmission cost from platform i to platform j; L ij is the network latency from platform i to platform j; λ is a weight coefficient representing the relationship between latency and bandwidth; C ij is the transmission bandwidth from platform i to platform j.
[0134] In this embodiment, the requirements analysis includes a comprehensive assessment of data transmission requirements, storage requirements, and security requirements. The data transmission requirements mainly consider the following aspects:
[0135] Data transmission frequency: The frequency of data transmission between each platform. Frequent data transmission requires higher bandwidth and lower latency.
[0136] Data size: The amount of data to be transmitted directly affects the network bandwidth requirements and may involve data fragmentation, compression, and encryption, etc.
[0137] Requirement for transmission real-time: Some scenarios may require low-latency real-time transmission, while other scenarios can tolerate longer transmission latency.
[0138] The storage requirements analysis mainly includes:
[0139] Storage capacity requirement: Each platform needs to provide sufficient storage space for data.
[0140] Storage redundancy requirement: According to the importance and recoverability requirements of the data, decide whether redundant storage is needed.
[0141] Data access frequency: Some data may be accessed frequently and require fast response, while some data may be archived and have a lower access frequency.
[0142] In this embodiment, the system conducts a quantitative analysis of the requirements of each storage platform, specifically by establishing the following mathematical model to describe the requirements of different platforms:
[0143] Ri = f(C i , B i , L i , T i )
[0144] Where: R i represents the resource requirements of platform i, which are mainly affected by its storage capacity C i , bandwidth B i , latency L i and transmission delay T i and other factors; f is a function that describes the relationship between the various factors.
[0145] By modeling the requirements of different platforms, the data allocation and transmission path selection between platforms can be optimized through a scheduling algorithm to ensure optimal performance while meeting the requirements.
[0146] In the entire system, the cross-platform storage and sharing environment is composed of multiple storage platforms with different attributes; therefore, the interaction methods and data sharing protocols between different platforms also need to be considered during the system modeling process; in order to ensure that data can be transmitted and shared efficiently and seamlessly between different platforms, appropriate protocols and scheduling strategies must be developed; for example, when sharing data between platforms, standard file sharing protocols (such as NFS (Network File System), SMB (Server Message Block) or object storage-based protocols) may be used.
[0147] In this embodiment, the selection of the data transmission protocol and storage protocol will directly affect the performance and data consistency of the system; therefore, the selection and configuration of the protocol need to be reasonably adjusted according to the different characteristics of the storage platform.
[0148] Through this modeling process, the system can accurately capture the capabilities, constraints, and transmission requirements of each storage platform, ensuring that each step can be adjusted and optimized according to the specific situation of the platform during implementation; this makes the cross-platform data transmission process more efficient and secure, avoiding unnecessary performance losses and resource waste.
[0149] In addition, by establishing a detailed requirement model and mathematical formula, the system can flexibly respond to different data storage and sharing requirements and provide strong data support and theoretical basis for subsequent steps (such as data transmission path optimization and data consistency management).
[0150] Step S302, Optimization of data transmission path selection: Using the optimal control theory, construct an objective function based on latency, storage load, and energy consumption to optimize the data transmission path:
[0151] In step S302, we optimize the data transfer path among multiple storage platforms through the optimal control theory. Through this optimization, the system can automatically select the most suitable data transfer path according to key factors such as latency, storage load, and energy consumption between different platforms. This step is directly connected to step S301 (system modeling and requirements analysis), in which the storage capacity, bandwidth, latency, etc. of each platform have been modeled in detail, and the optimization of the data transfer path will rely on this information for dynamic calculation.
[0152] In this embodiment, the optimal path selection not only minimizes network latency but also involves comprehensive consideration of storage load and energy consumption. The goal of optimization is to ensure the efficiency of the data transfer process, reduce resource consumption during data transfer, and improve the overall performance of the system.
[0153] In the optimization of the data transfer path, it is first necessary to construct an objective function. This objective function aims to minimize the sum of data transfer latency, storage load, and energy consumption. The formula is as follows:
[0154]
[0155] Where: J is the objective function, representing the comprehensive cost of optimization. The system needs to optimize the data transfer path by minimizing this objective function; α1, α2, α3 are weight coefficients, representing the weights of network latency, storage load, and energy consumption in the objective function respectively. In different application scenarios, these weights may vary; f1(x(t)) represents the variation of network latency with time, and x(t) is the data transfer latency at time t; f2(y(t)) represents the storage load, and y(t) is the storage load at time t; f3(z(t)) represents the energy consumption, and z(t) is the energy consumption at time t.
[0156] Through the design of the above objective function, the system not only focuses on the speed of data transfer but also comprehensively considers latency, load, and energy consumption to ensure that the optimization scheme is globally optimal.
[0157] Next, the optimal path is solved through the Hamilton-Jacobi-Bellman equation (HJB) in the optimal control theory. The HJB equation is used to describe the optimization process of a dynamic system and can calculate the optimal control strategy under given constraints. Specifically, the form of the HJB equation is:
[0158]
[0159] Where: V(t) is the value function, representing the total cost (i.e., cost) of the system at time t. Through the value function, the cost of selecting a specific path in a certain state can be measured. It is the state dynamics of the system, which describes the impact of path selection on latency, load, and energy consumption; u is the control variable, representing the current data transmission path selection; f(u,t) is the objective function, that is, the cost function in the data transmission process, which synthesizes latency, load, and energy consumption.
[0160] By solving the HJB equation, the optimal path selection strategy at each moment can be obtained, thereby optimizing the entire data transmission process.
[0161] In some implementations, the system may dynamically adjust the weights of the transmission path selection according to different real-time requirements; specifically, when the network latency is low, the system may preferentially select a path to improve transmission efficiency; while when the storage load is high, the system may adjust the path to reduce the burden on some platforms; this dynamic adjustment can be achieved by adjusting the weight coefficients α1, α2, α3 in the objective function.
[0162] For example, if the storage platform with a high current load affects the data transmission efficiency, the system can increase the weight of α2, reduce the load of this platform, and preferentially select other platforms for data transmission; this method can improve the efficiency of the overall system and avoid a sharp decline in system performance in the case of heavy load.
[0163] To ensure the timeliness and accuracy of path selection, this embodiment also introduces a real-time feedback mechanism; during the transmission process, the system monitors the changes in network latency, load, and energy consumption in real time and dynamically updates the path selection; this feedback mechanism ensures that in the case of network state changes or uneven load, the system can respond quickly, adjust the transmission path in real time, and optimize the data transmission efficiency.
[0164] For example, if the bandwidth of a certain platform is occupied exceeding the set threshold, the system will select other available transmission paths according to the real-time feedback; this mechanism avoids the latency and performance bottlenecks brought by static path selection and improves the adaptability and stability of the system.
[0165] In some embodiments, assume there are multiple storage platforms, including A, B, and C, and the bandwidth, latency, and energy consumption of each platform are different; the system selects the path from A to B as the preferred path according to the real-time network load, latency situation, and energy consumption prediction, and when the network load changes, it may be adjusted to the path from A to C to reduce energy consumption and improve efficiency while ensuring latency and bandwidth.
[0166] In addition, assume that platform A has a lower latency but a smaller bandwidth, while platform B has a larger bandwidth but a higher latency. In this case, the system will comprehensively analyze the amount of data transmitted each time and the timeliness requirements, and dynamically select the appropriate platform for data transmission. For the requirements of small data volume and high timeliness, the system may choose the platform with lower latency. For the transmission of large data volume, the system will choose the platform with larger bandwidth.
[0167] Through the optimal control theory and the HJB equation, the system can realize the intelligent selection of data transmission paths in practical applications. Compared with the traditional fixed path selection method, this optimization method not only considers the current network state but also can dynamically adapt to environmental changes. By comprehensively considering factors such as latency, storage load, and energy consumption, the system makes a choice among multiple transmission paths, thus ensuring the high efficiency of data transmission and the reasonable use of resources.
[0168] This method is particularly suitable for large-scale distributed systems and high-concurrency environments, and can perform efficient data sharing and transmission among multiple storage platforms, while avoiding performance bottlenecks caused by over-reliance on a single platform.
[0169] Step S303, data synchronization and consistency maintenance: Quantify data consistency through the entropy optimization method and optimize the data synchronization path:
[0170] In step S303, based on the optimal data transmission path calculated in S302, this application quantifies data consistency through the entropy optimization method and further optimizes the data synchronization path to ensure that cross-platform data always maintains consistency during the synchronization process. This step is one of the key links of the entire system and is closely connected to step S302 (optimization of data transmission path). In step S302, the data transmission path has been optimized to ensure that data can be efficiently transmitted to the target platform. However, only optimizing the transmission path cannot completely solve the data consistency problem. Therefore, in this step, the focus is on how to maintain data consistency among platforms and avoid data inconsistency problems caused by delays, uneven loads, or transmission conflicts during data transmission and storage. By optimizing the data synchronization path and combining the data consistency maintenance mechanism, ensure accurate and timely data synchronization among multiple storage platforms and prevent data conflicts caused by network fluctuations or load changes.
[0171] To measure the degree of data consistency among multiple storage platforms, the entropy optimization method is adopted, and the formula is as follows:
[0172]
[0173] Among them: H(X) represents the entropy value of data consistency; p(x i) is the probability distribution of data on platform i, representing the occurrence probability of data on that platform; x i is the data state on platform i, describing the data content stored on the platform.
[0174] By minimizing the entropy value, the system can reduce the differences between data on different platforms and ensure data consistency among multiple platforms; the entropy optimization method provides a quantitative and operable way, and also provides an operable optimization mechanism for cross-platform data synchronization, thereby reducing data inconsistency problems caused by network latency, uneven load, or transmission conflicts.
[0175] When synchronizing data among multiple platforms, optimizing the data synchronization path is an important aspect of improving system efficiency; the choice of data synchronization path directly affects the latency and reliability of data synchronization; therefore, in addition to using the entropy optimization method to quantify consistency, this embodiment also needs to optimize the data synchronization path to ensure the efficiency of the data transmission process.
[0176] In some embodiments, the data synchronization path can be represented by a weighted graph model in graph theory; the nodes in the graph represent storage platforms, and the weights of the edges represent the data synchronization latency between platforms; in actual operation, the weights of the edges may include factors such as latency, bandwidth limitation, storage load, etc.; through the shortest path algorithm in graph theory (such as Dijkstra's algorithm), the system can select an appropriate path to optimize the synchronization process.
[0177] The basic formula for synchronizing path optimization is as follows:
[0178] W ij = L ij + λ·E ij
[0179] Where: W ij represents the synchronization path cost from platform i to platform j; L ij represents the synchronization latency from platform i to platform j; E ij represents the synchronization energy consumption from platform i to platform j; λ is a weight coefficient that adjusts the importance of latency and energy consumption in the selection of the synchronization path.
[0180] By selecting the optimal synchronization path, the system can minimize the possible latency and energy consumption during the data synchronization process, thereby ensuring the efficiency of data synchronization.
[0181] In a distributed storage system, real-time performance and conflict resolution are factors that cannot be ignored during the synchronization process; data replicas on different platforms may be updated at different time points, resulting in data conflicts during the synchronization process; to effectively solve this problem, the system adopts a timestamp management and version control strategy.
[0182] Specifically, each time the data is updated, the system will stamp the data copy with a timestamp to record the time and version of the data modification; when synchronizing the data, the system will determine which copy is the latest based on the timestamp and synchronize the latest copy to other platforms; this method avoids data conflicts between different platforms and ensures data consistency.
[0183] For example, assume that Platform A and Platform B update the same data item at the same time point, but the updated content is different. The system will select the copy with the newer timestamp as the final version; in this way, the system can handle conflicts during multi-platform synchronization and ensure data consistency and integrity.
[0184] In this embodiment, the entropy optimization method is used to quantify data consistency, and the synchronization path optimization technology is used to solve the consistency problem during multi-platform data synchronization; specifically, the entropy optimization method provides a scientific way to measure data consistency and ensures the minimum difference between data copies; the synchronization path optimization technology ensures the efficiency during data transmission, reduces redundancy and latency, and improves the efficiency of data synchronization.
[0185] In addition, the timestamp management and version control strategy provide an effective solution for handling synchronization conflicts and ensure the currency and consistency of data in the system; compared with traditional synchronization methods, the method of this application can significantly improve the real-time performance and reliability of data synchronization while ensuring data consistency.
[0186] Step S304, optimization of data storage path: Optimize the path between storage platforms using a graph theory model:
[0187] In step S304, this application optimizes the cross-platform data storage path by using a graph theory model; this step is directly connected to the previous step S303 (data synchronization and consistency maintenance) and aims to further improve the efficiency and resource utilization rate of cross-platform data storage; in step S303, data consistency has been ensured by the entropy optimization method, and the optimization of the synchronization path ensures the consistency of data between platforms; on this basis, step S304 optimizes the data storage path between storage platforms through a graph theory model to achieve efficient storage and load balancing.
[0188] Generally, when choosing a data storage path, not only factors such as the capacity, bandwidth, and latency of the storage platform need to be considered, but also the load situation and energy consumption of each platform need to be considered; through the graph theory model, the system can abstract each platform and its connection relationship into a weighted graph, where the nodes represent storage platforms and the weights of the edges represent the transmission costs between platforms (such as latency, energy consumption, and load); through the shortest path algorithm, the system can select the optimal storage path, reduce data redundancy, and improve the efficiency of storage and data transmission.
[0189] To optimize the data storage path, it is first necessary to establish a weighted graph model; each node in the graph represents a storage platform, while the edges represent the connection relationships between platforms; the weight of each edge is defined according to the latency, energy consumption, and load capacity between platforms; in this way, the system can select the optimal storage path based on these weights.
[0190] In a specific implementation, the node P of the graph i represents the storage platform i, and the weight Wij of the edge can be calculated according to the following formula:
[0191] W ij = L ij + λ1·E ij + λ2·F ij
[0192] where: W ij represents the transmission cost from platform P i to platform P j ; L ij is the network transmission latency from platform P i to platform P j ; E ij is the transmission energy consumption from platform P i to platform P j ; F ij is the load capacity of platform P i to platform P j , usually represented by the current load of the platform; λ1 and λ2 are the weight coefficients of energy consumption and load in the storage path selection, respectively.
[0193] Through this weighted graph model, the system can comprehensively consider multiple factors and optimize the selection of the storage path.
[0194] To achieve the optimal path selection, this application adopts the shortest path algorithm in graph theory, such as the Dijkstra algorithm or the A* algorithm, to calculate the data transmission path from one platform to another; the goal of the shortest path algorithm is to find a path with the minimum cost according to the edge weights between nodes.
[0195] Specifically, the system finally finds the optimal storage path from the source platform to the target platform by continuously updating the shortest path of each node; in this case, the optimal path is selected not only based on the network latency, but also considering multiple factors such as the energy consumption and load capacity between platforms.
[0196] For example, in some embodiments, it may be necessary to cross multiple platforms during the transmission; in this case, the shortest path algorithm can ensure that the system selects the optimal path between these platforms, thereby reducing the transmission latency and energy consumption.
[0197] In some implementations, to further improve the performance of the system, the storage path optimization process can also be combined with a load balancing strategy; when the system detects that the load of a certain platform is too high, the path selection mechanism will automatically adjust and select other storage platforms with lower loads for data storage or transmission.
[0198] Specifically, the load balancing strategy avoids concentrating too much data load on a single platform by dynamically adjusting the selection of storage paths; this can effectively prevent a platform from experiencing performance degradation or response latency due to overload, thereby improving the stability and reliability of the overall system.
[0199] In the implementation of load balancing, the system continuously monitors the load conditions of each platform and gives priority to those platforms with lower current loads when selecting paths; for example, when the load of platform A is high, the system will automatically select platform B or platform C as the target for data storage to ensure balanced load distribution during data transmission.
[0200] To adapt to different usage scenarios, this embodiment provides a function for dynamically adjusting weights; in some specific scenarios, latency may be the most critical factor, while in other scenarios, energy consumption or load may be more important; to flexibly respond to these changes, the system allows the dynamic adjustment of weight coefficients λ1 and λ2 in different situations.
[0201] For example, the system can adjust the weight coefficients of path selection according to the real-time network status and platform load; if the network latency is high, the system may choose to reduce the latency path, that is, increase the value of λ1; while when the platform load is high, the system may optimize the load balancing by increasing the value of λ2, thereby selecting a path with lower load.
[0202] Through the above optimization methods, the system can significantly improve the efficiency of data transmission and storage; in some embodiments, when the network bandwidth is small and the latency is high, the system selects the optimized storage path to ensure that data can be transmitted to the target platform at the lowest cost, avoiding performance degradation caused by bandwidth bottlenecks; at the same time, through dynamic load balancing, the system can avoid over-reliance on a certain platform, thereby improving the scalability and stability of the system.
[0203] For example, assume that the system has platforms A, B, and C. Platform A has a small bandwidth but low latency, platform B has a large bandwidth but high latency, and platform C has a high load; through the shortest path algorithm and dynamic weight adjustment, the system will select the optimal path, possibly choosing platform B in cases of high bandwidth requirements and choosing platform A in scenarios of low bandwidth but low latency, thereby ensuring the efficiency of data transmission.
[0204] Step S305, Storage Redundancy Management and Conflict Resolution: Manage storage copies through deduplication and version control:
[0205] In step S305, the present application manages storage copies through deduplication technology and version control mechanisms to solve the redundancy problem and conflict problem in multi-platform storage; this step is closely connected to the previous step S304 (Optimization of Data Storage Path). Among them, the optimization of the data storage path selects the optimal storage path through a graph theory model to improve the efficiency of data storage and transmission; on this basis, step S305 will further optimize the storage space utilization rate and ensure the consistency and integrity of cross-platform data, avoiding the occurrence of storage redundancy and synchronization conflicts.
[0206] The key objective of this embodiment is to effectively reduce data redundancy, avoid data conflicts between different platforms, and ensure data synchronization and consistency in a multi-platform storage environment through deduplication technology and version control strategies; this can not only improve storage efficiency but also ensure the efficiency and security of the system during data transmission and storage.
[0207] To improve the utilization efficiency of storage space and reduce unnecessary storage redundancy, the present application adopts deduplication technology; in multi-platform storage, the same data copy may be stored multiple times, resulting in waste of space; to avoid this situation, the system will check whether there are duplicate data copies during data synchronization; if it is found that the same data copy already exists on the target platform, the system will skip the storage operation to avoid redundant storage.
[0208] Specifically, before data transmission or storage, the system will uniquely identify the data through a hash algorithm to generate the fingerprint of the data; each time data is stored, the system will first calculate the hash value of the data and compare it with the data already stored on the target platform; if the hash values match, it means that the same data copy already exists on the target platform, and the system will avoid duplicate storage.
[0209] For example, in some embodiments, the hash value of the data can be calculated using the SHA-256 algorithm (Secure Hash Algorithm 256-bit) to ensure that each data copy has a unique identifier; in this way, the system can significantly reduce redundant storage, thereby saving storage space and improving storage efficiency.
[0210] The formula for deduplication is as follows:
[0211] H(x) = SHA-256(x)
[0212] Where: H(x) represents the hash value of data x, generating a unique identifier; x is the data to be stored, and the hash value is used to determine whether the data has been stored.
[0213] In a multi-platform environment, data copies on different platforms may be updated simultaneously, leading to data conflicts. To avoid this situation, this embodiment adopts a version control mechanism to manage the update order of data copies through timestamp information.
[0214] In version control, the system assigns a timestamp information to each data update to record the time of the update operation. When data is synchronized from one platform to another, the system determines which copy is the latest based on the timestamp information and selects the data copy with the latest timestamp information for synchronization. In this way, the system can ensure that the latest version is always retained during synchronization across multiple platforms.
[0215] Specifically, the system tracks the version of data by maintaining an association relationship between a version number and timestamp information. When the data on a certain platform changes, the system attaches a timestamp information to the data and updates its version number. If the timestamp information on the target platform is earlier, the system will synchronize the latest version of the data to ensure data synchronization and consistency across platforms.
[0216] The formulas for version control and timestamp information management are as follows:
[0217] V(x) = (t x , ver x )
[0218] Where: V(x) represents the version information of data x, including the timestamp information t x and the version number ver x ; tx is the timestamp information of the data update, and ver x is the data version number.
[0219] When multiple platforms update data simultaneously, the system will select the data copy of the latest version by comparing the timestamp information t x .
[0220] When multiple platforms update the same data copy simultaneously, it may lead to data conflicts. To effectively resolve conflicts, the system introduces a conflict resolution strategy. Through version control and timestamp information management, the system can ensure that the latest data copy is always used. However, in some cases, the system may encounter a situation where different platforms update different versions of data simultaneously, and in this case, a conflict resolution strategy needs to be adopted.
[0221] Specifically, when conflicts occur, the system will merge or roll back the data according to business requirements and strategies. For example, in some cases, the system may choose to merge the update content and retain data of different versions. In other cases, the system may choose to roll back to a certain version to avoid data inconsistency.
[0222] For example, in a possible implementation, if platform A and platform B update the same data item simultaneously, but the update contents are different, the system will select the data version of one platform according to the priority, or merge the two versions and retain the update contents of both; the merging strategy can be flexibly designed according to specific application requirements. For example, retain the data of different fields, or perform manual intervention on the conflicting parts.
[0223] The formula for conflict resolution can be expressed in the following way:
[0224] C(x, y) = merge(x, y)
[0225] Where: C(x, y) represents the conflict resolution result of data x and y; merge(x, y) represents the merge operation, which merges two different versions of data.
[0226] Through deduplication technology and version control, the system can significantly reduce storage redundancy, improve storage efficiency, and ensure the consistency of data copies between multiple platforms, avoiding data conflicts; version control and timestamp information management provide an efficient solution for cross-platform data synchronization, enabling each data copy to have a clear version identifier, and the system can identify and synchronize the latest data in real time.
[0227] For example, in some embodiments, when the copy of platform A is updated, platform B will determine whether to update according to the timestamp information and select the latest version for synchronization; this mechanism avoids data inconsistency caused by synchronization delay or conflict between platforms and ensures the data integrity of the system.
[0228] Refer to Figure 4 , the architecture diagram corresponding to the above cross-platform data sharing method is:
[0229] Data storage module, which is responsible for managing cross-platform data storage and ensuring the storage and backup of data between different platforms; this module processes the allocation of storage requirements, data writing and reading operations, and optimizes the utilization of storage resources; by supporting a distributed storage architecture, this module can handle data storage requests from multiple platforms while ensuring the effective execution of data redundancy and backup strategies; the module is also closely integrated with the storage path optimization and redundancy management module to dynamically adjust the storage configuration and path to ensure the efficient storage and fast access of data;
[0230] Data Transmission Optimization Module. The data transmission optimization module dynamically selects the data transmission path according to the optimal control theory to minimize transmission delay, load, and energy consumption. This module uses an algorithm based on real-time monitoring, combines network delay, bandwidth, and load information, and optimizes the cross-platform data transmission path. By calculating the optimal path in the network, it reduces bottlenecks and resource waste during transmission. Its goal is to ensure efficient and secure data transmission between different platforms, further improve the performance of data synchronization and sharing, and reduce the overall overhead during transmission.
[0231] Data Synchronization Module. The data synchronization module is responsible for maintaining data consistency across multiple platforms and optimizing the synchronization path. This module monitors the data status between platforms in real time and uses the entropy optimization method to quantify data consistency. According to network conditions and the load of storage platforms, the module intelligently adjusts the synchronization path to ensure that data copies are updated in a timely manner among multiple platforms and prevent data conflicts. Through an efficient synchronization strategy, the module can reduce latency and bandwidth consumption during synchronization, while ensuring that data copies on all platforms are consistent, improving the overall data reliability and availability of the system.
[0232] Data Redundancy Management Module. The data redundancy management module reduces redundant data in storage through deduplication and version control technologies while ensuring data consistency. The module uses a hash algorithm to identify duplicate data, avoids generating redundant copies when storing data, and reduces the occupancy of storage space. At the same time, through the timestamp and version control mechanism, the module manages data copies on different platforms to ensure that the latest version of data is selected during synchronization. In case of data conflicts, the module can automatically resolve them and maintain data consistency in the system, improving storage and management efficiency and reducing resource waste.
[0233] Data Security Module. The data security module ensures the confidentiality and integrity of data during transmission and storage. This module protects data through encryption technologies, uses end-to-end encryption to ensure that data is not illegally accessed or tampered with during transmission. Encryption uses symmetric and asymmetric encryption algorithms, and the specific selection is based on data types and transmission requirements. The module also integrates a multi-factor authentication mechanism to ensure that only authorized users can access or modify data through authentication. In addition, the data security module manages the key lifecycle and sets permission controls for access between platforms to enhance the security of data storage and transmission.
[0234] See Figure 5 , the aforementioned data security module includes:
[0235] End-to-end encryption technology sub-module. The end-to-end encryption technology module is used to ensure the confidentiality and security of data during data storage and transmission. This module encrypts data through symmetric and asymmetric encryption algorithms to ensure that only authorized users can decrypt and access the data. During data transmission, the source platform encrypts the data, and the target platform decrypts the data after receiving it to ensure that the data is not stolen or tampered with by a third party during transmission. This module also supports the management and update of encryption keys, regularly changing the keys to improve security and prevent data leakage or unauthorized access.
[0236] Multi-factor authentication sub-module. The multi-factor authentication module is used to strengthen data access control. Through a multi-level authentication mechanism, it ensures that only authorized users can access sensitive data. The module supports multiple authentication methods, such as username and password, SMS verification code, hardware token, or biometric identification, etc. By comprehensively using these verification means, it can effectively prevent unauthorized users from accessing the system or data. In specific situations, the system can also set role-based access control (RBAC), restricting users' access rights to data according to their roles, thereby enhancing the security of the system.
[0237] Compared with the prior art, the present application has the following advantages:
[0238] 1. It adopts a technical solution that optimizes the data transmission path using the optimal control theory and graph theory model, achieving the technical effect of intelligently selecting the optimal path among multiple platforms to minimize latency and energy consumption. Compared with the prior art's path selection method based solely on network latency or bandwidth, the present application can comprehensively consider various factors, such as storage load and energy consumption, solving the problem of ignoring network load changes and resource consumption in traditional methods, and improving the efficiency and reliability of cross-platform data transmission.
[0239] 2. By using the entropy optimization method to quantify data consistency and optimize the synchronization path, it achieves the technical effect of efficiently synchronizing data among multiple platforms and ensuring consistency. Compared with traditional synchronization methods, the present application can accurately measure data inconsistency, automatically adjust the synchronization strategy, solve the problem of data inconsistency caused by synchronization latency and conflicts in the past, and greatly improve data consistency and synchronization efficiency among multiple platforms.
[0240] 3. It adopts a technical solution of using deduplication technology and version control to manage storage copies, achieving the technical effect of reducing redundant storage and optimizing the utilization of data storage space. Different from the simple storage copy management method in the prior art, the present application avoids duplicate storage, reduces resource waste through precise deduplication and version control, and ensures the consistency of data copies through timestamp and version number management, effectively improving storage management efficiency.
[0241] 4. A technical solution for ensuring data security by combining end-to-end encryption and multi-factor authentication technologies, achieving the technical effect of comprehensively protecting data confidentiality and access control during storage and transmission; compared with the encryption methods lacking comprehensive protection in the prior art, this application effectively prevents data leakage and unauthorized access through encryption algorithms and multi-layer authentication mechanisms, ensuring the security during data transmission and storage.
[0242] It should be understood that although the steps in the flowcharts involved in the above embodiments are shown in sequence according to the arrows, these steps do not necessarily need to be executed in the order indicated by the arrows. Unless clearly stated in this article, there is no strict order limit for the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages. These steps or stages do not necessarily need to be completed at the same moment, but can be executed at different moments. The execution order of these steps or stages does not necessarily need to be sequential, but can be executed alternately or in turn with at least some of the steps or stages in other steps or other steps.
[0243] Based on the same inventive concept, the embodiments of this application also provide a cross-platform data sharing device for implementing the cross-platform data sharing method involved above. The implementation solution provided by this device for solving problems is similar to the implementation solution described in the above method. Therefore, the specific limitations in one or more embodiments of the cross-platform data sharing device provided below can refer to the limitations on the cross-platform data sharing method in the above text, and will not be elaborated here.
[0244] In an exemplary embodiment, as Figure 6 shown, a cross-platform data sharing device is provided, including: a request response module 601, a constraint construction module 602, a first path determination module 603, a second path determination module 604, and a data sharing module 605, where:
[0245] The request response module 601 is configured to, in response to a request for sharing the data stored in the source data storage platform to each target data storage platform, obtain the data transmission delay and data transmission energy consumption generated when data sharing is achieved between each data storage platform at the current moment, as well as the storage load of each data storage platform; where each data storage platform includes the source data storage platform and each target data storage platform;
[0246] A constraint construction module 602, configured to obtain corresponding data transmission delay constraints, data transmission energy consumption constraints, and storage load constraints according to a platform attribute model and a platform requirement model pre-constructed for each data storage platform, and a cross-platform data flow model pre-constructed for the data flow cost generated by data sharing;
[0247] A path determination first module 603, configured to input data transmission delay, data transmission energy consumption, and storage load into a pre-constructed data transmission path optimization model, and obtain a target data transmission path that satisfies the data transmission delay constraint, the data transmission energy consumption constraint, and the storage load constraint;
[0248] A path determination second module 604, configured to obtain a corresponding target data synchronization path based on the target data transmission path, and obtain a corresponding target data storage path according to the target data transmission path;
[0249] A data sharing module 605, configured to use the target data transmission path, the target synchronization path, and the target data storage path to share the data stored in the source data storage platform to each target data storage platform.
[0250] In one embodiment, the path determination second module 604 is further configured to obtain the data status and data occurrence probability of each data storage platform; based on the data status and data occurrence probability, determine a candidate data synchronization path from multiple target data transmission paths; obtain the data synchronization delay and data synchronization energy consumption corresponding to the candidate data synchronization path, and determine a target data synchronization path from the candidate data synchronization paths according to the data synchronization delay and data synchronization energy consumption.
[0251] In one of the embodiments, the path determination second module 604 is further configured to determine a target data synchronization path from the candidate data synchronization paths according to the data synchronization delay and data synchronization energy consumption, including: calculating a synchronization path cost corresponding to the candidate data synchronization path according to the data synchronization delay and data synchronization energy consumption; determining the candidate data synchronization path corresponding to the lowest synchronization path cost as the target data synchronization path.
[0252] In an exemplary embodiment, the path determination second module 604 is further configured to obtain the target data transmission delay, the target data transmission energy consumption, and the load capacity corresponding to the target data transmission path; generate a data transmission cost corresponding to the target data transmission path according to the target data transmission delay, the target data transmission energy consumption, and the load capacity; determine the target data transmission path corresponding to the lowest data transmission cost as the target data storage path.
[0253] In one embodiment, the cross-platform data sharing device further includes a data storage module, which is configured to, in response to a data storage request for storing the data stored in the source data storage platform into each target data storage platform, obtain the data to be stored in the source data storage platform; perform a hash calculation on the data to be stored to obtain a target data fingerprint corresponding to the data to be stored; and in the case where the target data fingerprint is different from any data fingerprint saved in each target data storage platform, store the data to be stored into each target data storage platform through the target data storage path.
[0254] In one of the embodiments, the cross-platform data sharing device further includes a data synchronization module, which is configured to, in response to a data synchronization request for synchronizing the data stored in the source data storage platform to each target data storage platform, obtain the timestamp information corresponding to the data saved in each data storage platform at the current moment; determine the data corresponding to the latest timestamp information as the data to be synchronized, and synchronize the data to be synchronized to each data storage platform by using the target data synchronization path.
[0255] Each module in the above cross-platform data sharing device can be implemented in whole or in part by software, hardware, and their combination. Each of the above modules can be embedded in the processor in the computer device in the form of hardware or be independent of the processor, or can be stored in the memory in the computer device in the form of software, so as to facilitate the processor to call and execute the operations corresponding to each of the above modules.
[0256] In an exemplary embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 7 shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data transmission delay, data transmission energy consumption, storage load, data transmission delay constraint, data transmission energy consumption constraint, storage constraint, target data transmission path, target data synchronization path, and target data storage path. The input / output interface of the computer device is used for exchanging information between the processor and external devices. The communication interface of the computer device is used for communicating with an external terminal through a network connection. When the computer program is executed by the processor, it implements a cross-platform data sharing method.
[0257] Those skilled in the art can understand,Figure 7 The structure shown is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0258] In an exemplary embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the cross-platform data sharing method in the above embodiment is implemented.
[0259] In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the cross-platform data sharing method in the above embodiment is implemented.
[0260] In an embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the cross-platform data sharing method in the above embodiment is implemented.
[0261] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.
[0262] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include Read-Only Memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, Resistive Random Access Memory (ReRAM), Magnetoresistive Random Access Memory (MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (PCM), graphene memory, etc. Volatile memory can include Random Access Memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), etc. The databases involved in the embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in this application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, Artificial Intelligence (AI) processors, etc., without limitation.
[0263] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this application.
[0264] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the scope of the patent of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.
Claims
1. A cross-platform data sharing method, characterized in that: The method comprises: In response to a request to share data stored in a source data storage platform with each target data storage platform, obtaining the data transmission delay and data transmission energy consumption generated when data sharing is realized between each data storage platform at the current moment, as well as the storage load of each data storage platform; wherein each data storage platform includes the source data storage platform and each target data storage platform; According to the platform attribute model and platform requirement model pre-constructed for each of the data storage platforms, and the cross-platform data flow model pre-constructed for the data flow cost generated by data sharing, the corresponding data transmission delay constraint, data transmission energy consumption constraint and storage load constraint are obtained; Input the data transmission delay, data transmission energy consumption, and storage load into a pre-built data transmission path optimization model to obtain a target data transmission path that satisfies the data transmission delay constraint, the data transmission energy consumption constraint, and the storage load constraint; Acquire a corresponding target data synchronization path based on the target data transmission path, and acquire a corresponding target data storage path according to the target data transmission path; The data stored in the source data storage platform is shared to each of the target data storage platforms by utilizing the target data storage path, the target synchronization path and the target data storage path.
2. The method according to claim 1, characterized in that The acquiring a corresponding target data synchronization path based on the target data transmission path includes: Acquire the data status and data occurrence probability of each of the data storage platforms; Based on each of the data states and the data occurrence probability, determining a candidate data synchronization path from a plurality of the target data transmission paths; The data synchronization delay and the data synchronization energy consumption corresponding to the candidate data synchronization paths are acquired, and a target data synchronization path is determined from the candidate data synchronization paths according to the data synchronization delay and the data synchronization energy consumption.
3. The method according to claim 2, characterized in that The step of determining a target data synchronization path from the candidate data synchronization paths according to the data synchronization delay and the data synchronization energy consumption includes: Calculating a synchronization path cost corresponding to the candidate data synchronization path according to the data synchronization delay and the data synchronization energy consumption; The candidate data synchronization path corresponding to the lowest synchronization path cost is determined as the target data synchronization path.
4. The method according to claim 1, characterized in that: The acquiring a corresponding target data storage path according to the target data transmission path includes: Obtaining a target data transmission delay, a target data transmission energy consumption, and a load capacity corresponding to the target data transmission path; Generate a data transmission cost corresponding to the target data transmission path according to the target data transmission delay, the target data transmission energy consumption and the load capacity; The target data transmission path corresponding to the lowest data transmission cost is determined as the target data storage path.
5. The method according to claim 1, characterized in that The request includes a data storage request, and the method further includes: In response to a data storage request to store the data stored in the source data storage platform in each of the target data storage platforms, acquiring the data to be stored in the source data storage platform; Performing hash calculation on the data to be stored to obtain a target data fingerprint corresponding to the data to be stored; In the case that the target data fingerprint is different from any data fingerprint stored in each of the target data storage platforms, the data to be stored is stored in each of the target data storage platforms through the target data storage path.
6. The method according to claim 1, characterized in that The request also includes a data synchronization request, and the method further includes: In response to a data synchronization request for synchronizing the data stored in the source data storage platform to each of the target data storage platforms, obtaining timestamp information corresponding to the data stored in each data storage platform at the current moment; The data corresponding to the latest timestamp information is determined as the data to be synchronized, and the data to be synchronized is synchronized to each of the data storage platforms using the target data synchronization path.
7. A cross-platform data sharing device, characterized in that: The device comprises: A request response module, used to respond to a request to share data stored in a source data storage platform to each target data storage platform, and obtain the data transmission delay and data transmission energy consumption generated when data sharing is realized between each data storage platform at the current moment, as well as the storage load of each data storage platform; wherein each data storage platform includes the source data storage platform and each target data storage platform; A constraint construction module, for obtaining corresponding data transmission delay constraints, data transmission energy consumption constraints and storage load constraints according to a platform attribute model and a platform requirement model pre-constructed for each of the data storage platforms, and a cross-platform data flow model pre-constructed for the data flow cost generated by data sharing; The first path determination module inputs the data transmission delay, data transmission energy consumption, and storage load into a pre-built data transmission path optimization model to obtain a target data transmission path that satisfies the data transmission delay constraint, the data transmission energy consumption constraint, and the storage load constraint; A second path determination module is used to obtain a corresponding target data synchronization path based on the target data transmission path, and to obtain a corresponding target data storage path according to the target data transmission path; The data sharing module is used to share the data stored in the source data storage platform to each of the target data storage platforms by using the target data storage path, the target synchronization path and the target data storage path.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Multi-dimensional dynamic evaluation method and system for block chain transaction scheduling algorithm
CN121458434A
A multi-dimensional dynamic evaluation method and system for a blockchain transaction scheduling algorithm
CN121458434B