A dual-distributed micro-service architecture, scheduling algorithm and edge-cloud data sharing system
By employing a dual-distributed microservice architecture and scheduling algorithm, combined with cache server nodes and data center clusters, the problems of data consistency and high cost in distributed systems are solved, achieving low-cost and efficient data sharing and node utilization.
Patent Information
- Application Number
- CN202310140803.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-15
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2043-02-15
AI Technical Summary
The lack of a unified optimization approach in existing distributed network and edge computing technologies leads to complex data consistency issues, unpredictable additional system overhead, severe latency problems, low utilization of edge nodes, and high costs.
Adopting a dual distributed microservice architecture, through the design of cache server nodes and data center clusters, combined with gRPC, Gossip and Raft algorithms, it achieves the separation and maintenance of global data volume and effective data address, reducing data transmission and caching costs.
It optimizes data consistency maintenance and node communication in distributed systems, reduces global data caching and transmission costs, and improves the utilization of edge nodes and system scalability.
Smart Images

Figure CN116319786B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of information technology, and in particular relates to a dual distributed microservice architecture, scheduling algorithm and edge-cloud data sharing system. Background Technology
[0002] In existing distributed network and edge computing technologies, edge-cloud data sharing systems designed for edge content delivery networks are currently being optimized by individual companies primarily based on their own business architectures, lacking a unified overall optimization approach. The distributed system architecture further complicates matters, particularly data consistency issues leading to unpredictable additional system overhead. Furthermore, overly coarse-grained distributed interaction designs resulting from inadequate architectural refinement further increase the cost of building and operating distributed systems. Consequently, mainstream companies still tend to favor cluster-based architectures in most project designs, resulting in low utilization of edge nodes and hindering latency reduction due to physical distance limitations. Existing technologies have shortcomings. Summary of the Invention
[0003] The purpose of this application is to provide a dual-distributed microservice architecture, scheduling algorithm, and edge-cloud data sharing system. In a fully connected network, by setting up cache servers (e.g., network nodes), the system caches the transfer and replication operations between shared data sets, ensuring that data is transferred to the globally cached node with the lowest cost, thereby minimizing the overall service cost of the network. It aims to solve the problems of distributed node communication and data consistency maintenance, further reducing the cost of global data caching and transmission in a distributed architecture.
[0004] On the one hand, this application provides a dual distributed microservice architecture, including at least one cache server node and at least one data center cluster that connects the cache server node to the Internet; the cache server node is used to cache data; the data center cluster accepts service registrations from the cache server node based on the node structure; the data center cluster includes server nodes and client nodes respectively connected to the cache server node; the server nodes and client nodes share service registration information through mutual connection.
[0005] On the other hand, this application also provides a scheduling method applied in the above-mentioned microservice architecture; the scheduling method includes the following steps:
[0006] s1. When the cache server node needs data to satisfy a service request: it communicates with the client node with which it initially communicated and queries whether there is valid address information. If not, it continues to access the remaining client nodes to query. If a valid data address is obtained, it uses gRPC to access the cache server corresponding to that address and obtain the data packet.
[0007] s2. When a cache server node obtains data: it communicates with the server node to increment the global data volume maintained by the server node by 1; and maintains strong consistency of the data among the server nodes; it communicates with the client node and informs the client node of its address information, and the client nodes maintain eventual consistency of the address information based on Gossip; in order to record the data flow.
[0008] s3. When the cache server node makes a data scheduling decision, it communicates with the server node to obtain the latest global data volume; if the current data is not unique, it selects the local data deletion strategy; if the current data is unique, it caches the data again for a strategy time and queries again; if it is still unique, it transfers the data to the global cache minimum cost node.
[0009] s4. When data is deleted or migrated by the cache server node, it communicates with the server node to decrement the global data volume by 1; then it communicates again with the client node that has previously communicated with the current cache server node to inform the client node that the address of the deleted or migrated data has become invalid; the client node invalidates the address information sequentially based on the previously recorded data flow.
[0010] On the other hand, this application also provides an edge-cloud data sharing system based on the above-mentioned microservice architecture design, in which global data sharing is achieved among distributed edge nodes according to a pre-caching scheduling algorithm strategy.
[0011] This application, based on a semi-heterogeneous cost model, formulates the edge-cloud data sharing system problem as a collaborative caching optimization problem in a fully connected edge network. Utilizing the concept of expected caching in a strongly consistent distributed structure, the algorithm is optimized to have a deterministic upper bound, and further research is conducted to reduce cost design. Simultaneously, in the distributed structure, this application maintains the global data volume using a strongly consistent distributed algorithm on the server nodes, while maintaining valid data address information using an eventually consistent distributed algorithm on the client nodes. This algorithm makes the original algorithm more consistent with cost-driven data caching in a real-world distributed environment, solving the problems of distributed node communication and data consistency maintenance; furthermore, the categorized use of data center clusters further reduces the cost of global data caching and transmission in the distributed architecture. Attached Figure Description
[0012] Figure 1 This is a schematic diagram of the dual distributed microservice architecture provided in Embodiment 1 of this application;
[0013] Figure 2 This is a flowchart of the scheduling method applied in the dual distributed microservice architecture of this application. Detailed Implementation
[0014] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0015] The specific implementation of this application will be described in detail below with reference to specific embodiments:
[0016] Example One:
[0017] Figure 1 This paper illustrates a dual-distributed microservice architecture provided in Embodiment 1 of this application. For ease of explanation, only the parts relevant to the embodiments of this application are shown, and are described in detail below:
[0018] On the one hand, this application provides a dual distributed microservice architecture, including at least one cache server node and at least one data center cluster that connects the cache server node to the Internet; the cache server node is used to cache data; the data center cluster accepts service registrations from the cache server node based on the node structure; the data center cluster includes server nodes and client nodes that are respectively connected to the cache server node; the server nodes and client nodes share service registration information by connecting to each other.
[0019] In this process, after the cache server registers the services it can provide in the data center cluster, it can easily access the registered services from other nodes.
[0020] Furthermore, when the number of cache server nodes is greater than or equal to 2, the transfer and copying operations between a set of data are shared through caching.
[0021] Furthermore, all services registered to the client node are forwarded to the server node, and the client node does not persist the registration information; the client node maintains the data address of the cache server node.
[0022] The maintenance employs a globally eventual consistency approach. That is, for valid data addresses, as long as one or more valid data addresses exist, the needs of the entire network are satisfied. Therefore, the client nodes maintain the data addresses. This application uses the Gossip algorithm for communication between client nodes, thus the information on valid data addresses is shared and transmitted among them.
[0023] Furthermore, the server nodes accept service registrations and persistently retain the registration information; among the server nodes, the data volume of the cache server nodes is maintained based on the Raft algorithm.
[0024] The maintenance employs a globally strong consistency approach. This means the global data volume is the key basis for data scheduling / deletion by the cache server nodes, and the accurate information of the current global data volume in the server nodes must be readily available and updated. Therefore, a strongly consistent distributed algorithm is needed to maintain this volume. In this application, the global strong consistency maintenance of the global data volume among the server nodes is based on the Raft algorithm. Thus, the server nodes include the global data volume in the maintenance scope to ensure its sharing across all server nodes.
[0025] If the valid address information is also maintained with strong consistency, although it may reduce the communication overhead between client nodes, the additional overhead brought by strong consistency maintenance will be far greater than the overhead of eventual consistency. Therefore, adopting a design of maintaining two different types of data with two distributed architectures can better optimize the global consumption of the microservice architecture.
[0026] Furthermore, when the number of server nodes is greater than or equal to 2, one of the server nodes will be changed to the server leader node; the server leader node is responsible for synchronizing the registration information to the server nodes, and is also responsible for the health monitoring of all nodes in the data center cluster.
[0027] Furthermore, both the server-side and client-side nodes run agent programs that automatically execute tasks and interact with other nodes based on the algorithm of these agent programs.
[0028] Specifically, the core of the proxy program is a set of control algorithms, which are existing technologies and are not subject to protection claims in this application.
[0029] This application's dual-distributed microservice architecture is built upon an edge content delivery network and a semi-heterogeneous cost model. Because the cost model is semi-heterogeneous—meaning all cache nodes share the same transmission cost, but each cache node has potentially different caching costs—and in a distributed structure, data consistency between server nodes also incurs costs, each cache server node needs to interact with both server and client nodes. By maintaining data address and data volume information separately within the two distributed systems, different distributed algorithms are used to maintain these two key quantities, reducing the additional overhead of maintaining distributed data consistency and thus minimizing global overhead.
[0030] Specifically, in typical clusters, scheduling algorithms are centrally controlled, with each cache node passively receiving commands. However, the microservice architecture of this application is based on a distributed architecture design, where each node spontaneously participates in the scheduling algorithm. Distributed edge nodes spontaneously acquire environmental information to execute corresponding policy actions. Each distributed edge node needs two pieces of information: whether the corresponding data exists globally, and the path to obtain the corresponding data with the lowest routing cost. To dynamically maintain this global information, the edge-cloud data sharing system designed in this application's microservice architecture achieves global data sharing among distributed edge nodes based on a pre-cached scheduling algorithm strategy. Its dual-distributed architecture design further solves the problems of latency, scalability, and data security among nodes.
[0031] Example Two:
[0032] on the other hand, Figure 2 This application also provides a specific flow of a scheduling method, applied in the aforementioned microservice architecture; the scheduling method includes the following steps:
[0033] s1. When a cache server node needs data to fulfill a service request: it communicates with the initial client node and queries whether there is valid address information. If not, it continues to access other client nodes to query. If a valid data address is obtained, it uses gRPC to access the cache server corresponding to that address and obtain the data packet.
[0034] s2. When a cache server node obtains data: it communicates with the server node to increment the global data volume maintained by the server node by 1; and maintains strong consistency of the data among the server nodes; it communicates with the client node and informs the client node of its address information, and the client nodes maintain eventual consistency of the address information based on Gossip; in order to record the data flow.
[0035] s3. When the cache server node makes a decision on the data scheduling strategy: communicate with the server node to obtain the latest global data volume; if the current data is not unique, choose the local data deletion strategy; if the current data is unique, cache the data again for a strategy time and query again; if it is still unique, transfer the data to the global cache minimum cost node.
[0036] s4. When data is deleted or migrated on the cache server node: Communicate with the server node to decrement the global data volume by 1; then communicate with the client node that has previously communicated with the current cache server node to inform the client node that the address of the deleted or migrated data has become invalid; the client node invalidates the address information sequentially based on the previously recorded data flow.
[0037] Furthermore, in step s1, when the performance accesses the remaining client nodes, it avoids the client nodes that use the Gossip algorithm among the client nodes that initially communicated.
[0038] Furthermore, in step s2, the log records based on the Raft strategy determine the age of the data according to logical time to maintain strong consistency.
[0039] This application presents an improved scheduling method that designs a cost-driven cloud data caching algorithm based on a dual-distributed architecture. By employing different distributed algorithms and different types of nodes to maintain two key quantities (global data volume and valid data address), the additional overhead of maintaining distributed data consistency in the system is further optimized and reduced.
[0040] Specifically, the consistency requirements for effective addresses and global data volume differ. Higher consistency requirements lead to greater overall network overhead. Effective addresses do not require as high consistency as global data volume, so maintaining them separately can effectively reduce network overhead.
[0041] Example Three:
[0042] On the other hand, this application also provides an edge-cloud data sharing system based on the above-mentioned microservice architecture design, in which global data sharing is achieved among distributed edge nodes according to a pre-caching scheduling algorithm strategy.
[0043] This application aims to reduce economic costs, thus requiring a good balance between benefits and costs. Furthermore, since the capabilities of distributed edge nodes are limited compared to cloud data center clusters, the applications configured on each distributed edge node must also consider their capacity (e.g., the computing power of each node; more nodes can be configured for nodes with high computing power, such as assigning strong consistency maintenance tasks to these nodes). By decoupling the functionalities of the previous cluster algorithm, different nodes undertake different functions in the distributed system, giving this system better scalability.
[0044] Example Four:
[0045] On the other hand, this application also provides a storage medium storing a program file capable of implementing the above-described scheduling method.
[0046] Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware, and the program can be stored in a computer-readable storage medium, such as ROM / RAM, disk, optical disk, etc.
[0047] Example Five:
[0048] On the other hand, this application also provides a processor for running a program, wherein the program executes the scheduling method described above during runtime.
[0049] In the embodiments of this application, the scheduling method can be implemented by corresponding hardware or software units. Each unit can be an independent hardware or software unit, or it can be integrated into a single hardware or software unit, which is not intended to limit this application. The specific implementation methods of each unit can be referred to the description of Embodiment 1, and will not be repeated here.
[0050] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A dual-distributed microservice system, characterized in that, The system comprises at least one cache server node and at least one data center cluster connecting the cache server node to the Internet; the cache server node is used to cache data; the data center cluster accepts service registration of the cache server node in the form of node-based; the data center cluster comprises a service end node and a client node connected with the cache server node respectively; the service end node and the client node share service registration information by connecting with each other; When the number of cache server nodes is greater than or equal to 2, the transfer and replication operations between a group of data are shared by caching; The client node maintains the data address of the cache server node; The service end nodes maintain the data volume of the cache server node based on the Raft algorithm.
2. The microservice system of claim 1, wherein, All services registered to the client node are forwarded to the service end node, and the client node does not persist the registration information.
3. The microservice system of claim 2, wherein, The service end node accepts service registration and persists the registration information.
4. The microservice system of claim 3, wherein, When the number of service end nodes is greater than or equal to 2, one of the service end nodes will change to a service end leader node; the service end leader node is responsible for synchronizing the registered information to the service end nodes and monitoring the health of all nodes in the data center cluster.
5. The microservice system of claim 4, wherein, The service end node and the client node both run an agent program, which automatically executes tasks and interacts with other nodes according to the algorithm of the agent program.
6. A scheduling method characterized by, The scheduling method is applied to the micro-service system of any one of claims 1 to 5; the scheduling method comprises the following steps: s1. When the cache server node needs data to meet service requests: communicate with the initially communicated client node and query whether there is valid address information, if not, continue to access the remaining client nodes for query; if valid data address is obtained, use gRPC to access the cache server corresponding to the address and obtain the data packet; s2. When the cache server node obtains data: communicate with the service end node, make the global data volume maintained by the service end node +1; and maintain the data among the service end nodes with strong consistency; communicate with the client node and inform the client node of the node address information, and the address information is maintained with eventual consistency among the client nodes based on Gossip; to record the data flow; s3. When the cache server node decides the data scheduling strategy: communicate with the service end node to obtain the current latest global data volume; if the current data is not unique, select the local data deletion strategy; if the current data is unique, cache the data again for a strategy time and query again, if it is still unique, transfer the data to the global cache minimum cost node; s4. When the cache server node deletes or migrates data: communicate with the service end node to make the global data volume -1; and communicate with the client node that has communicated with the current cache server node again, and inform the client node that the address of the deleted or migrated data has become invalid; the client node invalidates the address information in sequence based on the previously recorded data flow.
7. The method of claim 6, wherein, In the step s1, when accessing the remaining client nodes, the client node using the Gossip algorithm in the initially communicated client node is avoided.
8. The method of claim 6, wherein, In the step s2, the new and old of the data are determined according to the logical time based on the Raft strategy record log to maintain the strong consistency. 9.A side cloud data sharing system based on the micro-service system design of any one of claims 1 to 5, characterized in that, Global data sharing is realized among the distributed edge nodes according to the pre-caching scheduling algorithm strategy.