Enterprise resource management system reconstruction method and device based on micro-service architecture

Through the microservice architecture, the enterprise resource management system is reconstructed, and distributed deployment and functional module decoupling is realized, solving the problems of insufficient scalability and functional coupling of existing systems, and improving the flexibility and maintainability of the system.

CN119991023APending Publication Date: 2025-05-13XIAMEN DAOZHI DIGITAL INFORMATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510068088.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-16
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The monolithic architecture of the existing enterprise resource management system results in insufficient scalability, inability to effectively process high concurrency and large-scale data, and the functions are highly coupled, making it difficult to quickly update and maintain.

Method used

The enterprise resource management system is reconstructed using the microservice architecture, and the domain-driven design is used to deploy independent microservices for each business field. Each microservice corresponds to a database, realizing distributed deployment and decoupling of functional modules. At the same time, the query interfaces of multiple microservices are merged and the compensation transaction mechanism is set up to ensure data consistency and system reliability.

Benefits of technology

It improves the flexibility and scalability of the enterprise resource management system, supports high concurrency and large-scale data processing, reduces the coupling between functional modules, realizes rapid updates and version management, and enhances the maintainability and fault tolerance of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119991023A_ABST
    Figure CN119991023A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of enterprise informatization management, and discloses an enterprise resource management system reconstruction method and device based on a micro-service architecture, and the method comprises the steps: analyzing a plurality of business fields corresponding to each function module in an enterprise resource management system, and deploying an independent micro-service for each business field; combining the query interfaces of the plurality of independent micro-services into a unified query interface; after receiving a data acquisition request through a query interface, determining a plurality of target micro-services required to be called in response to the data acquisition request, and setting a corresponding compensation transaction for each target micro-service; and calling a plurality of target micro-services to respond to the data acquisition request, if any target micro-service has a fault, executing a compensation transaction corresponding to the target micro-service, and feeding back the acquired data to the client after the plurality of target micro-services acquire the data from the corresponding database. According to the invention, the flexibility and expansibility of the enterprise resource management system are improved through the micro-service architecture.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of enterprise information management, and in particular relates to a method and device for reconstructing an enterprise resource management system based on a microservice architecture. Background Art

[0002] An enterprise resource management system is an information system that integrates and manages various departments of an enterprise as well as multiple business areas such as finance, logistics, and human resources. Existing enterprise resource management systems are usually monolithic, with highly coupled functions and lack of flexibility and scalability.

[0003] Specifically, as the scale of enterprises continues to expand, the enterprise resource management system will process a large number of concurrent requests and large-scale data, and the enterprise resource management system with a single architecture will face the problem of insufficient scalability. Therefore, it is urgent to propose an enterprise resource management system reconstruction method to improve the flexibility and scalability of the enterprise resource management system. Summary of the invention

[0004] The purpose of the present invention is to reduce the coupling degree of the enterprise resource management system through the microservice architecture, support high concurrency and large-scale data processing, and increase the flexibility and scalability of the enterprise resource management system.

[0005] In a first aspect, an embodiment of the present invention provides a method for reconstructing an enterprise resource management system based on a microservice architecture, the method comprising:

[0006] Through domain-driven design, we analyze the multiple business domains corresponding to each functional module in the enterprise resource management system, and deploy an independent microservice for each business domain. Multiple independent microservices can communicate with each other, each independent microservice corresponds to a database, and different microservices correspond to different databases.

[0007] Merge query interfaces of multiple independent microservices into a unified query interface;

[0008] After receiving a data acquisition request sent by a client through the query interface, the data acquisition request is parsed, a plurality of target microservices that need to be called in response to the data acquisition request are determined, and a corresponding compensation transaction is set for each of the target microservices, wherein a compensation transaction of a target microservice is used to cancel transactions executed by other target microservices among the plurality of target microservices except the target microservice when the target microservice fails;

[0009] The multiple target microservices are called to respond to the data acquisition request. If any of the multiple target microservices fails, a compensation transaction corresponding to the target microservice is executed, and the data acquisition request is continued to be responded to. After the multiple target microservices all obtain data from the corresponding database, the data obtained by the multiple target microservices are fed back to the client.

[0010] Optionally, the method further includes:

[0011] Establishing communication between multiple independent microservices through a transaction-driven architecture, wherein the multiple independent microservices communicate through a standard interface;

[0012] For each independent microservice, the microservice and its corresponding dependencies are packaged into an independent container, and the microservice runs independently through the independent container.

[0013] Optionally, the method further includes:

[0014] Adjust the configuration parameters of the microservice through the container orchestration tool to expand or update the microservice;

[0015] The health status or performance indicators of the microservices are monitored by a container monitoring tool, and when the health status or performance indicators of the microservices are abnormal, prompt information is generated, wherein the prompt information includes the service identifier of the abnormal microservice and the abnormal information of the abnormal microservice.

[0016] Optionally, the method further includes:

[0017] In the process of calling the multiple target microservices to respond to the data acquisition request, saving the transaction flows of the transactions executed by the multiple target microservices;

[0018] When it is necessary to trace back the transactions executed by the multiple target microservices, the tracing is performed by querying the transaction flow.

[0019] Optionally, the method further includes:

[0020] In the process of calling the multiple target microservices to respond to the data acquisition request, if a target microservice fails, the failed target microservice is isolated from other target microservices through a fuse mode;

[0021] The data is saved through asynchronous message queues, and the transactions that need to be executed by the failed target microservice are transferred to the backup microservice through automatic failover.

[0022] Optionally, the method further includes:

[0023] For each independent microservice, when the microservice needs to call other microservices, the other microservices are automatically registered and discovered through the service discovery mechanism.

[0024] In a second aspect, an embodiment of the present invention provides an enterprise resource management system reconstruction device based on a microservice architecture, the device comprising:

[0025] The microservice deployment module is used to analyze the multiple business domains corresponding to each functional module in the enterprise resource management system through domain-driven design, and deploy an independent microservice for each business domain. Multiple independent microservices can communicate with each other, each independent microservice corresponds to a database, and different microservices correspond to different databases;

[0026] The query interface merging module is used to merge the query interfaces of multiple independent microservices into a unified query interface;

[0027] A compensation transaction setting module, which is used to parse the data acquisition request sent by the client through the query interface, determine multiple target microservices that need to be called to respond to the data acquisition request, and set corresponding compensation transactions for each target microservice, wherein the compensation transaction of a target microservice is used to cancel the transactions executed by other target microservices among the multiple target microservices except the target microservice when the target microservice fails;

[0028] The data acquisition request response module is used to call the multiple target microservices to respond to the data acquisition request. If any of the multiple target microservices fails, the compensation transaction corresponding to the target microservice is executed, and the data acquisition request is continued to be responded to. After the multiple target microservices obtain data from the corresponding database, the data obtained by the multiple target microservices are fed back to the client.

[0029] In a third aspect, an embodiment of the present invention provides an electronic device, including:

[0030] at least one processor;

[0031] a memory for storing the at least one processor-executable instruction;

[0032] The at least one processor is configured to execute the instructions to implement the method described in the first aspect.

[0033] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method described in the first aspect.

[0034] In a fifth aspect, an embodiment of the present invention provides a computer program product, including a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.

[0035] The technical solution provided by the embodiment of the present invention analyzes multiple business domains corresponding to each functional module in the enterprise resource management system through domain-driven design, deploys an independent microservice for each business domain, and each independent microservice corresponds to a database, thereby realizing the distributed deployment of the enterprise resource management system. By deploying multiple independent microservices, the decoupling of the functional modules of the enterprise resource management system can be realized, and by merging the query interfaces of multiple independent microservices into a unified query interface, it can be ensured that the client accurately obtains the required data, reducing data transmission redundancy and data acquisition efficiency. Moreover, when responding to a data acquisition request, if any of the multiple target microservices fails, the compensation transaction corresponding to the target microservice is executed to cancel the transactions executed by other target microservices, thereby ensuring the consistency of cross-microservice events. After multiple target microservices obtain data from the corresponding database, the data obtained by the multiple target microservices are fed back to the client, thereby realizing a quick and accurate response to the data acquisition request.

[0036] It can be seen that through the distributed design of the microservice architecture, the functional modules of the enterprise resource management system can horizontally expand multiple independent microservices on demand, reduce the coupling degree of the enterprise resource management system, and support high concurrency and large-scale data processing. In accordance with the multiple business areas corresponding to the functional modules, independent microservices are deployed for each business area, supporting the rapid update and version management of functional modules, reducing the impact of the upgrade of a single functional module on the overall enterprise resource management system, increasing the flexibility of the enterprise resource management system, and improving the maintainability of the enterprise resource management system. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 A flowchart of a method for reconfiguring an enterprise resource management system based on a microservice architecture provided by an embodiment of the present invention;

[0038] Figure 2 A schematic diagram of the structure of an enterprise resource management system reconstruction device based on a microservice architecture provided by an embodiment of the present invention;

[0039] Figure 3 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0040] The present invention will be described in detail below through examples.

[0041] An enterprise resource management system is an information system that integrates and manages various departments of an enterprise as well as multiple business areas such as finance, logistics, and human resources. Existing enterprise resource management systems are usually monolithic, with highly coupled functions and lack of flexibility and scalability.

[0042] Specifically, as the scale of the enterprise continues to expand, the enterprise resource management system will handle a large number of concurrent requests and large-scale data, and the enterprise resource management system with a monolithic architecture will face the problem of insufficient scalability.

[0043] In addition, since traditional ERP systems are usually monolithic and highly coupled in function, once a functional module needs to be updated or repaired, the deployment and maintenance of the entire ERP system may be affected, or even cause the entire ERP system to shut down. Therefore, a new architectural approach is urgently needed to cope with complex and changing enterprise needs and improve the scalability, flexibility, reliability, and maintainability of the ERP system.

[0044] To this end, an embodiment of the present invention provides an enterprise resource management system reconstruction method to solve the above technical problems existing in the existing enterprise resource management system.

[0045] The enterprise resource management system provided by the embodiment of the present invention can achieve the following objectives:

[0046] 1. Improve the scalability of the enterprise resource management system. Specifically, through the distributed design of the microservice architecture, the functional modules of the enterprise resource management system can be horizontally expanded on demand to support high concurrency and large-scale data processing.

[0047] 2. Enhance the flexibility of the enterprise resource management system. Specifically, according to the multiple business areas corresponding to the functional modules, deploy independent microservices for each business area, support the rapid update and version management of functional modules, and reduce the impact of the upgrade of a single functional module on the overall enterprise resource management system.

[0048] 3. Reduce the coupling degree of the enterprise resource management system. Specifically, each microservice runs independently and communicates through a standardized API (Application Programming Interface), reducing the dependency between functional modules and improving the modularity of the enterprise resource management system.

[0049] 4. Improve the maintainability of the enterprise resource management system. Specifically, through containerized deployment, automated monitoring, dynamic expansion and other mechanisms, the operation and maintenance of the enterprise resource management system will be more efficient and reliable.

[0050] 5. Improve fault tolerance and reliability: Use technologies such as service circuit breaking, automatic failover, and load balancing to ensure that the enterprise resource management system can ensure uninterrupted business even when some microservices fail.

[0051] The following is a detailed description of an enterprise resource management system reconstruction method based on a microservice architecture provided by an embodiment of the present invention.

[0052] like Figure 1 As shown, an enterprise resource management system reconstruction method based on a microservice architecture provided by an embodiment of the present invention may include the following steps:

[0053] S110, analyzing multiple business domains corresponding to various functional modules in the enterprise resource management system through domain-driven design, and deploying an independent microservice for each business domain.

[0054] Among them, multiple independent microservices can communicate with each other, each independent microservice corresponds to a database, and different microservices correspond to different databases.

[0055] Specifically, the business domains corresponding to each functional module in the enterprise resource management system are analyzed through domain-driven design, so as to finely divide the functional modules according to the business domains. Different functional modules correspond to different business domains. For example, for the financial management functional module, it can be divided into multiple business domains such as budget management, reimbursement management, and financial statements; for the procurement management module, it can be divided into multiple business domains such as supplier management, order management, and inventory management.

[0056] In order to reduce functional coupling, the embodiment of the present invention deploys an independent microservice for each business domain. Each microservice can be independently developed, tested, deployed and upgraded, and each microservice has an independent database and data storage solution. In this way, each microservice can be limited to a single business domain, reducing data dependency and coupling across modules. At the same time, asynchronous communication and decoupling between multiple microservices are achieved based on a transaction-driven approach, improving the response speed and data consistency of the enterprise resource management system.

[0057] As an implementation of the embodiment of the present invention, the enterprise resource management system reconstruction method based on the microservice architecture may further include the following two steps, namely step a1 and step a2:

[0058] Step a1: Establish communication between multiple independent microservices through a transaction-driven architecture.

[0059] Among them, multiple independent microservices communicate through standard interfaces.

[0060] Step a2: for each independent microservice, the microservice and its corresponding dependencies are packaged into an independent container, and the microservice runs independently through the independent container.

[0061] In this embodiment, communication between multiple independent microservices is established through a transaction-driven architecture, and multiple independent microservices communicate through standard interfaces to ensure seamless collaboration and data transmission between multiple independent microservices. Among them, the standard interface can be GraphQL, etc. It is understandable that those skilled in the art can understand what the standard interfaces are, and will not be repeated here.

[0062] In addition, to ensure that multiple microservices can run independently, each microservice uses containerization technology to package the microservice and its corresponding dependencies into an independent container, so that each microservice can run independently through its corresponding container. API gateways can be used for unified routing and load balancing between multiple independent microservices.

[0063] S120, merge query interfaces of multiple independent microservices into a unified query interface.

[0064] Specifically, the API gateway mode can be used to introduce the GraphQL interface aggregation mechanism. The query interfaces of multiple microservices can be merged into a unified query interface through the GraphQL interface aggregation mechanism. The client can obtain data through the unified query interface. In this way, the client can accurately obtain the required data, reduce data transmission redundancy, and improve response speed, thereby improving the client's data acquisition efficiency.

[0065] S130, after receiving the data acquisition request sent by the client through the query interface, parse the data acquisition request, determine multiple target microservices that need to be called to respond to the data acquisition request, and set a corresponding compensation transaction for each target microservice.

[0066] Among them, a compensation transaction of a target microservice is used to cancel transactions executed by other target microservices except the target microservice among multiple target microservices when a failure occurs in the target microservice.

[0067] Specifically, when the client needs to obtain data, the client can send a data acquisition request through the query interface. The electronic device as the execution subject can receive the data acquisition request sent by the client, parse the data acquisition request, determine the multiple target microservices that need to be called to respond to the data acquisition request, and set a corresponding compensation transaction for each target microservice to determine the consistency of the final operation of the multiple target microservices. For example, the multiple target microservices are microservice 1, microservice 2, and microservice 3. Assuming that microservice 1 is successfully called, when microservice 2 is called, microservice 2 fails. Then, by executing the compensation transaction of microservice 2, the transaction that has been executed by microservice 1 can be revoked, thereby ensuring the consistency of the final operation of multiple target microservices, that is, ensuring the consistency of cross-microservice transactions.

[0068] S140, calling multiple target microservices to respond to the data acquisition request. If any of the multiple target microservices fails, execute the compensation transaction corresponding to the target microservice, and continue to respond to the data acquisition request. After the multiple target microservices obtain data from the corresponding database, the data obtained by the multiple target microservices are fed back to the client.

[0069] Specifically, after determining the multiple target microservices required to respond to the data acquisition request through S130, the multiple target microservices can be called to respond to the data acquisition request. If any of the multiple target microservices fails, the compensation transaction corresponding to the target microservice is executed to ensure the consistency of cross-microservice events. The data acquisition request can be re-responded. After the multiple target microservices have obtained data from their corresponding databases, the data obtained by the multiple target microservices can be sent to the client, thereby successfully responding to the data acquisition request. For example, the multiple target microservices are microservice 1, microservice 2, and microservice 3. In the process of responding to the data acquisition request, microservice 1 obtains the first data from its corresponding database, microservice 2 obtains the second data from its corresponding database, and microservice 3 obtains the third data from its corresponding database. Then, the first data, the second data, and the third data are sent to the client.

[0070] The technical solution provided by the embodiment of the present invention analyzes multiple business domains corresponding to each functional module in the enterprise resource management system through domain-driven design, deploys an independent microservice for each business domain, and each independent microservice corresponds to a database, thereby realizing the distributed deployment of the enterprise resource management system. By deploying multiple independent microservices, the decoupling of the functional modules of the enterprise resource management system can be realized, and by merging the query interfaces of multiple independent microservices into a unified query interface, it can be ensured that the client accurately obtains the required data, reducing data transmission redundancy and data acquisition efficiency. Moreover, when responding to a data acquisition request, if any of the multiple target microservices fails, the compensation transaction corresponding to the target microservice is executed to cancel the transactions executed by other target microservices, thereby ensuring the consistency of cross-microservice events. After multiple target microservices obtain data from the corresponding database, the data obtained by the multiple target microservices are fed back to the client, thereby realizing a quick and accurate response to the data acquisition request.

[0071] It can be seen that through the distributed design of the microservice architecture, the functional modules of the enterprise resource management system can horizontally expand multiple independent microservices on demand, reduce the coupling degree of the enterprise resource management system, and support high concurrency and large-scale data processing. In accordance with the multiple business areas corresponding to the functional modules, independent microservices are deployed for each business area, supporting the rapid update and version management of functional modules, reducing the impact of the upgrade of a single functional module on the overall enterprise resource management system, increasing the flexibility of the enterprise resource management system, and improving the maintainability of the enterprise resource management system.

[0072] Based on the above embodiment, in one implementation, the enterprise resource management system reconstruction method based on microservice architecture may further include the following steps, namely step b1 and step b2:

[0073] Step b1: adjust the configuration parameters of the microservice through the container orchestration tool, expand the microservice, or update the microservice.

[0074] Specifically, the container orchestration tool can modify the configuration parameters by modifying the configuration parameter file or by specifying the command. The configuration parameters of the configuration parameter file may include the image version, port, environment variables, and number of copies. By modifying the number of copies of the microservice, the expansion of the microservice can be achieved. In addition, the microservice can be updated by modifying the image version.

[0075] Step b2, monitor the health status or performance indicators of the microservice through the container monitoring tool, and generate prompt information when the health status or performance indicators of the microservice are abnormal, the prompt information includes the service identifier of the abnormal microservice and the abnormal information of the abnormal microservice.

[0076] Specifically, the monitoring status or performance indicators of each microservice can be monitored through the container monitoring tool, and when the health status or performance indicators of a microservice are abnormal, a prompt message is generated, which includes the service identifier of the abnormal microservice and the abnormal information of the abnormal microservice. That is, professionals can extract which microservices have completely abnormalities or abnormal performance indicators, so that professionals can solve them in time and restore the microservices to normal.

[0077] On the basis of the above embodiment, as an implementation method of the embodiment of the present disclosure, the enterprise resource management system reconstruction method based on the microservice architecture may further include the following steps, namely step c1 and step c2:

[0078] Step c1, in the process of calling multiple target microservices to respond to data acquisition requests, save the transaction flows of transactions executed by the multiple target microservices.

[0079] Step c2: when it is necessary to trace back the transactions executed by multiple target microservices, the tracing is performed by querying the transaction flow.

[0080] In order to avoid data loss and enhance data traceability, in the process of calling multiple target microservices to respond to data acquisition requests, the transaction flows of transactions executed by multiple target microservices are saved. In this way, if it is necessary to trace the transactions executed by multiple target microservices, you can trace them by querying the transaction flow.

[0081] Based on the above embodiment, in one implementation, the enterprise resource management system reconstruction method based on the microservice architecture may further include the following steps, namely step d1 and step d2:

[0082] Step d1, in the process of calling multiple target microservices to respond to data acquisition requests, if a target microservice fails, the failed target microservice is isolated from other target microservices through the fuse mode.

[0083] Step d2, save the data through the asynchronous message queue, and transfer the transactions that need to be executed by the failed target microservice to the backup microservice through automatic failover.

[0084] Specifically, in order to prevent the faulty microservice from affecting the entire enterprise resource management system, the fuse mode can be used to isolate the faulty microservice. The fuse mode is a mechanism that protects the enterprise resource management system from the impact of some microservice failures. When a microservice fails, the fuse will quickly return an error response and no longer call the microservice, thereby preventing resource waste and the collapse of the enterprise resource management system. The goal of the fuse mode is to improve the robustness and availability of the enterprise resource management system and prevent the spread of single point failures from affecting the entire enterprise resource management system.

[0085] In addition, by introducing automatic failover and asynchronous message queues, data is guaranteed not to be lost when the enterprise resource management system fails, and services can be quickly restored. Among them, the message queue is a technology used to send and receive messages between systems or services. It is mainly used to exchange data asynchronously between different applications, systems or services. As a kind of middleware, the message queue provides a buffering and storage mechanism, so that if a target microservice fails, the data can be temporarily saved in the message queue to avoid data loss.

[0086] Automatic failover is particularly important in enterprise resource management systems, which can greatly improve service availability and business continuity. For example, the automatic failover mechanism ensures that when a target microservice fails, the transactions required to be executed by the failed target microservice can be transferred to the backup microservice, thus avoiding service interruption.

[0087] Based on the above embodiment, in one implementation, the enterprise resource management system reconstruction method based on microservice architecture may further include the following step e1:

[0088] Step e1: For each independent microservice, when the microservice needs to call other microservices, it automatically registers and discovers other microservices through the service discovery mechanism.

[0089] Specifically, the service discovery mechanism allows microservices to automatically register and discover other microservices in a dynamic environment without manual configuration, thereby enabling automatic discovery and load balancing of microservices through the service discovery platform.

[0090] In addition, in actual applications, in the process of calling multiple target microservices to respond to data acquisition requests, logs can also be collected and analyzed to facilitate troubleshooting and optimization.

[0091] The embodiment of the present invention also provides an enterprise resource management system reconstruction device 20 based on a microservice architecture, such as Figure 2 As shown, the device comprises:

[0092] The microservice deployment module 210 is used to analyze multiple business domains corresponding to each functional module in the enterprise resource management system through domain-driven design, and deploy an independent microservice for each business domain, wherein the multiple independent microservices can communicate with each other, each independent microservice corresponds to a database, and different microservices correspond to different databases;

[0093] A query interface merging module 220, used to merge query interfaces of multiple independent microservices into a unified query interface;

[0094] The compensation transaction setting module 230 is used to parse the data acquisition request after receiving the data acquisition request sent by the client through the query interface, determine multiple target microservices that need to be called in response to the data acquisition request, and set corresponding compensation transactions for each of the target microservices, wherein the compensation transaction of a target microservice is used to cancel the transactions executed by other target microservices among the multiple target microservices except the target microservice when the target microservice fails;

[0095] The data acquisition request response module 240 is used to call the multiple target microservices to respond to the data acquisition request. If any of the multiple target microservices fails, the compensation transaction corresponding to the target microservice is executed, and the data acquisition request is continued to be responded to. After the multiple target microservices obtain data from the corresponding database, the data obtained by the multiple target microservices are fed back to the client.

[0096] The technical solution provided by the embodiment of the present invention analyzes multiple business domains corresponding to each functional module in the enterprise resource management system through domain-driven design, deploys an independent microservice for each business domain, and each independent microservice corresponds to a database, thereby realizing the distributed deployment of the enterprise resource management system. By deploying multiple independent microservices, the decoupling of the functional modules of the enterprise resource management system can be realized, and by merging the query interfaces of multiple independent microservices into a unified query interface, it can be ensured that the client accurately obtains the required data, reducing data transmission redundancy and data acquisition efficiency. Moreover, when responding to a data acquisition request, if any of the multiple target microservices fails, the compensation transaction corresponding to the target microservice is executed to cancel the transactions executed by other target microservices, thereby ensuring the consistency of cross-microservice events. After multiple target microservices obtain data from the corresponding database, the data obtained by the multiple target microservices are fed back to the client, thereby realizing a quick and accurate response to the data acquisition request.

[0097] It can be seen that through the distributed design of the microservice architecture, the functional modules of the enterprise resource management system can horizontally expand multiple independent microservices on demand, reduce the coupling degree of the enterprise resource management system, and support high concurrency and large-scale data processing. In accordance with the multiple business areas corresponding to the functional modules, independent microservices are deployed for each business area, supporting the rapid update and version management of functional modules, reducing the impact of the upgrade of a single functional module on the overall enterprise resource management system, increasing the flexibility of the enterprise resource management system, and improving the maintainability of the enterprise resource management system.

[0098] Optionally, the device further comprises:

[0099] A microservice communication module, used to establish communication between multiple independent microservices through a transaction-driven architecture, wherein the multiple independent microservices communicate through a standard interface;

[0100] The container creation module is used to package each independent microservice and its corresponding dependencies into an independent container, and the microservice runs independently through the independent container.

[0101] Optionally, the device further comprises:

[0102] A microservice extension and update module, used to adjust the configuration parameters of a microservice through a container orchestration tool, to extend the microservice or to update the microservice;

[0103] The prompt information generation module is used to monitor the health status or performance indicators of the microservice through the container monitoring tool, and generate prompt information when the health status or performance indicators of the microservice are abnormal. The prompt information includes the service identifier of the abnormal microservice and the abnormal information of the abnormal microservice.

[0104] Optionally, the device further comprises:

[0105] A transaction flow saving module, used to save the transaction flows of transactions executed by the multiple target microservices in the process of calling the multiple target microservices to respond to the data acquisition request;

[0106] The transaction tracing module is used to trace the transactions executed by the multiple target microservices by querying the transaction flow when it is necessary to trace the transactions executed by the multiple target microservices.

[0107] Optionally, the device further comprises:

[0108] A fault microservice isolation module is used to isolate the faulty target microservice from other target microservices through a fuse mode if a target microservice fails during the process of calling the multiple target microservices to respond to the data acquisition request;

[0109] The transaction transfer module is used to save data through asynchronous message queues and transfer transactions that need to be executed by the failed target microservice to the backup microservice through automatic failover.

[0110] Optionally, the device further comprises:

[0111] The microservice discovery module is used to automatically register and discover other microservices through the service discovery mechanism for each independent microservice when the microservice needs to call other microservices.

[0112] In a third aspect, an embodiment of the present invention provides an electronic device 300, such as Figure 3 As shown, including:

[0113] at least one processor 301;

[0114] a memory 302 for storing the at least one processor executable instruction;

[0115] The at least one processor is configured to execute the instructions to implement the method described in the first aspect.

[0116] The technical solution provided by the embodiment of the present invention analyzes multiple business domains corresponding to each functional module in the enterprise resource management system through domain-driven design, deploys an independent microservice for each business domain, and each independent microservice corresponds to a database, thereby realizing the distributed deployment of the enterprise resource management system. By deploying multiple independent microservices, the decoupling of the functional modules of the enterprise resource management system can be realized, and by merging the query interfaces of multiple independent microservices into a unified query interface, it can be ensured that the client accurately obtains the required data, reducing data transmission redundancy and data acquisition efficiency. Moreover, when responding to a data acquisition request, if any of the multiple target microservices fails, the compensation transaction corresponding to the target microservice is executed to cancel the transactions executed by other target microservices, thereby ensuring the consistency of cross-microservice events. After multiple target microservices obtain data from the corresponding database, the data obtained by the multiple target microservices are fed back to the client, thereby realizing a quick and accurate response to the data acquisition request.

[0117] It can be seen that through the distributed design of the microservice architecture, the functional modules of the enterprise resource management system can horizontally expand multiple independent microservices on demand, reduce the coupling degree of the enterprise resource management system, and support high concurrency and large-scale data processing. In accordance with the multiple business areas corresponding to the functional modules, independent microservices are deployed for each business area, supporting the rapid update and version management of functional modules, reducing the impact of the upgrade of a single functional module on the overall enterprise resource management system, increasing the flexibility of the enterprise resource management system, and improving the maintainability of the enterprise resource management system.

[0118] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method described in the first aspect.

[0119] The technical solution provided by the embodiment of the present invention analyzes multiple business domains corresponding to each functional module in the enterprise resource management system through domain-driven design, deploys an independent microservice for each business domain, and each independent microservice corresponds to a database, thereby realizing the distributed deployment of the enterprise resource management system. By deploying multiple independent microservices, the decoupling of the functional modules of the enterprise resource management system can be realized, and by merging the query interfaces of multiple independent microservices into a unified query interface, it can be ensured that the client accurately obtains the required data, reducing data transmission redundancy and data acquisition efficiency. Moreover, when responding to a data acquisition request, if any of the multiple target microservices fails, the compensation transaction corresponding to the target microservice is executed to cancel the transactions executed by other target microservices, thereby ensuring the consistency of cross-microservice events. After multiple target microservices obtain data from the corresponding database, the data obtained by the multiple target microservices are fed back to the client, thereby realizing a quick and accurate response to the data acquisition request.

[0120] It can be seen that through the distributed design of the microservice architecture, the functional modules of the enterprise resource management system can horizontally expand multiple independent microservices on demand, reduce the coupling degree of the enterprise resource management system, and support high concurrency and large-scale data processing. In accordance with the multiple business areas corresponding to the functional modules, independent microservices are deployed for each business area, supporting the rapid update and version management of functional modules, reducing the impact of the upgrade of a single functional module on the overall enterprise resource management system, increasing the flexibility of the enterprise resource management system, and improving the maintainability of the enterprise resource management system.

[0121] In a fifth aspect, an embodiment of the present invention provides a computer program product, including a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.

[0122] The technical solution provided by the embodiment of the present invention analyzes multiple business domains corresponding to each functional module in the enterprise resource management system through domain-driven design, deploys an independent microservice for each business domain, and each independent microservice corresponds to a database, thereby realizing the distributed deployment of the enterprise resource management system. By deploying multiple independent microservices, the decoupling of the functional modules of the enterprise resource management system can be realized, and by merging the query interfaces of multiple independent microservices into a unified query interface, it can be ensured that the client accurately obtains the required data, reducing data transmission redundancy and data acquisition efficiency. Moreover, when responding to a data acquisition request, if any of the multiple target microservices fails, the compensation transaction corresponding to the target microservice is executed to cancel the transactions executed by other target microservices, thereby ensuring the consistency of cross-microservice events. After multiple target microservices obtain data from the corresponding database, the data obtained by the multiple target microservices are fed back to the client, thereby realizing a quick and accurate response to the data acquisition request.

[0123] It can be seen that through the distributed design of the microservice architecture, the functional modules of the enterprise resource management system can horizontally expand multiple independent microservices on demand, reduce the coupling degree of the enterprise resource management system, and support high concurrency and large-scale data processing. In accordance with the multiple business areas corresponding to the functional modules, independent microservices are deployed for each business area, supporting the rapid update and version management of functional modules, reducing the impact of the upgrade of a single functional module on the overall enterprise resource management system, increasing the flexibility of the enterprise resource management system, and improving the maintainability of the enterprise resource management system.

[0124] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations on the present invention. A person skilled in the art may change, modify, replace and modify the above embodiments within the scope of the present invention without departing from the principles and intent of the present invention.

Claims

1. A method for reconstructing an enterprise resource management system based on a microservice architecture, characterized in that: The method comprises: Through domain-driven design, we analyze the multiple business domains corresponding to each functional module in the enterprise resource management system, and deploy an independent microservice for each business domain. Multiple independent microservices can communicate with each other, each independent microservice corresponds to a database, and different microservices correspond to different databases. Merge query interfaces of multiple independent microservices into a unified query interface; After receiving a data acquisition request sent by a client through the query interface, the data acquisition request is parsed, a plurality of target microservices that need to be called in response to the data acquisition request are determined, and a corresponding compensation transaction is set for each of the target microservices, wherein a compensation transaction of a target microservice is used to cancel transactions executed by other target microservices among the plurality of target microservices except the target microservice when the target microservice fails; The multiple target microservices are called to respond to the data acquisition request. If any of the multiple target microservices fails, a compensation transaction corresponding to the target microservice is executed, and the data acquisition request is continued to be responded to. After the multiple target microservices all obtain data from the corresponding database, the data obtained by the multiple target microservices are fed back to the client.

2. The method according to claim 1, characterized in that The method further comprises: Establishing communication between multiple independent microservices through a transaction-driven architecture, wherein the multiple independent microservices communicate through a standard interface; For each independent microservice, the microservice and its corresponding dependencies are packaged into an independent container, and the microservice runs independently through the independent container.

3. The method according to claim 2, characterized in that The method further comprises: Adjust the configuration parameters of the microservice through the container orchestration tool to expand or update the microservice; The health status or performance indicators of the microservices are monitored by a container monitoring tool, and when the health status or performance indicators of the microservices are abnormal, prompt information is generated, wherein the prompt information includes the service identifier of the abnormal microservice and the abnormal information of the abnormal microservice.

4. The method according to claim 1, characterized in that: The method further comprises: In the process of calling the multiple target microservices to respond to the data acquisition request, saving the transaction flows of the transactions executed by the multiple target microservices; When it is necessary to trace back the transactions executed by the multiple target microservices, the tracing is performed by querying the transaction flow.

5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: In the process of calling the multiple target microservices to respond to the data acquisition request, if a target microservice fails, the failed target microservice is isolated from other target microservices through a fuse mode; The data is saved through asynchronous message queues, and the transactions that need to be executed by the failed target microservice are transferred to the backup microservice through automatic failover.

6. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: For each independent microservice, when the microservice needs to call other microservices, the other microservices are automatically registered and discovered through the service discovery mechanism.

7. An enterprise resource management system reconstruction device based on microservice architecture, characterized in that: The device comprises: The microservice deployment module is used to analyze the multiple business domains corresponding to each functional module in the enterprise resource management system through domain-driven design, and deploy an independent microservice for each business domain. Multiple independent microservices can communicate with each other, each independent microservice corresponds to a database, and different microservices correspond to different databases; The query interface merging module is used to merge the query interfaces of multiple independent microservices into a unified query interface; A compensation transaction setting module, which is used to parse the data acquisition request sent by the client through the query interface, determine multiple target microservices that need to be called to respond to the data acquisition request, and set corresponding compensation transactions for each target microservice, wherein the compensation transaction of a target microservice is used to cancel the transactions executed by other target microservices among the multiple target microservices except the target microservice when the target microservice fails; The data acquisition request response module is used to call the multiple target microservices to respond to the data acquisition request. If any of the multiple target microservices fails, the compensation transaction corresponding to the target microservice is executed, and the data acquisition request is continued to be responded to. After the multiple target microservices obtain data from the corresponding database, the data obtained by the multiple target microservices are fed back to the client.

8. An electronic device, characterized in that: include: at least one processor; a memory for storing the at least one processor-executable instruction; The at least one processor is configured to execute the instructions to implement the method according to any one of claims 1-6.

9. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method according to any one of claims 1 to 6.

10. A computer program product, characterized in that The method comprises a computer program, which implements the method according to any one of claims 1 to 6 when being executed by a processor.