WO2019232962A1 - Data processing method, system, computer device and storage medium - Google Patents

Data processing method, system, computer device and storage medium Download PDF

Info

Publication number
WO2019232962A1
WO2019232962A1 PCT/CN2018/104727 CN2018104727W WO2019232962A1 WO 2019232962 A1 WO2019232962 A1 WO 2019232962A1 CN 2018104727 W CN2018104727 W CN 2018104727W WO 2019232962 A1 WO2019232962 A1 WO 2019232962A1
Authority
WO
WIPO (PCT)
Prior art keywords
microservice
order
microservices
scheduling center
transaction scheduling
Prior art date
Application number
PCT/CN2018/104727
Other languages
French (fr)
Chinese (zh)
Inventor
陈培镇
陈泽晖
李琦
刘琼
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019232962A1 publication Critical patent/WO2019232962A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present application relates to the field of information technology, and in particular, to a data processing method, system, computer device, and storage medium.
  • a database is a warehouse that organizes, stores, and manages data according to the data structure. In an information society, the full and effective management and use of various information resources is a prerequisite for scientific research and decision management. Database technology is the core part of various information systems such as management information systems, office automation systems, and decision support systems. It is an important technical means for scientific research and decision management.
  • Existing relational databases have the ability to solve complex transaction scenarios, and relational databases meet ACID characteristics, that is, atomicity, consistency, isolation, and permanence.
  • a database with ACID characteristics supports strong consistency of data, which can ensure that the data itself does not appear inconsistent.
  • each microservice has its own database. Once the system under the microservice architecture cannot simply meet the ACID characteristics, there will be inconsistencies in the data under the microservice architecture, including when a microservice When the service spans multiple databases at the same time, it is necessary to operate multiple data at the same time. As a result, some data in the database may fail to be updated and some data may be updated successfully. As a result, the consistency of the data cannot be guaranteed.
  • the microservice has a strong dependency on the database , And easy to invade the micro service system, causing data loss; the existing services under the micro service cannot distinguish between business abnormalities and technical abnormalities, and can not deal with the abnormal situation in time.
  • a data processing method includes:
  • the interface gateway API Gateway receives the service request sent by the client, and sends the service request to the microservice in the order field.
  • the microservice in the order field selects the microservice to be accessed according to the service request, and sends the selected microservice to the microservice.
  • the services are sorted according to the order in which the business requests are met to generate order events that access the microservices one by one, and the API Gateway and the order field microservices are set in an application system;
  • the transaction scheduling center After receiving the order event, the transaction scheduling center interfaces with each microservice, accesses the microservices one by one to execute the order event, and outputs a business result that meets the business request, and the transaction scheduling center is set in the application system;
  • the microservice sends a data replacement result generated when the order event is executed to the transaction scheduling center, the transaction scheduling center summarizes the data replacement result, and sends the data replacement result to the order field Microservices to complete the data update of each microservice.
  • this application also provides a data processing system, including:
  • the Gateway receives the business request sent by the client, and sends the business request to the order field microservice, and the order field microservice selects the service to be accessed according to the service request.
  • Microservices, and sorting selected microservices in order of meeting the business request to generate order events for accessing microservices one by one, the API Gateway and the order field microservices are set in an application system;
  • the output business result unit is set to connect the microservices to the transaction scheduling center after receiving the order event, access the microservices one by one to execute the order event, and output the business results that satisfy the business request.
  • the transaction scheduling center is set in the application.
  • a data update unit configured to send the micro service a data replacement result generated when the order event is executed to the transaction scheduling center, and the transaction scheduling center summarizes the data replacement result and the data replacement result Sending to the order field microservice to complete the data update of each microservice.
  • the present application also provides a computer device including a memory and a processor.
  • the memory stores computer-readable instructions.
  • the processing causes the processing.
  • the processor performs the following steps:
  • the interface gateway API Gateway receives the service request sent by the client, and sends the service request to the microservice in the order field.
  • the microservice in the order field selects the microservice to be accessed according to the service request, and sends the selected microservice to the microservice.
  • the services are sorted according to the order in which the business requests are met to generate order events that access the microservices one by one, and the API Gateway and the order field microservices are set in an application system;
  • the transaction scheduling center After receiving the order event, the transaction scheduling center interfaces with each microservice, accesses the microservices one by one to execute the order event, and outputs a business result that meets the business request, and the transaction scheduling center is set in the application system;
  • the microservice sends a data replacement result generated when the order event is executed to the transaction scheduling center, the transaction scheduling center summarizes the data replacement result, and sends the data replacement result to the order field Microservices to complete the data update of each microservice.
  • the present application also provides a storage medium storing computer-readable instructions.
  • the computer-readable instructions When the computer-readable instructions are executed by one or more processors, the one or more processors execute the following steps:
  • the interface gateway API Gateway receives the service request sent by the client, and sends the service request to the microservice in the order field.
  • the microservice in the order field selects the microservice to be accessed according to the service request, and sends the selected microservice to the microservice.
  • the services are sorted according to the order in which the business requests are met to generate order events that access the microservices one by one, and the API Gateway and the order field microservices are set in an application system;
  • the transaction scheduling center After receiving the order event, the transaction scheduling center interfaces with each microservice, accesses the microservices one by one to execute the order event, and outputs a business result that meets the business request, and the transaction scheduling center is set in the application system;
  • the microservice sends a data replacement result generated when the order event is executed to the transaction scheduling center, the transaction scheduling center summarizes the data replacement result, and sends the data replacement result to the order field Microservices to complete the data update of each microservice.
  • the above data processing method, system, computer equipment, and storage medium receive the business request sent by the client through the API and Gateway, and send the business request to the order field microservice, and the order field microservice is based on the
  • the business request selects the microservices to be accessed by the business request, and sorts the selected microservices according to the order in which the business requests are met to generate order events for accessing the microservices one by one;
  • the transaction scheduling center receives After the order event, each microservice is docked, and the microservices are accessed one by one to execute the order event, and output the business result that meets the business request;
  • the microservice sends the data replacement result generated when the order event is executed to the A transaction scheduling center that summarizes the data replacement results and sends them to the order field microservices to complete the data update of each microservice.
  • FIG. 1 is a flowchart of a data processing method according to an embodiment of the present application
  • FIG. 2 is a schematic diagram of an environment of a data processing method according to an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a data processing system according to an embodiment of the present application.
  • 1-mobile client 2-API Gateway
  • 3-microservices in the order field 4-microservices in the account field
  • 5-microservices in the customer field 6-product microservices
  • 7-transaction scheduling center 8-Nginx operating system.
  • FIG. 1 is a flowchart of a data processing method according to an embodiment of the present application. As shown in FIG. 1, the data processing method may include the following steps:
  • Step S1 The interface gateway API receives the service request sent by the client, and sends the service request to the order field microservice.
  • the order field microservice selects the microservice to be accessed according to the service request, and The selected microservices are sorted according to the order in which the business requests are satisfied to generate order events for accessing the microservices one by one, and the API Gateway and the order domain microservices are set in an application system.
  • the generating an order event for accessing microservices one by one includes:
  • the client obtains a service request through the input interface, calls a sending interface to send the service request to the API Gateway, and the API connects to the order field microservice through a data interface, and sends the service request to the order.
  • the order field microservice selects the microservices to be accessed according to the business request, and sorts the selected microservices according to the order in which the business requests are satisfied to generate one-by-one access microservices. Order event, the input interface and the sending interface are set on the client.
  • the client refers to a program corresponding to a server and providing local services for the client, and includes a mobile client, a computer client, and a third-party client.
  • the client in this embodiment may be selected as a mobile client.
  • the mobile client refers to software running on a mobile terminal, which can provide enterprises with complete, convenient, diverse and efficient mobile marketing.
  • the user can input a service request through the input interface of the mobile client at any time, and send the service request by calling the sending interface.
  • the application system may be selected as the Nginx application system.
  • the Nginx application system is a high-performance HTTP and reverse proxy server for load balancing. It can directly support Rails and PHP programs within it. External services can also support external services as an HTTP server. At the same time, Nginx application system also has the advantages of occupying less memory and strong concurrency.
  • the API Gateway refers to an API gateway, that is, a service request sent by a client needs to go through the API Gateway and then reach the microservice in the order field.
  • the API Gateway as the same external interface of the system can reduce the caller's perception of service implementation.
  • the mobile client obtains the service request through the input interface, and calls the sending interface to send the business request.
  • the Nginx application system sets an API Gateway and order field microservices.
  • the API Gateway receives the service sent by the mobile client.
  • the order domain microservice is called by calling a data interface, and the business request is sent to the order domain microservice.
  • the order domain microservice will select the microservice to be accessed according to the business request, and The selected microservices are sorted according to the order in which the business requests are satisfied to generate order events for accessing the microservices one by one, and the input interface and the sending interface are set on the mobile client.
  • Step S2 After receiving the order event, the transaction scheduling center interfaces with each microservice, accesses the microservices one by one to execute the order event, and outputs a business result that meets the business request.
  • the transaction scheduling center is set in the application system.
  • the output of a service result satisfying the service request includes:
  • the transaction scheduling center includes a data processing interface.
  • the transaction scheduling center receives an order event sent by the order field microservice after docking with the order field microservice through the data processing interface.
  • the transaction scheduling center connects with other data processing interfaces through the data processing interface.
  • Microservices which access microservices one by one to execute order events, output business results that satisfy the business request, and the transaction scheduling center is set in the application system.
  • the application system may be selected as the Nginx application system.
  • the Nginx application system is a high-performance HTTP and reverse proxy server for load balancing. It can directly support Rails and PHP programs within it. External services can also support external services as an HTTP server. At the same time, Nginx application system also has the advantages of occupying less memory and strong concurrency.
  • the purpose of the transaction scheduling center is to ensure the real-time validity of the data in the database, thereby ensuring that each microservice can run reliably. It includes a data processing interface, and the transaction scheduling center interfaces with each microservice through the data processing interface to execute all the services. The order event.
  • a transaction scheduling center is set on the Nginx application system.
  • the service scheduling center connects to the microservices in the order field through the data processing interface, receives order events sent by the service scheduling center, and connects to other microservices through the data processing interface. , Accessing microservices one by one to execute the order event, and outputting a business result that satisfies the business request.
  • Step S3 the microservice sends the data replacement result generated when the order event is executed to the transaction scheduling center, the transaction scheduling center summarizes the data replacement result, and sends the data replacement result to all
  • the microservices in the order field are described to complete the data update of each microservice.
  • the update result of the aggregated data and updating the microservice data include:
  • the microservice After the microservice provides the required service for it according to the requirements of the business request, the microservice completes the data replacement result generated by the business request by calling the database record corresponding to the microservice, and updates the data.
  • the result is sent to a transaction scheduling center, which includes a data processing core, and the transaction scheduling center sums up the data replacement result by calling the data processing core, and sends the data replacement result to the order field micro Services to complete data update of each microservice, and the database is set on the operation interface of the microservice.
  • the database refers to a data collection that is stored together in a certain way, can be shared by multiple users, has as little redundancy as possible, and is independent of the application program. It is integrated and shared. It is a management information system, The core parts of various types of information, such as office automation systems and decision support systems, are important technical means for scientific research and decision management.
  • the database includes Oracle, MySQL, DB2 or Sybase. In this embodiment, the database can be selected as the Oracle database.
  • the Oracle database is a relational database management system of Oracle Corporation, which has been in the leading position in the database field. Its system is portable, easy to use, and functional. Strong, can be applied to all kinds of large, medium, small, and microcomputer environments.
  • an abnormal situation occurs when the docking micro service times out or the micro service cannot provide services, and the transaction scheduling center reports the abnormal situation to the order field micro service, and the order field The microservice will retry the order event until the microservice can re-execute the order event. For example, when the transaction scheduling center docks with microservices through the data processing interface, a docking timeout occurs. The transaction scheduling center will report the abnormal situation to the order field microservice, and the order field The micro service will resend the service request, so that the transaction scheduling center reconnects with the micro service.
  • a micro-service is coordinated by adding a transaction scheduling center to ensure data consistency when each micro-service calls multiple databases.
  • a transaction scheduling center to ensure data consistency when each micro-service calls multiple databases.
  • through the retry mechanism increase the handling of abnormal conditions, improve the real-time nature of data calls and ensure data consistency.
  • FIG. 2 is a schematic diagram of an environment of a data processing method according to an embodiment of the present application.
  • the selected client is the mobile client 2
  • the selected application system is the Nginx application system 8
  • the Nginx application system is set.
  • APIGateway2 microservices in the order area3, microservices in the account area4, microservices in the customer area5, microservices in the product area6, and transaction scheduling center7.
  • the mobile client 1 is provided with an input interface and a sending interface.
  • the mobile client 1 obtains a service request for fund purchase from the input interface, and calls the sending interface to send the service request for fund purchase to the API Gateway 2 and API Gateway 2 through the Internet.
  • a data interface is set up on the interface, and is connected to the microservice 3 in the order field through the data interface, and sends the business request for the subscription fund to the microservice 3 in the order field.
  • the microservice 3 in the order field selects the access required for fund subscription.
  • the microservices are sorted according to the order in which the subscription funds are completed, and the order events for the subscription funds are generated, and the order events are sent to the transaction scheduling center 7, which includes a data processing core and data Processing interface.
  • the transaction scheduling center 7 connects to the order field microservice 3 through the data processing interface to receive order events for fund purchases, and docks the microservices one by one in accordance with the order of the microservices displayed on the event order to complete the fund purchase.
  • the product field microservice 6 is called, and the product field microservice 6 determines whether the fund can be purchased according to the subscription amount of the fund product under the fund company.
  • product service microservice 6 judges that the fund is unavailable for purchase, it feeds back the judgment result to transaction scheduling center 7, and transaction scheduling center 7 feeds back to mobile client 1 through API Gateway2 to inform users that the fund cannot be processed.
  • the transaction scheduling center 7 connects with the customer domain microservice 5, and the customer domain microservice 5 is based on the user account deposit, and the fund purchase amount And purchase time to determine whether the user meets the subscription conditions of the fund.
  • the customer domain microservice 5 determines that the customer does not meet the subscription conditions of the fund, the judgment result is fed back to the transaction scheduling center 7 and the transaction scheduling center 7 Then it returns to the mobile client 1 through the API Gateway2 to inform the user that the fund's subscription conditions are not met.
  • the customer domain microservice 5 judges that the customer meets the purchase conditions of the fund, the judgment result is fed back to the transaction scheduling center 7, the transaction scheduling center 7 connects to the account field microservice 4, and the account field microservice 4 is based on the fund purchase amount.
  • the user's account deposit is deducted from the user's account deposit, and the fund purchase transaction is recorded, and the fund payment deducted from the user's account deposit is fed back to the transaction dispatch center 7, and the transaction dispatch center 7 passes the API.
  • Gateway2 feeds back to mobile client 1 and informs the user of the success of the fund purchase and the amount deducted due to the fund purchase.
  • the product field microservices 6 feeds back the number of fund products purchased to the transaction scheduling center 7, and the customer field microservices 6 feed back the user's account deposit information to the transaction scheduling center 7 and the account field microservices 4
  • the information of the amount deducted from the user's account deposit due to the purchase fund is fed back to the transaction scheduling center 7.
  • the transaction scheduling center 7 summarizes the data replacement results in each microservice by calling the data processing core therein, and sends the data replacement results to the order field microservice 3.
  • the transaction scheduling center 7 by inputting the business request of the subscription fund on the mobile client 1, using API Gateway2 to select the required microservices for the subscription fund, and generating order events in sequence, receives the order events one by one. Visit microservices to execute order events and complete fund purchases. The transaction scheduling center 7 saves time for accessing all microservices one by one, and improves the efficiency of fund purchase.
  • an embodiment of the present application further provides a data processing system.
  • the system includes an order generation unit, an output service result unit, and a data update unit.
  • the order generation event unit is set to an API.
  • the Gateway receives a service request sent by a client and sends the service request to the order field microservice, and the order field microservice selects a service to be accessed according to the service request.
  • Microservices, and sorting selected microservices in order of meeting the business request to generate order events for accessing microservices one by one, the API Gateway and the order field microservices are set in an application system;
  • the output service result unit is configured to connect the micro service to each micro service after receiving the order event, access the micro services one by one to execute the order event, and output a service result that meets the business request.
  • the data update unit is configured so that the microservice sends a data replacement result generated when the order event is executed to the transaction scheduling center, and the transaction scheduling center summarizes the data replacement result and sends it to The order field microservices complete the data update of each microservice.
  • the order generation event unit receives a service request sent by a client through an API through Gateway, and sends the service request to the order field microservice, and the order field microservice is selected according to the service request.
  • the microservices that need to be accessed, and the selected microservices are sorted according to the order in which the business requests are met, to generate order events for accessing the microservices one by one; using the output business result unit to receive all services through the transaction scheduling center
  • each microservice is docked, and the microservices are accessed one by one to execute the order event, and the business result that meets the business request is output;
  • the data update unit uses the microservice to change the data generated when the order event is executed
  • the result is sent to the transaction scheduling center, and the transaction scheduling center summarizes the data replacement result and sends it to the order field microservice to complete the data update of each microservice.
  • the order generation event unit includes: a service request sending module configured to obtain a service request from a client through an input interface, and call the sending interface to send the service request to the API Gateway, the input interface And the sending interface are set on the client; a docking module is set up so that the API connects the microservices in the order field through the data interface and sends the business request to the microservices in the order field; selecting and The ordering module is configured for the order field microservice to select the microservices to be accessed according to the business request, and to sort the selected microservices according to the order in which the business requests are met to generate one-by-one access microservices Order event.
  • the output service result unit includes: an order receiving event module configured to include a data processing interface in the transaction scheduling center, and the transaction scheduling center receives the microservices in the order field through the data processing interface.
  • the order event sent by the microservice in the order field is described.
  • the docking microservice module is set up to connect the transaction scheduling center to other microservices through the data processing interface, access the microservices one by one to execute the order event, and output the information that meets the business request.
  • the transaction scheduling center is set in the application system.
  • the data update unit includes: a record and send result module, configured to provide the microservice with required services according to the requirements of the business request, and then call a database record corresponding to the microservice to complete this.
  • the data replacement result generated by the second service request, the micro service sends the data replacement result to the transaction scheduling center, the database is set on the micro service operation interface; the result module is aggregated and sent, and is set as the
  • the transaction scheduling center includes a data processing core, and the transaction scheduling center summarizes the data replacement result by calling the data processing core, and sends the data replacement result to the order field microservice to complete the data of each microservice. Update.
  • the database includes Oracle, MySQL, DB2, or Sybase.
  • the client includes a mobile client, a computer client, and a third-party client; and the application system includes an Nginx application system and a WEB application system.
  • the output service result unit is further configured that, when the transaction scheduling center performs the docking micro service, an exception occurs when the docking micro service times out or the micro service cannot provide services, and the transaction scheduling center sends the The abnormal situation is fed back to the order domain microservice, and the order domain microservice will retry the order event until the microservice can re-execute the order event.
  • the present application also proposes a computer device including a memory, a processor, and computer-readable instructions stored on the memory and executable on the processor, the processing When the processor executes the computer-readable instructions, the steps in the data processing method in the foregoing embodiments are implemented.
  • the present application also provides a storage medium storing computer-readable instructions.
  • the computer-readable instructions are executed by one or more processors, the one or more processors execute the foregoing implementations.
  • the computer program can be stored in a computer-readable storage medium.
  • the foregoing storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disc, a read-only memory (ROM), or a random access memory (Random Access Memory, RAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A data processing method, a system, a computer device and a storage medium, the method comprising: an API Gateway receiving a service request sent by a client, and sending the service request to an order field micro-service, the order field micro-service sorting selected micro-services so as to generate an order event; a transaction scheduling center docking the micro-services after receiving the order event so as to execute the order event and output a service result; the micro-services sending a data alternation result to the order field micro-service by means of the transaction scheduling center so as to complete data update for each micro-service. The method coordinates each micro-service by adding the transaction scheduling center to guarantee data consistency when each micro-service calls multiple databases.

Description

数据处理方法、系统、计算机设备和存储介质Data processing method, system, computer equipment and storage medium
本申请要求于2018年06月07日提交中国专利局、申请号为201810584611.3、发明名称为″数据处理方法、系统、计算机设备和存储介质″的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed on June 07, 2018 with the Chinese Patent Office, application number 201810584611.3, and the invention name is "data processing method, system, computer equipment and storage medium", the entire contents of which are incorporated by reference. In this application.
技术领域Technical field
本申请涉及信息技术领域,特别是涉及数据处理方法、系统、计算机设备和存储介质。The present application relates to the field of information technology, and in particular, to a data processing method, system, computer device, and storage medium.
背景技术Background technique
数据库是按照数据结构来组织、存储和管理数据的仓库。在信息化的社会,充分有效地管理和利用各类信息资源,是进行科学研究和决策管理的前提条件。数据库技术是管理信息系统、办公自动化系统、决策支持系统等各类信息系统的核心部分,是进行科学研究和决策管理的重要技术手段。现有的关系型数据库具有解决复杂事务场景的能力,且关系型数据库满足ACID特性,即原子性、一致性、隔离性和永久性。具有ACID特性的数据库支持数据的强一致性,能够保证数据本身不会出现不一致的情况。A database is a warehouse that organizes, stores, and manages data according to the data structure. In an information society, the full and effective management and use of various information resources is a prerequisite for scientific research and decision management. Database technology is the core part of various information systems such as management information systems, office automation systems, and decision support systems. It is an important technical means for scientific research and decision management. Existing relational databases have the ability to solve complex transaction scenarios, and relational databases meet ACID characteristics, that is, atomicity, consistency, isolation, and permanence. A database with ACID characteristics supports strong consistency of data, which can ensure that the data itself does not appear inconsistent.
然而在微服务架构下,每个微服务都有自己的数据库,一旦微服务架构下的系统不能简单地满足ACID特性,就会出现微服务架构下的数据存在不一致的情况,包括当一项微服务同时跨足多个数据库时,需同时操作多个数据,致使数据库中的数据可能出现部分数据更新失败、部分数据更新成功的情况,使得数据无法保证一致性;微服务对数据库的依赖性强,且易入侵微服务系统,造成数据流失;现有的微服务项下的业务无法区分业务异常和技术异常,不能及时对出现的异常情况进行处理。However, under the microservice architecture, each microservice has its own database. Once the system under the microservice architecture cannot simply meet the ACID characteristics, there will be inconsistencies in the data under the microservice architecture, including when a microservice When the service spans multiple databases at the same time, it is necessary to operate multiple data at the same time. As a result, some data in the database may fail to be updated and some data may be updated successfully. As a result, the consistency of the data cannot be guaranteed. The microservice has a strong dependency on the database , And easy to invade the micro service system, causing data loss; the existing services under the micro service cannot distinguish between business abnormalities and technical abnormalities, and can not deal with the abnormal situation in time.
发明内容Summary of the Invention
基于此,有必要针对在进行数据处理时,数据更新不统一,数据库易造受侵害,造成数据流失等问题,提供数据处理方法、系统、计算机设备和存储介 质。Based on this, it is necessary to provide data processing methods, systems, computer equipment, and storage media for problems such as inconsistent data updates during data processing, easy damage to databases, and loss of data.
一种数据处理方法,包括:A data processing method includes:
接口网关API Gateway接收客户端发送的业务请求,并将所述业务请求发送至订单领域微服务,所述订单领域微服务根据所述业务请求选定需要访问的微服务,并将选定的微服务按照满足所述业务请求的先后顺序进行排序,以生成逐个访问微服务的订单事件,所述API Gateway和所述订单领域微服务设置在应用系统内;The interface gateway API Gateway receives the service request sent by the client, and sends the service request to the microservice in the order field. The microservice in the order field selects the microservice to be accessed according to the service request, and sends the selected microservice to the microservice. The services are sorted according to the order in which the business requests are met to generate order events that access the microservices one by one, and the API Gateway and the order field microservices are set in an application system;
事务调度中心接收所述订单事件后对接各个微服务,逐个访问微服务以执行订单事件,输出满足所述业务请求的业务结果,所述事务调度中心设置在所述应用系统内;After receiving the order event, the transaction scheduling center interfaces with each microservice, accesses the microservices one by one to execute the order event, and outputs a business result that meets the business request, and the transaction scheduling center is set in the application system;
所述微服务将在执行所述订单事件时产生的数据更迭结果发送至所述事务调度中心,所述事务调度中心汇总所述数据更迭结果,并将所述数据更迭结果发送至所述订单领域微服务,以完成各个微服务的数据更新。The microservice sends a data replacement result generated when the order event is executed to the transaction scheduling center, the transaction scheduling center summarizes the data replacement result, and sends the data replacement result to the order field Microservices to complete the data update of each microservice.
基于相同的技术构思,本申请还提供一种数据处理系统,包括:Based on the same technical concept, this application also provides a data processing system, including:
生成订单事件单元,设置为接口网关API Gateway接收客户端发送的业务请求,并将所述业务请求发送至所述订单领域微服务,所述订单领域微服务根据所述业务请求选定需要访问的微服务,并将选定的微服务按照满足所述业务请求的先后顺序进行排序,以生成逐个访问微服务的订单事件,所述API Gateway和所述订单领域微服务设置在应用系统内;Generate an order event unit and set it as the interface gateway API. The Gateway receives the business request sent by the client, and sends the business request to the order field microservice, and the order field microservice selects the service to be accessed according to the service request. Microservices, and sorting selected microservices in order of meeting the business request to generate order events for accessing microservices one by one, the API Gateway and the order field microservices are set in an application system;
输出业务结果单元,设置为事务调度中心接收所述订单事件后对接各个微服务,逐个访问微服务以执行订单事件,输出满足所述业务请求的业务结果,所述事务调度中心设置在所述应用系统内;The output business result unit is set to connect the microservices to the transaction scheduling center after receiving the order event, access the microservices one by one to execute the order event, and output the business results that satisfy the business request. The transaction scheduling center is set in the application. Within the system
数据更新单元,设置为所述微服务将在执行所述订单事件时产生的数据更迭结果发送至所述事务调度中心,所述事务调度中心汇总所述数据更迭结果,并将所述数据更迭结果发送至所述订单领域微服务,以完成各个微服务的数据更新。A data update unit configured to send the micro service a data replacement result generated when the order event is executed to the transaction scheduling center, and the transaction scheduling center summarizes the data replacement result and the data replacement result Sending to the order field microservice to complete the data update of each microservice.
基于相同的技术构思,本申请还提供一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器 执行时,使得所述处理器执行以下步骤:Based on the same technical concept, the present application also provides a computer device including a memory and a processor. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the processing causes the processing. The processor performs the following steps:
接口网关API Gateway接收客户端发送的业务请求,并将所述业务请求发送至订单领域微服务,所述订单领域微服务根据所述业务请求选定需要访问的微服务,并将选定的微服务按照满足所述业务请求的先后顺序进行排序,以生成逐个访问微服务的订单事件,所述API Gateway和所述订单领域微服务设置在应用系统内;The interface gateway API Gateway receives the service request sent by the client, and sends the service request to the microservice in the order field. The microservice in the order field selects the microservice to be accessed according to the service request, and sends the selected microservice to the microservice. The services are sorted according to the order in which the business requests are met to generate order events that access the microservices one by one, and the API Gateway and the order field microservices are set in an application system;
事务调度中心接收所述订单事件后对接各个微服务,逐个访问微服务以执行订单事件,输出满足所述业务请求的业务结果,所述事务调度中心设置在所述应用系统内;After receiving the order event, the transaction scheduling center interfaces with each microservice, accesses the microservices one by one to execute the order event, and outputs a business result that meets the business request, and the transaction scheduling center is set in the application system;
所述微服务将在执行所述订单事件时产生的数据更迭结果发送至所述事务调度中心,所述事务调度中心汇总所述数据更迭结果,并将所述数据更迭结果发送至所述订单领域微服务,以完成各个微服务的数据更新。The microservice sends a data replacement result generated when the order event is executed to the transaction scheduling center, the transaction scheduling center summarizes the data replacement result, and sends the data replacement result to the order field Microservices to complete the data update of each microservice.
基于相同的技术构思,本申请还提供一种存储有计算机可读指令的存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:Based on the same technical concept, the present application also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the following steps:
接口网关API Gateway接收客户端发送的业务请求,并将所述业务请求发送至订单领域微服务,所述订单领域微服务根据所述业务请求选定需要访问的微服务,并将选定的微服务按照满足所述业务请求的先后顺序进行排序,以生成逐个访问微服务的订单事件,所述API Gateway和所述订单领域微服务设置在应用系统内;The interface gateway API Gateway receives the service request sent by the client, and sends the service request to the microservice in the order field. The microservice in the order field selects the microservice to be accessed according to the service request, and sends the selected microservice to the microservice. The services are sorted according to the order in which the business requests are met to generate order events that access the microservices one by one, and the API Gateway and the order field microservices are set in an application system;
事务调度中心接收所述订单事件后对接各个微服务,逐个访问微服务以执行订单事件,输出满足所述业务请求的业务结果,所述事务调度中心设置在所述应用系统内;After receiving the order event, the transaction scheduling center interfaces with each microservice, accesses the microservices one by one to execute the order event, and outputs a business result that meets the business request, and the transaction scheduling center is set in the application system;
所述微服务将在执行所述订单事件时产生的数据更迭结果发送至所述事务调度中心,所述事务调度中心汇总所述数据更迭结果,并将所述数据更迭结果发送至所述订单领域微服务,以完成各个微服务的数据更新。The microservice sends a data replacement result generated when the order event is executed to the transaction scheduling center, the transaction scheduling center summarizes the data replacement result, and sends the data replacement result to the order field Microservices to complete the data update of each microservice.
上述数据处理方法、系统、计算机设备和存储介质,通过所述API Gateway接收客户端发送的业务请求,并将所述业务请求发送至所述订单领域微服务, 所述订单领域微服务根据所述业务请求选定所述业务请求所需访问的微服务,并将选定的微服务按照满足所述业务请求的先后顺序进行排序,以生成逐个访问微服务的订单事件;所述事务调度中心接收所述订单事件后对接各个微服务,逐个访问微服务以执行订单事件,输出满足所述业务请求的业务结果;所述微服务将在执行所述订单事件时产生的数据更迭结果发送至所述事务调度中心,所述事务调度中心汇总所述数据更迭结果,并将其发送至所述订单领域微服务,以完成各个微服务的数据更新。因此,通过增加事务调度中心来协调各个微服务,保证各个微服务调用多个数据库时,保证数据的一致性,同时通过重试机制,增加对异常情况的处理,提高数据调用的实时性且保证数据的一致性,降低微服务对数据库的依赖程度,避免入侵微服务系统。The above data processing method, system, computer equipment, and storage medium receive the business request sent by the client through the API and Gateway, and send the business request to the order field microservice, and the order field microservice is based on the The business request selects the microservices to be accessed by the business request, and sorts the selected microservices according to the order in which the business requests are met to generate order events for accessing the microservices one by one; the transaction scheduling center receives After the order event, each microservice is docked, and the microservices are accessed one by one to execute the order event, and output the business result that meets the business request; the microservice sends the data replacement result generated when the order event is executed to the A transaction scheduling center that summarizes the data replacement results and sends them to the order field microservices to complete the data update of each microservice. Therefore, by adding a transaction scheduling center to coordinate various microservices, to ensure the consistency of data when each microservice calls multiple databases, at the same time, through the retry mechanism, increase the handling of abnormal conditions, improve the real-time nature of data calls and ensure The consistency of the data reduces the degree of dependence of the microservice on the database and avoids intrusion into the microservice system.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本申请一个实施例中一种数据处理方法的流程图;FIG. 1 is a flowchart of a data processing method according to an embodiment of the present application;
图2为本申请一个实施例中一种数据处理方法的环境示意图;2 is a schematic diagram of an environment of a data processing method according to an embodiment of the present application;
图3为本申请一个实施例中一种数据处理系统的示意图;3 is a schematic diagram of a data processing system according to an embodiment of the present application;
其中,1-手机客户端;2-API Gateway;3-订单领域微服务;4-账户领域微服务;5-客户领域微服务;6-产品领域微服务;7-事务调度中心;8-Nginx应用系统。Among them, 1-mobile client; 2-API Gateway; 3-microservices in the order field; 4-microservices in the account field; 5-microservices in the customer field; 6-product microservices; 7-transaction scheduling center; 8-Nginx operating system.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution, and advantages of the present application clearer, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the application, and are not used to limit the application.
本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式″一″、″一个″、″所述″和″该″也可以包括复数形式。应该进一步理解的是,本申请的说明书中使用的措辞″包括″是指存在所述特征、程序、步骤、操作、元件和/或组件,但是并不排除存在或添加一个或多个其他特征、程序、步骤、操作、元件、组件和/或它们的组。Those skilled in the art will understand that the singular forms "a", "an", "the" and "the" used herein may include the plural forms unless specifically stated. It should be further understood that the wording "including" used in the specification of the present application refers to the presence of the described features, procedures, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, Procedures, steps, operations, elements, components and / or groups thereof.
图1为本申请一个实施例中一种数据处理方法的流程图,如图1所示,所述数据处理方法,可以包括如下步骤:FIG. 1 is a flowchart of a data processing method according to an embodiment of the present application. As shown in FIG. 1, the data processing method may include the following steps:
步骤S1:接口网关API Gateway接收客户端发送的业务请求,并将所述业务请求发送至所述订单领域微服务,所述订单领域微服务根据所述业务请求选定需要访问的微服务,并将选定的微服务按照满足所述业务请求的先后顺序进行排序,以生成逐个访问微服务的订单事件,所述API Gateway和所述订单领域微服务设置在应用系统内。Step S1: The interface gateway API receives the service request sent by the client, and sends the service request to the order field microservice. The order field microservice selects the microservice to be accessed according to the service request, and The selected microservices are sorted according to the order in which the business requests are satisfied to generate order events for accessing the microservices one by one, and the API Gateway and the order domain microservices are set in an application system.
本实施例中,所述生成逐个访问微服务的订单事件包括:In this embodiment, the generating an order event for accessing microservices one by one includes:
客户端通过所述输入界面获取业务请求,调用发送界面将所述业务请求发送至所述API Gateway上,所述API Gateway通过数据接口对接订单领域微服务,将所述业务请求发送至所述订单领域微服务上,所述订单领域微服务根据所述业务请求选定需要访问的微服务,并将所选定的微服务按照满足所述业务请求的先后顺序进行排序,以生成逐个访问微服务的订单事件,所述输入界面和所述发送界面设置在所述客户端上。The client obtains a service request through the input interface, calls a sending interface to send the service request to the API Gateway, and the API connects to the order field microservice through a data interface, and sends the service request to the order. In the field microservice, the order field microservice selects the microservices to be accessed according to the business request, and sorts the selected microservices according to the order in which the business requests are satisfied to generate one-by-one access microservices. Order event, the input interface and the sending interface are set on the client.
所述客户端是指与服务器相对应,为客户提供本地服务的程序,其包括手机客户端、电脑客户端和第三方客户端。本实施例中的客户端可以选定为手机客户端,所述手机客户端是指在手机终端运行的软件,其能够为企业提供完善、便捷、多样、高效的移动营销。用户可以随时随地通过手机客户端的输入界面输入业务请求,通过调用发送界面发送所述业务请求。The client refers to a program corresponding to a server and providing local services for the client, and includes a mobile client, a computer client, and a third-party client. The client in this embodiment may be selected as a mobile client. The mobile client refers to software running on a mobile terminal, which can provide enterprises with complete, convenient, diverse and efficient mobile marketing. The user can input a service request through the input interface of the mobile client at any time, and send the service request by calling the sending interface.
本实施例中,所述应用系统可以选定为Nginx应用系统,所述Nginx应用系统是一个高性能的HTTP和反向代理服务器,用于负载均衡,既可以在其内部直接支持Rails和PHP程序对外进行服务,也可以支持作为HTTP服务器对外进行服务。同时,Nginx应用系统还具有占有内存少、并发能力强等优点。In this embodiment, the application system may be selected as the Nginx application system. The Nginx application system is a high-performance HTTP and reverse proxy server for load balancing. It can directly support Rails and PHP programs within it. External services can also support external services as an HTTP server. At the same time, Nginx application system also has the advantages of occupying less memory and strong concurrency.
本实施例中,所述API Gateway是指API网关,即客户端发送的业务请求都需要经过API Gateway,然后到达所述订单领域微服务。所述API Gateway作为系统对外的同一接口,可以减少调用方对服务实现的感知。In this embodiment, the API Gateway refers to an API gateway, that is, a service request sent by a client needs to go through the API Gateway and then reach the microservice in the order field. The API Gateway as the same external interface of the system can reduce the caller's perception of service implementation.
手机客户端通过输入界面获取业务请求,调用发送界面发送所述业务请求;在所述Nginx应用系统上设置API Gateway和订单领域微服务,所述API  Gateway接收所述手机客户端发送的所述业务请求后,通过调用数据接口对接订单领域微服务,将所述业务请求发送至所述订单领域微服务,所述订单领域微服务将根据所述业务请求选定需要访问的微服务,并将所选定的微服务按照满足所述业务请求的先后顺序进行排序,以生成逐个访问微服务的订单事件,所述输入界面和所述发送界面设置在所述手机客户端上。The mobile client obtains the service request through the input interface, and calls the sending interface to send the business request. The Nginx application system sets an API Gateway and order field microservices. The API Gateway receives the service sent by the mobile client. After the request, the order domain microservice is called by calling a data interface, and the business request is sent to the order domain microservice. The order domain microservice will select the microservice to be accessed according to the business request, and The selected microservices are sorted according to the order in which the business requests are satisfied to generate order events for accessing the microservices one by one, and the input interface and the sending interface are set on the mobile client.
步骤S2:事务调度中心接收所述订单事件后对接各个微服务,逐个访问微服务以执行订单事件,输出满足所述业务请求的业务结果,所述事务调度中心设置在所述应用系统内。Step S2: After receiving the order event, the transaction scheduling center interfaces with each microservice, accesses the microservices one by one to execute the order event, and outputs a business result that meets the business request. The transaction scheduling center is set in the application system.
本实施例中,所述输出满足所述业务请求的业务结果包括:In this embodiment, the output of a service result satisfying the service request includes:
事务调度中心包含数据处理接口,所述事务调度中心通过所述数据处理接口对接订单领域微服务后接收所述订单领域微服务发送的订单事件,所述事务调度中心通过所述数据处理接口对接其他微服务,进行逐个访问微服务以执行订单事件,输出满足所述业务请求的业务结果,所述事务调度中心设置在所述应用系统内。The transaction scheduling center includes a data processing interface. The transaction scheduling center receives an order event sent by the order field microservice after docking with the order field microservice through the data processing interface. The transaction scheduling center connects with other data processing interfaces through the data processing interface. Microservices, which access microservices one by one to execute order events, output business results that satisfy the business request, and the transaction scheduling center is set in the application system.
本实施例中,所述应用系统可以选定为Nginx应用系统,所述Nginx应用系统是一个高性能的HTTP和反向代理服务器,用于负载均衡,既可以在其内部直接支持Rails和PHP程序对外进行服务,也可以支持作为HTTP服务器对外进行服务。同时,Nginx应用系统还具有占有内存少、并发能力强等优点。In this embodiment, the application system may be selected as the Nginx application system. The Nginx application system is a high-performance HTTP and reverse proxy server for load balancing. It can directly support Rails and PHP programs within it. External services can also support external services as an HTTP server. At the same time, Nginx application system also has the advantages of occupying less memory and strong concurrency.
所述事务调度中心目的在于保证数据库中的数据实时有效性,从而保证各个微服务能够可靠运行,其包括数据处理接口,所述事务调度中心通过所述数据处理接口对接各个微服务,以执行所述订单事件。The purpose of the transaction scheduling center is to ensure the real-time validity of the data in the database, thereby ensuring that each microservice can run reliably. It includes a data processing interface, and the transaction scheduling center interfaces with each microservice through the data processing interface to execute all the services. The order event.
在所述Nginx应用系统上设置事务调度中心,所述是服务调度中心通过所述数据处理接口对接订单领域微服务,接收其发送的订单事件,同时,通过所述数据处理接口对接其他的微服务,进行逐个访问微服务以执行所述订单事件,输出满足所述业务请求的业务结果。A transaction scheduling center is set on the Nginx application system. The service scheduling center connects to the microservices in the order field through the data processing interface, receives order events sent by the service scheduling center, and connects to other microservices through the data processing interface. , Accessing microservices one by one to execute the order event, and outputting a business result that satisfies the business request.
步骤S3:所述微服务将在执行所述订单事件时产生的数据更迭结果发送至所述事务调度中心,所述事务调度中心汇总所述数据更迭结果,并将所述数据更迭结果发送至所述订单领域微服务,以完成各个微服务的数据更新。Step S3: the microservice sends the data replacement result generated when the order event is executed to the transaction scheduling center, the transaction scheduling center summarizes the data replacement result, and sends the data replacement result to all The microservices in the order field are described to complete the data update of each microservice.
本实施例中,所述汇总数据更迭结果,更新微服务数据包括:In this embodiment, the update result of the aggregated data and updating the microservice data include:
微服务按照所述业务请求的要求为其提供所需的服务后,所述微服务通过调用所述微服务对应的数据库记录完成此次业务请求所产生的数据更迭结果,并将所述数据更迭结果发送至事务调度中心,所述事务调度中心包含数据处理核,所述事务调度中心通过调用所述数据处理核汇总所述数据更迭结果,并将所述数据更迭结果发送至所述订单领域微服务,以完成各个微服务的数据更新,所述数据库设置在所述微服务的操作界面上。After the microservice provides the required service for it according to the requirements of the business request, the microservice completes the data replacement result generated by the business request by calling the database record corresponding to the microservice, and updates the data. The result is sent to a transaction scheduling center, which includes a data processing core, and the transaction scheduling center sums up the data replacement result by calling the data processing core, and sends the data replacement result to the order field micro Services to complete data update of each microservice, and the database is set on the operation interface of the microservice.
所述数据库是指以一定方式储存在一起,能为多个用户共享、具有尽可能小的冗余度,与应用程序彼此独立的数据集合,其具有整体性、共享性,是管理信息系统、办公自动化系统、决策支持系统等各类信息的核心部分,是进行科学研究和决策管理的重要技术手段。所述数据库包括Oracle、MySQL、DB2或Sybase。本实施例中,所述数据库可以选定为Oracle数据库,所述Oracle数据库是甲骨文公司的一款关系数据库管理系统,其在数据库领域一直处于领先地位,其系统可移植性好、使用方便、功能强、能够适用于各类大、中、小、微机环境。The database refers to a data collection that is stored together in a certain way, can be shared by multiple users, has as little redundancy as possible, and is independent of the application program. It is integrated and shared. It is a management information system, The core parts of various types of information, such as office automation systems and decision support systems, are important technical means for scientific research and decision management. The database includes Oracle, MySQL, DB2 or Sybase. In this embodiment, the database can be selected as the Oracle database. The Oracle database is a relational database management system of Oracle Corporation, which has been in the leading position in the database field. Its system is portable, easy to use, and functional. Strong, can be applied to all kinds of large, medium, small, and microcomputer environments.
所述事务调度中心在进行对接微服务时,出现对接微服务超时或者微服务无法提供服务的异常情况,所述事务调度中心将所述异常情况反馈至所述订单领域微服务,所述订单领域微服务将对所述订单事件进行重试机制,直到所述微服务能够重新执行所述订单事件。举例来说,在所述事务调度中心通过所述数据处理接口对接微服务时,出现对接超时的情况,所述事务调度中心会将该异常情况反馈至所述订单领域微服务,所述订单领域微服务将会重新发送业务请求,使得所述事务调度中心与所述微服务进行重新对接。When the transaction scheduling center performs the docking micro service, an abnormal situation occurs when the docking micro service times out or the micro service cannot provide services, and the transaction scheduling center reports the abnormal situation to the order field micro service, and the order field The microservice will retry the order event until the microservice can re-execute the order event. For example, when the transaction scheduling center docks with microservices through the data processing interface, a docking timeout occurs. The transaction scheduling center will report the abnormal situation to the order field microservice, and the order field The micro service will resend the service request, so that the transaction scheduling center reconnects with the micro service.
上述实施例,通过增加事务调度中心来协调各个微服务,保证各个微服务调用多个数据库时,保证数据的一致性。同时,通过重试机制,增加对异常情况的处理,提高数据调用的实时性且保证数据的一致性。In the above embodiment, a micro-service is coordinated by adding a transaction scheduling center to ensure data consistency when each micro-service calls multiple databases. At the same time, through the retry mechanism, increase the handling of abnormal conditions, improve the real-time nature of data calls and ensure data consistency.
图2为本申请一个实施例中一种数据处理方法的环境示意图,如图2所示,选定客户端为手机客户端2,选定应用系统为Nginx应用系统8,在Nginx应用系统上设置API Gateway2,订单领域微服务3,账户领域微服务4,客户领 域微服务5、产品领域微服务6和事务调度中心7。FIG. 2 is a schematic diagram of an environment of a data processing method according to an embodiment of the present application. As shown in FIG. 2, the selected client is the mobile client 2, the selected application system is the Nginx application system 8, and the Nginx application system is set. APIGateway2, microservices in the order area3, microservices in the account area4, microservices in the customer area5, microservices in the product area6, and transaction scheduling center7.
手机客户端1上设置输入界面和发送界面,手机客户端1在所述输入界面获取申购基金的业务请求,调用所述发送界面将该申购基金的业务请求通过互联网发送至API Gateway2上,API Gateway2上设置数据接口,通过数据接口与订单领域微服务3对接,将申购基金的业务请求发送至订单领域微服务3上,订单领域微服务3在接收该业务请求后,选定基金申购所需访问的微服务,按照完成申购基金的先后顺序对所选定的微服务进行排序,生成申购基金的订单事件后将该订单事件发送至事务调度中心7上,事务调度中心7包括数据处理核和数据处理接口,事务调度中心7通过数据处理接口对接订单领域微服务3接收申购基金的订单事件,按照该事件订单上显示的微服务先后顺序逐个对接微服务,以完成基金申购。The mobile client 1 is provided with an input interface and a sending interface. The mobile client 1 obtains a service request for fund purchase from the input interface, and calls the sending interface to send the service request for fund purchase to the API Gateway 2 and API Gateway 2 through the Internet. A data interface is set up on the interface, and is connected to the microservice 3 in the order field through the data interface, and sends the business request for the subscription fund to the microservice 3 in the order field. After receiving the business request, the microservice 3 in the order field selects the access required for fund subscription. The microservices are sorted according to the order in which the subscription funds are completed, and the order events for the subscription funds are generated, and the order events are sent to the transaction scheduling center 7, which includes a data processing core and data Processing interface. The transaction scheduling center 7 connects to the order field microservice 3 through the data processing interface to receive order events for fund purchases, and docks the microservices one by one in accordance with the order of the microservices displayed on the event order to complete the fund purchase.
调用产品领域微服务6,产品领域微服务6根据基金公司旗下的该笔基金产品的申购额度来判断该笔基金是否可以购买。产品领域微服务6在判断该笔基金不可以购买时,则将该判断结果反馈至事务调度中心7上,事务调度中心7则通过API Gateway2反馈至手机客户端1,以告知用户该基金无法进行申购。产品领域微服务6在判断该笔基金可以进行购买后将该判断结果反馈至事务调度中心7,事务调度中心7对接客户领域微服务5,客户领域微服务5则根据用户账户存款,基金申购金额和购买时间等条件来判断该用户是否满足该基金的申购条件,客户领域微服务5在判断客户不满足该基金的申购条件时,则将该判断结果反馈至事务调度中心7,事务调度中心7则通过API Gateway2反馈至手机客户端1,以告知用户不符合该基金的申购条件。客户领域微服务5在判断客户满足该基金的申购条件时,则将该判断结果反馈至事务调度中心7上,事务调度中心7对接账户领域微服务4,账户领域微服务4则根据基金申购金额从用户的账户存款中扣除该基金申购的款项,并对该笔基金申购交易进行记录,并将从用户的账户存款中扣除的基金款项反馈至事务调度中心7上,事物调度中心7则通过API Gateway2反馈至手机客户端1上,告知用户此次申购基金成功和因申购基金扣除的款项。The product field microservice 6 is called, and the product field microservice 6 determines whether the fund can be purchased according to the subscription amount of the fund product under the fund company. When product service microservice 6 judges that the fund is unavailable for purchase, it feeds back the judgment result to transaction scheduling center 7, and transaction scheduling center 7 feeds back to mobile client 1 through API Gateway2 to inform users that the fund cannot be processed. Purchase. In the product field microservices 6, after judging that the fund can be purchased, the judgment result is fed back to the transaction scheduling center 7, the transaction scheduling center 7 connects with the customer domain microservice 5, and the customer domain microservice 5 is based on the user account deposit, and the fund purchase amount And purchase time to determine whether the user meets the subscription conditions of the fund. When the customer domain microservice 5 determines that the customer does not meet the subscription conditions of the fund, the judgment result is fed back to the transaction scheduling center 7 and the transaction scheduling center 7 Then it returns to the mobile client 1 through the API Gateway2 to inform the user that the fund's subscription conditions are not met. When the customer domain microservice 5 judges that the customer meets the purchase conditions of the fund, the judgment result is fed back to the transaction scheduling center 7, the transaction scheduling center 7 connects to the account field microservice 4, and the account field microservice 4 is based on the fund purchase amount. The user's account deposit is deducted from the user's account deposit, and the fund purchase transaction is recorded, and the fund payment deducted from the user's account deposit is fed back to the transaction dispatch center 7, and the transaction dispatch center 7 passes the API. Gateway2 feeds back to mobile client 1 and informs the user of the success of the fund purchase and the amount deducted due to the fund purchase.
在该申购基金交易完成之后,产品领域微服务6将购买的基金产品数量反 馈至事务调度中心7,客户领域微服务6则将用户的账户存款信息反馈至事务调度中心7,账户领域微服务4则将因购买基金从用户的账户存款中扣除的款项信息反馈至事务调度中心7。事务调度中心7通过调用其内的数据处理核汇总各个微服务中的数据更迭结果,并将数据更迭结果发送至订单领域微服务3上。After the subscription fund transaction is completed, the product field microservices 6 feeds back the number of fund products purchased to the transaction scheduling center 7, and the customer field microservices 6 feed back the user's account deposit information to the transaction scheduling center 7 and the account field microservices 4 The information of the amount deducted from the user's account deposit due to the purchase fund is fed back to the transaction scheduling center 7. The transaction scheduling center 7 summarizes the data replacement results in each microservice by calling the data processing core therein, and sends the data replacement results to the order field microservice 3.
上述实施例,通过在手机客户端1输入申购基金的业务请求,利用API Gateway2为申购基金选定所需的微服务,并按照先后顺序生成订单事件,事务调度中心7则接收订单事件后,逐一访问微服务,以执行订单事件,完成基金申购。通过事务调度中心7节省了逐一访问所有微服务的时间,提高了基金申购的效率。In the above embodiment, by inputting the business request of the subscription fund on the mobile client 1, using API Gateway2 to select the required microservices for the subscription fund, and generating order events in sequence, the transaction scheduling center 7 receives the order events one by one. Visit microservices to execute order events and complete fund purchases. The transaction scheduling center 7 saves time for accessing all microservices one by one, and improves the efficiency of fund purchase.
基于相同的技术构思,本申请实施例还提供了一种数据处理系统,如图3所示,该系统包括生成订单事件单元、输出业务结果单元和数据更新单元;Based on the same technical concept, an embodiment of the present application further provides a data processing system. As shown in FIG. 3, the system includes an order generation unit, an output service result unit, and a data update unit.
所述生成订单事件单元,设置为API Gateway接收客户端发送的业务请求,并将所述业务请求发送至所述订单领域微服务,所述订单领域微服务根据所述业务请求选定需要访问的微服务,并将选定的微服务按照满足所述业务请求的先后顺序进行排序,以生成逐个访问微服务的订单事件,所述API Gateway和所述订单领域微服务设置在应用系统内;The order generation event unit is set to an API. The Gateway receives a service request sent by a client and sends the service request to the order field microservice, and the order field microservice selects a service to be accessed according to the service request. Microservices, and sorting selected microservices in order of meeting the business request to generate order events for accessing microservices one by one, the API Gateway and the order field microservices are set in an application system;
所述输出业务结果单元,设置为事务调度中心接收所述订单事件后对接各个微服务,逐个访问微服务以执行订单事件,输出满足所述业务请求的业务结果,所述事务调度中心设置在所述应用系统内;The output service result unit is configured to connect the micro service to each micro service after receiving the order event, access the micro services one by one to execute the order event, and output a service result that meets the business request. The application system;
所述数据更新单元,设置为所述微服务将在执行所述订单事件时产生的数据更迭结果发送至所述事务调度中心,所述事务调度中心汇总所述数据更迭结果,并将其发送至所述订单领域微服务,以完成各个微服务的数据更新。The data update unit is configured so that the microservice sends a data replacement result generated when the order event is executed to the transaction scheduling center, and the transaction scheduling center summarizes the data replacement result and sends it to The order field microservices complete the data update of each microservice.
上述实施例,通过所述生成订单事件单元通过API Gateway接收客户端发送的业务请求,并将所述业务请求发送至所述订单领域微服务,所述订单领域微服务根据所述业务请求选定需要访问的微服务,并将选定的微服务按照满足所述业务请求的先后顺序进行排序,以生成逐个访问微服务的订单事件;利用所述输出业务结果单元通过所述事务调度中心接收所述订单事件后对接各个微 服务,逐个访问微服务以执行订单事件,输出满足所述业务请求的业务结果;所述数据更新单元利用所述微服务将在执行所述订单事件时产生的数据更迭结果发送至所述事务调度中心,所述事务调度中心汇总所述数据更迭结果,并将其发送至所述订单领域微服务,以完成各个微服务的数据更新。通过增加事务调度中心来协调各个微服务,保证各个微服务调用多个数据库时,保证数据的一致性。In the foregoing embodiment, the order generation event unit receives a service request sent by a client through an API through Gateway, and sends the service request to the order field microservice, and the order field microservice is selected according to the service request. The microservices that need to be accessed, and the selected microservices are sorted according to the order in which the business requests are met, to generate order events for accessing the microservices one by one; using the output business result unit to receive all services through the transaction scheduling center After the order event is described, each microservice is docked, and the microservices are accessed one by one to execute the order event, and the business result that meets the business request is output; the data update unit uses the microservice to change the data generated when the order event is executed The result is sent to the transaction scheduling center, and the transaction scheduling center summarizes the data replacement result and sends it to the order field microservice to complete the data update of each microservice. By adding a transaction scheduling center to coordinate each microservice, it is guaranteed that the data consistency is guaranteed when each microservice calls multiple databases.
在一个实施例中,所述生成订单事件单元包括:发送业务请求模块,设置为客户端通过输入界面获取业务请求,调用发送界面将所述业务请求发送至所述API Gateway上,所述输入界面和所述发送界面设置在所述客户端上;对接模块,设置为所述API Gateway通过数据接口对接订单领域微服务,并将所述业务请求发送至所述订单领域微服务上;选定并排序模块,设置为所述订单领域微服务根据所述业务请求选定需要访问的微服务,并将所选定的微服务按照满足所述业务请求的先后顺序进行排序,以生成逐个访问微服务的订单事件。In one embodiment, the order generation event unit includes: a service request sending module configured to obtain a service request from a client through an input interface, and call the sending interface to send the service request to the API Gateway, the input interface And the sending interface are set on the client; a docking module is set up so that the API connects the microservices in the order field through the data interface and sends the business request to the microservices in the order field; selecting and The ordering module is configured for the order field microservice to select the microservices to be accessed according to the business request, and to sort the selected microservices according to the order in which the business requests are met to generate one-by-one access microservices Order event.
在一个实施例中,所述输出业务结果单元包括:接收订单事件模块,设置为所述事务调度中心包含数据处理接口,所述事务调度中心通过所述数据处理接口对接订单领域微服务后接收所述订单领域微服务发送的订单事件;对接微服务模块,设置为所述事务调度中心通过所述数据处理接口对接其他微服务,进行逐个访问微服务以执行订单事件,输出满足所述业务请求的业务结果,所述事务调度中心设置在所述应用系统内。In one embodiment, the output service result unit includes: an order receiving event module configured to include a data processing interface in the transaction scheduling center, and the transaction scheduling center receives the microservices in the order field through the data processing interface. The order event sent by the microservice in the order field is described. The docking microservice module is set up to connect the transaction scheduling center to other microservices through the data processing interface, access the microservices one by one to execute the order event, and output the information that meets the business request. As a result of the business, the transaction scheduling center is set in the application system.
在一个实施例中,所述数据更新单元包括:记录并发送结果模块,设置为所述微服务按照所述业务请求的要求提供所需的服务后,调用所述微服务对应的数据库记录完成此次业务请求所产生的数据更迭结果,所述微服务将所述数据更迭结果发送至事务调度中心,所述数据库设置在所述微服务的操作界面上;汇总并发送结果模块,设置为所述事务调度中心包含数据处理核,所述事务调度中心通过调用所述数据处理核汇总所述数据更迭结果,并将所述数据更迭结果发送至所述订单领域微服务,以完成各个微服务的数据更新。In one embodiment, the data update unit includes: a record and send result module, configured to provide the microservice with required services according to the requirements of the business request, and then call a database record corresponding to the microservice to complete this. The data replacement result generated by the second service request, the micro service sends the data replacement result to the transaction scheduling center, the database is set on the micro service operation interface; the result module is aggregated and sent, and is set as the The transaction scheduling center includes a data processing core, and the transaction scheduling center summarizes the data replacement result by calling the data processing core, and sends the data replacement result to the order field microservice to complete the data of each microservice. Update.
在一个实施例中,所述数据库包括Oracle、MySQL、DB2或Sybase。In one embodiment, the database includes Oracle, MySQL, DB2, or Sybase.
在一个实施例中,所述客户端包括手机客户端、电脑客户端和第三方客户 端;所述应用系统包括Nginx应用系统和WEB应用系统。In one embodiment, the client includes a mobile client, a computer client, and a third-party client; and the application system includes an Nginx application system and a WEB application system.
在一个实施例中,所述输出业务结果单元还设置为所述事务调度中心在进行对接微服务时,出现对接微服务超时或者微服务无法提供服务的异常情况,所述事务调度中心将所述异常情况反馈至所述订单领域微服务,所述订单领域微服务将对所述订单事件进行重试机制,直到所述微服务能够重新执行所述订单事件。In one embodiment, the output service result unit is further configured that, when the transaction scheduling center performs the docking micro service, an exception occurs when the docking micro service times out or the micro service cannot provide services, and the transaction scheduling center sends the The abnormal situation is fed back to the order domain microservice, and the order domain microservice will retry the order event until the microservice can re-execute the order event.
基于相同的技术构思,本申请还提出了一种计算机设备,所述计算机设备包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现上述各实施例里数据处理方法中的步骤。Based on the same technical concept, the present application also proposes a computer device including a memory, a processor, and computer-readable instructions stored on the memory and executable on the processor, the processing When the processor executes the computer-readable instructions, the steps in the data processing method in the foregoing embodiments are implemented.
基于相同的技术构思,本申请还提供了一种存储有计算机可读指令的存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行上述各实施例里数据处理方法中的步骤。Based on the same technical concept, the present application also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the foregoing implementations. The steps in the data processing method in the example.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,该计算机程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,前述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等非易失性存储介质,或随机存储记忆体(Random Access Memory,RAM)等。A person of ordinary skill in the art can understand that all or part of the processes in the methods of the foregoing embodiments can be implemented by using a computer program to instruct related hardware. The computer program can be stored in a computer-readable storage medium. When executed, the processes of the embodiments of the methods described above may be included. The foregoing storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disc, a read-only memory (ROM), or a random access memory (Random Access Memory, RAM).
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the embodiments described above can be arbitrarily combined. In order to simplify the description, all possible combinations of the technical features in the above embodiments have not been described. However, as long as there is no contradiction in the combination of these technical features, It should be considered as the scope described in this specification.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation manners of the present application, and their descriptions are more specific and detailed, but they should not be construed as limiting the patent scope of the present application. It should be noted that, for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of this application patent shall be subject to the appended claims.

Claims (20)

  1. 一种数据处理方法,包括:A data processing method includes:
    接口网关API Gateway接收客户端发送的业务请求,并将所述业务请求发送至订单领域微服务,所述订单领域微服务根据所述业务请求选定需要访问的微服务,并将选定的微服务按照满足所述业务请求的先后顺序进行排序,以生成逐个访问微服务的订单事件,所述API Gateway和所述订单领域微服务设置在应用系统内;The interface gateway API Gateway receives the service request sent by the client, and sends the service request to the microservice in the order field. The microservice in the order field selects the microservice to be accessed according to the service request, and sends the selected microservice to the microservice. The services are sorted according to the order in which the business requests are met to generate order events that access the microservices one by one, and the API Gateway and the order field microservices are set in an application system;
    事务调度中心接收所述订单事件后对接各个微服务,逐个访问微服务以执行订单事件,输出满足所述业务请求的业务结果,所述事务调度中心设置在所述应用系统内;After receiving the order event, the transaction scheduling center interfaces with each microservice, accesses the microservices one by one to execute the order event, and outputs a business result that meets the business request, and the transaction scheduling center is set in the application system;
    所述微服务将在执行所述订单事件时产生的数据更迭结果发送至所述事务调度中心,所述事务调度中心汇总所述数据更迭结果,并将所述数据更迭结果发送至所述订单领域微服务,以完成各个微服务的数据更新。The microservice sends a data replacement result generated when the order event is executed to the transaction scheduling center, the transaction scheduling center summarizes the data replacement result, and sends the data replacement result to the order field Microservices to complete the data update of each microservice.
  2. 根据权利要求1所述的一种数据处理方法,其中,所述生成逐个访问微服务的订单事件包括:The data processing method according to claim 1, wherein the generating an order event for accessing microservices one by one comprises:
    客户端通过输入界面获取业务请求,调用发送界面将所述业务请求发送至所述API Gateway上,所述API Gateway通过数据接口对接订单领域微服务,并将所述业务请求发送至所述订单领域微服务上,所述订单领域微服务根据所述业务请求选定需要访问的微服务,并将所选定的微服务按照满足所述业务请求的先后顺序进行排序,以生成逐个访问微服务的订单事件,所述输入界面和所述发送界面设置在所述客户端上。The client obtains the business request through the input interface, and calls the sending interface to send the business request to the API Gateway. The API Gateway connects to the microservices in the order field through the data interface, and sends the business request to the order field. In microservices, the order field microservice selects the microservices to be accessed according to the business request, and sorts the selected microservices according to the order in which the business requests are met to generate one-by-one access to the microservices. For an order event, the input interface and the sending interface are set on the client.
  3. 根据权利要求1所述的一种数据处理方法,其中,所述输出满足所述业务请求的业务结果包括:The data processing method according to claim 1, wherein the output of a service result satisfying the service request comprises:
    所述事务调度中心包含数据处理接口,所述事务调度中心通过所述数据处理接口对接订单领域微服务后接收所述订单领域微服务发送的订单事件,所述事务调度中心通过所述数据处理接口对接其他微服务,进行逐个访问微服务以执行订单事件,输出满足所述业务请求的业务结果,所述事务调度中心设置在所述应用系统内。The transaction scheduling center includes a data processing interface, and the transaction scheduling center receives the order event sent by the order field microservice after docking with the order field microservice through the data processing interface, and the transaction scheduling center uses the data processing interface. Docking other microservices, accessing microservices one by one to execute order events, outputting business results that satisfy the business request, and the transaction scheduling center is set in the application system.
  4. 根据权利要求1所述的一种数据处理方法,其中,所述汇总数据更迭结 果,更新微服务数据包括:The data processing method according to claim 1, wherein the update result of the summary data and updating the microservice data comprises:
    微服务按照所述业务请求的要求提供所需的服务后,调用所述微服务对应的数据库记录完成此次业务请求所产生的数据更迭结果,所述微服务将所述数据更迭结果发送至事务调度中心,所述事务调度中心包含数据处理核,所述事务调度中心通过调用所述数据处理核汇总所述数据更迭结果,并将所述数据更迭结果发送至所述订单领域微服务,以完成各个微服务的数据更新,所述数据库设置在所述微服务的操作界面上。After the microservice provides the required services according to the requirements of the business request, the database service corresponding to the microservice is called to complete the data replacement result generated by the business request, and the microservice sends the data replacement result to the transaction. A scheduling center, the transaction scheduling center includes a data processing core, and the transaction scheduling center summarizes the data replacement result by calling the data processing core, and sends the data replacement result to the order field microservice to complete The data of each microservice is updated, and the database is set on the operation interface of the microservice.
  5. 根据权利要求4所述的一种数据处理方法,其中,所述数据库包括Oracle、MySQL、DB2或Sybase。The data processing method according to claim 4, wherein the database comprises Oracle, MySQL, DB2 or Sybase.
  6. 根据权利要求1所述的一种数据处理方法,其中,所述客户端包括手机客户端、电脑客户端和第三方客户端;The data processing method according to claim 1, wherein the client comprises a mobile client, a computer client, and a third-party client;
    所述应用系统包括Nginx应用系统和WEB应用系统。The application system includes an Nginx application system and a WEB application system.
  7. 根据权利要求1所述的一种数据处理方法,其中,所述事务调度中心在进行对接微服务时,出现对接微服务超时或者微服务无法提供服务的异常情况,所述事务调度中心将所述异常情况反馈至所述订单领域微服务,所述订单领域微服务将对所述订单事件进行重试机制,直到所述微服务能够重新执行所述订单事件。The data processing method according to claim 1, wherein when the transaction scheduling center performs the docking micro service, an abnormal situation occurs when the docking micro service times out or the micro service cannot provide services, and the transaction scheduling center sends the The abnormal situation is fed back to the order domain microservice, and the order domain microservice will retry the order event until the microservice can re-execute the order event.
  8. 一种数据处理系统,包括:A data processing system includes:
    生成订单事件单元,设置为接口网关API Gateway接收客户端发送的业务请求,并将所述业务请求发送至订单领域微服务,所述订单领域微服务根据所述业务请求选定需要访问的微服务,并将选定的微服务按照满足所述业务请求的先后顺序进行排序,以生成逐个访问微服务的订单事件,所述API Gateway和所述订单领域微服务设置在应用系统内;Generate an order event unit and set it as the interface gateway API. The Gateway receives the business request sent by the client and sends the business request to the order field microservice, and the order field microservice selects the microservice to be accessed according to the business request And sort the selected microservices according to the order in which the business requests are met to generate order events that access the microservices one by one, the API Gateway and the order field microservices are set in the application system;
    输出业务结果单元,设置为事务调度中心接收所述订单事件后对接各个微服务,逐个访问微服务以执行订单事件,输出满足所述业务请求的业务结果,所述事务调度中心设置在所述应用系统内;The output business result unit is set to connect the microservices to the transaction scheduling center after receiving the order event, access the microservices one by one to execute the order event, and output the business results that satisfy the business request. The transaction scheduling center is set in the application. Within the system
    数据更新单元,设置为所述微服务将在执行所述订单事件时产生的数据更迭结果发送至所述事务调度中心,所述事务调度中心汇总所述数据更迭结果, 并将所述数据更迭结果发送至所述订单领域微服务,以完成各个微服务的数据更新。A data update unit, configured to send the micro service a data replacement result generated when the order event is executed to the transaction scheduling center, the transaction scheduling center summarizes the data replacement result, and stores the data replacement result Sending to the order field microservice to complete the data update of each microservice.
  9. 根据权利要求8所述的一种数据处理系统,其中,所述生成订单事件单元包括:The data processing system according to claim 8, wherein the order generation unit includes:
    发送业务请求模块,设置为客户端通过输入界面获取业务请求,调用发送界面将所述业务请求发送至所述API Gateway上,所述输入界面和所述发送界面设置在所述客户端上;The sending service request module is configured to obtain a service request from a client through an input interface, call the sending interface to send the service request to the API Gateway, and the input interface and the sending interface are set on the client;
    对接模块,设置为所述API Gateway通过数据接口对接订单领域微服务,并将所述业务请求发送至所述订单领域微服务上;The docking module is configured to connect the API Gateway to a microservice in the order field through a data interface, and send the business request to the microservice in the order field;
    选定并排序模块,设置为所述订单领域微服务根据所述业务请求选定需要访问的微服务,并将所选定的微服务按照满足所述业务请求的先后顺序进行排序,以生成逐个访问微服务的订单事件。A selection and sorting module configured to set the order field microservices to select the microservices to be accessed according to the business request, and sort the selected microservices according to the order in which the business requests are met to generate one by one Access to microservice order events.
  10. 根据权利要求8所述的一种数据处理系统,其中,所述输出业务结果单元包括:The data processing system according to claim 8, wherein the output service result unit comprises:
    接收订单事件模块,设置为所述事务调度中心包含数据处理接口,所述事务调度中心通过所述数据处理接口对接订单领域微服务后接收所述订单领域微服务发送的订单事件;An order event receiving module, configured that the transaction scheduling center includes a data processing interface, and the transaction scheduling center receives an order event sent by the order field microservice after connecting to the order field microservice through the data processing interface;
    对接微服务模块,设置为所述事务调度中心通过所述数据处理接口对接其他微服务,进行逐个访问微服务以执行订单事件,输出满足所述业务请求的业务结果,所述事务调度中心设置在所述应用系统内。The docking microservice module is configured to connect the transaction scheduling center with other microservices through the data processing interface, access the microservices one by one to execute order events, and output a business result that meets the business request. The transaction scheduling center is set at The application system.
  11. 根据权利要求8所述的一种数据处理系统,其中,所述数据更新单元包括:The data processing system according to claim 8, wherein the data update unit comprises:
    记录并发送结果模块,设置为所述微服务按照所述业务请求的要求提供所需的服务后,调用所述微服务对应的数据库记录完成此次业务请求所产生的数据更迭结果,所述微服务将所述数据更迭结果发送至事务调度中心,所述数据库设置在所述微服务的操作界面上;Record and send a result module, which is set to provide the microservice with the required services according to the requirements of the business request, and then call the database corresponding to the microservice to record the data replacement result generated by the business request. The service sends the data replacement result to a transaction scheduling center, and the database is set on an operation interface of the microservice;
    汇总并发送结果模块,设置为所述事务调度中心包含数据处理核,所述事务调度中心通过调用所述数据处理核汇总所述数据更迭结果,并将所述数据更 迭结果发送至所述订单领域微服务,以完成各个微服务的数据更新。The summary and transmission result module is configured so that the transaction scheduling center includes a data processing core, and the transaction scheduling center summarizes the data replacement result by calling the data processing core, and sends the data replacement result to the order field Microservices to complete the data update of each microservice.
  12. 根据权利要求11所述的一种数据处理系统,其中,所述数据库包括Oracle、MySQL、DB2或Sybase。The data processing system according to claim 11, wherein the database comprises Oracle, MySQL, DB2 or Sybase.
  13. 根据权利要求8所述的一种数据处理系统,其中,所述客户端包括手机客户端、电脑客户端和第三方客户端;The data processing system according to claim 8, wherein the client comprises a mobile client, a computer client, and a third-party client;
    所述应用系统包括Nginx应用系统和WEB应用系统。The application system includes an Nginx application system and a WEB application system.
  14. 根据权利要求8所述的一种数据处理系统,其中,所述输出业务结果单元还设置为所述事务调度中心在进行对接微服务时,出现对接微服务超时或者微服务无法提供服务的异常情况,所述事务调度中心将所述异常情况反馈至所述订单领域微服务,所述订单领域微服务将对所述订单事件进行重试机制,直到所述微服务能够重新执行所述订单事件。The data processing system according to claim 8, wherein the output service result unit is further configured that when the transaction scheduling center performs a docking microservice, an abnormal situation occurs when the docking microservice times out or the microservice cannot provide services. , The transaction scheduling center feedbacks the abnormal situation to the order domain microservice, and the order domain microservice will retry the order event until the microservice can re-execute the order event.
  15. 一种计算机设备,包括数据库和处理器,所述数据库中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行以下步骤:A computer device includes a database and a processor. The database stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor causes the processor to perform the following steps:
    接口网关API Gateway接收客户端发送的业务请求,并将所述业务请求发送至订单领域微服务,所述订单领域微服务根据所述业务请求选定需要访问的微服务,并将选定的微服务按照满足所述业务请求的先后顺序进行排序,以生成逐个访问微服务的订单事件,所述API Gateway和所述订单领域微服务设置在应用系统内;The interface gateway API Gateway receives the service request sent by the client, and sends the service request to the microservice in the order field. The microservice in the order field selects the microservice to be accessed according to the service request, and sends the selected microservice to the microservice. The services are sorted according to the order in which the business requests are met to generate order events that access the microservices one by one, and the API Gateway and the order field microservices are set in an application system;
    事务调度中心接收所述订单事件后对接各个微服务,逐个访问微服务以执行订单事件,输出满足所述业务请求的业务结果,所述事务调度中心设置在所述应用系统内;After receiving the order event, the transaction scheduling center interfaces with each microservice, accesses the microservices one by one to execute the order event, and outputs a business result that meets the business request, and the transaction scheduling center is set in the application system;
    所述微服务将在执行所述订单事件时产生的数据更迭结果发送至所述事务调度中心,所述事务调度中心汇总所述数据更迭结果,并将所述数据更迭结果发送至所述订单领域微服务,以完成各个微服务的数据更新。The microservice sends a data replacement result generated when the order event is executed to the transaction scheduling center, the transaction scheduling center summarizes the data replacement result, and sends the data replacement result to the order field Microservices to complete the data update of each microservice.
  16. 根据权利要求15所述的计算机设备,其中,所述生成逐个访问微服务的订单事件时,使得所述处理器执行以下步骤:The computer device of claim 15, wherein when generating an order event for accessing the microservices one by one, the processor is caused to perform the following steps:
    客户端通过输入界面获取业务请求,调用发送界面将所述业务请求发送至 所述API Gateway上,所述API Gateway通过数据接口对接订单领域微服务,并将所述业务请求发送至所述订单领域微服务上,所述订单领域微服务根据所述业务请求选定需要访问的微服务,并将所选定的微服务按照满足所述业务请求的先后顺序进行排序,以生成逐个访问微服务的订单事件,所述输入界面和所述发送界面设置在所述客户端上。The client obtains the business request through the input interface, and calls the sending interface to send the business request to the API Gateway. The API Gateway connects to the microservices in the order field through the data interface, and sends the business request to the order field. In microservices, the order field microservice selects the microservices to be accessed according to the business request, and sorts the selected microservices according to the order in which the business requests are met, so as to generate a For an order event, the input interface and the sending interface are set on the client.
  17. 根据权利要求15所述的计算机设备,其中,所述输出满足所述业务请求的业务结果时,使得所述处理器执行以下步骤:The computer device according to claim 15, wherein when the output meets a service result of the service request, the processor is caused to perform the following steps:
    所述事务调度中心包含数据处理接口,所述事务调度中心通过所述数据处理接口对接订单领域微服务后接收所述订单领域微服务发送的订单事件,所述事务调度中心通过所述数据处理接口对接其他微服务,进行逐个访问微服务以执行订单事件,输出满足所述业务请求的业务结果,所述事务调度中心设置在所述应用系统内。The transaction scheduling center includes a data processing interface, and the transaction scheduling center receives the order event sent by the order field microservice after docking with the order field microservice through the data processing interface, and the transaction scheduling center uses the data processing interface. Docking other microservices, accessing microservices one by one to execute order events, outputting business results that satisfy the business request, and the transaction scheduling center is set in the application system.
  18. 一种存储有计算机可读指令的存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:A storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the following steps:
    接口网关API Gateway接收客户端发送的业务请求,并将所述业务请求发送至订单领域微服务,所述订单领域微服务根据所述业务请求选定需要访问的微服务,并将选定的微服务按照满足所述业务请求的先后顺序进行排序,以生成逐个访问微服务的订单事件,所述API Gateway和所述订单领域微服务设置在应用系统内;The interface gateway API Gateway receives the service request sent by the client, and sends the service request to the microservice in the order field. The microservice in the order field selects the microservice to be accessed according to the service request, and sends the selected microservice to the microservice. The services are sorted according to the order in which the business requests are met to generate order events that access the microservices one by one, and the API Gateway and the order field microservices are set in an application system;
    事务调度中心接收所述订单事件后对接各个微服务,逐个访问微服务以执行订单事件,输出满足所述业务请求的业务结果,所述事务调度中心设置在所述应用系统内;After receiving the order event, the transaction scheduling center interfaces with each microservice, accesses the microservices one by one to execute the order event, and outputs a business result that meets the business request, and the transaction scheduling center is set in the application system;
    所述微服务将在执行所述订单事件时产生的数据更迭结果发送至所述事务调度中心,所述事务调度中心汇总所述数据更迭结果,并将所述数据更迭结果发送至所述订单领域微服务,以完成各个微服务的数据更新。The microservice sends a data replacement result generated when the order event is executed to the transaction scheduling center, the transaction scheduling center summarizes the data replacement result, and sends the data replacement result to the order field Microservices to complete the data update of each microservice.
  19. 根据权利要求18所述的存储介质,其中,所述生成逐个访问微服务的订单事件时,使得一个或多个处理器执行以下步骤:The storage medium of claim 18, wherein when generating an order event for accessing microservices one by one, one or more processors are caused to perform the following steps:
    客户端通过输入界面获取业务请求,调用发送界面将所述业务请求发送至 所述API Gateway上,所述API Gateway通过数据接口对接订单领域微服务,并将所述业务请求发送至所述订单领域微服务上,所述订单领域微服务根据所述业务请求选定需要访问的微服务,并将所选定的微服务按照满足所述业务请求的先后顺序进行排序,以生成逐个访问微服务的订单事件,所述输入界面和所述发送界面设置在所述客户端上。The client obtains the business request through the input interface, calls the sending interface to send the business request to the API Gateway, and the API Gateway connects to the microservices in the order field through the data interface and sends the business request to the order field In microservices, the order field microservice selects the microservices to be accessed according to the business request, and sorts the selected microservices according to the order in which the business requests are met, so as to generate a For an order event, the input interface and the sending interface are set on the client.
  20. 根据权利要求18所述的存储介质,其中,所述输出满足所述业务请求的业务结果时,使得一个或多个处理器执行以下步骤:The storage medium according to claim 18, wherein when the output meets a service result of the service request, causing one or more processors to perform the following steps:
    所述事务调度中心包含数据处理接口,所述事务调度中心通过所述数据处理接口对接订单领域微服务后接收所述订单领域微服务发送的订单事件,所述事务调度中心通过所述数据处理接口对接其他微服务,进行逐个访问微服务以执行订单事件,输出满足所述业务请求的业务结果,所述事务调度中心设置在所述应用系统内。The transaction scheduling center includes a data processing interface, and the transaction scheduling center receives the order event sent by the order field microservice after docking with the order field microservice through the data processing interface, and the transaction scheduling center uses the data processing interface. Docking other microservices, accessing microservices one by one to execute order events, outputting business results that satisfy the business request, and the transaction scheduling center is set in the application system.
PCT/CN2018/104727 2018-06-06 2018-09-08 Data processing method, system, computer device and storage medium WO2019232962A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810584611.3A CN109213770B (en) 2018-06-06 2018-06-06 Data processing method, system, computer device and storage medium
CN201810584611.3 2018-06-06

Publications (1)

Publication Number Publication Date
WO2019232962A1 true WO2019232962A1 (en) 2019-12-12

Family

ID=64991118

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/104727 WO2019232962A1 (en) 2018-06-06 2018-09-08 Data processing method, system, computer device and storage medium

Country Status (2)

Country Link
CN (1) CN109213770B (en)
WO (1) WO2019232962A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111586092A (en) * 2020-03-25 2020-08-25 深圳壹账通智能科技有限公司 Full link monitoring method, system and CAT client
CN113037812A (en) * 2021-02-25 2021-06-25 中国工商银行股份有限公司 Data packet scheduling method and device, electronic equipment, medium and intelligent network card
CN115118769A (en) * 2022-06-28 2022-09-27 深圳前海微众银行股份有限公司 Service system parameter configuration and micro-service execution method and device

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110489139A (en) * 2019-07-03 2019-11-22 平安科技(深圳)有限公司 A kind of real-time data processing method and its relevant device based on micro services
CN110545328A (en) * 2019-09-25 2019-12-06 杭州安恒信息技术股份有限公司 Non-invasive service function expansion enhancing method and device and server
CN114037496A (en) * 2021-11-17 2022-02-11 广域铭岛数字科技有限公司 State machine-based order state management method, device, equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106878393A (en) * 2017-01-16 2017-06-20 深圳市商沃科技发展有限公司 A kind of system based on fusion micro services framework
CN106993023A (en) * 2017-03-01 2017-07-28 北京交通大学 Distributed transaction solution under micro services framework
CN107979635A (en) * 2017-10-24 2018-05-01 广东康美通信息服务有限公司 System, method and storage medium based on micro services
CN108038141A (en) * 2017-11-27 2018-05-15 国云科技股份有限公司 Ensure the method for data consistency under micro services framework HTTP interactive modes
CN108055296A (en) * 2017-11-30 2018-05-18 北京中电普华信息技术有限公司 A kind of transaction methods and device based on micro services framework

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105959138B (en) * 2016-04-29 2019-05-17 深圳大数点科技有限公司 The system and method for micro services Dynamical Deployment based on cloud computing
US10348838B2 (en) * 2016-07-22 2019-07-09 Cisco Technology, Inc. Scaling service discovery in a micro-service environment
CN107370786B (en) * 2017-06-02 2020-11-13 广州杰赛科技股份有限公司 General information management system based on micro-service architecture

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106878393A (en) * 2017-01-16 2017-06-20 深圳市商沃科技发展有限公司 A kind of system based on fusion micro services framework
CN106993023A (en) * 2017-03-01 2017-07-28 北京交通大学 Distributed transaction solution under micro services framework
CN107979635A (en) * 2017-10-24 2018-05-01 广东康美通信息服务有限公司 System, method and storage medium based on micro services
CN108038141A (en) * 2017-11-27 2018-05-15 国云科技股份有限公司 Ensure the method for data consistency under micro services framework HTTP interactive modes
CN108055296A (en) * 2017-11-30 2018-05-18 北京中电普华信息技术有限公司 A kind of transaction methods and device based on micro services framework

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111586092A (en) * 2020-03-25 2020-08-25 深圳壹账通智能科技有限公司 Full link monitoring method, system and CAT client
CN113037812A (en) * 2021-02-25 2021-06-25 中国工商银行股份有限公司 Data packet scheduling method and device, electronic equipment, medium and intelligent network card
CN115118769A (en) * 2022-06-28 2022-09-27 深圳前海微众银行股份有限公司 Service system parameter configuration and micro-service execution method and device
CN115118769B (en) * 2022-06-28 2024-02-02 深圳前海微众银行股份有限公司 Method and device for configuring parameters of service system and executing micro-service

Also Published As

Publication number Publication date
CN109213770A (en) 2019-01-15
CN109213770B (en) 2023-05-30

Similar Documents

Publication Publication Date Title
WO2019232962A1 (en) Data processing method, system, computer device and storage medium
US10455091B1 (en) User input driven short message service (SMS) applications
US11461667B2 (en) System and method for controlled knowledge system management
US10038619B2 (en) Providing a monitoring service in a cloud-based computing environment
US8745625B2 (en) System, method and computer program product for conditionally executing related reports in parallel based on an estimated execution time
US8688640B2 (en) System, method and computer program product for distributed execution of related reports
US10121110B2 (en) System, method and computer program product for progressive rendering of report results
US8589348B2 (en) System, method and computer program product for converting a format of report results
US9189532B2 (en) System, method and computer program product for locally defining related reports using a global definition
WO2019076007A1 (en) Method for processing information fed back by customer, and terminal
US20160140200A1 (en) Dynamic integration of disparate database architectures for efficient management of resources in an on-demand services environment
US11301617B2 (en) Systems and methods for providing error recovery in data transmissions
US20140149173A1 (en) Mechanism for facilitating dynamic visual workflow and task generation in an on-demand services environment
US10505878B1 (en) Workflow management and corresponding integrated notification processing platform
CN114827280A (en) Request processing method, device, equipment and medium
US9826092B2 (en) Method and system for call queue messaging
US20210409541A1 (en) Systems and methods for shifting call handling across multi-region service clusters
US9632837B2 (en) Systems and methods for system consolidation
US11734092B2 (en) Systems and methods for extending the data model of a monolithic database through a microservice for a multi-tenant platform
US11250028B2 (en) Data aggregator
US20230014255A1 (en) Bundling line item based events in an event-driven architecture
US20200379973A1 (en) Systems and methods for providing tenant-defined event notifications in a multi-tenant database system
US20180089681A1 (en) System and method for compliance screening
CN116503005A (en) Method, device, system and storage medium for dynamically modifying flow
AU2019282240B2 (en) Systems and methods for providing uniform access in a multi-tenant system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18921565

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18921565

Country of ref document: EP

Kind code of ref document: A1