Method, device, equipment and storage medium for processing orders

By configuring the timing processing plug-in in the business server system, allocating parallel orders and ensuring that the same order set is assigned to the same partition queue, the problem of low order processing efficiency under the microservice architecture is solved and efficient order processing is achieved.

CN114217875BActive Publication Date: 2024-08-27PINGAN YIQIANBAO E COMMERCE CO LTD
View PDF 13 Cites 0 Cited by

Patent Information

Application Number
CN202111549137.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-17
Publication Date
2024-08-27
Estimated Expiration
2041-12-17

AI Technical Summary

Technical Problem

The order processing system under the traditional microservice architecture is difficult to allocate accurately when receiving concurrent orders, resulting in a high error rate and reducing the overall order processing efficiency.

Method used

Configure the time series processing plug-in in the business server system. By obtaining the identification information of the order, allocate parallel orders based on the time series processing plug-in and the preset partition queue to ensure that the same order set is assigned to the same partition queue, and then the order server System processing.

Benefits of technology

It effectively solves the problem of order out-of-sequence when multiple execution states are concurrent, avoids economic losses, and improves the efficiency of order processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114217875B
    Figure CN114217875B
Patent Text Reader

Abstract

The present application is applicable to the field of operation and maintenance technology, and provides a method, device, equipment and storage medium for processing orders. It includes: configuring a timing processing plug-in in the business server system; when parallel orders are detected, obtaining the identification information of each order; assigning a corresponding partition queue to each order based on the timing processing plug-in, the identification information of each order and the preset partition queue; assigning the orders corresponding to each partition queue to the order server system, and the order server system is used to process the orders in each partition queue. In the above scheme, the orders in each partition queue can only be processed by a corresponding server in the order server system, thereby solving the problem of timing disorder caused by concurrent execution of multiple orders, and avoiding economic losses to the company. And by introducing the timing processing plug-in, the steps are simple and the cost is low, and the efficiency of processing business orders is also improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of operation and maintenance technology, and in particular, relates to a method, device, equipment and storage medium for processing orders. Background Art

[0002] Microservices were first proposed by Martin Fowler and James Lewis in 2014. The microservices architectural style is a way of developing a single application using a set of small services. Each service runs in its own process and communicates using lightweight mechanisms. These services are built based on business capabilities and can be independently deployed through automated deployment mechanisms. These services are implemented in different programming languages ​​and different data storage technologies, and maintain minimal centralized management.

[0003] With the widespread popularity of microservices, every company has its own clustered order system. Clustering means that the same business is deployed on multiple servers, which can be generally understood as multiple people doing the same thing. When this clustered order system receives order data, if the same order has different execution states concurrently, it is difficult to accurately allocate these orders, resulting in a high error rate in order processing, and it is easy to have unreasonable order processing, which reduces the overall efficiency of order processing. Summary of the invention

[0004] In view of this, the embodiments of the present application provide a method, apparatus, device and storage medium for processing orders to solve the problem that the traditional method of processing orders has a high error rate, is prone to unreasonable order processing, and reduces the efficiency of overall order processing.

[0005] A first aspect of an embodiment of the present application provides a method for processing an order, which is applied to a business server system, and the method includes:

[0006] A time sequence processing plug-in is configured in the business server system, wherein the time sequence processing plug-in is used to allocate parallel orders in the business server system, wherein the parallel orders include multiple orders in different execution states;

[0007] When the parallel orders are detected, obtaining identification information of each of the orders;

[0008] Based on the timing processing plug-in, the identification information of each order and the preset partition queue, a corresponding partition queue is allocated to each order;

[0009] The orders corresponding to each of the partition queues are distributed to an order server system, and the order server system is used to process the orders in each of the partition queues.

[0010] Optionally, allocating a corresponding partition queue to each order based on the timing processing plug-in, identification information of each order and a preset partition queue includes:

[0011] Determine a same order set according to the identification information of the order, where the same order set includes a plurality of same orders in different execution states;

[0012] The timing processing plug-in allocates the multiple identical orders in the identical order set to the same partition queue.

[0013] Optionally, determining the same order set according to the identification information of the order includes:

[0014] Extracting the field value in the identification information of each of the orders;

[0015] Determining the number of the preset partition queues;

[0016] Perform remainder processing on each of the field values ​​according to the quantity to obtain a remainder result corresponding to each order;

[0017] Orders with the same remainder result are determined, and the same order set is generated according to the orders with the same remainder result.

[0018] Optionally, after allocating the orders corresponding to each partition queue to the order server system, the method further includes:

[0019] Obtaining the processing result of each order fed back by the order server system;

[0020] Determine the final processing result corresponding to the same order set according to the processing result of each of the orders;

[0021] The final processing result is sent to the user's terminal.

[0022] Optionally, determining the final processing result corresponding to the same order set according to the processing result of each of the orders includes:

[0023] obtaining the time of each of said orders;

[0024] sorting the processing results of each order according to the time of each order;

[0025] According to the sorting result, the final processing result corresponding to the same order set is determined.

[0026] Optionally, the timing processing plug-in is developed based on Java, and the timing processing plug-in includes a jar package.

[0027] A second aspect of an embodiment of the present application provides a method for processing an order, which is applied to an order server system, wherein the order server system includes multiple servers, and the method includes:

[0028] Get the orders corresponding to each partition queue assigned by the business server system;

[0029] The orders of the same partition queue are allocated to the same server, and the same server is used to process the orders allocated to the same server.

[0030] A third aspect of an embodiment of the present application provides a device for processing an order, characterized in that it is applied to a business server system, and the device includes:

[0031] A configuration unit, configured to configure a time sequence processing plug-in in the business server system, wherein the time sequence processing plug-in is used to allocate parallel orders in the business server system, wherein the parallel orders include multiple orders in different execution states;

[0032] an acquisition unit, configured to acquire identification information of each of the orders when the parallel orders are detected;

[0033] A first allocation unit, configured to allocate a corresponding partition queue to each order based on the timing processing plug-in, identification information of each order and a preset partition queue;

[0034] The second allocation unit is used to allocate the orders corresponding to each of the partition queues to an order server system, and the order server system is used to process the orders in each of the partition queues.

[0035] A fourth aspect of the embodiments of the present application provides a device for processing an order, characterized in that it is applied to an order server system, and the device includes:

[0036] An order acquisition unit, used to acquire orders corresponding to each partition queue allocated by the business server system;

[0037] The order distribution unit is used to distribute the orders of the same partition queue to the same server, and the same server is used to process the orders distributed to the same server.

[0038] The fifth aspect of an embodiment of the present application provides a device for processing orders, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method for processing orders as described in the first aspect above when executing the computer program.

[0039] The sixth aspect of an embodiment of the present application provides a device for processing orders, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method for processing orders as described in the second aspect above when executing the computer program.

[0040] A seventh aspect of an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the method for processing an order as described in the first aspect above are implemented.

[0041] An eighth aspect of an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the method for processing an order as described in the second aspect above.

[0042] A ninth aspect of an embodiment of the present application provides a computer program product. When the computer program product runs on a device, the device executes the steps of the method for processing an order described in the first aspect above.

[0043] The tenth aspect of the embodiments of the present application provides a computer program product. When the computer program product runs on a device, the device executes the steps of the method for processing an order described in the second aspect above.

[0044] The method, device, equipment and storage medium for processing orders provided in the embodiments of the present application have the following beneficial effects:

[0045] The timing processing plug-in is pre-configured into the business server system. The timing processing plug-in is used to allocate parallel orders in the business server system. Parallel orders include multiple orders in different execution states. When parallel orders are detected, the identification information of each order is obtained. The identification information of each order is processed based on the timing processing plug-in. According to the processing result, the same order in different states can be allocated to the same preset partition queue. The orders in each partition queue can only be processed by a corresponding server in the order server system, thereby solving the problem of timing disorder caused by concurrent orders in multiple execution states and avoiding economic losses to the company. The above-mentioned problem is solved by introducing the timing processing plug-in in a simple and low-cost way, and the efficiency of processing business orders is also improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0047] Figure 1 is a schematic flow chart of a method for processing an order provided by an exemplary embodiment of the present application;

[0048] Figure 2 is a specific flow chart of step S103 of the method for processing an order shown in another exemplary embodiment of the present application;

[0049] Figure 3 is a schematic flow chart of a method for processing an order provided by yet another exemplary embodiment of the present application;

[0050] Figure 4 is a schematic flow chart of a method for processing an order provided by an exemplary embodiment of the present application;

[0051] Figure 5 is a schematic diagram of a device for processing orders provided by an embodiment of the present application;

[0052] Figure 6 is a schematic diagram of a device for processing orders provided by an embodiment of the present application;

[0053] Figure 7 is a schematic diagram of a device for processing orders provided by an embodiment of the present application;

[0054] Figure 8 It is a schematic diagram of a device for processing orders provided in another embodiment of the present application. DETAILED DESCRIPTION

[0055] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0056] In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0057] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.

[0058] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0059] The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. Artificial intelligence software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning / supervised learning.

[0060] See also Figure 1 , Figure 1 : is a schematic flow chart of a method for processing an order provided by an exemplary embodiment of the present application. The execution subject of the method for processing an order provided by the present application is a device for processing an order, wherein the device includes but is not limited to mobile terminals such as smart phones, tablet computers, computers, personal digital assistants (PDAs), desktop computers, and may also include various types of servers.

[0061] For example, the server can be a stand-alone server or a cloud service that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0062] In the embodiment of the present application, the execution subject is taken as an example to illustrate.

[0063] like Figure 1 The method for processing an order shown may include: S101 to S104, which are specifically as follows:

[0064] S101: configuring a time sequence processing plug-in in the business server system, where the time sequence processing plug-in is used to allocate parallel orders in the business server system, where the parallel orders include multiple orders in different execution states.

[0065] Exemplarily, the business server system is used to process various businesses, and the types of businesses are not limited. For example, the business server system can be an air ticket business server system (used to process air ticket business), a hotel business server system (used to process hotel business), a scenic spot ticket server system (used to process scenic spot ticket business), etc. This is only an exemplary description and is not limited to this.

[0066] The business server system may include a server cluster, which can be understood as a collection of many servers to process the same business together. For example, the air ticket service server system may include three servers, respectively represented as air ticket service 01, air ticket service 02, and air ticket service 03. The hotel business server system may also include three servers, respectively represented as hotel service 01, hotel service 02, and hotel service 03. This is only an exemplary description and is not limited to this.

[0067] The timing processing plug-in is a plug-in developed using a computer programming language (Java), and is mainly used to allocate parallel orders in a business server system. The timing processing plug-in is usually a file in a software package file format (Java Archive, JAR), also known as a file package (jar package). For example, the target plug-in may be order-push-timing.jar. This is only an exemplary description and is not limited to this.

[0068] Among them, parallel orders include multiple orders in different execution states. It can be generally understood as different execution states of the same order generated according to different operations of the user. For example, a certain order is an air ticket order generated by a user purchasing an air ticket. When the order is submitted but not paid, the execution state of the air ticket order is to be paid. After the user pays, the execution state of the air ticket order is first paid, and then the execution state of the air ticket order is to be traveled. These are the same order of the air ticket order, but with different operations of the user, execution states such as to be paid, paid, and to be travel appear. These orders in different execution states constitute parallel orders. This is only an exemplary explanation and is not limited to this.

[0069] The timing processing plug-in is configured in the business server system. Specifically, the timing processing plug-in is configured in each server in the server cluster using Java technology. For example, the timing processing plug-in is configured in ticket service 01, ticket service 02 and ticket service 03 respectively.

[0070] For example, each server in the server cluster has corresponding codes, and order-push-timing.jar is configured into these codes respectively by using Java technology. This is only an exemplary description and is not limited to this.

[0071] S102: When parallel orders are detected, identification information of each order is obtained.

[0072] Exemplarily, when one or more parallel orders are detected, identification information of each order in a different execution state in each parallel order is obtained, wherein the identification information may include a field value of each order.

[0073] Exemplarily, when it is detected that different states appear in orders generated for the same business, identification information of each order in different execution states is obtained. For example, a certain order is an order generated by a user ordering a hotel. When the order is submitted but the payment is not made, a first order is generated, and the execution state of the first order is pending payment; after the user pays, a second order is generated, and the execution state of the second order is paid; then a third order is generated, and the execution state of the third order is pending check-in.

[0074] Obtain identification information corresponding to each of the first order, the second order, and the third order. It is worth noting that the first order, the second order, and the third order are all generated in response to the user's behavior of ordering a hotel, and the first order, the second order, and the third order constitute parallel orders.

[0075] For example, after a parallel order is generated, it is first submitted to a server in the server cluster, and the server obtains the identification information of each order in different execution states, and then extracts the field value of each order from the identification information of each order. For example, the orderId field value in a certain order is extracted. This is only an exemplary description and is not limited to this.

[0076] S103: Based on the timing processing plug-in, the identification information of each order and the preset partition queue, a corresponding partition queue is allocated to each order.

[0077] Exemplarily, the preset partition queue can be provided by an open source stream processing platform (Kafka). Kafka is an open source stream processing platform developed by the Apache Software Foundation and written in Scala and Java. Kafka is a high-throughput distributed publish-subscribe messaging system that can process all action stream data of consumers on a website.

[0078] Kafka can set different topics according to different businesses, and then set one or more partition queues in different topics according to actual needs. The partition queue is used to reasonably distribute the orders sent by the servers in the business server system to the servers in the order server system.

[0079] For example, in this embodiment, Kafka can be used to set up the air ticket order topic airTopic and the hotel order topic hotelTopic respectively. Partition queues 01, 02, and 03 are pre-established in the air ticket order topic airTopic. Partition queues 01, 02, and 03 are pre-established in the hotel order topic hotelTopic.

[0080] Exemplarily, when there are multiple parallel orders, the field value of each order is obtained from the identification information of each order. Since each server in the business server system is pre-configured with a timing processing plug-in, the timing processing plug-in can process each field value. Based on the processing results, the same order can be sent to one of the partition queues of the same topic in Kafka.

[0081] S104: Allocate the orders corresponding to each partition queue to an order server system, and the order server system is used to process the orders in each partition queue.

[0082] Exemplarily, the order server system may include a server cluster, which is composed of multiple servers. For example, the order server system may include three servers, which are respectively represented as order service 01, order service 02, and order service 03. This is only an exemplary description and is not limited to this.

[0083] The orders corresponding to each partition queue are assigned to the servers in the order server system. For example, the orders corresponding to each partition queue can be assigned to the servers in the order server system according to the preset corresponding relationship. For example, the orders in partition queue 01 are assigned to order service 01, the orders in partition queue 02 are assigned to order service 02, and the orders in partition queue 03 are assigned to order service 03.

[0084] For another example, the orders corresponding to each partition queue are randomly assigned to the servers in the order server system. For example, the orders in partition queue 01 are assigned to order service 02, the orders in partition queue 02 are assigned to order service 03, and the orders in partition queue 03 are assigned to order service 01. This is only an exemplary description and is not limited to this.

[0085] The servers in the order server system are used to process the orders in each partition queue to which they are assigned. It can be understood that the same server in the order server system only processes the orders assigned to the same server.

[0086] In the above scheme, the timing processing plug-in is pre-configured into the business server system. The timing processing plug-in is used to allocate parallel orders in the business server system. Parallel orders include multiple orders in different execution states. When parallel orders are detected, the identification information of each order is obtained. The identification information of each order is processed based on the timing processing plug-in. According to the processing result, the same order in different states can be allocated to the same preset partition queue. The orders in each partition queue can only be processed by a corresponding server in the order server system, thereby solving the problem of timing disorder caused by concurrent orders in multiple execution states and avoiding economic losses to the company. The above problems are solved by introducing the timing processing plug-in in a simple and low-cost way, and the efficiency of processing business orders is also improved.

[0087] See also Figure 2 , Figure 2 is a specific flow chart of step S103 of the method for processing an order shown in another exemplary embodiment of the present application; optionally, in some possible implementations of the present application, the above S103 may include S1031 to S1032, which are as follows:

[0088] S1031: Determine a same order set according to identification information of the order, where the same order set includes multiple same orders in different execution states.

[0089] Exemplarily, when one or more parallel orders are detected, identification information of each order in different execution states in each parallel order is obtained, the identification information of each order is processed by the time sequence processing plug-in, and orders with consistent processing results are determined as the same order set.

[0090] The same order set includes multiple orders in different execution states. It can be understood that the same order is an order generated based on the user's operation of the same business, but the execution states of these orders are different.

[0091] It is worth noting that parallel orders may include orders generated by users operating different businesses. The execution status of orders generated for the same business is different, but the same order set only includes the same order generated by users operating the same business.

[0092] Optionally, in some possible implementations of the present application, the above S1031 may include S10311 to S10314, which are as follows:

[0093] S10311: Extract the field values ​​in the identification information of each order.

[0094] Exemplarily, the field value of each order is extracted from the identification information of each order. For example, the value of the orderId field in a certain order is extracted. This is only an exemplary description and is not limited to this.

[0095] S10312: Determine the number of preset partition queues.

[0096] Exemplarily, Kafka sets different topics according to different businesses in advance, and then sets one or more partition queues in different topics according to actual needs, and obtains the number of set partition queues.

[0097] For example, the air ticket order topic airTopic is set up through Kafka. Partition queue 01, partition queue 02 and partition queue 03 are pre-established in the air ticket order topic airTopic, and the number of preset partition queues is determined to be 3. This is only an exemplary description and is not limited to this.

[0098] S10313: Perform remainder processing on each field value according to the quantity to obtain the remainder result corresponding to each order.

[0099] Exemplarily, the field value corresponding to each order is divided by the number of partition queues to obtain the remainder result corresponding to each order.

[0100] For example, the number of partition queues corresponding to the airTopic air ticket order topic in Kafka is 3. Extract the orderId field value of each order, and calculate the remainder of the orderId field value by the number of airTopic partition queues 3 to obtain the remainder result corresponding to each order.

[0101] S10314: Determine the orders with the same remainder result, and generate the same order set based on the orders with the same remainder result.

[0102] The field values ​​of the orders generated by the same business are the same. The remainder processing is performed on each field value based on the number of partition queues. The obtained remainder results are the same. The orders with the same remainder results are grouped together to form the same order set.

[0103] Using the example in S10313, when the remainder is 0, the orders with remainder 0 are grouped together to form a same order set. When the remainder is 1, the orders with remainder 1 are grouped together to form a same order set. When the remainder is 2, the orders with remainder 2 are grouped together to form a same order set.

[0104] In the above implementation, since the field values ​​of the orders generated by the same business are the same, the remainder of each field value is processed according to the quantity, so that the same order set can be accurately generated, which makes it easier to send the orders in the same order set to the same partition queue in the future, and makes it easier for the servers in the order server system to process the orders in each partition queue in a targeted manner to avoid interference from other orders, thereby solving the problem of timing disorder caused by concurrent execution of orders in multiple states.

[0105] S1032: Allocate multiple identical orders in the same order set to the same partition queue through a timing processing plug-in.

[0106] Exemplarily, the time sequence processing plug-in distributes the orders, and each identical order set corresponds to a partition queue, and then multiple identical orders in the same order set are allocated to the same partition queue.

[0107] Using the example in S10313, the order corresponding to the remainder result is sent to partition queue 01; when the remainder is 1, the order corresponding to the remainder result is sent to partition queue 02; when the remainder is 2, the order corresponding to the remainder result is sent to partition queue 03. This is only an exemplary description and is not limited to this.

[0108] In the above implementation, when the orderId field values ​​are the same, the orders corresponding to these orderId field values ​​can be sent to the same partition queue. The orderId field values ​​corresponding to the same order in different execution states are also the same, so the same order can be sent to the same partition queue. This facilitates the server in the order server system to process the orders in each partition queue in a targeted manner to avoid interference from other orders, thereby solving the problem of time sequence disorder caused by concurrent orders in multiple execution states.

[0109] See also Figure 3 , Figure 3 FIG. 1 is a schematic flow chart of a method for processing an order provided by another exemplary embodiment of the present application. Figure 1 The difference between the corresponding embodiments is that after S204, S205 to S207 are also included. In this embodiment, S201 to S204 are different from Figure 1 S101 to S104 in the corresponding embodiment are exactly the same. For details, please refer to the relevant description of S101 to S104 in the previous embodiment, which will not be repeated here. S205 to S207 are as follows:

[0110] S205: Obtain the processing result of each order fed back by the order server system.

[0111] For example, after each server in the order server system completes processing the order assigned to it, it generates a corresponding processing result, and each server can send its corresponding processing result to the business server system separately. The business server system receives the processing result of each order fed back by the server in the order server system.

[0112] For example, order service 01 in the order server system is assigned to the orders in partition queue 01 and processes the orders in partition queue 01. The orders in partition queue 01 are the orders generated by users ordering hotels, which are: when the order is submitted but not paid, the first order is generated, and the execution status of the first order is waiting for payment; the second order is generated after the user pays, and the execution status of the second order is paid; then the third order is generated, and the execution status of the third order is waiting for check-in.

[0113] The order service 01 detects whether there is any problem in the information of the first order, the second order, and the third order, and returns the processing result corresponding to each order if there is no problem. The processing result may include prompt information. For example, the prompt information corresponding to the first order may be: You have an order to be paid; the prompt information corresponding to the second order may be: You have an order that has been paid; and the prompt information corresponding to the third order may be: The hotel you ordered is waiting for check-in.

[0114] The order service 01 sends the prompt information corresponding to each order to the business server system, and the business server system receives the prompt information of each order sent by the order service 01.

[0115] S206: Determine the final processing result corresponding to the same order set according to the processing result of each order.

[0116] Exemplarily, for orders in the same order set, multiple different processing results are received, and a final processing result can be determined from the multiple different processing results based on the order in which each order is generated.

[0117] Continuing with the example in S205, the business server system receives the same order set and the corresponding processing results are: you have an order to be paid, you have an order that has been paid, and you have booked a hotel to check in.

[0118] Among the first order, the second order and the third order, the second order will be generated only after the first order is generated, and the third order will be generated only after the second order is generated, so the prompt information of the third order generated last is taken as the final processing result. This is only an exemplary description and is not limited to this.

[0119] S207: Send the final processing result to the user's terminal.

[0120] Exemplarily, the final processing results corresponding to the same order set are sent to the user's terminal (such as a mobile phone, tablet, smart watch, etc.), so that the user can understand the current status of the order in a timely manner.

[0121] For ease of understanding, the following is an example of a user ordering an air ticket and a hotel. The processing of an order in multiple concurrent execution states in the prior art is as follows:

[0122] Set up a ticket business cluster system and an order cluster system. The ticket business cluster system includes three servers, which are respectively represented as ticket service 01, ticket service 02, and ticket service 03. The order cluster system includes three servers, which are respectively represented as order service 01, order service 02, and order service 03.

[0123] The four different execution states corresponding to a certain air ticket order bizld01 are: bizld01_A1, bizld01_A2, bizld01_A3 and bizld01_A4. In the prior art, the four different execution states of the air ticket order are randomly assigned to order service 01 and order service 03. For example, bizld01_A1 indicates that the A1 order is in the submitted execution state, bizld01_A2 indicates that the A1 order is in the pending payment execution state, bizld01_A3 indicates that the A1 order is in the paid execution state, and bizld01_A4 indicates that the A1 order is in the pending travel execution state.

[0124] When a server's network has problems, or an order changes status frequently, the received orders cannot be processed in time, which will lead to time disorder. For example, when the order service 01 has a network problem, the order service 03 first processes bizld01_A4 and sends a prompt message to the user. The prompt message can be: You have an order to be traveled, the time is XX, please pay attention to the travel time to avoid delays. Then, the order service 01 processes bizld01_A2 and sends a prompt message to the user. The prompt message can be: You have an order to be paid, the remaining time is XX minutes, please pay in time. The user has already paid and still received a message prompting payment, which brings great trouble to the user, and in serious cases, it will cause economic losses to the company.

[0125] In this implementation, Kafka is added on the basis of the air ticket service server system, the hotel service server system and the order server system. The air ticket service server system includes three servers, which are respectively represented as air ticket service 01, air ticket service 02 and air ticket service 03. Using Java technology, order-push-timing.jar is configured in air ticket service 01, air ticket service 02 and air ticket service 03 respectively.

[0126] The hotel business server system may also include three servers, which are respectively represented as hotel service 01, hotel service 02 and hotel service 03. The order-push-timing.jar is configured to hotel service 01, hotel service 02 and hotel service 03 respectively by using Java technology.

[0127] Kafka is set up with the air ticket order topic airTopic and the hotel order topic hotelTopic. In the air ticket order topic airTopic, partition queues 01, 02, and 03 are pre-established. In the hotel order topic hotelTopic, partition queues 01, 02, and 03 are pre-established.

[0128] Extract the orderId field value of each order, and calculate the remainder result by taking the orderId field value and the number of partition queues of airTopic 3. Send the orders with the same remainder result to one of the partition queues of the same topic in Kafka. The orders in each partition queue are processed by a corresponding server in the order server system.

[0129] The server processes the different states of the orders generated by the same business in sequence, determines the final processing result corresponding to the same order set, and sends the final processing result to the user's terminal. Using the example in S205, the prompt information of the third order generated last is used as the final processing result and sent to the user. That is, "The hotel you ordered is waiting for check-in" is sent to the user.

[0130] Since orders of different statuses generated by the same business are processed by the same server, the final processing result only needs to be returned to the user. There will be no situation where the user is first prompted "the hotel you ordered is ready for check-in" and then prompted "you have an order to be paid" as in the prior art, which effectively solves the problem of disordered timing in the prior art.

[0131] Optionally, in some possible implementations of the present application, the above S206 may include S2061 to S2063, which are specifically as follows:

[0132] S2061: Get the time of each order.

[0133] Exemplarily, the time of each order in the same order set is obtained. This time is the time when the order is generated. For example, the time corresponding to the first order is 2020-11-11 11:11:24, the time corresponding to the second order is 2020-11-11 11:11:26, and the time corresponding to the third order is 2020-11-11 11:11:28. This is only an exemplary description and is not limited to this.

[0134] S2062: Sort the processing results of each order according to the time of each order.

[0135] For example, the processing results of each order may be sorted in a time order from first to last. The processing results of each order may also be sorted in a time order from last to first. This is only an exemplary description and is not limited to this.

[0136] S2063: Determine the final processing result corresponding to the same order set according to the sorting result.

[0137] For example, the processing results of each order are sorted in chronological order from the earliest to the latest, and the processing result that is sorted last is taken as the final processing result.

[0138] Using the example in S2061, the processing results of the first order, the second order, and the third order are sorted, and the sorting results are: you have an order to be paid, you have an order paid, and the hotel you ordered is waiting for check-in. "The hotel you ordered is waiting for check-in" is taken as the final processing result. This is only an exemplary description and is not limited to this.

[0139] In this embodiment, the processing results of each order are sorted according to the time of each order, and a final processing result is selected according to the sorting result, so that the final processing result can be sent to the user later. Since only the final processing result is fed back to the user, the disorder of the time sequence in the prior art is effectively avoided.

[0140] See also Figure 4 , Figure 4 : is a schematic flow chart of a method for processing an order provided by an exemplary embodiment of the present application. The execution subject of the method for processing an order provided by the present application is a device for processing an order, wherein the device includes but is not limited to mobile terminals such as smart phones, tablet computers, computers, personal digital assistants (PDAs), desktop computers, and may also include various types of servers.

[0141] For example, the server can be a stand-alone server or a cloud service that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0142] In the embodiment of the present application, the execution subject is taken as an example to illustrate.

[0143] like Figure 4 The method for processing an order shown may include: S301 to S302, which are specifically as follows:

[0144] S301: Obtain the orders corresponding to each partition queue allocated by the business server system.

[0145] Exemplarily, the order server system may include a server cluster, which is composed of multiple servers. For example, the order server system may include three servers, which are respectively represented as order service 01, order service 02, and order service 03. This is only an exemplary description and is not limited to this.

[0146] The business server system sends the order corresponding to each partition queue to the order server system, and the order server system receives the order corresponding to each partition queue sent by the business server system.

[0147] S302: Allocate orders of the same partition queue to the same server, and the same server is used to process the orders allocated to the same server.

[0148] For example, the order server system includes three servers, namely order service 01, order service 02, and order service 03. The partition queues established in the air ticket order topic airTopic are partition queue 01, partition queue 02, and partition queue 03.

[0149] It is preset that order service 01 processes orders in partition queue 01 in the air ticket order topic airTopic, order service 02 processes orders in partition queue 02 in the air ticket order topic airTopic, and order service 03 processes orders in partition queue 03 in the air ticket order topic airTopic.

[0150] The orders in partition queue 01 are assigned to order service 01, and order service 01 processes the orders in partition queue 01; the orders in partition queue 02 are assigned to order service 02, and order service 02 processes the orders in partition queue 02; the orders in partition queue 03 are assigned to order service 03, and order service 03 processes the orders in partition queue 03.

[0151] Alternatively, the orders in a certain partition queue may be randomly assigned to a server in the order server system, and this may be adjusted according to actual conditions. This is only an exemplary description and is not limited to this.

[0152] In the above implementation, orders in the same partition queue are assigned to the same server, and orders in each partition queue can only be processed by a corresponding server in the order server system, which effectively solves the problem of time disorder caused by concurrent execution of orders in multiple states and avoids causing economic losses to the company.

[0153] Optionally, in a possible implementation, the method for processing orders provided by the present application can also be applied to the medical field. For example, when a patient performs online consultations, registration, and other operations, corresponding orders will also be generated. The method for processing orders provided by the present application can effectively avoid the occurrence of time sequence disorder caused by concurrent execution of multiple orders.

[0154] See also Figure 5 , Figure 5 Schematic diagram of a device for processing orders provided in an embodiment of the present application. The device 4 includes units for executing Figure 1-Figure 3 For details, please refer to the steps in the corresponding embodiment. Figure 1-Figure 3 The relevant descriptions in the respective corresponding embodiments.

[0155] For the convenience of explanation, only the parts related to this embodiment are shown. Figure 5 ,include:

[0156] A configuration unit 410, configured to configure a time sequence processing plug-in in the business server system, wherein the time sequence processing plug-in is used to allocate parallel orders in the business server system, wherein the parallel orders include multiple orders in different execution states;

[0157] An acquisition unit 420, configured to acquire identification information of each of the orders when the parallel orders are detected;

[0158] A first allocation unit 430 is used to allocate a corresponding partition queue to each order based on the timing processing plug-in, the identification information of each order and the preset partition queue;

[0159] The second allocating unit 440 is used to allocate the orders corresponding to each of the partition queues to an order server system, and the order server system is used to process the orders in each of the partition queues.

[0160] Optionally, the first allocating unit 430 is specifically configured to:

[0161] Determine a same order set according to the identification information of the order, where the same order set includes a plurality of same orders in different execution states;

[0162] The timing processing plug-in allocates the multiple identical orders in the identical order set to the same partition queue.

[0163] Optionally, the first allocating unit 430 is further configured to:

[0164] Extracting the field value in the identification information of each of the orders;

[0165] Determining the number of the preset partition queues;

[0166] Perform remainder processing on each of the field values ​​according to the quantity to obtain a remainder result corresponding to each order;

[0167] Orders with the same remainder result are determined, and the same order set is generated according to the orders with the same remainder result.

[0168] Optionally, the device further comprises:

[0169] A result acquisition unit, used for acquiring the processing result of each order fed back by the order server system;

[0170] A determination unit, configured to determine a final processing result corresponding to the same order set according to the processing result of each of the orders;

[0171] The sending unit is used to send the final processing result to the user's terminal.

[0172] Optionally, the determining unit is specifically configured to:

[0173] obtaining the time of each of said orders;

[0174] sorting the processing results of each order according to the time of each order;

[0175] According to the sorting result, the final processing result corresponding to the same order set is determined.

[0176] Optionally, the timing processing plug-in is developed based on Java, and the timing processing plug-in includes a jar package.

[0177] See also Figure 6 , Figure 6 Schematic diagram of a device for processing orders provided in one embodiment of the present application. The device 5 includes units for executing Figure 4 For details, please refer to the steps in the corresponding embodiment. Figure 4For the convenience of explanation, only the parts related to this embodiment are shown. Figure 6 ,include:

[0178] An order acquisition unit 510 is used to acquire orders corresponding to each partition queue allocated by the business server system;

[0179] The order allocation unit 520 is used to allocate orders in the same partition queue to the same server, and the same server is used to process the orders allocated to the same server.

[0180] See also Figure 7 , Figure 7 Schematic diagram of a device for processing orders provided by an embodiment of the present application. Figure 7 As shown, the device 6 of this embodiment includes: a processor 60, a memory 61, and a computer program 62 stored in the memory 61 and executable on the processor 60. When the processor 60 executes the computer program 62, the steps in the above-mentioned order processing method embodiments are implemented, such as Figure 1 Alternatively, when the processor 60 executes the computer program 62, the functions of each unit in the above embodiments are realized, for example, Figure 5 The functions of units 410 to 440 are shown.

[0181] Exemplarily, the computer program 62 may be divided into one or more units, which are stored in the memory 61 and executed by the processor 60 to complete the present application. The one or more units may be a series of computer instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 62 in the device 6. For example, the computer program 62 may be divided into a configuration unit, an acquisition unit, a first allocation unit, and a second allocation unit, and the specific functions of each unit are as described above.

[0182] The device may include, but is not limited to, a processor 60 and a memory 61. Those skilled in the art will appreciate that Figure 7 It is only an example of device 6 and does not constitute a limitation of the device. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the device may also include input and output devices, network access devices, buses, etc.

[0183] The processor 60 may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0184] The memory 61 may be an internal storage unit of the device, such as a hard disk or memory of the device. The memory 61 may also be an external storage terminal of the device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the device. Further, the memory 61 may also include both an internal storage unit of the device and an external storage terminal. The memory 61 is used to store the computer instructions and other programs and data required by the terminal. The memory 61 may also be used to temporarily store data that has been output or is to be output.

[0185] See also Figure 8 , Figure 8 FIG. 1 is a schematic diagram of an order processing device provided by another embodiment of the present application. Figure 8 As shown, the device 7 of this embodiment includes: a processor 70, a memory 71, and a computer program 72 stored in the memory 71 and executable on the processor 70. When the processor 70 executes the computer program 72, the steps in the above-mentioned order processing method embodiments are implemented, for example Figure 4 Alternatively, when the processor 70 executes the computer program 72, the functions of each unit in the above embodiments are realized, for example, Figure 6 The functions of units 510 to 520 are shown.

[0186] Exemplarily, the computer program 72 may be divided into one or more units, which are stored in the memory 71 and executed by the processor 70 to complete the present application. The one or more units may be a series of computer instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 72 in the device 7. For example, the computer program 72 may be divided into an order acquisition unit and an order allocation unit, and the specific functions of each unit are as described above.

[0187] The device may include, but is not limited to, a processor 70 and a memory 71. Those skilled in the art will appreciate that Figure 8 It is only an example of device 7 and does not constitute a limitation of the device. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the device may also include input and output devices, network access devices, buses, etc.

[0188] The processor 70 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0189] The memory 71 may be an internal storage unit of the device, such as a hard disk or memory of the device. The memory 71 may also be an external storage terminal of the device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the device. Further, the memory 71 may also include both an internal storage unit of the device and an external storage terminal. The memory 71 is used to store the computer instructions and other programs and data required by the terminal. The memory 71 may also be used to temporarily store data that has been output or is to be output.

[0190] The embodiment of the present application also provides a computer storage medium, which may be non-volatile or volatile. The computer storage medium stores a computer program, which, when executed by a processor, implements the steps in the above-mentioned order processing method embodiments.

[0191] The present application also provides a computer program product. When the computer program product runs on a device, the device executes the steps in the above-mentioned method embodiments for processing an order.

[0192] An embodiment of the present application also provides a chip or integrated circuit, which includes: a processor, which is used to call and run a computer program from a memory, so that a device equipped with the chip or integrated circuit executes the steps in the above-mentioned embodiments of the method for processing an order.

[0193] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0194] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0195] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0196] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features can be replaced by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for processing an order, characterized in that: Applied to a business server system, the method comprises: A timing processing plug-in is configured in the business server system, and the timing processing plug-in is used to allocate parallel orders in the business server system, and the parallel orders include multiple orders in different execution states; the business server system includes an air ticket business server system, a hotel business server system, and a scenic spot ticket server system; When the parallel orders are detected, obtaining identification information of each of the orders; Extract the field value in the identification information of each of the orders; determine the number of preset partition queues; perform remainder processing on each of the field values ​​according to the number to obtain a remainder result corresponding to each order; determine orders with the same remainder result, and generate a same order set according to the orders with the same remainder result; the same order set includes multiple same orders in different execution states generated based on user operations on the same business; and assign multiple same orders in the same order set to the same partition queue through the timing processing plug-in; The orders corresponding to each of the partition queues are distributed to an order server system, and the order server system is used to process the orders in each of the partition queues.

2. The method according to claim 1, characterized in that After allocating the orders corresponding to each partition queue to the order server system, the method further includes: Obtaining the processing result of each order fed back by the order server system; Determine the final processing result corresponding to the same order set according to the processing result of each of the orders; The final processing result is sent to the user's terminal.

3. The method according to claim 2, characterized in that Determining the final processing result corresponding to the same order set according to the processing result of each order includes: obtaining the time of each of said orders; sorting the processing results of each order according to the time of each order; According to the sorting result, the final processing result corresponding to the same order set is determined.

4. A method for processing an order, characterized in that: Applied to an order server system, the order server system includes a plurality of servers, and the method includes: Obtaining orders corresponding to each partition queue assigned by a business server system; the business server system includes an air ticket business server system, a hotel business server system, and a scenic spot ticket server system; the business server system is a business server system as claimed in any one of claims 1 to 3; The orders of the same partition queue are allocated to the same server, and the same server is used to process the orders allocated to the same server.

5. A device for processing orders, characterized in that: Applied to a business server system, the device comprises: A configuration unit, configured to configure a timing processing plug-in in the business server system, wherein the timing processing plug-in is used to allocate parallel orders in the business server system, wherein the parallel orders include multiple orders in different execution states; the business server system includes an air ticket business server system, a hotel business server system, and a scenic spot ticket server system; an acquisition unit, configured to acquire identification information of each of the orders when the parallel orders are detected; A first allocation unit is used to extract the field value in the identification information of each of the orders; determine the number of preset partition queues; perform remainder processing on each of the field values ​​according to the number to obtain a remainder result corresponding to each order; determine orders with the same remainder result, and generate a same order set according to the orders with the same remainder result; the same order set includes multiple same orders in different execution states generated based on the same business operated by the user; and allocate multiple same orders in the same order set to the same partition queue through the timing processing plug-in; The second allocation unit is used to allocate the orders corresponding to each of the partition queues to an order server system, and the order server system is used to process the orders in each of the partition queues.

6. A device for processing an order, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Processing method and platform of transaction closed loop

    CN106097059A

  • System and method for order processing

    CN109840815A

  • Distributed message queue management system based on NVM

    CN110113420A

  • Electronic coupon issuing method and device

    CN111026758A

  • Data processing method, device and system, server and readable storage medium

    CN111131074A