Micro-service application data sharing method, apparatus and device

Through data registration management and memory data partition distribution, the system complexity and performance problems of real-time data sharing under the microservice architecture are solved, efficient memory data sharing is achieved, Redis cluster dependency and serialization process are avoided, and system performance and performance are improved. throughput.

WO2024221633A1PCT designated stage expired Publication Date: 2024-10-31INSPUR GENERSOFT CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/110600
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-04-26
Filing Date
2023-08-01
Publication Date
2024-10-31

AI Technical Summary

Technical Problem

In large-scale business systems under microservice architecture, when existing distributed memory databases such as Redis cluster are used for real-time data sharing, there are problems such as increased system complexity, low efficiency, and performance impact, especially when the amount of data is large and concurrency is high. In this case, it is easy to create access hotspot bottlenecks.

Method used

Through data registration management, memory data is partitioned to multiple memory computing service nodes and deployed locally between nodes. Data is loaded and shared in real time using a preset method to avoid relying on Redis clusters and serialization and reflection in the data transmission process. Serialization, filtering and calculation are performed directly on the memory computing service node.

Benefits of technology

It reduces system complexity and data movement, improves system performance and throughput, alleviates the bottleneck problem of centralized access hot spots, and achieves high efficiency of real-time data sharing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023110600_31102024_PF_FP_ABST
    Figure CN2023110600_31102024_PF_FP_ABST
Patent Text Reader

Abstract

The embodiments of the present description relate to the technical field of computers. Disclosed are a micro-service application data sharing method, apparatus and device. The method comprises: by means of data registration management, managing memory data registration information needing to be loaded by each micro-service application cluster; according to the memory data registration information, determining memory data required by each micro-service application cluster; partitioning and distributing the memory data to a plurality of memory computing service nodes in each micro-service application cluster, and performing near-end deployment of the plurality of memory computing service nodes in the corresponding micro-service application clusters; and loading the memory data in the plurality of memory computing service nodes according to a preset mode, and, when the memory data changes, sharing in real time the corresponding memory computing service nodes.
Need to check novelty before this filing date? Find Prior Art

Description

A method, device and equipment for sharing microservice application data

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on April 26, 2023, with application number 202310456957.6 and invention name “A method, device and apparatus for sharing microservice application data”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] This specification relates to the field of computer technology, and in particular to a method, device, and apparatus for sharing microservice application data. Background Art

[0003] In large-scale business systems under the microservice architecture, there are scenarios where a large amount of data is shared in real time between various business microservices and cluster nodes within microservices, such as basic data sharing, business flow, instant aggregation calculation, query caching, etc.

[0004] For these scenarios, the industry typically uses distributed in-memory databases. For distributed in-memory databases, such as Redis clusters, data providers write shared data to the Redis cluster and share it in real time. Users access the data through Redis. However, sharing large amounts of data in real time through Redis clusters presents the following problems:

[0005] First, real-time data sharing relies on Redis clusters, which increases the complexity of the system. When the amount of real-time shared data is too large, it may increase the operating burden of the system. Second, real-time data sharing requires data access, which involves serialization, deserialization, and data transmission processes, which may make the system's real-time data sharing less efficient. Third, real-time data sharing may require data filtering, multi-table association, and aggregation calculations. Usually, the data must be retrieved locally for the above processing, which may affect the performance of the system.

[0006] Summary of the Invention

[0007] One or more embodiments of this specification provide a method, apparatus, and device for sharing microservice application data to solve the technical problems raised by the background technology.

[0008] One or more embodiments of this specification adopt the following technical solutions:

[0009] One or more embodiments of this specification provide a method for sharing microservice application data, including:

[0010] Through data registration management, manage the memory data registration information required to be loaded by each microservice application cluster;

[0011] Determining the memory data required by each microservice application cluster according to the memory data registration information;

[0012] Distributing the memory data partitions to multiple memory computing service nodes in each microservice application cluster, and deploying the multiple memory computing service nodes proximally in the corresponding microservice application cluster;

[0013] The memory data is loaded into the plurality of memory computing service nodes according to a preset method, and the corresponding memory computing service nodes are shared in real time when the memory data changes.

[0014] One or more embodiments of this specification provide a device for sharing microservice application data, the device comprising:

[0015] The registration management unit manages the memory data registration information required to be loaded by each microservice application cluster through data registration management;

[0016] A memory data determining unit, which determines the memory data required by each microservice application cluster according to the memory data registration information;

[0017] A node distribution unit distributes the memory data partitions to multiple memory computing service nodes in each microservice application cluster, and deploys the multiple memory computing service nodes proximally in the corresponding microservice application cluster;

[0018] The data sharing unit loads the memory data in the multiple memory computing service nodes according to a preset method, and shares the corresponding memory computing service nodes in real time when the memory data changes.

[0019] One or more embodiments of this specification provide a device for sharing microservice application data, including:

[0020] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:

[0021] Through data registration management, manage the memory data registration information required to be loaded by each microservice application cluster;

[0022] Determining the memory data required by each microservice application cluster according to the memory data registration information;

[0023] Distributing the memory data partitions to multiple memory computing service nodes in each microservice application cluster, and deploying the multiple memory computing service nodes proximally in the corresponding microservice application cluster;

[0024] The memory data is loaded into the plurality of memory computing service nodes according to a preset method, and the corresponding memory computing service nodes are shared in real time when the memory data changes.

[0025] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects:

[0026] The embodiments of this specification partition and distribute the memory data required to be loaded by the microservice application cluster to multiple memory computing service nodes in each microservice application cluster, and deploy multiple memory computing service nodes proximally in the corresponding microservice application cluster, ultimately completing the real-time sharing of memory data. The process does not need to rely on the Redis cluster. At the same time, it can reduce the movement of memory data and eliminate the serialization, deserialization and other processes in the data transmission process. In addition, when performing data filtering, multi-table association and convergence calculation and other processing, there is no need to fetch the memory data locally, which improves the overall performance of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the following briefly introduces the drawings required for the embodiments or the description of the prior art. Obviously, the drawings described below are only some of the embodiments described in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without inventive work. In the drawings:

[0028] FIG1 is a flow chart of a method for sharing microservice application data provided by one or more embodiments of this specification;

[0029] FIG2 is a schematic diagram of an existing distributed memory database provided by one or more embodiments of this specification;

[0030] FIG3 is a schematic diagram of decentralized on-demand near-end memory computing provided by one or more embodiments of this specification;

[0031] FIG4 is a schematic diagram of data caching and real-time data sharing provided by one or more embodiments of this specification;

[0032] FIG5 is a schematic diagram of real-time computing provided by one or more embodiments of this specification;

[0033] FIG6 is a schematic diagram of the structure of a device for sharing microservice application data provided by one or more embodiments of this specification;

[0034] FIG7 is a schematic diagram of the structure of a method and device for sharing microservice application data provided by one or more embodiments of this specification. DETAILED DESCRIPTION

[0035] The embodiments of this specification provide a distributed on-demand near-end memory computing method, apparatus, and device.

[0036] For the above scenario, there are three solutions that can be adopted: RPC (Remote Procedure Call Protocol) interface call, multi-write mechanism based on message queue and distributed memory database.

[0037] For RPC interface calls, that is, the data provider provides a service interface, and the data user obtains data by calling the interface to share data in real time. This method has problems such as low efficiency, high coupling, and poor scalability. In addition, cross-service data transmission requires data serialization / deserialization and transmission, which also increases the pressure on the data provider's application and database. Through RPC interface calls, the coupling between the two parties is high, and scalability is poor when demand changes.

[0038] For the multi-write mechanism based on message queues, that is, data is stored in multiple copies on the provider and user sides, and after data initialization, incremental data is synchronized through the message queue. The provider sends a message when business occurs, and the user listens and synchronizes it to the local database through message subscription. This solution can basically meet the sharing problem of basic data and other data that does not change much, but there are several problems. First, the solution is more complicated to implement, and it is necessary to provide mechanisms such as data initialization and consistency assurance. In particular, consistency assurance is more complicated and relies on message middleware, which increases the complexity of the system. Second, users in scenarios such as business flow, instant aggregation calculation, and query cache do not need data to be written to the disk. Third, data is synchronized in quasi-real time, which does not meet scenarios with high real-time requirements. Finally, the frequent sharing of data such as business flow increases the pressure on the database of the user of shared data.

[0039] For distributed in-memory databases, such as Redis, data providers write shared data into a Redis cluster and share it in real time. Users access the data through Redis. This solution has the following problems: First, it relies on the Redis cluster, which increases system complexity. Second, data access involves serialization, deserialization, and transmission, which is inefficient. Third, data filtering, multi-table association, and aggregate calculation processing are inconvenient, and data usually needs to be retrieved locally for processing, which increases costs and affects performance.

[0040] Large-scale business systems under the microservice architecture have complex structures and large data volumes. The industry generally uses memory caching and computing technologies to address the performance bottlenecks brought about by persistent storage access. The use of in-memory databases or centralized in-memory computing middleware results in performance losses such as data transmission and serialization / deserialization. In high concurrency and large data volumes, access hotspot bottlenecks are prone to occur.

[0041] To help those skilled in the art better understand the technical solutions in this specification, the following will provide a clear and complete description of the technical solutions in the embodiments of this specification, in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this specification without creative work should fall within the scope of protection of this specification.

[0042] Figure 1 is a flow chart of a method for sharing microservice application data, as provided in one or more embodiments of this specification. This process can be executed by a microservice application data sharing system. Certain input parameters or intermediate results in the process can be manually adjusted to help improve accuracy.

[0043] The method steps of the embodiment of this specification are as follows:

[0044] S101, through data registration management, manage the memory data registration information required to be loaded by each microservice application cluster.

[0045] S102: Determine the memory data required by each microservice application cluster according to the memory data registration information.

[0046] In an embodiment of the present specification, the registration information may include a memory data subscription relationship; when determining the memory data required by each microservice application cluster based on the memory data registration information, the microservice application cluster to which the memory data is subscribed may be determined based on the memory data subscription relationship; and the memory data required by each microservice application cluster may be determined based on the microservice application cluster to which the memory data is subscribed.

[0047] In the embodiments of this specification, the memory data subscription relationship can also pre-set the memory data required by each microservice application, and according to the memory data subscription relationship, the memory data can be directly allocated to the corresponding microservice application cluster. Each microservice application cluster can include multiple memory computing service nodes.

[0048] Furthermore, the registration information of the embodiments of this specification may also include memory data structure and microservice application information. The memory data structure may be defined according to the entity structure of the business entity framework. Before distributing the memory data partitions to multiple memory computing service nodes in each microservice application cluster, the application database connection information corresponding to each microservice application cluster can be determined according to the microservice application information to connect each microservice application cluster to the corresponding application database. The application database can store relevant data of the corresponding microservice application cluster. At the same time, the memory data structure can be defined according to the entity structure of the business entity framework and can be tailored as needed.

[0049] S103: Distribute the memory data partitions to multiple memory computing service nodes in each microservice application cluster, and deploy the multiple memory computing service nodes proximally in the corresponding microservice application cluster.

[0050] In an embodiment of the present specification, distributing the memory data partitions to multiple memory computing service nodes includes: distributing the memory data partitions to memory computing service nodes corresponding to application microservice nodes through a node filtering mechanism to ensure that the memory data is stored in memory computing service nodes with which memory data subscription relationships exist. The node filtering mechanism may be pre-set to perform classified filtering on the memory data, and ultimately distribute the classified and filtered memory data partitions to the memory computing service nodes corresponding to the application microservice nodes.

[0051] In an embodiment of the present specification, before distributing the memory data partitions to the multiple memory computing service nodes in each microservice application cluster, the memory computing service nodes of each microservice application cluster can be determined based on the deployment information of each microservice application cluster and a pre-set memory computing service node discovery mechanism; finally, a memory computing service cluster can be established based on the memory computing service nodes of each microservice application cluster. The memory computing service cluster can integrate the memory computing service nodes to improve the processing capacity between the memory computing service nodes.

[0052] S104: Load the memory data in the multiple memory computing service nodes according to a preset method, and share the corresponding memory computing service nodes in real time when the memory data changes.

[0053] In an embodiment of the present specification, loading in a predetermined manner may include parallel loading. Loading the memory data in the plurality of memory computing service nodes according to the predetermined manner includes, after the memory computing service is started, loading the memory data in parallel across all memory computing service nodes. Parallel loading of memory data across the plurality of memory computing service nodes can significantly improve data initialization efficiency and accelerate startup and restart times for each partitioned node.

[0054] In an embodiment of the present specification, loading in a preset manner may also include on-demand loading, loading the memory data in the multiple memory computing service nodes according to a preset manner, including: confirming the memory data to be loaded according to the microservice application to which the memory computing service node belongs; determining a set of partition columns based on the partition columns pre-acquired for the memory data to be loaded; determining, in the set of partition columns, a value range of the partition columns to be loaded by the memory computing service node through hash calculation; and loading the memory data to be loaded according to the value range of the partition columns.

[0055] In an embodiment of the present specification, the corresponding memory computing service node is shared in real time when the memory data changes, including: when the business data of the business entity framework corresponding to the memory data is monitored to change, the memory data of the corresponding memory computing service cluster node is shared in real time according to the memory data registration information.

[0056] In the embodiments of this specification, when deploying partitioned memory data, the memory data can be deployed in the application service process, which can reduce hardware and operation and maintenance costs. In addition, data and computing logic are reused within the process (near the application end), which can reduce data movement and eliminate costs such as serialization and deserialization during data transmission, thereby improving performance and throughput, and effectively alleviating the bottleneck problem of centralized access hotspots.

[0057] In the embodiments of this specification, the memory computing service can provide data access and computing services for microservice applications, including: using the Map Reduce mechanism to provide distributed access services for memory data within the microservice application cluster; a computing task engine of the Map Reduce mechanism; and a current node data access interface.

[0058] In the embodiment of this specification, the memory data may include data of the account balance and the auxiliary balance; when the microservice is started, the business entity framework loads the data of the account balance and the auxiliary balance into the memory in parallel;

[0059] The business entity framework receives the data of the account balance and the auxiliary balance, and can call a pre-set calculation task to perform real-time calculation and synchronize it to the calculation node.

[0060] In the embodiment of this specification, the data registration management has:

[0061] Provide microservice unit management, and manage database and application service processes through each microservice unit;

[0062] Provide business entity management and data structure management;

[0063] Provide business entities with the ability to configure whether to cache in memory, the partition columns to be cached, and the number of replicas;

[0064] Provide publish-subscribe configuration for business entities, which can be subscribed to by other microservice units;

[0065] Provides a business entity change capture mechanism to capture business data changes in real time and distribute data to corresponding memory computing nodes in real time.

[0066] It should be noted that the embodiments of this specification propose a decentralized, on-demand near-in-memory computing method designed to address the centralized access hotspot bottleneck problem in existing memory caching and in-memory computing technologies. To address this bottleneck, the embodiments of this specification can adopt a distributed, decentralized architecture, where data is distributed on demand to different nodes without dependencies between them. This design can significantly improve data throughput and effectively alleviate the centralized access hotspot bottleneck problem. See Figure 2 for a schematic diagram of an existing distributed in-memory database.

[0067] Furthermore, Figure 3 is a schematic diagram of decentralized on-demand proximal memory computing provided by an embodiment of this specification. By reading the memory data registration information in the data registration management APP, the memory data required by the microservice application 1 cluster and the microservice application 2 cluster is determined, and the application 1 database corresponding to the microservice application 1 cluster and the application 2 database corresponding to the microservice application 2 cluster are determined. The microservice application 1 cluster includes nodes 1 and nodes 2, and nodes 1 and 2 respectively include a business entity framework and a memory computing service node. The microservice application 2 cluster includes nodes 3 and nodes 4, and nodes 3 and nodes 4 respectively include a business entity framework and a memory computing service node. At the same time, the memory service nodes of each node constitute a memory computing cluster.

[0068] In terms of data distribution strategy, the embodiments of this specification use the business entity framework to describe the original data structure and the microservice unit in which it is located, and use the memory data registry to manage the memory data structure, data source, publish-subscribe relationship, etc. that the microservice unit needs to load. According to the microservice unit deployment information and the memory data registry, data is distributed and loaded on demand. Through the above design, data is reasonably distributed to different nodes according to the user (microservice unit), and the nodes can be scaled according to the transaction volume of different businesses (microservice units). By elastically deploying nodes, the access throughput of hot data is improved. At the same time, different data can be configured with different numbers of copies, so that hot data can be stored in multiple copies on different nodes, greatly increasing the access throughput of hot data.

[0069] In terms of data cache initialization loading, a parallel loading design is adopted. Distributed data memory computing nodes load data in parallel on demand according to the configured data structure, data source, and publish-subscribe relationship, greatly improving data initialization efficiency and speeding up node startup and restart time.

[0070] In terms of incremental data synchronization, data change capture technology is adopted. According to the mechanism provided by the business entity framework, business data changes are monitored in real time. According to the data publish-subscribe relationship configured in the memory data registry, data is automatically distributed to the corresponding data cache and computing nodes. Through the above-mentioned incremental synchronization mechanism, data synchronization consumption is reduced, the consistency and real-time performance of memory data are guaranteed, and the throughput is greatly improved.

[0071] In terms of memory computing deployment, the deployment of memory computing nodes within the application service process can eliminate the need for memory computing cluster deployment, reduce hardware and operation and maintenance costs, and reuse data and computing logic within the process (near the application end), which can reduce data movement and eliminate serialization, deserialization and other costs during data transmission, thereby improving performance and throughput, and effectively alleviating the bottleneck problem of centralized access hotspots.

[0072] The embodiment of this specification includes two parts: data registration management and business entity framework.

[0073] Data registration management has the following characteristics:

[0074] 1) Provide microservice unit management and use microservice units (MSU) to manage databases and application processes;

[0075] 2) Provide business entity management and business data structure management. A business entity belongs to a unique microservice unit;

[0076] 3) Business entities can configure whether to cache in memory, the partition columns to be cached, and the number of replicas (default 1);

[0077] 4) Provide publish-subscribe configuration for business entities, which can be subscribed to by other business units;

[0078] 5) Integrate the business entity change capture mechanism to capture business data changes in real time, and distribute the data to its corresponding memory computing node in real time according to the above configuration.

[0079] The Business Entity Framework has the following characteristics:

[0080] 1) Adopt a decentralized distributed architecture and automatically discover and network according to the configuration;

[0081] 2) Use deployment within the application process;

[0082] 3) Provide an interface for dynamically maintaining memory structures based on business entity descriptions;

[0083] 4) When the microservice cluster is started, all nodes automatically load data in parallel based on the partition columns according to the configuration information of the data registration management;

[0084] 5) Automatically synchronize incremental data by monitoring data change events in the Entity Framework;

[0085] 6) Provide access interface for business data, supporting data addition, deletion, modification and query;

[0086] 7) Provides elastic scaling mechanism, automatically rebalancing data after node changes;

[0087] 8) Provide data multi-copy management.

[0088] The application scenarios of the embodiments of this specification are: data caching (such as query results), real-time data sharing (such as basic data sharing across microservices), and instant calculation (such as budget control, daily / monthly / annual sales).

[0089] Figure 4 is a schematic diagram of data caching and real-time data sharing. In the figure, finance, budget, and basic data are three microservices. Each microservice can be deployed in a cluster (multi-node), and each microservice corresponds to an independent database. Data registration management configures the business entity structure required by the business entity framework, the subscription relationship between microservice units and data, and other information. Each microservice APP only needs to load the data it needs. Basic data includes units, Data on departments, personnel, customers, suppliers, etc. Most of this data will be used by finance and budgeting, and need to be shared in real time in their microservices. Therefore, it is necessary to configure the subscription relationship between the finance and budget microservices and the basic data such as units, departments, and personnel in the data registration management; Finance includes data such as accounts, vouchers, account balances, auxiliary balances, etc., which need to be cached in memory. Voucher data will be referenced by the budget, so it is necessary to configure the subscription relationship between the budget microservice and it in the data registration; Budget includes data such as budget table definitions and budget tables, which need to be cached in memory. The subscribed voucher data will be used for budget control and accounting. For example, the expense account on the voucher will be recorded in the corresponding expense budget execution number; When the above microservices are started, the business entity framework will load data from the corresponding database in parallel (for example, each microservice deploys 4 nodes, and these four nodes load data at the same time) and on demand (load the required content according to the registration data, and calculate the hash value according to the partition column to load the data distributed to this node) according to the data registration information.

[0090] Figure 5 is a schematic diagram of instant calculation. In the figure, financial microservices can be deployed in a cluster (as shown in the nodes in Figure 5); the frequency of querying account balances and auxiliary balances is very high, so they are cached in memory to improve performance. At the same time, their data changes at any time as business occurs; to reasonably distribute data and meet most computing performance requirements, account balances and auxiliary balances are configured to be partitioned according to subjects; when the microservice is started, the business entity framework loads account balances and auxiliary balance data into memory in parallel according to subjects (here 3 nodes at the same time); when business occurs at the same time (voucher preparation), incremental business data will be captured and sent to the business entity framework, and when sending, it will be sent to different nodes according to the hash value of the subject; when the business entity framework receives business data, it will call the computing tasks developed in advance for real-time calculations and share the account balances and auxiliary balances in memory; related queries directly obtain query results from memory.

[0091] FIG6 shows a device for sharing microservice application data provided by one or more embodiments of this specification. The device includes a registration management unit 601 , a memory data determination unit 602 , a node distribution unit 603 , and a data sharing unit 604 .

[0092] The registration management unit 601 manages the memory data registration information required to be loaded by each microservice application cluster through data registration management;

[0093] A memory data determining unit 602 determines the memory data required by each microservice application cluster according to the memory data registration information;

[0094] A node distribution unit 603 distributes the memory data partitions to multiple memory computing service nodes in each microservice application cluster, and deploys the multiple memory computing service nodes proximally in the corresponding microservice application cluster;

[0095] The data sharing unit 604 loads the memory data in the multiple memory computing service nodes according to a preset method, and shares the corresponding memory computing service nodes in real time when the memory data changes.

[0096] FIG7 is a schematic diagram of the structure of a microservice application data sharing device provided by one or more embodiments of this specification, including:

[0097] at least one processor and a bus; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:

[0098] Through data registration management, manage the memory data registration information required to be loaded by each microservice application cluster;

[0099] Determining the memory data required by each microservice application cluster according to the memory data registration information;

[0100] Distributing the memory data partitions to multiple memory computing service nodes in each microservice application cluster, and deploying the multiple memory computing service nodes proximally in the corresponding microservice application cluster;

[0101] The memory data is loaded into the plurality of memory computing service nodes according to a preset method, and the corresponding memory computing service nodes are shared in real time when the memory data changes.

[0102] The various embodiments in this specification are described in a progressive manner. Similar portions between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the device, apparatus, and non-volatile computer storage medium embodiments are generally similar to the method embodiments, so their descriptions are relatively simplified. For relevant details, refer to the descriptions of the method embodiments.

[0103] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0104] The foregoing description is merely one or more embodiments of this specification and is not intended to limit this specification. It will be apparent to those skilled in the art that various modifications and variations may be made to one or more embodiments of this specification. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of one or more embodiments of this specification are intended to be within the scope of the claims of this specification.

Claims

1. A method for sharing microservice application data, characterized in that: The method comprises: Through data registration management, manage the memory data registration information required to be loaded by each microservice application cluster; Determine the memory data required by each microservice application cluster according to the memory data registration information; Distributing the memory data partitions to multiple memory computing service nodes in each microservice application cluster, and deploying the multiple memory computing service nodes proximally in the corresponding microservice application cluster; In the multiple memory computing service nodes, the memory data is loaded according to a preset method, and the corresponding memory computing service nodes are shared in real time when the memory data changes.

2. The method according to claim 1, characterized in that The registration information includes a memory data subscription relationship; Determining the memory data required by each microservice application cluster according to the memory data registration information includes: Determine the microservice application cluster to which the memory data is subscribed according to the memory data subscription relationship; The memory data required by each microservice application cluster is determined according to the microservice application cluster subscribed to the memory data.

3. The method according to claim 1, characterized in that The registration information includes a memory data structure and microservice application information, wherein the memory data structure is defined according to an entity structure of a business entity framework; Before distributing the memory data partitions to the multiple memory computing service nodes in each microservice application cluster, the method further includes: The application database connection information corresponding to each microservice application cluster is determined according to the microservice application information, so as to connect each microservice application cluster to the corresponding application database.

4. The method according to claim 1, characterized in that: Before distributing the memory data partitions to the multiple memory computing service nodes in each microservice application cluster, the method further includes: Determine the memory computing service nodes of each microservice application cluster according to the deployment information of each microservice application cluster and a preset memory computing service node discovery mechanism; A memory computing service cluster is established based on the memory computing service nodes of each microservice application cluster.

5. The method according to claim 2, characterized in that: The partitioning of the memory data to multiple memory computing service nodes includes: Through the node filtering mechanism, the memory data partitions are distributed to the memory computing service nodes corresponding to the application microservice nodes to ensure that the memory data is stored in the memory computing service nodes with which the memory data subscription relationship exists.

6. The method according to claim 1, characterized in that The pre-set mode loading includes parallel loading; The step of loading the memory data in the plurality of memory computing service nodes according to a preset method includes: After the memory computing service is started, the memory data of all memory computing service nodes are loaded in parallel.

7. The method according to claim 1, characterized in that The pre-set mode loading includes on-demand loading; The step of loading the memory data in the plurality of memory computing service nodes according to a preset method includes: Confirm the memory data to be loaded based on the microservice application to which the memory computing service node belongs; Determine a set of partition columns according to the partition columns pre-acquired from the memory data to be loaded; In the set of partition columns, determine the value range of the partition column to be loaded by the memory computing service node through hash calculation; The memory data to be loaded is loaded according to the value range of the partition column.

8. The method according to claim 1, characterized in that The real-time sharing of the corresponding memory computing service node when the memory data changes includes: When a change in the business data of the business entity framework corresponding to the memory data is monitored, the memory data of the corresponding memory computing service cluster node is shared in real time according to the memory data registration information.

9. A device for sharing microservice application data, characterized in that: The device comprises: The registration management unit manages the memory data registration information required to be loaded by each microservice application cluster through data registration management; A memory data determination unit, which determines the memory data required by each microservice application cluster according to the memory data registration information; A node distribution unit distributes the memory data partitions to multiple memory computing service nodes in each microservice application cluster, and deploys the multiple memory computing service nodes proximally in the corresponding microservice application cluster; The data sharing unit loads the memory data in the multiple memory computing service nodes according to a preset method, and shares the corresponding memory computing service nodes in real time when the memory data changes.

10. A device for sharing microservice application data, characterized in that: include: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor so that the at least one processor can: Through data registration management, manage the memory data registration information required to be loaded by each microservice application cluster; Determine the memory data required by each microservice application cluster according to the memory data registration information; Distributing the memory data partitions to multiple memory computing service nodes in each microservice application cluster, and deploying the multiple memory computing service nodes proximally in the corresponding microservice application cluster; In the multiple memory computing service nodes, the memory data is loaded according to a preset method, and the corresponding memory computing service nodes are shared in real time when the memory data changes.

Citation Information

Patent Citations

  • A data sharing method between micro-services

    CN109922151A

  • Service registration system and method

    CN110365750A

  • Device and method for refreshing local cache of distributed system

    CN113449000A

  • Interface request processing method and device, cluster system of micro-service framework and medium

    CN114500655A

  • Multi-service isolation method and system for micro-service cluster

    CN115567251A