CN116263717A - Order service processing method and device based on event - Google Patents

Order service processing method and device based on event Download PDF

Info

Publication number
CN116263717A
CN116263717A CN202111515293.3A CN202111515293A CN116263717A CN 116263717 A CN116263717 A CN 116263717A CN 202111515293 A CN202111515293 A CN 202111515293A CN 116263717 A CN116263717 A CN 116263717A
Authority
CN
China
Prior art keywords
order event
order
event
processor
processing
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202111515293.3A
Other languages
Chinese (zh)
Inventor
郑陈平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Lizhi Network Technology Co ltd
Original Assignee
Guangzhou Lizhi Network Technology Co ltd
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 Guangzhou Lizhi Network Technology Co ltd filed Critical Guangzhou Lizhi Network Technology Co ltd
Priority to CN202111515293.3A priority Critical patent/CN116263717A/en
Publication of CN116263717A publication Critical patent/CN116263717A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0633Lists, e.g. purchase orders, compilation or processing
    • G06Q30/0635Processing of requisition or of purchase orders
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/541Client-server
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue
    • 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
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The application relates to an order service processing method and device based on events. The method comprises the steps of receiving request information which is sent by a client and used for triggering an order event; configuring an order event processor matched with the order event according to the request information, wherein the order event processor is predefined and comprises processing logic for processing the order event; executing the order event processor to process the order event. According to the scheme provided by the application, the same order processing logic can be highly reused, the order processing capacity is improved, and the research, development and maintenance cost is effectively reduced.

Description

Order service processing method and device based on event
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to an event-based order service processing method and apparatus.
Background
With the continuous popularization and development of networks, users have become increasingly trend to place orders to obtain desired resources or services on an e-commerce platform. For example, online shopping has become an integral part of people's daily life consumption.
In the related art, after the user places an order on the e-commerce platform, the e-commerce system may perform a state change and an operation action on the order around the processing procedure (for example, before sale, during sale, after sale) of the order, for example, when the state of the order is that the payment is changed into the payment, the order is operated to be shipped. Each change and operation of the order status may cause a series of service demands, such as sending a short message to the user, sending a work order to the operator, etc. In the related art, for the processing of the order status and the operation behavior, a serial mode and a blocking mode are generally adopted, and corresponding program processing logic is added on the original flow for each function increase, so that the order core flow is more and more complex, the processing speed is slower and slower, the processing performance of the order is reduced, and the order core flow needs to be changed for each function change, so that the stability of the order core flow is affected.
Disclosure of Invention
In order to solve or partially solve the problems in the related art, the application provides an order service processing method and device based on events, which can highly reuse the same order processing logic, improve the order processing capability and effectively reduce the research, development and maintenance cost.
A first aspect of the present application provides an event-based order service processing method, including:
receiving request information which is sent by a client and used for triggering an order event;
configuring an order event processor matched with the order event according to the request information, wherein the order event processor is predefined and comprises processing logic for processing the order event;
executing the order event processor to process the order event.
In one embodiment, the order event processor configured to match the order event according to the request information includes:
acquiring name information of the order event from a predefined order event model data object, and configuring an order event processor matched with the order event according to the name information.
In one embodiment, the order event processor configured to match the order event according to the name information includes:
judging whether an order event processor matched with the order event exists or not according to the name information;
if yes, configuring the order event processor; or if the order event processor does not exist, returning prompt information that the order event processor does not exist.
In one embodiment, the executing the order event handler includes:
acquiring name information of an order event driver from a predefined order event model data object, determining the order event driver matched with the order event according to the name information, and executing the order event processor through the order event driver.
In one embodiment, the determining, according to the name information, an order event driver that matches the order event, and executing, by the order event driver, the order event processor includes:
and determining an order event driver matched with the order event according to the name information and different types of the order event, wherein the order event driver executes the order event processor in a synchronous, asynchronous or queue mode.
In one embodiment, the method further comprises:
judging whether the processing record of the order event exists or not;
if not, creating a processing record of the order event in an order record table; or if so, returning the prompt information that the order event is recorded.
In one embodiment, the determining whether the processing record of the order event exists includes:
and persisting the matched order model data object with the order event to the order event record table, and judging whether the processing record of the order event exists or not according to the unique hash value corresponding to the order event contained in the order event record table.
In one embodiment, after the receiving the request information for triggering the order event sent by the client, the method further includes:
judging whether other order events different from the current order event are triggered or not;
if other order events are triggered, an order event tree is formed through order event fission.
A second aspect of the present application provides an event-based order service processing apparatus, including:
the receiving module is used for receiving request information which is sent by the client and used for triggering an order event;
the configuration module is used for configuring an order event processor matched with the order event according to the request information received by the receiving module, wherein the order event processor is predefined and comprises processing logic for processing the order event;
and the execution module is used for executing the order event processor configured by the configuration module and processing the order event.
In one embodiment, the acquiring sub-module is configured to acquire name information of the order event from a predefined order event model data object;
and the configuration sub-module is used for configuring an order event processor matched with the order event according to the name information acquired by the acquisition sub-module.
The technical scheme that this application provided can include following beneficial effect:
according to the scheme provided by the application, request information which is sent by a client and used for triggering an order event is received first; then configuring an order event processor matched with the order event according to the request information; finally, executing the order event processor to process the order event, and after the order event is processed, the processing logic of the order event is predefined and packaged into the order event processor, so that the same order processing logic can be highly reused, the order processing capability is improved, and the research, development and maintenance cost is effectively reduced.
Further, according to the scheme provided by the application, when the order event is processed, different systems can trigger the corresponding order event processor to process through the event name, the order event processor can trigger other order events, the core flow of the order cannot be changed due to the change of each function in the order event processing flow, the stability of the order core flow cannot be influenced, the defect that the order core flow is more and more complex in the related technology is avoided, and the order processing performance is improved. In addition, the business processing is isolated by different order event processors, so that parallel processing flows are realized, the expansion is very easy, and the flexibility is better.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The foregoing and other objects, features and advantages of the application will be apparent from the following more particular descriptions of exemplary embodiments of the application as illustrated in the accompanying drawings wherein like reference numbers generally represent like parts throughout the exemplary embodiments of the application.
FIG. 1 is a flow diagram of an event-based order service processing method according to an embodiment of the present application;
FIG. 2 is another flow diagram of an event-based order service processing method shown in an embodiment of the present application;
FIG. 3 is another flow diagram of an event-based order service processing method shown in an embodiment of the present application;
FIG. 4 is a graph of relationship between different order events of an event-based order service processing method according to an embodiment of the present application
FIG. 5 is a schematic diagram of an event-based order service processing device according to an embodiment of the present application;
FIG. 6 is another schematic diagram of an event-based order service processing device according to an embodiment of the present application;
fig. 7 is a schematic diagram of an event-based order service processing system according to an embodiment of the present application.
Detailed Description
Embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While embodiments of the present application are shown in the drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The terminology used in the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the matched listed items.
It should be understood that although the terms "first," "second," "third," etc. may be used herein to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first message may also be referred to as a second message, and similarly, a second message may also be referred to as a first message, without departing from the scope of the present application. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the present application, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
In the related art, for the processing of the order status and the operation behavior, a serial mode and a blocking mode are generally adopted, and corresponding program processing logic is added on the original flow for each function increase, so that the order core flow is more and more complex, the processing speed is slower and slower, the processing performance of the order is reduced, and the order core flow needs to be changed for each function change, so that the stability of the order core flow is affected.
Aiming at the problems, the embodiment of the application provides an order service processing method, device and system based on events, which can highly multiplex the same order processing logic, improve the order processing capability and effectively reduce the research, development and maintenance cost.
The following describes the technical scheme of the embodiments of the present application in detail with reference to the accompanying drawings.
Fig. 1 is a flow chart illustrating an event-based order service processing method according to an embodiment of the present application.
Referring to fig. 1, a method of an embodiment of the present application includes:
step S101, receiving request information for triggering an order event sent by a client.
In this step, after receiving the request information for triggering the order event, an order model data object matched with the request information may be obtained, where the order model data object may be predefined, and the request information needs to conform to the order event model data object.
Step S102, an order event processor matched with the order event is configured according to the request information, wherein the order event processor is predefined and comprises processing logic for processing the order event.
In this step, attribute information corresponding to the order event may be obtained from the order model data object, and the order event processor may be preset and include specific logic for processing the order event by the attribute information.
Step S103, executing an order event processor to process the order event.
In this step, the order event handler may be executed by an order event driver that matches the order event handler, thereby processing the order event.
It can be seen that, firstly, request information for triggering an order event sent by a client is received; then configuring an order event processor matched with the order event according to the request information; finally, executing the order event processor to process the order event, and after the order event is processed, the processing logic of the order event is predefined and packaged into the order event processor, so that the same order processing logic can be highly reused, the order processing capability is improved, and the research, development and maintenance cost is effectively reduced.
Fig. 2 is another flow chart of the event-based order service processing method according to the embodiment of the present application, and fig. 2 further describes the solution according to the embodiment of the present application compared to fig. 1.
Referring to fig. 2, a method of an embodiment of the present application includes:
step S201, receiving request information for triggering an order event sent by a client.
In this step, the order event model data object may contain two parts of metadata and variable data volume content. The metadata comprises an order ID field, a business type field, a link ID field, a data body type field, an event driven name field, an order event name field, an order father event name field and an order event record ID field.
The variable data volume structure may be defined by a data volume type field in the metadata and the parameter data required by the order event handler is set.
Step S202, name information of the order event is obtained from a predefined order event model data object, and an order event processor matched with the order event is configured according to the name information.
In the step, whether an order event processor matched with the order event exists or not can be judged according to the name information; if yes, configuring an order event processor; or if the order event processor does not exist, returning error prompt information which does not exist in the order event processor.
Step S203, the name information of the order event driver is obtained from the order event model data object, and the order event driver matched with the order event is determined according to the name information.
In this step, an order event driver matched with the order event can be determined according to the name information and different types of the order event, wherein the optional order event driver comprises a synchronous driver, an asynchronous driver and a queue driver.
In step S204, the order event handler is executed by the order event driver.
In this step, the order event driver may execute the order event handler in a synchronous, asynchronous or queued manner to process the order event according to different types of order events.
In this embodiment, when processing an order event, different systems may trigger the corresponding order event processor to process through the event name, and the order event processor may trigger other order events. In the processing process of the current order event, whether other order events are triggered or not can be judged; if other order events are triggered, multiple levels of order event fission may be generated and an order event tree is composed. After the processing, the same processing logic can be highly reused, the order processing performance is greatly improved, and the research, development and maintenance cost is effectively reduced; and the core flow of the order is not changed by changing the functions of each time in the order event processing flow, the stability of the core flow of the order is not affected, the defect that the core flow of the order is more and more complex in the related art is avoided, and the performance of order processing is improved.
According to the scheme of the embodiment of the application, the order event driver matched with the order event can be determined according to the name information and different types of the order event, so that an asynchronous queue mode can be adopted for long-time order tasks, and the throughput and the processing speed of order processing can be effectively improved.
According to the scheme of the embodiment of the application, the order event processor is predefined, namely the processing logic of the order event is predefined, the change of the order state and the operation of the behavior can keep the same processing thought in different program modules, multiple program logics are not required to be maintained for similar functions, the fault processing efficiency is improved, and the daily maintenance cost and difficulty are reduced.
FIG. 3 is another flow diagram of an event-based order service processing method shown in an embodiment of the present application; fig. 3 presents a solution of an embodiment of the present application in more detail than fig. 2.
Referring to fig. 2, a method of an embodiment of the present application includes:
step S301, receiving request information for triggering an order event sent by a client.
In this step, the request information includes data submitted by the client that matches the order event, which data is to conform to a predefined order event model data object.
The order event model data object may contain two parts of metadata and variable data volume content. The metadata comprises an order ID field, a business type field, a link ID field, a data body type field, an event driven name field, an order event name field, an order father event name field and an order event record ID field. The variable data volume structure may be defined by a data volume type field in the metadata and the parameter data required by the order event handler is set.
Step S302, name information of the order event is acquired from a predefined order event model data object.
In this step, the name information of the order event includes an order event name field.
In this step, the order event name and variable data volume data corresponding to the order event may be acquired, then serialized into a string, and then the unique hash value of the string may be calculated, where the unique hash value of the string may be calculated using an information summarization algorithm.
Step S303, judging whether an order event processor matched with the order event exists or not according to the name information; if yes, configuring an order event processor; or if the order event processor does not exist, returning prompt information that the order event processor does not exist.
In this step, the order event handler contains specific logic for handling order events, and different order events may correspond to different order event handlers. The order event name field is used as a key through the mapping relation, the order event processor is used as a value to be predefined in the configuration file, and thus whether the corresponding order event processor exists or not can be known through the full name of the order event.
Step S304, judging whether the processing record of the order event exists, if not, creating the processing record of the order event in an order record table; or if the order event exists, returning the recorded prompt information of the order event.
In this step, the matching order model data object with the order event may be persisted to the order event record table of the database. The order event record table may contain an order event record ID field, an order event model data field, an order ID field, a link ID field, a unique hash value field, a status field.
Wherein, it can be judged whether the order event record exists or not according to the unique hash value. If so, returning an error prompt that the event has been processed; or if the data does not exist, inserting new data into the order event record table, marking the order event record data as unprocessed state, returning an order event record ID, and then writing the order event record ID back into an order event record ID field of the order event model data object.
In step S305, name information of the order event driver is acquired in a predefined order event model data object.
In this step, the order event driver's name information may include an order event driven name field.
Step S306, determining an order event driver matched with the order event according to the name information.
In this step, an order event driver matching the order event may be determined according to the name information and different types of the order event, and optionally, the order event driver may include a synchronous driver, an asynchronous driver, and a queue driver.
In step S307, the order event handler is executed by the order event driver.
In this step, each order event handler may be configured to select a corresponding event driver when executing, and then execute the order event handler in a synchronous, asynchronous or queued manner.
For example, when the selected order event driver is a synchronous driver, the order event model data object is injected into the order event handler as a processing parameter of the order event, and then the order handler is executed.
When the selected order event driver is an asynchronous driver, the order event model data object is used as a processing parameter of the order event to be injected into the order event processor, an idle thread is obtained from a thread pool in the asynchronous driver, and then the order event processor is executed. For example, the processing of long-time tasks can be performed in an asynchronous queue mode through an asynchronous driver, so that the throughput and the processing speed of order processing are effectively improved.
When the order event driver is a queue driver, the order event model data object is serialized into a character string and pushed into the queue as message data. Simultaneously, the consumer thread started by the system reads message data from the queue and is inversely sequenced into order event model data objects. And acquiring an order event processor with matched order event names through an order event configurator, injecting order event model data serving as order event processor parameters into the order event processor, acquiring idle threads from a thread pool in the asynchronous driver, and executing the order event processor.
Step S308, updating the order processing state in the order processing record table, and collecting the link log of the order event.
In the step, after the order event processor returns a processing result, the order event of the order event record table is marked as a processed state according to the order event record ID.
After each order event is processed, link logs of the order event can be collected, each collected log contains a link ID field of an order event model data object, the link ID field corresponds to a link ID field of an order event record table, and all the link logs can be queried through the order event record table. After the processing, as the processing condition of each event is recorded in the single processing record list, all event processing of the whole order processing flow can be checked through one order number, and the efficiency of checking the problem is improved.
In some embodiments, the order event handlers include a generic order event handler and a business custom order event handler. The general order event processor is used for processing order events which all businesses need to process in common. The business customization order event processor is configured to process order events having business customization requirements. After the processing, different businesses can customize the order event processor independently, sub-events of the general order event can be customized, the running program cannot be influenced, the business processing is isolated through different event processors, the expansion is easy, and different order events can be arranged and combined to form a tree structure, so that the system has better flexibility.
It should be noted that, in this embodiment, in the current order processing flow, if other order events are triggered, the order event model data object corresponding to the other order events may be obtained, and the parameter data required by the order event processor may be repeatedly executed, and then the steps S302 to S307 may be repeated, so as to generate a multi-level order event fission, and form an order event tree, so that the processing flow of the order event is converted from the serial processing in the related art into the parallel processing flow isolated from each other, and the performance of the order processing is improved.
Fig. 4 is an order event relationship diagram of an event-based order service processing method according to an embodiment of the present application, and fig. 4 describes a scheme of multi-level event fission to form an order event tree according to an embodiment of the present application.
Referring to fig. 4, the system 1 and the system 2 may be different server devices, and may respectively receive request information for triggering an order event sent by a client. The system 1 and the system 2 can trigger an order event A at the same time, and the order event A can generate a business M custom sub-order event A1, a business N custom sub-order event A2 and an order event B in a mode of order event fission;
the service M custom sub-order event A1, the service N custom sub-order event A2, and the order event B may also be triggered directly by the system 1. The business M customizes the sub-order event A1 to generate the order event E by way of order event fission, and the order event B to generate the order event C and the order event D by way of order event fission.
In some embodiments, the name of the order event is composed of different fields (e.g., a first field, a second field, and a third field). The first field may be defined as a service identifier, and the corresponding value is a service party name. The second field may be defined as a sub-event identification, with a fixed value of english words (e.g., item) to represent the sub-event. The third field may be defined as an event name identification, with the corresponding value being an event name defined by the business party. When the main order is split into a plurality of sub orders, the main order event name can be composed of a first field and a third field, and the sub order event name can be composed of the first field, the second field and the third field.
In this embodiment, the order event triggered by the client and the order event model data object corresponding to the fissile order event may be serialized into a character string, and then stored into the database for persistence. All order event records matched with a certain order event ID are constructed into an event tree, and the event tree is displayed on a background management page, so that visualization of order event processing is realized.
It can be seen that, according to the scheme provided by the embodiment of the application, the order processing logic of the order event is packaged into the order event processor, when different systems process the order event, the corresponding order event processor can be triggered to process through the event name, and the order event processor can trigger other order events, so that the same logic is highly reused, the performance of order processing is improved, and the research, development and maintenance cost is effectively reduced; and the core flow of the order is not changed by changing the functions of each time in the order event processing flow, the stability of the core flow of the order is not affected, the defect that the core flow of the order is more and more complex in the related art is avoided, and the performance of order processing is improved.
Corresponding to the embodiment of the application function implementation method, the application further provides an order service processing device based on the event and a corresponding embodiment.
FIG. 5 is a schematic diagram of an event-based order service processing device according to an embodiment of the present application;
referring to fig. 5, an apparatus 500 provided in an embodiment of the present application includes:
the receiving module 501 is configured to receive request information sent by a client for triggering an order event.
After receiving the request information for triggering the order event, the receiving module 501 may acquire an order model data object matched with the request information, that is, the request information needs to conform to the order event model data object, where the order model data object may be predefined.
The configuration module 502 is configured to configure an order event processor matched with the order event according to the request information received by the receiving module 501, where the order event processor is predefined and includes processing logic for processing the order event.
The configuration module 502 may obtain attribute information corresponding to the order event from the order model data object, through which the order event handler is obtained.
And the execution module 503 is configured to execute the order event processor configured by the configuration module 502 to process the order event.
The execution module 503 may execute the order event handler through an order event driver matched with the order event handler to further process the order event.
It can be seen that, according to the scheme of the embodiment of the application, the processing logic of the order event is packaged into the order event processor, and then the order event is processed by the order event processor configured by the configuration module 502, so that the same order processing logic can be highly reused, the order processing capability is improved, and the research, development and maintenance costs are effectively reduced.
Fig. 6 is another schematic structural diagram of an event-based order service processing apparatus according to an embodiment of the present application.
Referring to fig. 6, in the apparatus provided in the embodiment of the present application, a configuration module 502 includes:
an acquiring sub-module 512 is configured to acquire name information of the order event in a predefined order event model data object.
The name information of the order event includes an order event name field.
A configuration sub-module 522 is configured to configure an order event processor matched with the order event according to the name information acquired by the acquisition sub-module 512.
The configuration sub-module 522 is further configured to determine whether an order event handler matching the order event exists according to the name information; if yes, configuring an order event processor; or if the order event processor does not exist, returning prompt information that the order event processor does not exist.
It can be seen that, according to the scheme of the embodiment of the application, the order event processor matched with the order event can be configured according to the name information corresponding to the order event, and because the processing logic of the order event is predefined, the operation of changing the order state and behavior is the same processing thought in different program modules, and multiple program logics are not required to be maintained for similar functions, so that the fault processing efficiency is improved, and the daily maintenance cost and difficulty are reduced.
Fig. 7 is a schematic diagram of an event-based order service processing system according to an embodiment of the present application.
Referring to fig. 7, a system 600 provided in an embodiment of the present application includes:
a client device 601 for sending request information for triggering an order event to a server.
The client device may be, for example, a mobile communication device such as a cell phone, tablet computer, or the like.
The server device 602 configures an order event processor matched with the order event according to the request information sent by the client 601 device, wherein the order event processor is predefined and comprises processing logic for processing the order event; and the order event executing processor is used for processing the order event.
The service device 602 may be different system modules that may each trigger an order event.
According to the scheme, the processing logic of the order event is packaged into the order event processor, different systems can respectively trigger the order event processor to process the order event, the same order processing logic can be highly reused, the order processing capability is improved, and the research, development and maintenance cost is effectively reduced.
The specific manner in which the respective modules perform the operations in the apparatus of the above embodiments has been described in detail in the embodiments related to the method, and will not be described in detail herein.
Furthermore, the method according to the present application may also be implemented as a computer program or computer program product comprising computer program code instructions for performing part or all of the steps of the above-described method of the present application.
Alternatively, the present application may also be embodied as a computer-readable storage medium (or non-transitory machine-readable storage medium or machine-readable storage medium) having stored thereon executable code (or a computer program or computer instruction code) which, when executed by a processor of an electronic device (or a server, etc.), causes the processor to perform part or all of the steps of the above-described methods according to the present application.
The embodiments of the present application have been described above, the foregoing description is exemplary, not exhaustive, and not limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the various embodiments described. The terminology used herein was chosen in order to best explain the principles of the embodiments, the practical application, or the improvement of technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (10)

1. An event-based order service processing method, comprising:
receiving request information which is sent by a client and used for triggering an order event;
configuring an order event processor matched with the order event according to the request information, wherein the order event processor is predefined and comprises processing logic for processing the order event;
executing the order event processor to process the order event.
2. The method of claim 1, wherein configuring an order event handler matching the order event according to the request information comprises:
acquiring name information of the order event from a predefined order event model data object, and configuring an order event processor matched with the order event according to the name information.
3. The method of claim 2, wherein configuring an order event handler matching the order event according to the name information comprises:
judging whether an order event processor matched with the order event exists or not according to the name information;
if yes, configuring the order event processor; or if the order event processor does not exist, returning prompt information that the order event processor does not exist.
4. A method according to claim 3, wherein said executing said order event handler comprises:
acquiring name information of an order event driver from a predefined order event model data object;
and determining an order event driver matched with the order event according to the name information, and executing the order event processor through the order event driver.
5. The method of claim 4, wherein the determining an order event driver matching the order event based on the name information, executing the order event processor by the order event driver, comprises:
and determining an order event driver matched with the order event according to the name information and different types of the order event, wherein the order event driver executes the order event processor in a synchronous, asynchronous or queue mode.
6. The method as recited in claim 1, further comprising:
judging whether the processing record of the order event exists or not;
if not, creating a processing record of the order event in an order record table; or if so, returning the prompt information that the order event is recorded.
7. The method of claim 6, wherein said determining whether a process record of the order event exists comprises:
and persisting the matched order model data object with the order event to the order event record table, and judging whether the processing record of the order event exists or not according to the unique hash value corresponding to the order event contained in the order event record table.
8. The method of claim 1, wherein after receiving the request information for triggering the order event sent by the client, further comprises:
judging whether other order events different from the current order event are triggered or not;
if other order events are triggered, an order event tree is formed through order event fission.
9. An event-based order service processing apparatus, comprising:
the receiving module is used for receiving request information which is sent by the client and used for triggering an order event;
the configuration module is used for configuring an order event processor matched with the order event according to the request information received by the receiving module, wherein the order event processor is predefined and comprises processing logic for processing the order event;
and the execution module is used for executing the order event processor configured by the configuration module and processing the order event.
10. The apparatus of claim 9, wherein the configuration module comprises:
the acquisition sub-module is used for acquiring name information of the order event from a predefined order event model data object;
and the configuration sub-module is used for configuring an order event processor matched with the order event according to the name information acquired by the acquisition sub-module.
CN202111515293.3A 2021-12-13 2021-12-13 Order service processing method and device based on event Pending CN116263717A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111515293.3A CN116263717A (en) 2021-12-13 2021-12-13 Order service processing method and device based on event

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111515293.3A CN116263717A (en) 2021-12-13 2021-12-13 Order service processing method and device based on event

Publications (1)

Publication Number Publication Date
CN116263717A true CN116263717A (en) 2023-06-16

Family

ID=86721816

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111515293.3A Pending CN116263717A (en) 2021-12-13 2021-12-13 Order service processing method and device based on event

Country Status (1)

Country Link
CN (1) CN116263717A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116841772A (en) * 2023-08-30 2023-10-03 成都中科合迅科技有限公司 Cross-thread signal processing method and system based on event queue

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116841772A (en) * 2023-08-30 2023-10-03 成都中科合迅科技有限公司 Cross-thread signal processing method and system based on event queue
CN116841772B (en) * 2023-08-30 2023-11-07 成都中科合迅科技有限公司 Cross-thread signal processing method and system based on event queue

Similar Documents

Publication Publication Date Title
CN106802826B (en) Service processing method and device based on thread pool
US8832658B2 (en) Verification framework for business objects
US8150889B1 (en) Parallel processing framework
CN110162344B (en) Isolation current limiting method and device, computer equipment and readable storage medium
CN110288190A (en) Event notification method, event notification server, storage medium and device
CN111381940B (en) Distributed data processing method and device
CN110704170A (en) Batch task processing method and device, computer equipment and storage medium
CN116523457A (en) Workflow processing method, device, equipment and storage medium based on business process
CN113434396A (en) Interface test method, device, equipment, storage medium and program product
CN111538659A (en) Interface testing method and system for service scene, electronic device and storage medium
CN116263717A (en) Order service processing method and device based on event
CN104636211A (en) Information interaction method among software systems, and middleware system
CN113254445B (en) Real-time data storage method, device, computer equipment and storage medium
CN109783159A (en) Application starting method and apparatus based on configuration information
CN115994079A (en) Test method, test device, electronic apparatus, storage medium, and program product
CN115328457A (en) Method and device for realizing form page based on parameter configuration
CN112182107B (en) List data acquisition method, device, computer equipment and storage medium
CN111680478B (en) Report generation method, device, equipment and storage medium based on configuration software
CN113642836A (en) Callback event processing method and device, computer equipment and storage medium
CN112817782A (en) Data acquisition reporting method and device, electronic equipment and storage medium
CN112380820A (en) Automatic data backfilling method and device, electronic equipment and computer storage medium
CN111679899A (en) Task scheduling method, device, platform equipment and storage medium
CN111798338A (en) Smart tourism GDS method, system and intermediate server
CN113485799B (en) Method, device, equipment and storage medium for executing same timing task by multiple libraries
CN111078232B (en) Application program packaging method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination