A data sharing method and system based on server and server

By using decentralized dynamic anonymous ID, data filtering and hotspot scoring rules in data sharing among servers, and combining with reinforcement learning models to optimize data sharing strategies, network latency and security issues are solved, and efficient and secure data sharing is achieved.

CN119011603BActive Publication Date: 2025-03-18JIANGSU RUINUO TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411083765.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-08
Publication Date
2025-03-18
Estimated Expiration
2044-08-08

AI Technical Summary

Technical Problem

When the prior art overcomes the inherent delay problem of networks, data sharing is high cost and inefficient, and does not pay attention to the security of the server itself during the sharing process, resulting in the server being vulnerable to attacks and data breaches.

Method used

By generating decentralized dynamic anonymous IDs, pre-shared data that does not exist in the shared target server, establish hotspot scoring rules with time weighted items, filter out hotspot data packets, and build a reinforcement learning model to optimize data sharing strategy.

Benefits of technology

Reduces data sharing costs and delays, improves data access efficiency, enhances server security, and prevents data leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119011603B_ABST
    Figure CN119011603B_ABST
Patent Text Reader

Abstract

The present invention provides a data sharing method and system based on servers, and relates to the technical field of data sharing. The method includes: generating dynamic anonymous IDs of servers respectively; obtaining an existing data list of a first server; screening data of a second server and retaining pre-shared data; establishing hotspot scoring rules, obtaining hotspot data packets in pre-shared data, and using the hotspot data packets as pre-cached data; using the data access delay time of the first server as a state, and sharing the pre-cached data to the first server as an action with the identity of a dynamic anonymous ID, to construct a reinforcement learning model; establishing a reward function; monitoring feedback data of data access requests within a first preset time; calculating a reward function value under the action according to the feedback data, and updating the data when the reward function value is less than the preset reward function value; and sharing the pre-cached data to the first server. Optimize the real-time performance and security of data sharing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data sharing, and in particular to a method and system for data sharing between servers. Background Art

[0002] A server is a computer system or device that is specifically designed to provide one or more services or applications to other computers or devices, which are usually called clients. In a network environment, the server plays a central role in processing, storing and distributing data. The core functions of a server usually include data management, resource sharing and network service management. They are designed to handle high-load tasks, support multiple users at the same time, and usually have higher processing power, larger storage space and stronger data transmission capabilities than ordinary personal computers.

[0003] Data sharing between servers refers to the process of transferring and accessing data between two or more servers. This can include files, database contents, application data, or any other form of information. Data sharing enables different servers to access and use data stored on each other, regardless of their physical location. This sharing mechanism is achieved through network connections and involves various data synchronization technologies, middleware, API calls, and data transmission protocols. Sharing data between servers can not only improve data accessibility and resource utilization, but also reduce costs and improve efficiency through centralized data management. In addition, data sharing supports collaboration across departments and geographic locations, enabling teams to instantly access key information and accelerate decision-making.

[0004] However, due to the inherent delay of the network, there are inevitable delays in data sharing between servers, especially in the case of large network fluctuations, which will cause data access requests to be subject to uncontrollable data delays. In order to avoid this problem, existing data sharing often directly migrates the server data as a whole, resulting in excessive occupation of server storage resources, greatly increasing the cost of data storage and data sharing. Moreover, in the process of data sharing, people often only pay attention to the security of the data itself, and frequently expose the server IP address without considering the security of the server itself. This makes the server extremely vulnerable to association analysis and then attack, resulting in long-term data leakage of servers storing a large amount of sensitive data, seriously affecting user data security. Summary of the invention

[0005] In order to solve the technical problems existing in the prior art of overcoming the inherent network delay problem, overall data migration is performed in the existing data sharing, the data sharing cost is high, the efficiency is low, and the security of the server itself is not paid attention to during the sharing process, which may lead to attacks on the server and thus long-term data leakage, the present invention provides a data sharing method and system between servers.

[0006] The technical solution provided by the embodiment of the present invention is as follows:

[0007] First aspect

[0008] An embodiment of the present invention provides a data sharing method between servers, including:

[0009] S1: Generate decentralized dynamic anonymous IDs of the first server and the second server that need to share data respectively;

[0010] S2: Obtaining a list of existing data from the first server;

[0011] S3: Screening data on the second server according to the existing data list, and retaining unmarked data packets in the existing data list as pre-shared data;

[0012] S4: establishing a hotspot scoring rule with a time weighted item, obtaining hotspot data packets in the pre-shared data, and using the hotspot data packets as pre-cached data;

[0013] S5: construct a reinforcement learning model using the data access delay time of the first server as the state and sharing the pre-cached data to the first server as a dynamic anonymous ID as the action;

[0014] S6: Establish a reward function with a transformation product that takes the reduction of data access delay and the increase of cache hit rate as positive feedback, wherein the transformation product is the transformation product of the state vector and its change matrix;

[0015] S7: monitoring feedback data of data access requests within a first preset time period, wherein the feedback data includes delay time data and cache hit rate;

[0016] S8: Calculate the reward function value under the action according to the feedback data. If the reward function value is less than the preset reward function value, return to step S4;

[0017] S9: Sharing the pre-cached data to the first server.

[0018] Second aspect

[0019] An embodiment of the present invention provides a data sharing system between servers, including:

[0020] processor;

[0021] A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method for data sharing between servers as described in the first aspect is implemented.

[0022] The third aspect

[0023] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the method for sharing data between servers based on the first aspect is implemented.

[0024] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0025] In the present invention, for the problem of inherent network delay, the data to be shared is first screened, and the pre-shared data that does not exist in the shared target server, i.e., the first server, is retained to avoid sharing useless duplicate data and reduce the sharing cost. Then, a hotspot scoring rule with a time weighted term is established, and hotspot data packets are further screened from the pre-shared data so that the obtained hotspot data packets can reflect the real-time user access status, avoiding the situation where the hotspot data packets obtained are inaccurate due to the long-term cumulative effect. While ensuring that the obtained pre-cached data can meet the real-time user access rules and effectively reduce the user access data delay, the data that needs to be cached in advance to the first server is reduced, the redundant cache in the server sharing process is reduced, and the data sharing cost is further reduced. Finally, a reinforcement learning model is constructed, and a reward function with a conversion product is established with a reduction in data access delay and an increase in cache hit rate as positive feedback. The expected reward function value is used as a driving force, and the data access delay of the first server is used as a state cycle adjustment to obtain a hotspot data packet that meets the reward function value, and the hotspot data packet at this time is cached in advance to the first server to provide an extremely fast data response speed, thereby reducing the uncontrollable network delay caused by frequent cross-server data access and improving the user experience. And during the entire sharing process, the server shares data as a decentralized dynamic anonymous ID without exposing the server IP address, which greatly enhances the security of the server itself and ensures the security of the data. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0027] Figure 1 A flow chart of a data sharing method between servers provided in an embodiment of the present invention;

[0028] Figure 2 A schematic diagram of the structure of a data sharing system between servers provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0029] The technical solution of the present invention is described below in conjunction with the accompanying drawings.

[0030] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or it can be either of the two.

[0031] In the embodiments of the present invention, "image" and "picture" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same. "of", "corresponding, relevant" and "corresponding" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same.

[0032] In the embodiments of the present invention, sometimes a subscript such as W1 may be mistakenly written as a non-subscript such as W1. When the difference is not emphasized, the meanings to be expressed are consistent.

[0033] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.

[0034] Reference Manual Attached Figure 1 , showing a flow chart of a data sharing method between servers provided in an embodiment of the present invention.

[0035] S1: Generate decentralized dynamic anonymous IDs for the first server and the second server that need to share data.

[0036] Among them, dynamic anonymous ID refers to a temporary, non-fixed identity assigned to a server or the data elements it processes. This identification is decentralized, meaning that it does not rely on a centralized identity management system for allocation or verification, but is dynamically generated and managed between servers through an algorithm or protocol. The main feature of dynamic anonymous ID is that it can effectively identify and manage data exchanges or access requests between servers without revealing the actual identity.

[0037] It should be noted that the anonymous ID allocation method ensures that each node receives a unique ID without knowing the IDs of other nodes, thereby maintaining anonymity and security, allowing data to be shared without exposing personal identities, while also providing complete log tracking of data access and processing activities. In the process of mutual sharing, the server ID is not exposed, and the specific values ​​of each node are not disclosed, so that data can be shared anonymously, which can effectively prevent the real identity of the user from being inferred through association analysis, and has anti-association analysis capabilities.

[0038] In a possible implementation, S1 specifically includes:

[0039] S101: Allocate a node number to the first server and the second server respectively, where the node number is the total number of servers participating in sharing.

[0040] S102: Calculate the sum of all node numbers to share their respective node numbers:

[0041]

[0042] Among them, W represents the sum value, x i represents the node number of server i, n represents the total number of servers, p is a large prime number, and mod represents the modulo operation.

[0043] Among them, W is the result of adding up the input values ​​of all participating nodes. This accumulation process is based on a mathematical operation (addition), and then processed by modular operation to ensure that the result is within a specific mathematical range. Due to the use of modular operation, W does not directly expose the original value of any participating node, thereby protecting the privacy of participating nodes to a certain extent. In this way, even if an external observer or other node knows the value of W, it is difficult to determine the value of a single x. i The specific value of .

[0044] It should be noted that the sum of all node random numbers is calculated under the premise of ensuring the confidentiality of each node input, ensuring that no single node can know any random number except itself. In the anonymous ID allocation process, the secure sum algorithm is first used to allow each node to share its selected random number without leaking these random numbers to other nodes. This step ensures that the set of random numbers is securely aggregated so that subsequent operations can be performed while maintaining node privacy.

[0045] S103: Determine whether the node number is repeated, if so, return to step S101, otherwise, go to step S104.

[0046] It should be noted that the system checks whether there are repeated random numbers. If so, the node that selected the repeated random number will not be assigned an ID and will try again in the next round. Identify which nodes have selected the same number in the same round of random number selection and check whether each random number is selected by more than one node. If so, those nodes will not be assigned an ID and will need to try again in the next round. This step ensures that no two nodes in any round will select the same random number and try to obtain an ID.

[0047] S104: Using the node number as an input of Newton's identity, establishing a polynomial based on the node number, and performing a collision test on the polynomial using Sturm's theorem.

[0048] In a possible implementation, S104 specifically includes:

[0049] S1041: Use the node number as input for Newton's identity and calculate the coefficients of the polynomial:

[0050]

[0051] Among them, p k represents the sum of the k-th power of the node number, e i Represents the coefficient of the i-th degree term of the polynomial.

[0052] For example, suppose there are four nodes, whose node numbers are 1, 2, 3, and 4. If we want to calculate the sum of the powers of k=1 and k=2:

[0053] First power and p1:1 1 +2 1 +3 1 +4 1 =1+2+3+4=10.

[0054] Second power and p2:1 2 +2 2 +3 2 +4 2 =1+4+9+16=30.

[0055] These power sums are used in Newton's identities to calculate polynomial coefficients. In actual applications, due to different node numbers, the corresponding results are also different.

[0056] S1042: Construct a polynomial based on the calculated coefficients:

[0057] P(x)=e n x n +e n-1 x n-1 +…+e1x+e0

[0058] Among them, P(x) represents the polynomial about the unknown number x, e i Represents the coefficient of the i-th degree term of the polynomial, i = 0, 1,…, n.

[0059] The solution to the unknown number x is the node number assigned subsequently.

[0060] S1043: Collision testing of polynomials via Sturm's theorem:

[0061] V(a)-V(b)

[0062] Where a and b represent the minimum and maximum values ​​of the node number, respectively, and V(a)-V(b) represents the total number of sign changes of the polynomial P(x) in the interval [a,b].

[0063] Specifically, Newton's identity and Sturm's theorem are used to ensure that each node obtains a unique number in the data sharing system, which is accomplished by mathematically accurately constructing and verifying polynomials. First, the coefficients of the polynomial are generated by calculating the sum of powers of the node numbers. This process ensures that each number is reflected in the final polynomial. Then, these coefficients are used to construct a polynomial about the unknown number x. Finally, a collision test is performed using Sturm's theorem, which can detect the uniqueness of the polynomial solution within a given number range to ensure that no two nodes obtain the same number. This method not only improves the accuracy of number allocation, but also increases the security and reliability of the system through mathematical verification, avoids potential number conflicts, and enables each node to maintain a unique identity during data sharing.

[0064] S105: When the collision test passes, the solution of the polynomial is used as the node number of each server.

[0065] It should be noted that the total number of sign changes in the collision test is the same as the total number of different node number values. At this time, the solution of the polynomial corresponds to the node number value one by one, and a unique ID can be obtained.

[0066] In actual application, by dynamically generating node numbers and using the secure sum algorithm, data sharing can be achieved without exposing the identity of specific servers, which greatly enhances the security and privacy protection of the system. In addition, through the application of Newton's identity and Sturm's theorem, the system can ensure that each server obtains a unique node number, thereby avoiding number conflicts and duplications, so that each node can obtain a unique ID fairly and securely, which not only improves the robustness of the system, but also ensures the efficiency and accuracy of the algorithm, so that each node can maintain fairness and security when sharing data.

[0067] S2: Obtain the existing data list of the first server.

[0068] The existing data list refers to the existing data in the first server. The first server, as a sharing end, obtains the list to prevent the sharing of duplicate data already existing in the first server during data sharing, thereby avoiding wasting network resources and storage resources of the first server.

[0069] S3: Screening data on the second server according to the existing data list, and retaining unmarked data packets in the existing data list as pre-shared data.

[0070] Pre-shared data refers to the data that the second server will share with the first server. This data does not exist in the first server. The system will identify and retain the data that does not exist in the first server, and mark it as pre-shared data to avoid repeated transmission of existing data between the two servers, thereby saving bandwidth and storage resources and improving the efficiency and effectiveness of data sharing. By only sharing new or updated data, it can ensure the optimal use of resources and reduce unnecessary network load, avoiding wasting network resources by sharing the same content.

[0071] S4: Establish a hotspot scoring rule with a time weighted item, obtain the hotspot data packet in the pre-shared data, and use the hotspot data packet as pre-cached data.

[0072] Pre-cached data refers to data that is cached from the second server to the first server in advance. Pre-caching helps reduce data sharing delays caused by inherent network delays and improves the response rate of user requests. Part of the data is cached to the first server to ensure that users can access data quickly while avoiding excessive use of the first server's storage resources.

[0073] It should be noted that a time-weighted hotspot scoring formula is used to comprehensively consider the access frequency and time sensitivity of the data. By calculating the weighted access frequency of data items in a given time period to identify hotspot data, the popularity of data items can be dynamically reflected, making the identification of hotspot data more accurate and timely, and then effectively selecting data that needs to be shared or cached first, thereby optimizing data sharing strategies and system performance. High-scoring data packets filtered by the scoring rules are considered "hotspot data", which are selected as pre-cached data due to their high-frequency access characteristics. Pre-caching these hotspot data in the first server can significantly improve data access speed and reduce server response time, especially in high-traffic situations. In addition, this also helps to balance network load and avoid network congestion caused by frequent requests for specific data during peak hours.

[0074] In a possible implementation, S4 specifically includes:

[0075] S401: Establish a hotspot scoring rule with a time weighted term. The function corresponding to the hotspot scoring rule is specifically:

[0076]

[0077] Among them, H(d i ) represents the i-th data packet d i The access frequency function at time t, where t1 represents the current time, λ represents the decay rate constant, and e represents the base of the natural logarithm.

[0078] S402: taking a data packet with an access frequency greater than a preset access frequency as a hot data packet, and taking the hot data packet as pre-cached data.

[0079] in, Represents an exponential decay model that weights the access frequency in the recent period. This decay factor gives higher importance to recent data access. This processing method helps to dynamically evaluate and respond to the actual usage of data and ensure the real-time and accuracy of data processing strategies. By establishing hotspot scoring rules with time-weighted items, the system can effectively identify and prioritize those data packets with high access frequency. This scoring mechanism uses an exponential decay model to dynamically adjust the importance of data packets according to their access frequency, among which recent access has a greater impact on the score. This method allows the system to quickly adapt to changes in user behavior and ensure that the most frequently and recently accessed data can be cached first. Such a strategy not only improves the response speed of data access, but also optimizes the use of network and storage resources, making the system more efficient and accurate when processing large numbers of data requests.

[0080] S5: The data access delay time of the first server is used as the state, and the pre-cached data is shared to the first server as a dynamic anonymous ID as an action to build a reinforcement learning model.

[0081] Among them, the state is defined as "the data access delay duration of the first server". This means that the system will consider the processing speed of the current data request when making decisions. This indicator reflects the efficiency of the server in responding to data requests. The action is defined as "sharing pre-cached data to the first server as a dynamic anonymous ID". This action involves choosing when and how to transfer data from the second server (or other data source) to the first server to optimize the availability and access speed of the data. The best data sharing strategy is automatically learned using a reinforcement learning model, with the goal of minimizing data access latency. The model learns which strategies are most effective by trying different actions (data sharing strategies) and observing the results (changes in data access latency).

[0082] It should be noted that the reinforcement learning model is used to optimize the server data access delay, can dynamically learn and implement the best data sharing strategy, automatically adjust to achieve the minimum delay, and greatly improve data processing efficiency. Secondly, by using dynamic anonymous IDs, the security and privacy protection of the data sharing process are enhanced, effectively preventing the risk of data leakage. In addition, the adaptive ability of the model ensures that the system can still maintain optimal performance under changing network conditions and data loads, thereby improving the reliability of the overall system and user satisfaction. This intelligent approach not only saves the cost of manual monitoring and adjustment, but also brings higher operational efficiency and better data service quality to enterprises.

[0083] In a possible implementation, the reinforcement learning model is a reinforcement learning model based on a deep Q-network algorithm.

[0084] Specifically, the learning process of the reinforcement learning model based on the deep Q network (DQN) mainly includes the following steps: First, a deep neural network is initialized to estimate the Q value of each action in a given state. The agent takes actions in the environment and collects data (state, action, reward, and new state) based on the results of the actions. These data are stored in the experience replay pool. During the training process, samples are randomly drawn from the experience replay pool, and these samples are used to update the parameters of the neural network to minimize the gap between the predicted Q value and the target Q value calculated by the Bellman equation. In addition, a target network is set up whose parameters are updated more slowly to provide a stable target value to help the stability and convergence of the network training process. In this way, the model continues to learn and adjust, gradually optimizing its strategy to achieve long-term maximum rewards.

[0085] S6: Establish a reward function with a transformation product with positive feedback of reducing data access delay and increasing cache hit rate, where the transformation product is the transformation product of the state vector and its change matrix.

[0086] Among them, the introduction of transformation products in the reward function provides a highly sophisticated way to evaluate the impact of the agent's behavior on the system state. By calculating the product of the state vector and its change matrix, this method can intuitively quantify how different actions comprehensively affect multiple performance indicators, such as data access latency and cache hit rate. This not only enhances the flexibility and adaptability of the reward function, but also enables the agent to more fully understand the consequences of its behavior, so as to make more optimized choices in complex decision-making environments. In addition, the application of transformation products helps to balance conflicting goals and improve the performance and efficiency of the overall system. It is particularly suitable for highly dynamic systems that need to consider multiple factors at the same time.

[0087] It should be noted that the reward function integrates multiple performance indicators through matrix operations, so that the calculation of the reward not only reflects the changes in a single variable, but also takes into account the interactions and overall impacts between variables, making the reward function more sensitive and responsive to the actual performance of the agent in the environment, improving the pertinence and efficiency of the learning strategy. Through such a mechanism, the agent can more accurately adjust its behavior according to environmental feedback, optimize the decision-making process, and thus achieve better performance in complex or changing environments.

[0088] In a possible implementation, S6 specifically includes:

[0089] S601: Construct a state-based state vector according to data access latency and cache hit rate:

[0090]

[0091] Where s represents the state vector regarding data access latency D and cache hit rate H.

[0092] S602: Determine the change matrix of the state vector over time:

[0093]

[0094] Among them, Δs represents the change matrix representing the change of the state vector, ΔD represents the delay reduction, ΔH represents the hit rate increase, and s t and t-1 Represent the state vectors at time t and time t+1 respectively.

[0095] S603: Construct a reward function based on the change matrix:

[0096]

[0097] Among them, R represents the reward function, e represents the base of the natural logarithm, log represents the logarithmic function, the parameter T represents the transformation matrix, and the subscript T represents the transpose. Represents the transformation product of the state vector at time t and its change matrix, ΔH max Indicates the maximum cache hit change rate.

[0098] It should be noted that the reward function constructed using a combination of matrix operations and nonlinear functions has significant advantages in reinforcement learning, especially when dealing with multi-dimensional state spaces and complex environmental dynamics. First, matrix transformation makes it possible to consider multiple state variables (delay and cache hit rate) simultaneously in a single framework, and the impact of these state variables on the behavior of the agent can be flexibly set through the specific element values ​​in the matrix. This approach improves the expressiveness of the reward function, enabling it to finely reflect the impact of different state changes on the overall performance, thereby better guiding the agent to optimize its behavior. Second, the use of nonlinear functions (exponential and logarithmic functions) introduces additional dynamics and adaptability to reward distribution. For example, by processing the reduction of delay through an exponential function, a larger reward can be given for a significant reduction in delay, thereby incentivizing the agent to adopt a more effective strategy to reduce response time. The application of logarithmic functions helps to smoothly process the improvement of cache hit rate and avoid giving excessive rewards for small improvements, which can maintain the stability and consistency of the learning process. In addition, the reward function design not only enhances the model's nonlinear processing capabilities, but also improves its sensitivity and adaptability to environmental changes. It can more finely adjust responses to different types of state changes, allowing the agent to converge to the optimal strategy more quickly while maintaining a balance between environmental exploration and utilization.

[0099] S7: Monitoring feedback data of data access requests within a first preset time period.

[0100] The feedback data includes delay duration data and cache hit rate.

[0101] It should be noted that through this monitoring, the performance of data services can be tracked and analyzed in real time to ensure that data sharing and access strategies can effectively reduce latency and improve the success rate of data acquisition, thereby optimizing overall system performance and user experience. In addition, this feedback mechanism also supports continuous performance tuning and system improvement.

[0102] It should be noted that those skilled in the art can set the first preset duration according to actual needs, and the present invention is not limited thereto.

[0103] In a possible implementation, the cache hit rate is a probability that a data access request is for pre-cached data.

[0104] S8: Calculate the reward function value under the action according to the feedback data. If the reward function value is less than the preset reward function value, return to step S4.

[0105] Among them, the reward function value is a key concept in the reinforcement learning environment. It is used to evaluate the effect of a specific action taken by the agent. This value is calculated by the reward function, which is based on the impact of the agent's actions on the state of the environment. The reward function is essentially a feedback mechanism whose purpose is to guide the agent to learn how to optimize the desired goal through its actions.

[0106] It should be noted that when the reward function value is insufficient, it proves that the request access delay of the first server is still high. At this time, returning to step S4 to adjust the pre-cached data is equivalent to changing the action, and updating the priority of the pre-shared data. In this process, new strategies are constantly tried to find pre-cached data with lower request access delay, thereby improving the data access rate.

[0107] It should be noted that those skilled in the art can set the size of the preset reward function value according to actual needs, and the present invention is not limited here.

[0108] S9: Sharing the pre-cached data to the first server.

[0109] Continuously update the pre-cached data with the goal of maximizing the reward function, that is, minimizing the response time. In this state, the agent continuously captures the access data (including access frequency, etc.) requested to the first server and continuously updates the cached data. In this way, the unsolvable network delay caused by physical factors is alleviated, and the response time for accessing the first server is continuously shortened. After the system is stable, the cached data are mostly frequently accessed and important data, which can greatly reduce the data access delay of the first server and improve the timeliness of data access response.

[0110] In a possible implementation manner, after S9, the method further includes:

[0111] The pre-shared data is updated at a second preset time interval.

[0112] It should be noted that by regularly checking and updating pre-shared data sets, the data’s currency and relevance are ensured. This operation is to keep data synchronized and adapt to possible data changes or new requirements, thereby improving data sharing efficiency and system responsiveness. This regular update mechanism helps to ensure the accuracy and timeliness of data sharing, which is especially important in a dynamically changing data environment.

[0113] It should be noted that those skilled in the art can set the second preset duration according to actual needs, and the present invention is not limited thereto.

[0114] In actual use, the use of dynamic anonymous IDs effectively prevents identity leakage during data transmission, ensures the privacy of data sharing, and reduces security threats caused by identity identification, which is especially important for companies involving sensitive information. Secondly, through the intelligent hot data pre-caching strategy, the most needed data is dynamically selected for priority processing based on the access frequency and timeliness of the data, which greatly reduces the response time of the server and network latency, and improves the real-time performance of data processing. In addition, this strategy continuously optimizes data sharing and caching decisions through a feedback-driven reinforcement learning model, enabling the system to self-adjust and optimize under changing data usage patterns and network conditions, greatly improving the adaptability and efficiency of the system. Therefore, this solution not only improves the security and efficiency of data processing, but also enhances the system's adaptability to complex environments. It is a practical and efficient data sharing solution.

[0115] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0116] In the present invention, for the problem of inherent network delay, the data to be shared is first screened, and the pre-shared data that does not exist in the shared target server, i.e., the first server, is retained to avoid sharing useless duplicate data and reduce the sharing cost. Then, a hotspot scoring rule with a time weighted term is established, and hotspot data packets are further screened from the pre-shared data so that the obtained hotspot data packets can reflect the real-time user access status, avoiding the situation where the hotspot data packets obtained are inaccurate due to the long-term cumulative effect. While ensuring that the obtained pre-cached data can meet the real-time user access rules and effectively reduce the user access data delay, the data that needs to be cached in advance to the first server is reduced, the redundant cache in the server sharing process is reduced, and the data sharing cost is further reduced. Finally, a reinforcement learning model is constructed, and a reward function with a conversion product is established with a reduction in data access delay and an increase in cache hit rate as positive feedback. The expected reward function value is used as a driving force, and the data access delay of the first server is used as a state cycle adjustment to obtain a hotspot data packet that meets the reward function value, and the hotspot data packet at this time is cached in advance to the first server to provide an extremely fast data response speed, thereby reducing the uncontrollable network delay caused by frequent cross-server data access and improving the user experience. And during the entire sharing process, the server shares data as a decentralized dynamic anonymous ID without exposing the server IP address, which greatly enhances the security of the server itself and ensures the security of the data.

[0117] Reference Manual Attached Figure 2 , showing a structural schematic diagram of a data sharing system between servers provided by the present invention.

[0118] The present invention further provides a data sharing system 20 between servers, which is applied to the above-mentioned data sharing method between servers, and includes:

[0119] Processor 201.

[0120] The memory 202 stores computer-readable instructions. When the computer-readable instructions are executed by the processor 201, a data sharing method between servers according to the method embodiment is implemented.

[0121] The server-based data sharing system 20 provided by the present invention can execute the above-mentioned server-based data sharing method and achieve the same or similar technical effects. To avoid repetition, the present invention will not go into details.

[0122] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0123] In the present invention, for the problem of inherent network delay, the data to be shared is first screened, and the pre-shared data that does not exist in the shared target server, i.e., the first server, is retained to avoid sharing useless duplicate data and reduce the sharing cost. Then, a hotspot scoring rule with a time weighted term is established, and hotspot data packets are further screened from the pre-shared data so that the obtained hotspot data packets can reflect the real-time user access status, avoiding the situation where the hotspot data packets obtained are inaccurate due to the long-term cumulative effect. While ensuring that the obtained pre-cached data can meet the real-time user access rules and effectively reduce the user access data delay, the data that needs to be cached in advance to the first server is reduced, the redundant cache in the server sharing process is reduced, and the data sharing cost is further reduced. Finally, a reinforcement learning model is constructed, and a reward function with a conversion product is established with a reduction in data access delay and an increase in cache hit rate as positive feedback. The expected reward function value is used as a driving force, and the data access delay of the first server is used as a state cycle adjustment to obtain a hotspot data packet that meets the reward function value, and the hotspot data packet at this time is cached in advance to the first server to provide an extremely fast data response speed, thereby reducing the uncontrollable network delay caused by frequent cross-server data access and improving the user experience. And during the entire sharing process, the server shares data as a decentralized dynamic anonymous ID without exposing the server IP address, which greatly enhances the security of the server itself and ensures the security of the data.

[0124] It should be understood that the processor in the embodiment of the present invention may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0125] It should also be understood that the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0126] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

[0127] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.

[0128] In the present invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0129] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0130] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0131] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0132] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0133] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0134] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0135] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0136] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements a data sharing method between servers as described in the method embodiment.

[0137] A computer-readable storage medium provided by the present invention can implement the steps and effects of the data sharing method between servers in the above method embodiment. To avoid repetition, the present invention will not go into details.

[0138] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0139] In the present invention, for the problem of inherent network delay, the data to be shared is first screened, and the pre-shared data that does not exist in the shared target server, i.e., the first server, is retained to avoid sharing useless duplicate data and reduce the sharing cost. Then, a hotspot scoring rule with a time weighted term is established, and hotspot data packets are further screened from the pre-shared data so that the obtained hotspot data packets can reflect the real-time user access status, avoiding the situation where the hotspot data packets obtained are inaccurate due to the long-term cumulative effect. While ensuring that the obtained pre-cached data can meet the real-time user access rules and effectively reduce the user access data delay, the data that needs to be cached in advance to the first server is reduced, the redundant cache in the server sharing process is reduced, and the data sharing cost is further reduced. Finally, a reinforcement learning model is constructed, and a reward function with a conversion product is established with a reduction in data access delay and an increase in cache hit rate as positive feedback. The expected reward function value is used as a driving force, and the data access delay of the first server is used as a state cycle adjustment to obtain a hotspot data packet that meets the reward function value, and the hotspot data packet at this time is cached in advance to the first server to provide an extremely fast data response speed, thereby reducing the uncontrollable network delay caused by frequent cross-server data access and improving the user experience. And during the entire sharing process, the server shares data as a decentralized dynamic anonymous ID without exposing the server IP address, which greatly enhances the security of the server itself and ensures the security of the data.

[0140] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

[0141] There are a few points to note:

[0142] (1) The drawings of the embodiments of the present invention only relate to the structures related to the embodiments of the present invention, and other structures may refer to the general design.

[0143] (2) For the sake of clarity, in the drawings used to describe the embodiments of the present invention, the thickness of the layers or regions is exaggerated or reduced, that is, these drawings are not drawn according to the actual scale. It is understood that when an element such as a layer, film, region or substrate is referred to as being "on" or "under" another element, the element may be "directly" "on" or "under" the other element or there may be intermediate elements.

[0144] (3) In the absence of conflict, the embodiments of the present invention and the features therein may be combined with each other to obtain new embodiments.

[0145] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. The protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A data sharing method between servers, characterized in that: include: S1: Generate decentralized dynamic anonymous IDs of the first server and the second server that need to share data respectively; S2: Obtaining a list of existing data of the first server; S3: screening data on the second server according to the existing data list, and retaining unmarked data packets in the existing data list as pre-shared data; S4: establishing a hotspot scoring rule with a time weighted item, obtaining a hotspot data packet in the pre-shared data, and using the hotspot data packet as pre-cached data; S5: Taking the data access delay time of the first server as the state and sharing the pre-cached data to the first server as the dynamic anonymous ID as the action, a reinforcement learning model is constructed; S6: establishing a reward function with a conversion product that takes the reduction of data access delay time and the increase of cache hit rate as positive feedback, wherein the conversion product is the conversion product of the state vector and its change matrix; S7: monitoring feedback data of data access requests within a first preset time period, wherein the feedback data includes delay time data and cache hit rate; S8: Calculate the reward function value for the action according to the feedback data, and if the reward function value is less than a preset reward function value, return to step S4; S9: Sharing the pre-cached data to the first server.

2. The method for sharing data between servers according to claim 1, characterized in that: The S1 specifically includes: S101: Allocate a node number to each of the first server and the second server, wherein the node number is the total number of servers participating in sharing; S102: Calculate the sum of all node numbers to share their respective node numbers: Where W represents the sum value, x i represents the node number of server i, n represents the total number of servers, p is a large prime number, and mod represents the modulus operation; S103: Determine whether the node number is repeated, if so, return to step S101, otherwise, proceed to step S104; S104: using the node number as an input of Newton's identity, establishing a polynomial based on the node number, and performing a collision test on the polynomial using Sturm's theorem; S105: When the collision test passes, the solution of the polynomial is used as the node number of each server.

3. The method for sharing data between servers according to claim 2, characterized in that: The S104 specifically includes: S1041: Using the node number as input of Newton's identity, calculate the coefficient of the polynomial: Among them, p k represents the sum of the k-th power of the node number, e i Represents the coefficient of the i-th degree term of the polynomial; S1042: Construct the polynomial according to the calculated coefficients: P(x)=e n x n +e n-1 x n-1 +…+e1x+e0 Among them, P(x) represents the polynomial about the unknown number x, e i Represents the coefficient of the i-th degree term of the polynomial, i = 0, 1, ..., n; S1043: Perform collision test on the polynomial using Sturm's theorem: V(a)-V(b) Where a and b represent the minimum and maximum values ​​of the node number, respectively, and V(a)-V(b) represents the total number of sign changes of the polynomial P(x) in the interval [a,b].

4. The method for sharing data between servers according to claim 1, characterized in that: The S4 specifically includes: S401: Establish a hotspot scoring rule with a time weighted term. The function corresponding to the hotspot scoring rule is specifically: Among them, H(d i ) represents the i-th data packet d i The access frequency function at time t, t1 represents the current time, λ represents the decay rate constant, and e represents the base of the natural logarithm; S402: taking a data packet with an access frequency greater than a preset access frequency as the hotspot data packet, and taking the hotspot data packet as pre-cached data.

5. The method for sharing data between servers according to claim 1, characterized in that: The reinforcement learning model is a reinforcement learning model based on a deep Q network algorithm.

6. The method for sharing data between servers according to claim 1, characterized in that: The S6 specifically includes: S601: Construct a state vector based on the state according to the data access delay and the cache hit rate: Wherein, s represents a state vector regarding the data access delay D and the cache hit rate H; S602: Determine the change matrix of the state vector over time: Among them, Δs represents the change matrix representing the change of the state vector, ΔD represents the delay reduction, ΔH represents the hit rate increase, and s t and t-1 Represent the state vectors at time t and time t+1 respectively; S603: Construct the reward function in combination with the variation matrix: Wherein, R represents the reward function, e represents the base of natural logarithm, log represents logarithmic function, parameter T represents transformation matrix, and subscript T represents transposition. Represents the transformation product of the state vector at time t and its change matrix, ΔH max Indicates the maximum cache hit change rate.

7. The method for sharing data between servers according to claim 1, characterized in that: The cache hit rate is the probability that a data access request is for pre-cached data.

8. The method for sharing data between servers according to claim 1, characterized in that: After S9, the method further includes: The pre-shared data is updated at intervals of a second preset time length.

9. A data sharing system between servers, characterized in that: include: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, a method for sharing data between servers according to any one of claims 1 to 8 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for sharing data between servers according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Privacy protection dynamic edge cache design method based on distributed reinforcement learning in mobile edge computing network

    CN113364854A

  • Seamless credible cross-domain routing system of heterogeneous convergence network and control method of seamless credible cross-domain routing system

    CN113660668A