CN113807923B - Order processing method and device, electronic equipment and readable storage medium - Google Patents

Order processing method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN113807923B
CN113807923B CN202111114174.7A CN202111114174A CN113807923B CN 113807923 B CN113807923 B CN 113807923B CN 202111114174 A CN202111114174 A CN 202111114174A CN 113807923 B CN113807923 B CN 113807923B
Authority
CN
China
Prior art keywords
order
information
data table
determining
state information
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.)
Active
Application number
CN202111114174.7A
Other languages
Chinese (zh)
Other versions
CN113807923A (en
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.)
Hangzhou Youwen Network Technology Co ltd
Original Assignee
Hangzhou Youwen 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 Hangzhou Youwen Network Technology Co ltd filed Critical Hangzhou Youwen Network Technology Co ltd
Priority to CN202111114174.7A priority Critical patent/CN113807923B/en
Publication of CN113807923A publication Critical patent/CN113807923A/en
Application granted granted Critical
Publication of CN113807923B publication Critical patent/CN113807923B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • 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]

Abstract

The application discloses an order processing method, an order processing device, electronic equipment and a computer readable storage medium, wherein the method comprises the following steps: acquiring a plurality of orders to be processed, and inputting the orders to be processed into a card intermediate to obtain a plurality of order information; each order information comprises state information, order amount and identity information; determining a target operation corresponding to the order amount by using the state information; searching the data table by using the identity information to obtain a search result; if the search result and the state information meet the execution conditions which are not matched with the state information, executing target operation on the data table according to the amount of the order; according to the method, the state information is mapped into the target operation, and on the premise that the accuracy and the reliability of the data table are ensured, all orders of the same identity information are not required to be ordered and then processed, so that the ordering process is reduced, the consumption of computing resources is saved, and the order processing speed is improved.

Description

Order processing method and device, electronic equipment and readable storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to an order processing method, an order processing device, an electronic device, and a computer readable storage medium.
Background
In the context of online shopping forms such as live-on-demand, the creation and change of online shopping orders presents a short-term, massive scenario. Through the cluster task, orders are synchronized from the three-party system, and the message middleware of Kafka (namely Kafka) is used as an intermediate transmission carrier to process the orders and extract information in the orders. The status of the order may change, for example, from created to paid or shipped, or from created to cancelled. Because the order quantity is large and the state change is quick, the synchronous real-time order amount calculation is difficult. Currently, after an order is acquired, a series of identical orders with different states (namely orders with identical order identity information but different states) need to be determined according to the order identity information, and are ordered, and after the ordering is finished, the amount is calculated. However, the ordering process requires a significant amount of computing resources and computing time, making order processing slow.
Therefore, the problem of slower order processing speed in the related art is a technical problem that needs to be solved by those skilled in the art.
Disclosure of Invention
In view of the foregoing, an object of the present application is to provide an order processing method, an order processing device, an electronic apparatus, and a computer readable storage medium, which save the consumption of computing resources and increase the order processing speed.
In order to solve the above technical problems, the present application provides an order processing method, including:
acquiring a plurality of orders to be processed, and inputting the orders to be processed into a Kaff card middleware to acquire a plurality of order information; each order information comprises state information, order amount and identity information;
determining a target operation corresponding to the order amount by utilizing the state information;
searching a data table by using the identity information to obtain a search result;
and if the search result is not matched with the state information, executing the target operation on the data table according to the amount of the order.
Optionally, the inputting the pending order into the kaff card middleware to obtain a plurality of order information includes:
and randomly inputting each order to be processed into each partition of the Kaff card middleware, and carrying out parallel processing on the order to be processed by using a consumption program corresponding to each partition to obtain the order information.
Optionally, the method further comprises:
in response to a quantity setting instruction, the number of partitions in the card middleware is set to a target number.
Optionally, the determining, by using the status information, a target operation corresponding to the order amount includes:
if the state information is the order valid state, determining that the target operation is an increasing operation;
and if the state information is in an order invalid state, determining that the target operation is a reduction operation.
Optionally, if the search result and the state information do not match, executing the target operation on the data table according to the order amount, including:
if the search result is hit and the state information is an order invalid state, determining mismatch;
the order amount is subtracted from the data table.
Optionally, if the search result and the state information do not match, executing the target operation on the data table according to the order amount, including:
if the search result is not hit and the state information is the order valid state, determining that the search result is not hit;
and adding the order amount into the data table.
Optionally, the identity information includes at least two identity sub-information, and the searching the data table by using the identity information to obtain a search result includes:
judging whether target data items matched with all the identity sub-information exist in the data table or not;
if yes, determining the search result as hit;
if not, determining that the search result is a miss.
The application also provides an order processing device, which comprises:
the processing module is used for acquiring a plurality of orders to be processed, inputting the orders to be processed into the card middleware, and acquiring a plurality of order information; each order information comprises state information, order amount and identity information;
the operation determining module is used for determining target operation corresponding to the order amount by utilizing the state information;
the searching module is used for searching the data table by utilizing the identity information to obtain a searching result;
and the execution module is used for executing the target operation on the data table according to the order amount if the search result is not matched with the state information.
The application also provides an electronic device comprising a memory and a processor, wherein:
the memory is used for storing a computer program;
the processor is configured to execute the computer program to implement the order processing method described above.
The application also provides a computer readable storage medium for storing a computer program, wherein the computer program is executed by a processor to implement the order processing method.
According to the order processing method, a plurality of orders to be processed are obtained, the orders to be processed are input into the Kaff card middleware, and a plurality of order information is obtained; each order information comprises state information, order amount and identity information; determining a target operation corresponding to the order amount by using the state information; searching the data table by using the identity information to obtain a search result; and if the search result and the state information meet the execution condition which is not matched with the state information, executing the target operation on the data table according to the amount of the order.
Therefore, the method utilizes the card middleware to process the order to obtain corresponding order information, wherein the corresponding order information further comprises state information, order amount and identity information. It will be appreciated that the status of an order may characterize the manner in which the order is subsequently processed, e.g., in the creation, payment, receipt, etc., of the order, the amount of the order corresponding to the order should be counted, as the user who generated the order in the above-described status pays the amount of the order. In the refund state, etc., the order amount corresponding to the order should not be wanted because the user will not pay the order amount. Based on the thought, the target operation corresponding to the order amount can be determined according to the state information, namely the order amount should be counted or not should be counted. After the target operation is determined, searching the data table by using the identity information, and judging whether a data item corresponding to the identity information exists or not, namely whether the order amount corresponding to the identity information is counted or not. If the search result and the status information satisfy the execution condition that is not in conformity with the status information, it is indicated that the data table has not been processed correctly for the order amount, that is, should be recorded but not recorded, or should not be recorded but recorded, so that the target operation, such as addition or deletion, is executed on the data table according to the order amount. According to the method, the state information is mapped into the target operation, and on the premise that the accuracy and the reliability of the data table are ensured, all orders of the same identity information are not required to be ordered and then processed, so that the ordering process is reduced, the consumption of computing resources is saved, and the order processing speed is improved.
In addition, the application also provides an order processing device, electronic equipment and a computer readable storage medium, and the order processing device and the electronic equipment have the beneficial effects.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the related art, the drawings that are required to be used in the embodiments or the related technical descriptions will be briefly described below, and it is apparent that the drawings in the following description are only embodiments of the present application, and other drawings may be obtained according to the provided drawings without inventive effort to those of ordinary skill in the art.
FIG. 1 is a flow chart of an order processing method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an order processing device according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
Referring to fig. 1, fig. 1 is a flowchart of an order processing method according to an embodiment of the present application. The method comprises the following steps:
s101: and acquiring a plurality of orders to be processed, and inputting the orders to be processed into the card intermediate piece to acquire a plurality of order information.
Wherein each order information includes respective status information, order amount, and identity information. The order status refers to a status of an order to be processed, and may be, for example, a status of invalid, paid, received, settled, paid, shipped, refund, order audit, etc. The order amount refers to the amount of products or services related to the order to be processed, and the identity information refers to information capable of uniquely identifying the order. It will be appreciated that the same order is from creation to termination, where multiple order status changes are involved. The change of the order state does not affect the amount and the identity information of the order, and in general, orders with the same identity information and different state information are determined to be different orders, and finally the operation to be executed is determined according to the change of the order state with time. Therefore, in order to accurately count the amount of the order, the order needs to be ordered according to the identity information, and the counting mode is determined according to the final state of the order, and the ordering causes the consumption of computing resources and time.
The pending orders may be generated locally or may invoke a third party interface, synchronized locally from other electronic devices or clusters for subsequent processing, the number of pending orders acquired each time being unlimited. The card middleware is a high-performance message component which can buffer data. The card middleware may be provided with several partitions, each corresponding to a different consumer (process), running in parallel between each consumer. It should be noted that, in the present application, ordering of orders is not required, so that the orders to be processed with the same identity information can be randomly allocated to different partitions, and only can be allocated to a certain partition without being limited by the identity information, thereby improving the efficiency of order input. Specifically, the process of inputting the to-be-processed order into the kafu card middleware to obtain the plurality of order information may include:
step 11: and randomly inputting each order to be processed into each partition of the Kaff card middleware, and carrying out parallel processing on the order to be processed by using a consumption program corresponding to each partition to obtain order information.
The embodiment of the specific manner of obtaining the order information is not limited, for example, the consumption program may pull the order in the corresponding period according to the preset period, and extract the order information therein. For example, the preset period may be 20 seconds, that is, all or a certain number of orders are acquired from the corresponding partition every 20 seconds, and information therein is extracted. After order information is obtained, each consumption program can use the order information to continue to execute subsequent processing; alternatively, the consuming program may send the order information to a designated program (e.g., a designated LUA script, LUA being a compact scripting language) for performing subsequent processing operations with the order information.
The to-be-processed order can be processed as soon as possible by means of random input of the partitions, and order processing efficiency is improved. In addition, since the ordering is not performed, each partition and the corresponding consuming program (i.e., consumer) run in parallel, the number of partitions of the kaff card middleware is not limited, and can be arbitrarily adjusted as required. Thus, the following steps may also be included:
step 21: in response to the number setting instruction, the number of partitions in the card middleware is set to the target number.
The specific size of the target number is not limited, and is specified by the number setting instruction, and the target number may be 48 or 96, for example. The consumption programs and the partitions are in one-to-one correspondence, and the consumption programs and the partitions are the same in number.
S102: and determining the target operation corresponding to the order amount by using the state information.
The number of status information is large, however, it indicates two types of situations, namely, a situation in which an order is valid, a situation in which the corresponding order amount needs to be counted, and a situation in which the order is invalid, and a situation in which the corresponding order amount needs not to be counted. Based on the thought, the state information can be classified according to whether the state information indicates the effective angle of the order, and the target operation required to be executed on the amount of the order is determined according to the classification result. In practical applications, there may be situations where the status information cannot indicate whether the order is invalid, and, for example, when the order status is a payment-substituting status, if the subsequent user pays, the order is valid, and if the subsequent user does not pay, the order is invalid. Therefore, before the order amount is determined by using the state information, the order information corresponding to the state information which cannot indicate whether the order is valid or not can be deleted, so that the subsequent order state is changed and then processed.
Specifically, the process of determining the target operation corresponding to the order amount by using the state information specifically includes:
step 31: if the state information is the order valid state, determining the target operation as the adding operation.
Step 32: if the status information is an order invalid status, determining the target operation as a reduction operation.
The order valid state refers to a state indicating that an order is intentionally completed, and the order invalid state refers to a state determining that an order cannot be completed. Specifically, the order valid state may include a paid state, a received state, a settled state, a to-be-shipped state, a shipped state, and the order invalid state may include an invalid state, a refund state. When the status information is in order valid status, it is stated that if the order is normally developed, the order can be completed, and the corresponding order amount should be recorded, so that the target operation is determined as an increasing operation, that is, if no record is made, the corresponding order amount should be recorded. When the state is fine and smooth and is in an order invalid state, a jin of the state is stated to determine that the order cannot be completed, and the corresponding order amount is not recorded, so that the target operation is determined to be a reduction operation, namely if the record exists, the target operation is removed.
S103: and searching the data table by using the identity information to obtain a search result.
After the target operation corresponding to the order amount is obtained, whether the order amount corresponding to the order to be processed is recorded or not is judged, and the situation that the record error is caused by multiple records of the order amount of the same identity information is avoided. The data table is a statistical table for recording the amount of money, wherein the statistical table records the identity information of the order, and in addition, the amount of the order corresponding to each identity information independently or the total amount corresponding to all the identity information together can be recorded. Therefore, the data table is searched by using the identity information, and the obtained search result can indicate whether the order amount corresponding to the identity information is recorded or not.
In one embodiment, to increase the viewing and management efficiency of the data sheet, and to more efficiently manage the pending orders, the identity information may include at least two identity sub-information, with different identity sub-information corresponding to different identity description angles. In this case, searching the data table using the identity information, the process of obtaining the search result may include:
step 41: and judging whether target data items matched with all the identity sub-information exist in the data table.
Step 42: if so, determining the search result as a hit.
Step 43: if not, the search result is determined to be a miss.
Specifically, one identity sub-information can be sequentially selected to match the data table, and whether target data items matched with all the identity sub-information exist or not is judged in a multi-round matching screening mode. For example, in a live network scenario, a user may place an order for a commodity in a different live network, so that the generated order information may include two identity sub-information, namely, an order number and a live network number.
In addition, in another embodiment, the characteristic value, such as a hash value, may be generated in common by using the respective identity sub-information, and the data table may be searched by using the hash value. If the same hash value is searched, determining that the target data item matched with each identity sub-information exists. The target data item may in particular comprise only identity information or may also comprise the corresponding order amount.
S104: and if the search result and the state information are not matched, executing target operation on the data table according to the amount of the order.
The search results indicate the current recording of the order amount, i.e. it has been recorded or not, and the status information indicates the target recording of the order amount, i.e. it should be recorded or not. If the search result does not match the status information, i.e., should be recorded but not recorded, or should not be recorded but recorded, then the target operation needs to be performed on the data according to the order amount. The process of executing the target operation is the process of correcting the data table.
Specifically, this step can be specifically divided into two cases. First case:
step 51: if the search result is hit and the status information is the order invalid status, a mismatch is determined.
Step 52: the order amount is subtracted from the data table.
If the search result is hit, it indicates that the order amount has been recorded in the data table, and if the status information is an order invalid status, it indicates that the order amount should not be recorded in the data table. In this case, it may be determined that the two do not match, and a target operation, specifically a reduction operation, needs to be performed. The order amount is thus subtracted from the data table, in particular the order amount corresponding to the identity information may be deleted from the data table, or the order amount may be subtracted from the total amount of the data table.
In addition, there may be a second case:
step 61: if the search result is a miss and the status information is an order valid status, a mismatch is determined.
Step 62: the order amount is added to the data table.
If the search result is a miss, the order amount is not recorded in the data table, and if the state information is the order valid state, the order amount is recorded in the data table. In this case, it may be determined that the two do not match, and a target operation, specifically an add operation, needs to be performed. Therefore, the order amount is added to the data table, specifically, the order amount corresponding to the identity information may be newly added to the data table, or the order amount may be added to the total amount of the data table.
It should be noted that, in one embodiment, each customer or the program designated to perform the order processing may directly operate on the data table. In another embodiment, the customer or designated program may send the order amount, the target operation, etc. to the target program designated for the spreadsheet operation for processing. For example, an increase may be represented by a return value of 1 and a decrease may be represented by a return value of-1, after which a determination is made that the two do not match, the return value is determined based on the specifics of the target operation and the return value and the order amount are sent to the target program for the target program to perform the target operation on the data table.
It is to be understood that the present embodiment is not limited to the steps performed if the search result matches the state information, and may be, for example, not performed. For example, a return value of 0 may be used to indicate a match between the two, and the return value is sent to the target program, which will not perform any operations.
By applying the order processing method provided by the embodiment of the application, after the order is processed by using the card middleware, corresponding order information is obtained, wherein the corresponding order information further comprises state information, order amount and identity information. It will be appreciated that the status of an order may characterize the manner in which the order is subsequently processed, e.g., in the creation, payment, receipt, etc., of the order, the amount of the order corresponding to the order should be counted, as the user who generated the order in the above-described status pays the amount of the order. In the refund state, etc., the order amount corresponding to the order should not be wanted because the user will not pay the order amount. Based on the thought, the target operation corresponding to the order amount can be determined according to the state information, namely the order amount should be counted or not should be counted. After the target operation is determined, searching the data table by using the identity information, and judging whether a data item corresponding to the identity information exists or not, namely whether the order amount corresponding to the identity information is counted or not. If the search result and the status information satisfy the execution condition that is not in conformity with the status information, it is indicated that the data table has not been processed correctly for the order amount, that is, should be recorded but not recorded, or should not be recorded but recorded, so that the target operation, such as addition or deletion, is executed on the data table according to the order amount. According to the method, the state information is mapped into the target operation, and on the premise that the accuracy and the reliability of the data table are ensured, all orders of the same identity information are not required to be ordered and then processed, so that the ordering process is reduced, the consumption of computing resources is saved, and the order processing speed is improved.
The following describes an order processing device provided in an embodiment of the present application, and the order processing device described below and the order processing method described above may be referred to correspondingly.
Referring to fig. 2, fig. 2 is a schematic structural diagram of an order processing device according to an embodiment of the present application, including:
the processing module 110 is configured to obtain a plurality of orders to be processed, and input the orders to be processed into the kafu card middleware to obtain a plurality of order information; each order information comprises state information, order amount and identity information;
an operation determining module 120, configured to determine a target operation corresponding to the order amount by using the status information;
the searching module 130 is configured to search the data table by using the identity information to obtain a search result;
and the execution module 140 is used for executing the target operation on the data table according to the amount of the order if the search result and the state information are not matched.
Optionally, the processing module 110 includes:
the random input unit is used for randomly inputting each order to be processed into each partition of the Kaff card middleware, and carrying out parallel processing on the order to be processed by using a consumption program corresponding to each partition to obtain order information.
Optionally, the method further comprises:
and a number setting unit configured to set the number of partitions in the card middleware to a target number in response to the number setting instruction.
Optionally, the operation determining module 120 includes:
the adding determining unit is used for determining that the target operation is an adding operation if the state information is the order valid state;
and the reduction determining unit is used for determining that the target operation is a reduction operation if the state information is an order invalid state.
Optionally, the execution module 140 includes:
the first determining unit is used for determining mismatch if the search result is hit and the state information is an order invalid state;
and the first execution unit is used for subtracting the order amount from the data table.
Optionally, the execution module 140 includes:
the second determining unit is used for determining mismatch if the search result is not hit and the state information is the order valid state;
and the second execution unit is used for adding the order amount into the data table.
Optionally, the search module 130 includes:
the matching judging unit is used for judging whether a target data item matched with each identity sub-information exists in the data table or not;
a hit determination unit for determining that the search result is hit if present;
and the miss determining unit is used for determining that the search result is a miss if the search result does not exist.
The electronic device provided in the embodiments of the present application is described below, and the electronic device described below and the order processing method described above may be referred to correspondingly.
Referring to fig. 3, fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application. Wherein the electronic device 100 may include a processor 101 and a memory 102, and may further include one or more of a multimedia component 103, an information input/information output (I/O) interface 104, and a communication component 105.
Wherein the processor 101 is configured to control the overall operation of the electronic device 100 to perform all or part of the steps in the order processing method described above; the memory 102 is used to store various types of data to support operation at the electronic device 100, which may include, for example, instructions for any application or method operating on the electronic device 100, as well as application-related data. The Memory 102 may be implemented by any type or combination of volatile or non-volatile Memory devices, such as one or more of static random access Memory (Static Random Access Memory, SRAM), electrically erasable programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), erasable programmable Read-Only Memory (Erasable Programmable Read-Only Memory, EPROM), programmable Read-Only Memory (Programmable Read-Only Memory, PROM), read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk, or optical disk.
The multimedia component 103 may include a screen and an audio component. Wherein the screen may be, for example, a touch screen, the audio component being for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in the memory 102 or transmitted through the communication component 105. The audio assembly further comprises at least one speaker for outputting audio signals. The I/O interface 104 provides an interface between the processor 101 and other interface modules, which may be a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 105 is used for wired or wireless communication between the electronic device 100 and other devices. Wireless communication, such as Wi-Fi, bluetooth, near field communication (Near Field Communication, NFC for short), 2G, 3G or 4G, or a combination of one or more thereof, the respective communication component 105 may thus comprise: wi-Fi part, bluetooth part, NFC part.
The electronic device 100 may be implemented by one or more application specific integrated circuits (Application Specific Integrated Circuit, abbreviated as ASIC), digital signal processors (Digital Signal Processor, abbreviated as DSP), digital signal processing devices (Digital Signal Processing Device, abbreviated as DSPD), programmable logic devices (Programmable Logic Device, abbreviated as PLD), field programmable gate arrays (Field Programmable Gate Array, abbreviated as FPGA), controllers, microcontrollers, microprocessors, or other electronic components for performing the order-processing methods set forth in the above embodiments.
The following describes a computer readable storage medium provided in an embodiment of the present application, where the computer readable storage medium described below and the order processing method described above may be referred to correspondingly.
The present application also provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the order processing method described above.
The computer readable storage medium may include: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Those skilled in the art may implement the described functionality using different approaches for each particular application, but such implementation should not be considered to be beyond the scope of this application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it is further noted that, in this document, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms include, comprise, or any other variation is intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
The principles and embodiments of the present application are described herein with specific examples, the above examples being provided only to assist in understanding the methods of the present application and their core ideas; meanwhile, as those skilled in the art will have modifications in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (7)

1. An order processing method, comprising:
acquiring a plurality of orders to be processed, and inputting the orders to be processed into a Kaff card middleware to acquire a plurality of order information; each order information comprises state information, order amount and identity information;
determining a target operation corresponding to the order amount by utilizing the state information;
searching a data table by using the identity information to obtain a search result;
if the search result is not matched with the state information, executing the target operation on the data table according to the amount of the order;
the determining, by using the state information, a target operation corresponding to the order amount includes:
if the state information is the order valid state, determining that the target operation is an increasing operation;
if the state information is an order invalid state, determining that the target operation is a reduction operation;
if the search result and the state information are not matched, executing the target operation on the data table according to the order amount, wherein the target operation comprises the following steps:
if the search result is hit and the state information is an order invalid state, determining mismatch;
subtracting the order amount from the data table;
if the search result and the state information are not matched, executing the target operation on the data table according to the order amount, wherein the target operation comprises the following steps:
if the search result is not hit and the state information is the order valid state, determining that the search result is not hit;
and adding the order amount into the data table.
2. The order processing method according to claim 1, wherein the inputting the pending order into the kaff card middleware to obtain a plurality of order information includes:
and randomly inputting each order to be processed into each partition of the Kaff card middleware, and carrying out parallel processing on the order to be processed by using a consumption program corresponding to each partition to obtain the order information.
3. The order processing method of claim 2, further comprising:
in response to a quantity setting instruction, the number of partitions in the card middleware is set to a target number.
4. The order processing method according to claim 1, wherein the identity information includes at least two identity sub-information, and the searching the data table by using the identity information to obtain a search result includes:
judging whether target data items matched with all the identity sub-information exist in the data table or not;
if yes, determining the search result as hit;
if not, determining that the search result is a miss.
5. An order processing apparatus, comprising:
the processing module is used for acquiring a plurality of orders to be processed, inputting the orders to be processed into the card middleware, and acquiring a plurality of order information; each order information comprises state information, order amount and identity information;
the operation determining module is used for determining target operation corresponding to the order amount by utilizing the state information;
the searching module is used for searching the data table by utilizing the identity information to obtain a searching result;
the execution module is used for executing the target operation on the data table according to the order amount if the search result is not matched with the state information;
wherein, the operation determining module includes:
the adding determining unit is used for determining that the target operation is an adding operation if the state information is the order valid state;
a reduction determining unit configured to determine that the target operation is a reduction operation if the status information is an order invalid status;
wherein, the execution module includes:
the first determining unit is used for determining mismatch if the search result is hit and the state information is an order invalid state;
a first execution unit for subtracting the order amount from the data table;
wherein, the execution module includes:
the second determining unit is used for determining mismatch if the search result is not hit and the state information is the order valid state;
and the second execution unit is used for adding the order amount into the data table.
6. An electronic device comprising a memory and a processor, wherein:
the memory is used for storing a computer program;
the processor being adapted to execute the computer program to implement an order processing method as claimed in any one of claims 1 to 4.
7. A computer-readable storage medium for storing a computer program, wherein the computer program when executed by a processor implements the order processing method of any of claims 1 to 4.
CN202111114174.7A 2021-09-23 2021-09-23 Order processing method and device, electronic equipment and readable storage medium Active CN113807923B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111114174.7A CN113807923B (en) 2021-09-23 2021-09-23 Order processing method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111114174.7A CN113807923B (en) 2021-09-23 2021-09-23 Order processing method and device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN113807923A CN113807923A (en) 2021-12-17
CN113807923B true CN113807923B (en) 2024-02-09

Family

ID=78940163

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111114174.7A Active CN113807923B (en) 2021-09-23 2021-09-23 Order processing method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN113807923B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103593723A (en) * 2012-08-14 2014-02-19 江南大学 Liquor storage management system based on RFID
CN106779920A (en) * 2016-11-30 2017-05-31 刘海军 A kind of order method of payment and system
CN106845881A (en) * 2015-12-04 2017-06-13 阿里巴巴集团控股有限公司 A kind of detection method of stock abnormal data, device and electronic equipment
CN109558408A (en) * 2018-11-27 2019-04-02 北京微播视界科技有限公司 Update method, apparatus, electronic equipment and the readable storage medium storing program for executing of list
CN110309206A (en) * 2019-07-10 2019-10-08 中国联合网络通信集团有限公司 Order information acquisition method and system
CN110706069A (en) * 2019-09-25 2020-01-17 口碑(上海)信息技术有限公司 Exception handling method, device, server and system for order payment request
CN111162995A (en) * 2019-12-26 2020-05-15 苏州浪潮智能科技有限公司 Data change notification method, device, equipment and readable storage medium
CN111242751A (en) * 2020-03-11 2020-06-05 上海东普信息科技有限公司 Express order updating method, device, equipment and storage medium
CN111738728A (en) * 2020-05-15 2020-10-02 苏宁金融科技(南京)有限公司 Transaction compensation method and device
CN112200629A (en) * 2020-10-12 2021-01-08 绿瘦健康产业集团有限公司 Refund payment processing method, device, medium and terminal equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8315940B2 (en) * 2010-04-27 2012-11-20 Omx Technology Ab System and method for rapidly calculating risk in an electronic trading exchange

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103593723A (en) * 2012-08-14 2014-02-19 江南大学 Liquor storage management system based on RFID
CN106845881A (en) * 2015-12-04 2017-06-13 阿里巴巴集团控股有限公司 A kind of detection method of stock abnormal data, device and electronic equipment
CN106779920A (en) * 2016-11-30 2017-05-31 刘海军 A kind of order method of payment and system
CN109558408A (en) * 2018-11-27 2019-04-02 北京微播视界科技有限公司 Update method, apparatus, electronic equipment and the readable storage medium storing program for executing of list
CN110309206A (en) * 2019-07-10 2019-10-08 中国联合网络通信集团有限公司 Order information acquisition method and system
CN110706069A (en) * 2019-09-25 2020-01-17 口碑(上海)信息技术有限公司 Exception handling method, device, server and system for order payment request
CN111162995A (en) * 2019-12-26 2020-05-15 苏州浪潮智能科技有限公司 Data change notification method, device, equipment and readable storage medium
CN111242751A (en) * 2020-03-11 2020-06-05 上海东普信息科技有限公司 Express order updating method, device, equipment and storage medium
CN111738728A (en) * 2020-05-15 2020-10-02 苏宁金融科技(南京)有限公司 Transaction compensation method and device
CN112200629A (en) * 2020-10-12 2021-01-08 绿瘦健康产业集团有限公司 Refund payment processing method, device, medium and terminal equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
网上零售免费送货的订单金额设定及实证分析;田俊峰;田劲松;;供应链管理(第07期);全文 *

Also Published As

Publication number Publication date
CN113807923A (en) 2021-12-17

Similar Documents

Publication Publication Date Title
CN111177214B (en) Event linkage processing method, device and system, electronic equipment and storage medium
CN110060139B (en) Accounting processing method and device
CN110866008B (en) Data processing method, device and system
CN113094434A (en) Database synchronization method, system, device, electronic equipment and medium
CN114356921A (en) Data processing method, device, server and storage medium
CN111611249A (en) Data management method, device, equipment and storage medium
CN112925664A (en) Target user determination method and device, electronic equipment and storage medium
CN110389989B (en) Data processing method, device and equipment
CN112966756A (en) Visual access rule generation method and device, machine readable medium and equipment
CN113807923B (en) Order processing method and device, electronic equipment and readable storage medium
CN116842106A (en) Resource clue generation method and device
CN113590604B (en) Service data processing method, device and server
US10956369B1 (en) Data aggregations in a distributed environment
CN113256355B (en) Method, device, medium, equipment and system for determining integral rights and interests in real time
CN114048136A (en) Test type determination method, device, server, medium and product
CN113901046A (en) Virtual dimension table construction method and device
CN114297211A (en) Data online analysis system, method, equipment and storage medium
CN113760178A (en) Cache data processing method and device, electronic equipment and computer readable medium
CN112988812A (en) Inventory data processing method, device, equipment and storage medium
CN113778976A (en) Data processing method and device, electronic equipment and storage medium
CN111045983A (en) Nuclear power station electronic file management method and device, terminal equipment and medium
CN113127436B (en) Data synchronization method, device, server and storage medium
CN115658749B (en) Fund product ordering method and device based on directed acyclic graph and electronic equipment
CN109447386B (en) Work assessment method and terminal equipment
CN110019352B (en) Method and apparatus for storing data

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
GR01 Patent grant
GR01 Patent grant