WO2022073293A1 - Distributed order processing method, apparatus, device, and storage medium - Google Patents
Distributed order processing method, apparatus, device, and storage medium Download PDFInfo
- Publication number
- WO2022073293A1 WO2022073293A1 PCT/CN2020/134274 CN2020134274W WO2022073293A1 WO 2022073293 A1 WO2022073293 A1 WO 2022073293A1 CN 2020134274 W CN2020134274 W CN 2020134274W WO 2022073293 A1 WO2022073293 A1 WO 2022073293A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- order
- order request
- request
- node database
- data
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q30/00—Commerce
- G06Q30/06—Buying, selling or leasing transactions
- G06Q30/0601—Electronic shopping [e-shopping]
- G06Q30/0633—Lists, e.g. purchase orders, compilation or processing
- G06Q30/0635—Processing of requisition or of purchase orders
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
- G06F16/258—Data format conversion from or to a database
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/542—Event management; Broadcasting; Multicasting; Notifications
Definitions
- the present application relates to the technical field of order processing, and in particular, to a distributed order processing method, apparatus, device and storage medium.
- the order processing system in the related art is used to transmit information between the user and different third parties, so that the user can complete the order processing with different third parties through the order processing system; In the process, it is not only responsible for receiving order information, but also responsible for sending order information, which makes the system coupling between the user, the order processing system and the third party high, resulting in low stability of the order processing system.
- the present application provides a distributed order processing method, device, equipment and storage medium.
- the present application provides a distributed order processing method, which adopts the following technical solutions:
- the method includes:
- the message event that the processing result has been stored in the read node database is sent to the user side corresponding to the order request in the form of broadcast.
- the order processing system only stores the user's order request and the third party's feedback result, and sends the stored result information to the user or the third party correspondingly after storage.
- the stored content is actively sent; after receiving the result information notified by the order processing system, the user and the third party can choose whether to retrieve the relevant data of the order or result stored in the order processing system according to their needs, so that each system can only focus on At the same time, it notifies its related systems by broadcasting, which achieves the effect of system decoupling, reduces the coupling between various systems, and improves the stability of the order processing system.
- the method further includes;
- auxiliary processing system can retrieve the data information related to the order request in the read node database as needed after receiving the broadcast Process the auxiliary events related to the order request other than the order request in place of the order processing system, and store the processing results of the auxiliary events in the auxiliary database;
- the user can perform an operation of issuing a query after receiving the broadcast of the message event of the stored processing result
- the method also includes:
- the main business closely related to the order request is completed by the order processing system, while the auxiliary events other than the order request related to the order request are completed by the auxiliary processing system instead of the order processing system, which reduces the business pressure of the order processing system , thereby improving the processing speed of the order processing system; at the same time, the auxiliary processing system stores the processing results of auxiliary events separately, so that users can quickly retrieve and query all processing results related to order requests, improving user experience.
- the order request includes a business log and a business node
- the storing the order request to the write node database includes:
- the business log, business node and order log corresponding to the order request are stored in the write node database.
- each order request of the user has a unique identity, so that other systems can quickly identify the specific order request according to its identity when calling the order request, reducing the possibility of calling errors , which further improves the stability of the system.
- the storing of the business log, business node and order log corresponding to the order request to the write node database includes:
- a number of the order request data sources are stored in the write node database.
- the data of the order request is isomerized so that the format corresponds to the data format required by the corresponding third party, so that the third party can quickly process the order request, thereby improving the processing efficiency of the third party on the order request.
- the method further includes;
- the different data types in the order request are classified and preprocessed in advance, and each data type of the order request is pre-converted into the format required by the data heterogeneity , which not only improves the speed of data heterogeneity, but also reduces the possibility of errors in the process of data heterogeneity.
- the storing the processing result of the order request to the read node database includes:
- the order processing result data source is stored in the read node database for the user to read.
- the format of the order processing results is pre-isomerized into a format corresponding to the data format required by the user, so that the user can quickly read
- the relevant data of the order processing result retrieved from the node database is processed, thereby improving the processing speed of the order processing result data on the user side.
- the storing of the processing result of the auxiliary event in the auxiliary database includes:
- the auxiliary processing result data source is stored in the auxiliary database for the user to read.
- the auxiliary processing structure is isomerized in advance into a format corresponding to the data format required by the user, so that the user can quickly analyze the data in the auxiliary database.
- the retrieved data related to the auxiliary processing result is processed, thereby improving the processing speed of the auxiliary processing result data by the user.
- the present application provides a distributed order processing device, which adopts the following technical solution: the device includes:
- the request receiving module is used to receive the user's order request
- a request storage module configured to store the order request in the write node database and generate a message event
- a data synchronization module for synchronizing the order request in the write node database to the read node database for a third party to read;
- the first broadcast module is used to send the message event of the stored order request to the read node database in the form of broadcast to the third party corresponding to the order request, so that the third party can call the write node database after receiving the broadcast.
- the data of the order request to process the order request and generate the processing result;
- a result receiving module configured to receive the processing result corresponding to the order request fed back by the third party
- a result storage module used to store the processing result of the order request in the read node database and generate a message event
- the second broadcasting module is configured to send the message event of the stored processing result to the read node database in the form of broadcasting to the user side corresponding to the order request.
- the order processing system only stores the user's order request and the third party's feedback result, and sends the stored result information to the user or the third party correspondingly after storage.
- the stored content is actively sent; after receiving the result information notified by the order processing system, the user and the third party can choose whether to retrieve the relevant data of the order or result stored in the order processing system according to their needs, so that each system can only focus on At the same time, it notifies its related systems by broadcasting, which achieves the effect of system decoupling, reduces the coupling between various systems, and improves the stability of the order processing system.
- the present application provides a computer device using the following technical solution: comprising a memory and a processor, where the memory stores a computer program capable of being loaded by the processor and executing the method described in the first aspect.
- the processor in the computer device can implement the above distributed order processing method according to the relevant computer program stored in the memory, thereby achieving the effect of improving the stability of the order processing system.
- the present application provides a computer-readable storage medium, using the following technical solution: a computer program capable of being loaded by a processor and executing the method described in the first aspect is stored.
- the above-mentioned distributed order processing method can be stored in a readable storage medium, so that the computer program of the distributed order processing method stored in the readable storage medium can be executed by the processor, thereby improving order processing.
- the present application includes at least one of the following beneficial technical effects:
- Each system can only focus on its own business, and at the same time notify its related systems by broadcasting, which achieves the effect of system decoupling, reduces the coupling degree between systems, and improves the stability of the order processing system;
- FIG. 1 is a flowchart of a distributed order processing method in an embodiment of the present application.
- FIG. 2 is a flowchart of sub-steps of S20 in an embodiment of the present application.
- FIG. 3 is a structural block diagram of receiving a query request according to an embodiment of the present application.
- FIG. 4 is a structural block diagram of a distributed order processing apparatus in an embodiment of the present application.
- the embodiment of the present application discloses a distributed order processing method.
- the method includes the following steps:
- S10 Receive an order request from the user.
- the user's order request includes business logs and business nodes, and the order request is different user needs such as a ticket booking request or a payment request; different order requests correspond to different third parties, for example: train ticket order requests
- the corresponding third party is the supplier of train tickets; the third party corresponding to the payment request is payment software such as WeChat and Alipay.
- S20 specifically includes the following four sub-steps:
- the write node database After the write node database receives the order request, it allocates a unique order log, and the order log is the unique identifier of the order request; so that the order processing system can process the data of the order request later according to the The order log can quickly and accurately find the order request.
- the data formats of the business log, business node, order log and write node database corresponding to the order request are preprocessed to obtain the business log intermediate data source, business node intermediate data source, and order log intermediate data source And modify and record the intermediate data source;
- the format of each intermediate data source corresponds to the format required by data heterogeneity.
- the data format is heterogeneous by Flink streaming computing method, heterogeneous data processing will be required first. It is the format required for Flink streaming computing, so as to achieve the effect of preprocessing the data that needs to be heterogeneous, so that data heterogeneous operations can be performed quickly in the later stage.
- the Flink streaming computing method is used to perform data heterogeneity on the business log intermediate data source, business node intermediate data source, order log intermediate data source and the data format of the modified record intermediate data source corresponding to the preprocessed order request. , and obtain several order request data sources with the same data format as the third party needs to read; for example, order request data sources with the same data format as the train ticket supplier system or the same data format as the WeChat payment system Order request data source, etc.
- the order request data source obtained after data isomerization is stored in the write node database.
- the information of the order request data source is synchronized to the read node database, so that the read node database also contains the relevant information of the order request. information; and while synchronizing the information of the request data source to the read node database, a message event representing the stored order request to the read node database is generated.
- the message event is synchronously sent to the third party corresponding to the order request in the form of broadcast.
- the order request is a WeChat payment request
- the The message event is sent to the WeChat payment system
- the order request is a train ticket reservation request
- the message event is sent to the train ticket supplier system
- the third party can actively retrieve the order request in the node database after receiving the broadcast
- the data source is used to process the order request and generate the processing result; the data format of the order request data source is the same as that required by the third party, so that the third party can quickly process the order request.
- the relevant data of the order request in the order processing system will be heterogeneous into different data formats and stored in different databases for different demanders to call at any time.
- the background R&D personnel of the order processing system can regularly adjust Get order information to perform statistical analysis on different order information; or background operation and maintenance personnel can pull abnormal events during order processing for unified operation and maintenance processing.
- the preset auxiliary processing system is used to replace the order processing system to process auxiliary events related to the order request other than the order request, such as payment status information, seat occupancy details information, etc. during the order process; the order processing system is sending When broadcasting to a third party, it will also send a broadcast to the auxiliary processing system; after receiving the broadcast, the auxiliary processing system will call the data information related to the order request in the read node database as needed to replace the order processing system to process the order request.
- Auxiliary events related to the order request outside; the setting of the auxiliary processing system has the effect of sharing the processing pressure of the order processing system, so that the order processing system can only process the events directly related to the order request, and the auxiliary events other than the order request can be processed by Auxiliary processing system to complete, thereby relieving the business pressure of the order processing system and improving the processing efficiency of the order processing system.
- the auxiliary processing system will generate the processing results of several auxiliary events after processing the auxiliary events.
- the data format of the processing results of the auxiliary events is heterogeneous by using Flink streaming computing method.
- S70 Store the processing result fed back by the third party.
- the third party calls the relevant order request for processing and generates the processing result of the order request, it will send the processing result of the order request to the read node database, and the read node database will receive the processing result of the order request;
- the data format of the processing result of the order request is heterogeneous by using Flink streaming computing method, and the data source of the order processing result is obtained in the same format as the data that the user needs to read, and Synchronously store the obtained order processing result data source in the read node database for the user to read; after the order processing result data source is stored in the read node database, synchronously generate a message representing the stored processing result to the read node database event.
- the generated message event of the stored processing result to the read node database is sent to the user side synchronously, so that the user side can know the processing result of the order request according to the notification of the message event, Order payment is successful, etc.
- the method also includes the following optional steps:
- the user can choose whether to send a query request to the order processing system after receiving the broadcast of the message event of the stored processing result.
- the order processing system in the process of processing the user's order, only stores the user's order request and the feedback result of the third party, and sends the stored result information correspondingly to the user or the third party after storage.
- the third party does not actively send the stored content; after receiving the result information notified by the order processing system, the user and the third party can choose whether to retrieve the relevant data of the order or result stored in the order processing system according to their needs, so that each The system can only focus on its own business, and at the same time notify its related systems by broadcasting, which achieves the effect of system decoupling, reduces the degree of coupling between systems, and improves the stability of the order processing system; auxiliary processing system It can replace the order processing system to process some auxiliary events other than order requests, reducing the business pressure of the order processing system; at the same time, after receiving the order request or the processing result information fed back by the third party, the order processing system will Perform data heterogeneity, so that the data stored in the read database can correspond to the data format required by the user or a third party, so that the user and the third party can quickly perform related processing after calling the relevant data in the read database, This further improves the efficiency of order processing.
- an embodiment of the present application further discloses a distributed order processing apparatus.
- the device includes the following modules:
- a request receiving module 301 configured to receive an order request from a user
- a request storage module 302 configured to store the order request in the write node database and generate a message event
- the data synchronization module 303 is used for synchronizing the order request in the write node database to the read node database for a third party to read;
- the first broadcast module 304 is used to send the message event of the stored order request to the read node database in the form of broadcast to the third party corresponding to the order request, so that the third party can call the write node database after receiving the broadcast.
- the data of the order request to process the order request and generate the processing result;
- the result receiving module 305 is used for receiving the processing result corresponding to the order request fed back by the third party;
- the result storage module 306 is used to store the processing result of the order request in the read node database and generate a message event
- the second broadcast module 307 is used to send the message event that has stored the processing result to the read node database in the form of broadcast to the user side corresponding to the order request;
- the third broadcasting module 308 is used to send the message event of the stored processing result to all preset auxiliary processing systems in the form of broadcasting; for the auxiliary processing system to call the read node database and the relevant auxiliary processing system as needed after receiving the broadcast.
- the data information related to the order request is used instead of the order processing system to process the auxiliary events related to the order request other than the order request, and the processing results of the auxiliary events are stored in the auxiliary database;
- the format processing module 309 is configured to preprocess the data formats of the business log, business node and order log in the order request respectively to obtain the business log intermediate data source, the business node intermediate data source and the order log intermediate data source.
- the embodiment of the present application also discloses a computer device.
- the computer device includes a memory and a processor, and the memory stores a computer program capable of being loaded by the processor and executing the above-mentioned distributed order processing method.
- the embodiment of the present application also discloses a computer-readable storage medium.
- the computer-readable storage medium stores a computer program that can be loaded by the processor and executes the above-mentioned distributed order processing method
- the computer-readable storage medium includes, for example: U disk, removable hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disks or optical disks and other media that can store program codes.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Software Systems (AREA)
- Data Mining & Analysis (AREA)
- Marketing (AREA)
- General Business, Economics & Management (AREA)
- Strategic Management (AREA)
- Economics (AREA)
- Multimedia (AREA)
- Development Economics (AREA)
- Computing Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
Provided are a distributed order processing method, apparatus, device, and storage medium, said method comprising: receiving an order request from a user party (S10); storing the order request to a write node database; synchronizing the order request to the write node database to a read node database (S20); sending a message event, storing the order request to the read node database, as a broadcast to a third party corresponding to the order request, for the third party to call the data of the order request in the write node database so as to process the order request and generate a processing result; receiving the processing result corresponding to the order request, fed back by the third party; storing the processing result of the order request to the read node database; sending a message event, storing the processing result to the read node database, as a broadcast to the user party corresponding to the order request. The method reduces the degree of coupling between systems, thus increasing the stability of an order processing system.
Description
本申请涉及订单处理的技术领域,尤其是涉及一种分布式订单处理方法、装置、设备及存储介质。The present application relates to the technical field of order processing, and in particular, to a distributed order processing method, apparatus, device and storage medium.
随着OTA行业的不断发展,业务订单量及业务复杂度快速攀升,业务对系统的要求急速提升,对接口交互时长、系统稳定、用户体验等要求越来越高。With the continuous development of the OTA industry, the number of business orders and business complexity are rapidly increasing, and the business requirements for the system are rapidly increasing, and the requirements for interface interaction time, system stability, and user experience are getting higher and higher.
相关技术中的订单处理系统用于在用户方与不同的第三方之间进行信息传递,以便于用户可以通过订单处理系统完成与不同第三方之间的订单处理;而订单处理系统在订单处理的过程中既要负责订单信息的接收,还需要负责订单信息的发送,使得用户方、订单处理系统以及第三方之间的系统耦合度较高,从而导致订单处理系统的稳定性较低。The order processing system in the related art is used to transmit information between the user and different third parties, so that the user can complete the order processing with different third parties through the order processing system; In the process, it is not only responsible for receiving order information, but also responsible for sending order information, which makes the system coupling between the user, the order processing system and the third party high, resulting in low stability of the order processing system.
发明内容SUMMARY OF THE INVENTION
为了改善订单处理系统稳定性较低的问题,本申请提供的一种分布式订单处理方法、装置、设备及存储介质。In order to improve the problem of low stability of the order processing system, the present application provides a distributed order processing method, device, equipment and storage medium.
第一方面,本申请提供一种分布式订单处理方法,采用如下的技术方案:In the first aspect, the present application provides a distributed order processing method, which adopts the following technical solutions:
所述方法包括:The method includes:
接收用户方的订单请求;Receive an order request from the user;
将所述订单请求存储至写节点数据库;storing the order request in the write node database;
将所述写节点数据库内的订单请求同步至读节点数据库以供第三方进行读取,并生成消息事件;Synchronizing the order request in the write node database to the read node database for a third party to read, and generating a message event;
将已存储订单请求至读节点数据库的消息事件以广播的形式发送至与所述订单请求相对应的第三方,以供第三方在接收到广播后调用读节点数据库内的订单请求的数据以对该订单请求进行处理并生成处理结果;Send the message event of the stored order request to the read node database to the third party corresponding to the order request in the form of broadcast, so that the third party can call the data of the order request in the read node database after receiving the broadcast. The order request is processed and a processing result is generated;
接收所述第三方反馈的与所述订单请求相对应的处理结果;Receive the processing result corresponding to the order request fed back by the third party;
将所述订单请求的处理结果存储至读节点数据库并生成消息事件;Store the processing result of the order request in the read node database and generate a message event;
将已存储处理结果至读节点数据库的消息事件以广播的形式发送至与所述订单请求相对应的用户方。The message event that the processing result has been stored in the read node database is sent to the user side corresponding to the order request in the form of broadcast.
通过上述技术方案,在用户订单处理的过程中,订单处理系统仅对用户的订单请求以及第三方的反馈结果进行存储,并在存储后将存储完成的结果信息对应发送至用户或第三方,不对存储的内容进行主动发送;用户和第三发在接收到订单处理系统通知的结果信息后可根据需要选择是否调取订单处理系统内存储的订单或结果的相关数据,从而使得各系统可以只关注自己的业务,同时用广播的方式通知与其相关的系统,达到了系统解耦的效果,降低了各系统之间的耦合度,进而提升了订单处理系统的稳定性。Through the above technical solution, in the process of user order processing, the order processing system only stores the user's order request and the third party's feedback result, and sends the stored result information to the user or the third party correspondingly after storage. The stored content is actively sent; after receiving the result information notified by the order processing system, the user and the third party can choose whether to retrieve the relevant data of the order or result stored in the order processing system according to their needs, so that each system can only focus on At the same time, it notifies its related systems by broadcasting, which achieves the effect of system decoupling, reduces the coupling between various systems, and improves the stability of the order processing system.
优选的,在所述将所述处理结果存储至读节点数据库之后,还包括;Preferably, after the processing result is stored in the read node database, the method further includes;
将已存储处理结果的消息事件以广播的形式发送至所有预设的辅助处理系统,以供所述辅助处理系统在接收到广播后根据需要调取读节点数据库中与该订单请求相关的数据信息以代替订单处理系统处理该订单请求之外与订单请求相关的辅助事件,并将辅助事件的处理结果存储至辅助数据库;Send the message event of the stored processing result to all preset auxiliary processing systems in the form of broadcast, so that the auxiliary processing system can retrieve the data information related to the order request in the read node database as needed after receiving the broadcast Process the auxiliary events related to the order request other than the order request in place of the order processing system, and store the processing results of the auxiliary events in the auxiliary database;
在所述方法中,所述用户方在接收到已存储处理结果的消息事件的广播后可进行发出查询的操作;In the method, the user can perform an operation of issuing a query after receiving the broadcast of the message event of the stored processing result;
所述方法还包括:The method also includes:
在接收到用户方针对所述订单请求的查询请求时,调取读节点数据库和/或辅助数据库中的相关数据信息并将调取到的数据信息反馈至用户方。When receiving a query request for the order request from the user side, retrieve the relevant data information in the read node database and/or the auxiliary database, and feed back the retrieved data information to the user side.
通过上述技术方案,与订单请求密切相关的主业务由订单处理系统完成,而订单请求之外与订单请求相关的辅助事件则由辅助处理系统代替订单处理系统完成,减轻了订单处理系统的业务压力,从而提升了订单处理系统的处理速度;同时,辅助处理系统对辅助事件的处理结果单独存放,以便于用户可以快速调取查询与订单请求相关的所有处理结果,提升了用户体验 度。Through the above technical solution, the main business closely related to the order request is completed by the order processing system, while the auxiliary events other than the order request related to the order request are completed by the auxiliary processing system instead of the order processing system, which reduces the business pressure of the order processing system , thereby improving the processing speed of the order processing system; at the same time, the auxiliary processing system stores the processing results of auxiliary events separately, so that users can quickly retrieve and query all processing results related to order requests, improving user experience.
优选的,所述订单请求包括业务日志和业务节点;Preferably, the order request includes a business log and a business node;
所述将所述订单请求存储至写节点数据库,包括:The storing the order request to the write node database includes:
为存储在写节点数据库中的订单请求分配订单日志,所述订单日志为该订单请求的唯一身份标识;Allocate an order log for the order request stored in the write node database, where the order log is the unique identifier of the order request;
将与所述订单请求对应的业务日志、业务节点以及订单日志存储至写节点数据库。The business log, business node and order log corresponding to the order request are stored in the write node database.
通过上述技术方案,用户方的每一订单请求均具有唯一的身份标识,以便于其他系统在对订单请求进行调用时,可以根据其身份标识快速识别到具体的订单请求,减少了调用错误的可能,进一步提升了系统的稳定性。Through the above technical solution, each order request of the user has a unique identity, so that other systems can quickly identify the specific order request according to its identity when calling the order request, reducing the possibility of calling errors , which further improves the stability of the system.
优选的,所述将与所述订单请求对应的业务日志、业务节点以及订单日志存储至写节点数据库,包括:Preferably, the storing of the business log, business node and order log corresponding to the order request to the write node database includes:
对所述订单请求中的业务日志、业务节点及订单日志的数据格式进行数据异构得出若干与第三方需要读取的数据格式相同的订单请求数据源;Perform data heterogeneity on the data format of the business log, business node and order log in the order request to obtain a number of order request data sources with the same format as the data that the third party needs to read;
将若干所述订单请求数据源存储在写节点数据库内。A number of the order request data sources are stored in the write node database.
通过上述技术方案,在对订单请求进行存储之前,预先根据该订单请求所对应的第三方的数据需求格式,对订单请求的数据进行异构使其格式与对应第三方需要的数据格式相对应,使得第三方在调取订单请求时无需对订单请求的格式进行转化,以便于第三方可以快速对订单请求进行处理,从而提升了第三方对订单请求的处理效率。Through the above technical solution, before the order request is stored, according to the data requirement format of the third party corresponding to the order request, the data of the order request is isomerized so that the format corresponds to the data format required by the corresponding third party, The third party does not need to convert the format of the order request when fetching the order request, so that the third party can quickly process the order request, thereby improving the processing efficiency of the third party on the order request.
优选的,在所述对所述订单请求中的业务日志、业务节点及订单日志的数据格式进行数据异构之前,还包括;Preferably, before the data isomerization is performed on the data formats of the business logs, business nodes and order logs in the order request, the method further includes;
分别对所述订单请求中的业务日志、业务节点及订单日志的数据格式进行预处理得到业务日志中间数据源、业务节点中间数据源及订单日志中间数据源;所述业务日志中间数据源、业务节点中间数据源及订单日志中间数据源均与数据异构所需要的格式相对应。Preprocessing the data formats of the business log, business node and order log in the order request respectively to obtain a business log intermediate data source, a business node intermediate data source and an order log intermediate data source; the business log intermediate data source, business Both the node intermediate data source and the order log intermediate data source correspond to the format required for data heterogeneity.
通过上述技术方案,在对订单请求的数据进行异构处理之前,预先对订单请求中的不同数据类型进行分类并预处理,将订单请求的各数据类型均预先转化为数据异构所需要的格式,提升了数据异构速度的同时,还降低了数据异构过程中出现错误的可能。Through the above technical solution, before performing heterogeneous processing on the data requested by the order, the different data types in the order request are classified and preprocessed in advance, and each data type of the order request is pre-converted into the format required by the data heterogeneity , which not only improves the speed of data heterogeneity, but also reduces the possibility of errors in the process of data heterogeneity.
优选的,所述将所述订单请求的处理结果存储至读节点数据库,包括:Preferably, the storing the processing result of the order request to the read node database includes:
对所述订单请求处理结果的数据格式进行数据异构得出与用户方需要读取的数据格式相同的订单处理结果数据源;Performing data heterogeneity on the data format of the order request processing result to obtain the data source of the order processing result that is the same as the data format that the user needs to read;
将所述订单处理结果数据源存储在读节点数据库内以供用户方进行读取。The order processing result data source is stored in the read node database for the user to read.
通过上述技术方案,在将第三方反馈的处理结果存储到读节点数据库之前,预先将订单处理结果的格式异构为与用户方需要的数据格式相对应的格式,以便于用户方可以快速对读节点数据库内调取到的订单处理结果的相关数据进行处理,从而提升了用户方对订单处理结果数据的处理速度。Through the above technical solution, before storing the processing results fed back by the third party in the reading node database, the format of the order processing results is pre-isomerized into a format corresponding to the data format required by the user, so that the user can quickly read The relevant data of the order processing result retrieved from the node database is processed, thereby improving the processing speed of the order processing result data on the user side.
优选的,所述将辅助事件的处理结果存储至辅助数据库,包括:Preferably, the storing of the processing result of the auxiliary event in the auxiliary database includes:
对所述辅助事件处理结果的数据格式进行数据异构得出与用户方需要读取的数据格式相同的辅助处理结果数据源;Performing data heterogeneity on the data format of the auxiliary event processing result to obtain the same auxiliary processing result data source as the data format that the user needs to read;
将所述辅助处理结果数据源存储在辅助数据库内以供用户方进行读取。The auxiliary processing result data source is stored in the auxiliary database for the user to read.
通过上述技术方案,在将辅助事件的处理结果存储至辅助数据库内之前,预先将辅助处理的结构异构为与用户方需要的数据格式相对应的格式,以便于用户方可以快速对辅助数据库内调取到的辅助处理结果的相关数据进行处理,从而提升了用户方对辅助处理结果数据的处理速度。Through the above technical solution, before the processing result of the auxiliary event is stored in the auxiliary database, the auxiliary processing structure is isomerized in advance into a format corresponding to the data format required by the user, so that the user can quickly analyze the data in the auxiliary database. The retrieved data related to the auxiliary processing result is processed, thereby improving the processing speed of the auxiliary processing result data by the user.
第二方面,本申请提供一种分布式订单处理装置,采用如下技术方案:所述装置包括:In a second aspect, the present application provides a distributed order processing device, which adopts the following technical solution: the device includes:
请求接收模块,用于接收用户方的订单请求;The request receiving module is used to receive the user's order request;
请求存储模块,用于将所述订单请求存储至写节点数据库并生成消息事件;a request storage module, configured to store the order request in the write node database and generate a message event;
数据同步模块,用于将所述写节点数据库内的订单请求同步至读节点数据库以供第三方进行读取;a data synchronization module for synchronizing the order request in the write node database to the read node database for a third party to read;
第一广播模块,用于将已存储订单请求至读节点数据库的消息事件以广播的形式发送至与所述订单请求相对应的第三方,以供第三方在接收到广播后调用写节点数据库内的订单请求的数据以对该订单请求进行处理并生成处理结果;The first broadcast module is used to send the message event of the stored order request to the read node database in the form of broadcast to the third party corresponding to the order request, so that the third party can call the write node database after receiving the broadcast. The data of the order request to process the order request and generate the processing result;
结果接收模块,用于接收所述第三方反馈的与所述订单请求相对应的处理结果;a result receiving module, configured to receive the processing result corresponding to the order request fed back by the third party;
结果存储模块,用于将所述订单请求的处理结果存储至读节点数据库并生成消息事件;a result storage module, used to store the processing result of the order request in the read node database and generate a message event;
第二广播模块,用于将已存储处理结果至读节点数据库的消息事件以广播的形式发送至与所述订单请求相对应的用户方。The second broadcasting module is configured to send the message event of the stored processing result to the read node database in the form of broadcasting to the user side corresponding to the order request.
通过上述技术方案,在用户订单处理的过程中,订单处理系统仅对用户的订单请求以及第三方的反馈结果进行存储,并在存储后将存储完成的结果信息对应发送至用户或第三方,不对存储的内容进行主动发送;用户和第三发在接收到订单处理系统通知的结果信息后可根据需要选择是否调取订单处理系统内存储的订单或结果的相关数据,从而使得各系统可以只关注自己的业务,同时用广播的方式通知与其相关的系统,达到了系统解耦的效果,降低了各系统之间的耦合度,进而提升了订单处理系统的稳定性。Through the above technical solution, in the process of user order processing, the order processing system only stores the user's order request and the third party's feedback result, and sends the stored result information to the user or the third party correspondingly after storage. The stored content is actively sent; after receiving the result information notified by the order processing system, the user and the third party can choose whether to retrieve the relevant data of the order or result stored in the order processing system according to their needs, so that each system can only focus on At the same time, it notifies its related systems by broadcasting, which achieves the effect of system decoupling, reduces the coupling between various systems, and improves the stability of the order processing system.
第三方面,本申请提供一种计算机设备,采用如下技术方案:包括存储器和处理器,所述存储器上存储有能够被处理器加载并执行如第一方面中所述方法的计算机程序。In a third aspect, the present application provides a computer device using the following technical solution: comprising a memory and a processor, where the memory stores a computer program capable of being loaded by the processor and executing the method described in the first aspect.
通过上述技术方案,计算机设备中的处理器可以根据存储器中存储的相关计算机程序,实现上述分布式订单处理的方法,从而达到提升订单处理系统稳定性的效果。Through the above technical solution, the processor in the computer device can implement the above distributed order processing method according to the relevant computer program stored in the memory, thereby achieving the effect of improving the stability of the order processing system.
第四方面,本申请提供一种计算机可读存储介质,采用如下技术方案: 存储有能够被处理器加载并执行如第一方面中所述方法的计算机程序。In a fourth aspect, the present application provides a computer-readable storage medium, using the following technical solution: a computer program capable of being loaded by a processor and executing the method described in the first aspect is stored.
通过上述技术方案,上述分布式订单处理方法可以被存储到可读存储介质中,以便于可读存储介质内存储的分布式订单处理方法的计算机程序可以被处理器执行,从而实现提升了订单处理系统稳定性的效果。Through the above technical solution, the above-mentioned distributed order processing method can be stored in a readable storage medium, so that the computer program of the distributed order processing method stored in the readable storage medium can be executed by the processor, thereby improving order processing. The effect of system stability.
综上所述,本申请包括以下至少一种有益技术效果:To sum up, the present application includes at least one of the following beneficial technical effects:
1.各系统可以只关注自己的业务,同时用广播的方式通知与其相关的系统,达到了系统解耦的效果,降低了各系统之间的耦合度,进而提升了订单处理系统的稳定性;1. Each system can only focus on its own business, and at the same time notify its related systems by broadcasting, which achieves the effect of system decoupling, reduces the coupling degree between systems, and improves the stability of the order processing system;
2.在对订单请求进行存储之前,预先对订单请求的数据进行异构使其格式与对应第三方需要的数据格式相对应,以便于第三方可以快速对订单请求进行处理,从而提升了第三方对订单请求的处理效率。2. Before storing the order request, isomerize the data of the order request in advance so that the format corresponds to the data format required by the corresponding third party, so that the third party can quickly process the order request, thus improving the third party Processing efficiency of order requests.
图1是本申请一实施例中分布式订单处理方法的流程图。FIG. 1 is a flowchart of a distributed order processing method in an embodiment of the present application.
图2是本申请一实施例中S20的子步骤流程图。FIG. 2 is a flowchart of sub-steps of S20 in an embodiment of the present application.
图3是本申请一实施例中体现接收查询请求的结构框图。FIG. 3 is a structural block diagram of receiving a query request according to an embodiment of the present application.
图4是本申请一实施例中分布式订单处理装置的结构框图。FIG. 4 is a structural block diagram of a distributed order processing apparatus in an embodiment of the present application.
附图标记:301、请求接收模块;302、请求存储模块;303、数据同步模块;304、第一广播模块;305、结果接收模块;306、结果存储模块;307、第二广播模块;308、第三广播模块;309、格式处理模块。Reference numerals: 301, request receiving module; 302, request storage module; 303, data synchronization module; 304, first broadcast module; 305, result receiving module; 306, result storage module; 307, second broadcast module; 308, The third broadcasting module; 309, a format processing module.
以下结合附图1-4对本申请作进一步详细说明。The present application will be further described in detail below in conjunction with accompanying drawings 1-4.
本申请实施例公开一种分布式订单处理方法。The embodiment of the present application discloses a distributed order processing method.
结合图1,该方法包括以下步骤:1, the method includes the following steps:
S10,接收用户方的订单请求。S10: Receive an order request from the user.
具体来说,用户方的订单请求包括业务日志和业务节点,订单请求为订票请求或支付请求等不同的用户需求;不同的订单请求分别与不同的第三方 相对应,例如:火车票订单请求对应的第三方为火车票的供应商;支付请求对应的第三方为微信、支付宝等支付软件。Specifically, the user's order request includes business logs and business nodes, and the order request is different user needs such as a ticket booking request or a payment request; different order requests correspond to different third parties, for example: train ticket order requests The corresponding third party is the supplier of train tickets; the third party corresponding to the payment request is payment software such as WeChat and Alipay.
S20,将订单请求存储至写节点数据库。S20, the order request is stored in the write node database.
结合图2,S20具体包括以下四个子步骤:With reference to Figure 2, S20 specifically includes the following four sub-steps:
S201,为订单请求分配订单日志。S201, assigning an order log to the order request.
具体来说,写节点数据库接收到订单请求之后,为其分配唯一的订单日志,订单日志为该订单请求的唯一身份标识;以便于订单处理系统后期在对订单请求的数据进行处理时,可以根据订单日志快速且精准的查找到该订单请求。Specifically, after the write node database receives the order request, it allocates a unique order log, and the order log is the unique identifier of the order request; so that the order processing system can process the data of the order request later according to the The order log can quickly and accurately find the order request.
S202,对订单请求数据进行预处理。S202, preprocessing the order request data.
具体来说,分别对订单请求所对应的业务日志、业务节点、订单日志以及写节点数据库的修改记录的数据格式进行预处理得到业务日志中间数据源、业务节点中间数据源、订单日志中间数据源以及修改记录中间数据源;各中间数据源的格式均与数据异构所需要的格式相对应,例如,采用Flink流式计算方式对数据的格式进行异构时,首先将需要异构的数据处理为Flink流式计算所需要的格式,从而达到了对需要异构的数据进行预处理的效果,以便于后期可以快速进行数据异构操作。Specifically, the data formats of the business log, business node, order log and write node database corresponding to the order request are preprocessed to obtain the business log intermediate data source, business node intermediate data source, and order log intermediate data source And modify and record the intermediate data source; the format of each intermediate data source corresponds to the format required by data heterogeneity. For example, when the data format is heterogeneous by Flink streaming computing method, heterogeneous data processing will be required first. It is the format required for Flink streaming computing, so as to achieve the effect of preprocessing the data that needs to be heterogeneous, so that data heterogeneous operations can be performed quickly in the later stage.
S203,对订单请求数据进行数据异构。S203, performing data isomerization on the order request data.
具体来说,采用Flink流式计算方式对预处理后的订单请求所对应的业务日志中间数据源、业务节点中间数据源、订单日志中间数据源以及修改记录中间数据源的数据格式进行数据异构,得出若干与第三方需要读取的数据格式相同的订单请求数据源;例如,与火车票的供应商系统需要的数据格式相同的订单请求数据源或与微信支付系统需要的数据格式相同的订单请求数据源等。Specifically, the Flink streaming computing method is used to perform data heterogeneity on the business log intermediate data source, business node intermediate data source, order log intermediate data source and the data format of the modified record intermediate data source corresponding to the preprocessed order request. , and obtain several order request data sources with the same data format as the third party needs to read; for example, order request data sources with the same data format as the train ticket supplier system or the same data format as the WeChat payment system Order request data source, etc.
S204,对订单请求数据源进行存储。S204, the order request data source is stored.
具体来说,将数据异构后得到的订单请求数据源存储至写节点数据库。Specifically, the order request data source obtained after data isomerization is stored in the write node database.
S30,将写节点数据库数据同步至读节点数据库。S30, synchronize the data of the write node database to the read node database.
具体来说,在将数据异构后得到的订单请求数据源存储至写节点数据库之后,将该订单请求数据源的信息同步至读节点数据库,使得读节点数据库中同样包含有该订单请求的相关信息;并在将请求数据源的信息同步至读节点数据库的同时,生成代表已存储订单请求至读节点数据库的消息事件。Specifically, after the order request data source obtained after data isomerization is stored in the write node database, the information of the order request data source is synchronized to the read node database, so that the read node database also contains the relevant information of the order request. information; and while synchronizing the information of the request data source to the read node database, a message event representing the stored order request to the read node database is generated.
S40,发送广播至与订单请求对应的第三方。S40, send a broadcast to a third party corresponding to the order request.
具体来说,在生成已存储订单请求至读节点数据库的消息事件后,同步将该消息事件以广播的形式发送给与订单请求相对应的第三方,例如,订单请求为微信支付请求时,将消息事件发送给微信支付系统;订单请求为火车票订票占座请求时,发送消息事件至火车票供应商系统;以便于第三方在接收到广播后可以主动调取读节点数据库内的订单请求数据源以对该订单请求进行处理并生成处理结果;订单请求数据源的数据格式与第三方所需的格式相同,以便于第三方可以快速对该订单请求进行处理。Specifically, after generating the message event of the stored order request to the read node database, the message event is synchronously sent to the third party corresponding to the order request in the form of broadcast. For example, when the order request is a WeChat payment request, the The message event is sent to the WeChat payment system; when the order request is a train ticket reservation request, the message event is sent to the train ticket supplier system; so that the third party can actively retrieve the order request in the node database after receiving the broadcast The data source is used to process the order request and generate the processing result; the data format of the order request data source is the same as that required by the third party, so that the third party can quickly process the order request.
同时,订单处理系统内的订单请求的相关数据会被异构为不同的数据格式并分别存储在不同的数据库内,以供不同的需求方随时调用,例如订单处理系统的后台研发人员可以定期调取订单信息对不同的订单信息进行统计分析;或者后台运维人员可以拉取订单处理过程中的异常事件进行统一的运维处理。At the same time, the relevant data of the order request in the order processing system will be heterogeneous into different data formats and stored in different databases for different demanders to call at any time. For example, the background R&D personnel of the order processing system can regularly adjust Get order information to perform statistical analysis on different order information; or background operation and maintenance personnel can pull abnormal events during order processing for unified operation and maintenance processing.
S50,发送广播至预设的辅助处理系统。S50, sending a broadcast to a preset auxiliary processing system.
具体来说,预设的辅助处理系统用于代替订单处理系统处理订单请求之外与订单请求相关的辅助事件,例如订单进行过程中的支付状态信息、占座详情信息等;订单处理系统在发送广播至第三方的同时会同样发送广播至辅助处理系统;辅助处理系统在接收到广播后会根据需要调取读节点数据库中与该订单请求相关的数据信息以代替订单处理系统处理该订单请求之外与订单请求相关的辅助事件;辅助处理系统的设置具有分担订单处理系统处理压力的作用,以便于订单处理系统可以只处理与订单请求直接相关的事件,而 订单请求之外的辅助事件可以由辅助处理系统来完成,从而缓解了订单处理系统的业务压力,提升了订单处理系统的处理效率。Specifically, the preset auxiliary processing system is used to replace the order processing system to process auxiliary events related to the order request other than the order request, such as payment status information, seat occupancy details information, etc. during the order process; the order processing system is sending When broadcasting to a third party, it will also send a broadcast to the auxiliary processing system; after receiving the broadcast, the auxiliary processing system will call the data information related to the order request in the read node database as needed to replace the order processing system to process the order request. Auxiliary events related to the order request outside; the setting of the auxiliary processing system has the effect of sharing the processing pressure of the order processing system, so that the order processing system can only process the events directly related to the order request, and the auxiliary events other than the order request can be processed by Auxiliary processing system to complete, thereby relieving the business pressure of the order processing system and improving the processing efficiency of the order processing system.
S60,对辅助事件的处理结果进行存储。S60, the processing result of the auxiliary event is stored.
具体来说,辅助处理系统在对辅助事件进行处理之后会生成若干辅助事件的处理结果,在辅助事件处理结果生成之后,采用Flink流式计算方式对辅助事件的处理结果的数据格式进行异构,得出与用户方需要读取的数据格式相同的辅助处理结果数据源,并将辅助处理结果数据源存储在辅助数据库内以供用户方进行读取。Specifically, the auxiliary processing system will generate the processing results of several auxiliary events after processing the auxiliary events. After the auxiliary event processing results are generated, the data format of the processing results of the auxiliary events is heterogeneous by using Flink streaming computing method. Obtain the auxiliary processing result data source in the same format as the data that the user needs to read, and store the auxiliary processing result data source in the auxiliary database for the user to read.
S70,对第三方反馈的处理结果进行存储。S70: Store the processing result fed back by the third party.
具体来说,第三方调取相关订单请求进行处理并生成订单请求的处理结果后,会将该订单请求的处理结果发送至读节点数据库,读节点数据库会对该订单请求的处理结果进行接收;在读节点数据库接收到订单请求的处理结果后,采用Flink流式计算方式对订单请求处理结果的数据格式进行异构,得出与用户方需要读取的数据格式相同的订单处理结果数据源,并将得出的订单处理结果数据源同步存储至读节点数据库以供用户方进行读取;在订单处理结果数据源被存储至读节点数据库后,同步生成代表已存储处理结果至读节点数据库的消息事件。Specifically, after the third party calls the relevant order request for processing and generates the processing result of the order request, it will send the processing result of the order request to the read node database, and the read node database will receive the processing result of the order request; After the read node database receives the processing result of the order request, the data format of the processing result of the order request is heterogeneous by using Flink streaming computing method, and the data source of the order processing result is obtained in the same format as the data that the user needs to read, and Synchronously store the obtained order processing result data source in the read node database for the user to read; after the order processing result data source is stored in the read node database, synchronously generate a message representing the stored processing result to the read node database event.
S80,发送广播至用户方。S80, send the broadcast to the user side.
具体来说,将生成的已存储处理结果至读节点数据库的消息事件同步发送至用户方,以便于用户方可以根据消息事件的通知得知订单请求的处理结果,例如,车票占座成功、车票订单支付成功等。Specifically, the generated message event of the stored processing result to the read node database is sent to the user side synchronously, so that the user side can know the processing result of the order request according to the notification of the message event, Order payment is successful, etc.
结合图3,该方法还包括以下可选步骤:In conjunction with Figure 3, the method also includes the following optional steps:
S90,接收用户方的查询请求。S90: Receive a query request from the user side.
具体来说,用户方在接收到已存储处理结果的消息事件的广播后可选择是否向订单处理系统发出查询请求,订单处理系统在接收到用户方的订单查询请求后,会根据不同的业务场景调取读节点数据库和/或辅助数据库中的 数据源并反馈至用户方;不同的业务场景包括:订单处理成功后查询订单相关信息时仅需要调用读节点数据库内的订单处理结果数据源以反馈订单完成后的相关信息,例如出发时间、车次以及座位信息等;订单处理失败后查询订单相关信息时,调用辅助数据库中存储的辅助处理结果数据源以反馈订单处理失败的原因,例如订单未支付、车票已售罄等信息;其中读节点数据库中存储的订单处理结果数据源以及辅助数据库中存储的辅助处理结果数据源均与用户方需要的数据格式相同,以便于用户方可以快速对调取到的信息进行相关处理。Specifically, the user can choose whether to send a query request to the order processing system after receiving the broadcast of the message event of the stored processing result. Call the data source in the read node database and/or the auxiliary database and feed it back to the user; different business scenarios include: when the order-related information is queried after the order is processed successfully, only the order processing result data source in the read node database needs to be called for feedback Relevant information after the order is completed, such as departure time, train number, seat information, etc.; when the order-related information is queried after the order processing fails, the auxiliary processing result data source stored in the auxiliary database is called to feed back the reason for the failure of the order processing, such as the order not being paid. , tickets are sold out, etc.; the order processing result data source stored in the read node database and the auxiliary processing result data source stored in the auxiliary database are the same as the data format required by the user, so that the user can quickly recall The received information is processed accordingly.
本申请实施例的实施原理为:在用户订单处理的过程中,订单处理系统仅对用户的订单请求以及第三方的反馈结果进行存储,并在存储后将存储完成的结果信息对应发送至用户或第三方,不对存储的内容进行主动发送;用户和第三发在接收到订单处理系统通知的结果信息后可根据需要选择是否调取订单处理系统内存储的订单或结果的相关数据,从而使得各系统可以只关注自己的业务,同时用广播的方式通知与其相关的系统,达到了系统解耦的效果,降低了各系统之间的耦合度,进而提升了订单处理系统的稳定性;辅助处理系统可以代替订单处理系统处理部分订单请求之外的辅助事件,减轻了订单处理系统的业务压力;同时,订单处理系统在接收到订单请求或第三方反馈的处理结果信息后,会对接收到的数据进行数据异构,以使得存储在读数据库内的数据可以与用户方或第三方所需的数据格式相互对应,以便于用户和第三方在调取读数据库内的相关数据后可以快速进行相关处理,从而进一步提升了订单的处理效率。The implementation principle of the embodiment of the present application is as follows: in the process of processing the user's order, the order processing system only stores the user's order request and the feedback result of the third party, and sends the stored result information correspondingly to the user or the third party after storage. The third party does not actively send the stored content; after receiving the result information notified by the order processing system, the user and the third party can choose whether to retrieve the relevant data of the order or result stored in the order processing system according to their needs, so that each The system can only focus on its own business, and at the same time notify its related systems by broadcasting, which achieves the effect of system decoupling, reduces the degree of coupling between systems, and improves the stability of the order processing system; auxiliary processing system It can replace the order processing system to process some auxiliary events other than order requests, reducing the business pressure of the order processing system; at the same time, after receiving the order request or the processing result information fed back by the third party, the order processing system will Perform data heterogeneity, so that the data stored in the read database can correspond to the data format required by the user or a third party, so that the user and the third party can quickly perform related processing after calling the relevant data in the read database, This further improves the efficiency of order processing.
基于上述方法,本申请实施例还公开一种分布式订单处理装置。Based on the above method, an embodiment of the present application further discloses a distributed order processing apparatus.
结合图4,该装置包括以下模块:4, the device includes the following modules:
请求接收模块301,用于接收用户方的订单请求;A request receiving module 301, configured to receive an order request from a user;
请求存储模块302,用于将订单请求存储至写节点数据库并生成消息事件;a request storage module 302, configured to store the order request in the write node database and generate a message event;
数据同步模块303,用于将写节点数据库内的订单请求同步至读节点数据库以供第三方进行读取;The data synchronization module 303 is used for synchronizing the order request in the write node database to the read node database for a third party to read;
第一广播模块304,用于将已存储订单请求至读节点数据库的消息事件以广播的形式发送至与订单请求相对应的第三方,以供第三方在接收到广播后调用写节点数据库内的订单请求的数据以对该订单请求进行处理并生成处理结果;The first broadcast module 304 is used to send the message event of the stored order request to the read node database in the form of broadcast to the third party corresponding to the order request, so that the third party can call the write node database after receiving the broadcast. The data of the order request to process the order request and generate the processing result;
结果接收模块305,用于接收第三方反馈的与订单请求相对应的处理结果;The result receiving module 305 is used for receiving the processing result corresponding to the order request fed back by the third party;
结果存储模块306,用于将订单请求的处理结果存储至读节点数据库并生成消息事件;The result storage module 306 is used to store the processing result of the order request in the read node database and generate a message event;
第二广播模块307,用于将已存储处理结果至读节点数据库的消息事件以广播的形式发送至与订单请求相对应的用户方;The second broadcast module 307 is used to send the message event that has stored the processing result to the read node database in the form of broadcast to the user side corresponding to the order request;
第三广播模块308,用于将已存储处理结果的消息事件以广播的形式发送至所有预设的辅助处理系统;以供辅助处理系统在接收到广播后根据需要调取读节点数据库中与该订单请求相关的数据信息以代替订单处理系统处理该订单请求之外与订单请求相关的辅助事件,并将辅助事件的处理结果存储至辅助数据库;The third broadcasting module 308 is used to send the message event of the stored processing result to all preset auxiliary processing systems in the form of broadcasting; for the auxiliary processing system to call the read node database and the relevant auxiliary processing system as needed after receiving the broadcast. The data information related to the order request is used instead of the order processing system to process the auxiliary events related to the order request other than the order request, and the processing results of the auxiliary events are stored in the auxiliary database;
格式处理模块309,用于分别对订单请求中的业务日志、业务节点及订单日志的数据格式进行预处理得到业务日志中间数据源、业务节点中间数据源及订单日志中间数据源。The format processing module 309 is configured to preprocess the data formats of the business log, business node and order log in the order request respectively to obtain the business log intermediate data source, the business node intermediate data source and the order log intermediate data source.
本申请实施例还公开一种计算机设备。The embodiment of the present application also discloses a computer device.
具体来说,该计算机设备包括存储器和处理器,存储器上存储有能够被处理器加载并执行上述分布式订单处理方法的计算机程序。Specifically, the computer device includes a memory and a processor, and the memory stores a computer program capable of being loaded by the processor and executing the above-mentioned distributed order processing method.
本申请实施例还公开一种计算机可读存储介质。The embodiment of the present application also discloses a computer-readable storage medium.
具体来说,该计算机可读存储介质,其存储有能够被处理器加载并执行如上述分布式订单处理方法的计算机程序,该计算机可读存储介质例如包 括:U盘、移动硬盘、只读存储器(Read-OnlyMemory,ROM)、随机存取存储器(RandomAccessMemory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。Specifically, the computer-readable storage medium stores a computer program that can be loaded by the processor and executes the above-mentioned distributed order processing method, and the computer-readable storage medium includes, for example: U disk, removable hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disks or optical disks and other media that can store program codes.
本具体实施例仅仅是对本发明的解释,其并不是对本发明的限制,本领域技术人员在阅读完本说明书后可以根据需要对本实施例做出没有创造性贡献的修改,但只要在本发明的权利要求范围内都受到专利法的保护。This specific embodiment is only an explanation of the present invention, and it does not limit the present invention. Those skilled in the art can make modifications without creative contribution to the present embodiment as needed after reading this specification, but as long as the rights of the present invention are used All claims are protected by patent law.
Claims (10)
- 一种分布式订单处理方法,其特征在于,所述方法包括:A distributed order processing method, characterized in that the method comprises:接收用户方的订单请求;Receive an order request from the user;将所述订单请求存储至写节点数据库;storing the order request in the write node database;将所述写节点数据库内的订单请求同步至读节点数据库以供第三方进行读取,并生成消息事件;Synchronizing the order request in the write node database to the read node database for a third party to read, and generating a message event;将已存储订单请求至读节点数据库的消息事件以广播的形式发送至与所述订单请求相对应的第三方,以供第三方在接收到广播后调用读节点数据库内的订单请求的数据以对该订单请求进行处理并生成处理结果;Send the message event of the stored order request to the read node database to the third party corresponding to the order request in the form of broadcast, so that the third party can call the data of the order request in the read node database after receiving the broadcast. The order request is processed and a processing result is generated;接收所述第三方反馈的与所述订单请求相对应的处理结果;Receive the processing result corresponding to the order request fed back by the third party;将所述订单请求的处理结果存储至读节点数据库并生成消息事件;Store the processing result of the order request in the read node database and generate a message event;将已存储处理结果至读节点数据库的消息事件以广播的形式发送至与所述订单请求相对应的用户方。The message event that the processing result has been stored in the read node database is sent to the user side corresponding to the order request in the form of broadcast.
- 根据权利要求1所述的分布式订单处理方法,其特征在于,The distributed order processing method according to claim 1, wherein:在所述将所述处理结果存储至读节点数据库之后,还包括;After the storing the processing result in the read node database, the method further includes;将已存储处理结果的消息事件以广播的形式发送至所有预设的辅助处理系统,以供所述辅助处理系统在接收到广播后根据需要调取读节点数据库中与该订单请求相关的数据信息以代替订单处理系统处理该订单请求之外与订单请求相关的辅助事件,并将辅助事件的处理结果存储至辅助数据库;Send the message event of the stored processing result to all preset auxiliary processing systems in the form of broadcast, so that the auxiliary processing system can retrieve the data information related to the order request in the read node database as needed after receiving the broadcast Process the auxiliary events related to the order request other than the order request in place of the order processing system, and store the processing results of the auxiliary events in the auxiliary database;在所述方法中,所述用户方在接收到已存储处理结果的消息事件的广播后可进行发出查询的操作;In the method, the user can perform an operation of issuing a query after receiving the broadcast of the message event of the stored processing result;所述方法还包括:The method also includes:在接收到用户方针对所述订单请求的查询请求时,调取读节点 数据库和/或辅助数据库中的相关数据信息并将调取到的数据信息反馈至用户方。When receiving the query request of the user side for the order request, the relevant data information in the read node database and/or the auxiliary database is retrieved, and the retrieved data information is fed back to the user side.
- 根据权利要求2所述的分布式订单处理方法,其特征在于,The distributed order processing method according to claim 2, wherein:所述订单请求包括业务日志和业务节点;The order request includes a business log and a business node;所述将所述订单请求存储至写节点数据库,包括:The storing the order request to the write node database includes:为存储在写节点数据库中的订单请求分配订单日志,所述订单日志为该订单请求的唯一身份标识;Allocate an order log for the order request stored in the write node database, where the order log is the unique identifier of the order request;将与所述订单请求对应的业务日志、业务节点以及订单日志存储至写节点数据库。The business log, business node and order log corresponding to the order request are stored in the write node database.
- 根据权利要求3所述的分布式订单处理方法,其特征在于,The distributed order processing method according to claim 3, wherein:所述将与所述订单请求对应的业务日志、业务节点以及订单日志存储至写节点数据库,包括:The storing of the business log, business node and order log corresponding to the order request to the write node database includes:对所述订单请求中的业务日志、业务节点及订单日志的数据格式进行数据异构得出若干与第三方需要读取的数据格式相同的订单请求数据源;Perform data heterogeneity on the data format of the business log, business node and order log in the order request to obtain a number of order request data sources with the same format as the data that the third party needs to read;将若干所述订单请求数据源存储在写节点数据库内。A number of the order request data sources are stored in the write node database.
- 根据权利要求4所述的分布式订单处理方法,其特征在于,在所述对所述订单请求中的业务日志、业务节点及订单日志的数据格式进行数据异构之前,还包括;The distributed order processing method according to claim 4, characterized in that, before performing data isomerization on the data formats of the business logs, business nodes and order logs in the order request, further comprising:分别对所述订单请求中的业务日志、业务节点及订单日志的数据格式进行预处理得到业务日志中间数据源、业务节点中间数据源及订单日志中间数据源;所述业务日志中间数据源、业务节点中间数据源及订单日志中间数据源均与数据异构所需要的格式相对应。Preprocessing the data formats of the business log, business node and order log in the order request respectively to obtain the business log intermediate data source, the business node intermediate data source and the order log intermediate data source; the business log intermediate data source, the business log intermediate data source and the order log intermediate data source; Both the node intermediate data source and the order log intermediate data source correspond to the format required for data heterogeneity.
- 根据权利要求3所述的分布式订单处理方法,其特征在于,The distributed order processing method according to claim 3, wherein:所述将所述订单请求的处理结果存储至读节点数据库,包括:The storing of the processing result of the order request to the read node database includes:对所述订单请求处理结果的数据格式进行数据异构得出与用户方需要读取的数据格式相同的订单处理结果数据源;Performing data heterogeneity on the data format of the order request processing result to obtain the data source of the order processing result that is the same as the data format that the user needs to read;将所述订单处理结果数据源存储在读节点数据库内以供用户方进行读取。The order processing result data source is stored in the read node database for the user to read.
- 根据权利要求3所述的分布式订单处理方法,其特征在于,所述将辅助事件的处理结果存储至辅助数据库,包括:The distributed order processing method according to claim 3, wherein the storing the processing result of the auxiliary event in the auxiliary database comprises:对所述辅助事件处理结果的数据格式进行数据异构得出与用户方需要读取的数据格式相同的辅助处理结果数据源;Performing data heterogeneity on the data format of the auxiliary event processing result to obtain the same auxiliary processing result data source as the data format that the user needs to read;将所述辅助处理结果数据源存储在辅助数据库内以供用户方进行读取。The auxiliary processing result data source is stored in the auxiliary database for the user to read.
- 一种分布式订单处理装置,其特征在于,所述装置包括:A distributed order processing device, characterized in that the device comprises:请求接收模块(301),用于接收用户方的订单请求;a request receiving module (301) for receiving an order request from a user;请求存储模块(302),用于将所述订单请求存储至写节点数据库并生成消息事件;a request storage module (302), configured to store the order request in the write node database and generate a message event;数据同步模块(303),用于将所述写节点数据库内的订单请求同步至读节点数据库以供第三方进行读取;a data synchronization module (303), configured to synchronize the order request in the write node database to the read node database for a third party to read;第一广播模块(304),用于将已存储订单请求至读节点数据库的消息事件以广播的形式发送至与所述订单请求相对应的第三方,以供第三方在接收到广播后调用写节点数据库内的订单请求的数据以对该订单请求进行处理并生成处理结果;The first broadcast module (304) is used to send the message event of the stored order request to the read node database in the form of broadcast to the third party corresponding to the order request, so that the third party can call the write after receiving the broadcast. The data of the order request in the node database to process the order request and generate the processing result;结果接收模块(305),用于接收所述第三方反馈的与所述订单请求相对应的处理结果;a result receiving module (305), configured to receive the processing result corresponding to the order request fed back by the third party;结果存储模块(306),用于将所述订单请求的处理结果存储至读节点数据库并生成消息事件;a result storage module (306), configured to store the processing result of the order request in the read node database and generate a message event;第二广播模块(307),用于将已存储处理结果至读节点数据库的 消息事件以广播的形式发送至与所述订单请求相对应的用户方。The second broadcasting module (307) is configured to send the message event of the stored processing result to the read node database in the form of broadcasting to the user side corresponding to the order request.
- 一种计算机设备,其特征在于,包括存储器和处理器,所述存储器上存储有能够被处理器加载并执行如权利要求1至7中任一种方法的计算机程序。A computer device is characterized in that it comprises a memory and a processor, and the memory stores a computer program capable of being loaded by the processor and executing the method according to any one of claims 1 to 7.
- 一种计算机可读存储介质,其特征在于,存储有能够被处理器加载并执行如权利要求1至7中任一种方法的计算机程序。A computer-readable storage medium, characterized by storing a computer program capable of being loaded by a processor and executing the method according to any one of claims 1 to 7.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011076853.5A CN112258266B (en) | 2020-10-10 | 2020-10-10 | Distributed order processing method, device, equipment and storage medium |
CN202011076853.5 | 2020-10-10 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2022073293A1 true WO2022073293A1 (en) | 2022-04-14 |
Family
ID=74242952
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/134274 WO2022073293A1 (en) | 2020-10-10 | 2020-12-07 | Distributed order processing method, apparatus, device, and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN112258266B (en) |
WO (1) | WO2022073293A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115204814A (en) * | 2022-06-23 | 2022-10-18 | 平安科技(深圳)有限公司 | Order approval method and device, storage medium and computer equipment |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113282660B (en) * | 2021-05-24 | 2023-05-23 | 挂号网(杭州)科技有限公司 | Method and system for synchronizing data in cluster, electronic equipment and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104156863A (en) * | 2014-08-08 | 2014-11-19 | 携程计算机技术(上海)有限公司 | OTA website order processing system and method |
US9507843B1 (en) * | 2013-09-20 | 2016-11-29 | Amazon Technologies, Inc. | Efficient replication of distributed storage changes for read-only nodes of a distributed database |
CN109685674A (en) * | 2018-12-21 | 2019-04-26 | 众安信息技术服务有限公司 | Order based on block chain leads to cardization, compensation, the method, apparatus of inquiry and storage medium |
CN110012050A (en) * | 2018-12-04 | 2019-07-12 | 阿里巴巴集团控股有限公司 | Message Processing, storage method, apparatus and system |
CN110245764A (en) * | 2019-05-13 | 2019-09-17 | 特斯联(北京)科技有限公司 | A kind of about vehicle traveling method based on distributed storage database |
CN110503781A (en) * | 2019-09-19 | 2019-11-26 | 腾讯科技(深圳)有限公司 | Vehicle leasing business data processing method and device based on block chain |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8108612B2 (en) * | 2009-05-15 | 2012-01-31 | Microsoft Corporation | Location updates for a distributed data store |
WO2011078723A1 (en) * | 2009-12-25 | 2011-06-30 | Starodubtsev Valeriy Ivanovich | System for orders for and the sale of goods and services (variants), method for offering for sale and placing orders, and method for the sale of goods and services |
US10331695B1 (en) * | 2013-11-25 | 2019-06-25 | Amazon Technologies, Inc. | Replication coordination service for data transfers between distributed databases |
US10884869B2 (en) * | 2015-04-16 | 2021-01-05 | Nuodb, Inc. | Backup and restore in a distributed database utilizing consistent database snapshots |
CN111127157A (en) * | 2019-12-24 | 2020-05-08 | 北京每日优鲜电子商务有限公司 | Order processing method, device, storage medium and equipment |
-
2020
- 2020-10-10 CN CN202011076853.5A patent/CN112258266B/en active Active
- 2020-12-07 WO PCT/CN2020/134274 patent/WO2022073293A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9507843B1 (en) * | 2013-09-20 | 2016-11-29 | Amazon Technologies, Inc. | Efficient replication of distributed storage changes for read-only nodes of a distributed database |
CN104156863A (en) * | 2014-08-08 | 2014-11-19 | 携程计算机技术(上海)有限公司 | OTA website order processing system and method |
CN110012050A (en) * | 2018-12-04 | 2019-07-12 | 阿里巴巴集团控股有限公司 | Message Processing, storage method, apparatus and system |
CN109685674A (en) * | 2018-12-21 | 2019-04-26 | 众安信息技术服务有限公司 | Order based on block chain leads to cardization, compensation, the method, apparatus of inquiry and storage medium |
CN110245764A (en) * | 2019-05-13 | 2019-09-17 | 特斯联(北京)科技有限公司 | A kind of about vehicle traveling method based on distributed storage database |
CN110503781A (en) * | 2019-09-19 | 2019-11-26 | 腾讯科技(深圳)有限公司 | Vehicle leasing business data processing method and device based on block chain |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115204814A (en) * | 2022-06-23 | 2022-10-18 | 平安科技(深圳)有限公司 | Order approval method and device, storage medium and computer equipment |
Also Published As
Publication number | Publication date |
---|---|
CN112258266B (en) | 2023-09-26 |
CN112258266A (en) | 2021-01-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2022073293A1 (en) | Distributed order processing method, apparatus, device, and storage medium | |
CN106874334B (en) | Data processing method and device and information processing system | |
WO2020248708A1 (en) | Method and device for submitting spark work | |
CN110691133A (en) | Web service mimicry system and method applied to network communication equipment | |
US20190238605A1 (en) | Verification of streaming message sequence | |
CN114077518B (en) | Data snapshot method, device, equipment and storage medium | |
CN113204598A (en) | Data synchronization method, system and storage medium | |
CN110909060A (en) | Data transmission method and system | |
US20230030856A1 (en) | Distributed table storage processing method, device and system | |
CN118295815A (en) | Asynchronous task processing method, device, equipment, medium and program product | |
CN112699118B (en) | Data synchronization method, corresponding device, system and storage medium | |
CN113992352A (en) | Message pushing method and device, electronic equipment and storage medium | |
CN105095310B (en) | Data processing method, first server, second server and data processing system | |
CN110928911A (en) | System, method and device for processing checking request and computer readable storage medium | |
US20090106781A1 (en) | Remote call handling methods and systems | |
US10728323B2 (en) | Method and apparatus for operating infrastructure layer in cloud computing architecture | |
CN114254039A (en) | Distributed synchronization system | |
WO2022227719A1 (en) | Data backup method and system, and related device | |
CN111324668B (en) | Database data synchronous processing method, device and storage medium | |
CN111294383B (en) | Internet of things service management system | |
CN108196834B (en) | Static processing system of website | |
US20050097555A1 (en) | Method, system and program product for processing a transaction | |
US20130326006A1 (en) | Managing large data sets through page based information tracking in multi-master environments | |
CN113722152A (en) | Data incremental backup method, device, equipment and storage medium | |
CN114257612B (en) | Data processing method |
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: 20956608 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: 20956608 Country of ref document: EP Kind code of ref document: A1 |