CN111652691A - Order information processing method and device and electronic equipment - Google Patents

Order information processing method and device and electronic equipment Download PDF

Info

Publication number
CN111652691A
CN111652691A CN202010520474.4A CN202010520474A CN111652691A CN 111652691 A CN111652691 A CN 111652691A CN 202010520474 A CN202010520474 A CN 202010520474A CN 111652691 A CN111652691 A CN 111652691A
Authority
CN
China
Prior art keywords
order information
message queue
preset
processing
preset message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010520474.4A
Other languages
Chinese (zh)
Inventor
丁杰
崔卫兵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010520474.4A priority Critical patent/CN111652691A/en
Publication of CN111652691A publication Critical patent/CN111652691A/en
Pending legal-status Critical Current

Links

Images

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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Finance (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • General Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the disclosure discloses an order information processing method and device and electronic equipment. The method comprises the following steps: receiving new order information; storing the new order information into the tail of a preset message queue, wherein at least one unprocessed order information is stored in the preset message queue; and in response to receiving first feedback information which is sent by an order information processor and used for indicating to continue processing the order information, extracting target order information from the head of the preset message queue and sending the target order information to the order information processor for processing. The decoupling of order information receiving and processing is realized; the order processing real-time performance is ensured on the premise of decoupling, the response speed is increased, and the user experience is improved.

Description

Order information processing method and device and electronic equipment
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to an order information processing method and apparatus, and an electronic device.
Background
A message can be seen as a record having a particular format and a particular priority. A process having write permission on a message queue can add a new message to the message queue according to a certain rule; a process that has read permission for a message queue may read a message from the message queue.
Here, a message queue can be considered as a container for holding messages during their transmission, and the main purpose of the message queue is to provide routing and guarantee delivery of the messages. When sending a message, if the recipient of the message cannot receive it normally, the message queue may hold the message until it can be successfully delivered.
Disclosure of Invention
This disclosure is provided to introduce concepts in a simplified form that are further described below in the detailed description. This disclosure is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
The embodiment of the disclosure provides an order information processing method and device and electronic equipment.
In a first aspect, an embodiment of the present disclosure provides an order information processing method, where the method includes: receiving new order information; storing the new order information into the tail of a preset message queue, wherein at least one unprocessed order information is stored in the preset message queue; and in response to receiving first feedback information which is sent by an order information processor and used for indicating to continue processing the order information, extracting target order information from the head of the preset message queue and sending the target order information to the order information processor for processing.
In a second aspect, an embodiment of the present disclosure provides an order information processing apparatus, including: the receiving module is used for receiving new order information; the storage module is used for storing the new order information into the tail of a preset message queue, and at least one unprocessed order information is stored in the preset message queue; and the extracting module is used for extracting the target order information from the head of the preset message queue and sending the target order information to the order information processing party for processing in response to receiving first feedback information which is sent by the order information processing party and used for indicating to continue processing the order information.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: one or more processors; a storage device having one or more programs stored thereon, which when executed by the one or more processors, cause the one or more processors to implement the order information processing method of the first aspect.
In a fourth aspect, the disclosed embodiments provide a computer readable medium, on which a computer program is stored, which when executed by a processor, implements the steps of the order information processing method according to the first aspect.
According to the order information processing method, the order information processing device and the electronic equipment, new order information is received firstly; then storing the new order information into the tail of a preset message queue, wherein at least one unprocessed order information is stored in the preset message queue; and finally, in response to receiving first feedback information which is sent by the order information processor and used for indicating to continue processing the order information, extracting target order information from the head of the preset message queue and sending the target order information to the order information processor for processing. The decoupling of order information receiving and processing is realized; the order processing real-time performance is ensured on the premise of decoupling, the response speed is increased, and the user experience is improved.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
FIG. 1 is a flow diagram for one embodiment of an order information processing method according to the present disclosure;
FIG. 2 is a schematic block diagram illustrating one embodiment of an order information processing apparatus according to the present disclosure;
FIG. 3 is an exemplary system architecture to which the order information processing method of one embodiment of the present disclosure may be applied;
fig. 4 is a schematic diagram of a basic structure of an electronic device provided according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be combined with each other without conflict.
Referring to fig. 1, which shows a flowchart of an embodiment of an order information processing method according to the present disclosure, as shown in fig. 1, the order information processing method includes the following steps 101 to 103.
Step 101, receiving new order information.
The new order information may include new order information that is received again after the last order information is received. The order information may be information requesting a telephone charge, information requesting a purchase of an article, or the like, for example.
And 102, storing the new order information into the tail of a preset message queue, wherein at least one unprocessed order information is stored in the preset message queue.
The preset message queue can be visualized as a container capable of storing a plurality of order information. After receiving the order information submitted by the user, the order information can be temporarily stored in the container.
Here, when the new order information is stored in the preset message queue, the new order information may be stored in the tail of the preset message queue. In this way, the order information in the preset message queue can be arranged according to the storage sequence. When order information is extracted from the head of the preset message queue, first-in first-out can be realized according to the storage sequence, and the condition that the received order information is processed preferentially is avoided.
And 103, in response to receiving first feedback information which is sent by the order information processor and used for indicating to continue processing the order information, extracting target order information from the head of the preset message queue and sending the target order information to the order information processor for processing.
The order information processing party may be a worker or an apparatus or system for performing order information processing. When the order information processing party is an operator, the operator may send the first feedback information; when the order information processing party is a device or a system for performing order information processing, the device or the system may send the first feedback information.
The first feedback information may include a message that is sent by the order information processing party when the working state is normal and requests to continue sending the next order information. For example, when the order information is the request telephone charge recharging information, the telephone charge recharging provider (the order information processing party) may send first feedback information of "please continue to send the next recharging order information" to the telephone charge recharging system, and the telephone charge recharging system may receive and respond to the first feedback information, fetch the next order information from the head of the preset message queue, and send the next order information to the telephone charge recharging provider for processing.
The preset message queue may correspond to a message sending end and a message consuming end. After receiving the new order information, the new order information may be cached in a preset message queue through the message sending terminal, and the message consuming terminal may extract the target order information therefrom and send the target order information to the corresponding order information processing party. For example, when the received order information sent by the user is a telephone charge recharging order, the telephone charge recharging order can be cached in the tail of the preset message queue. The corresponding message consuming terminal can extract the target order information at the head of the preset message queue from the preset message queue. The message consumer can send the extracted target order information to the corresponding telephone charge recharging provider to request the telephone charge recharging provider to process the telephone charge recharging order.
When the message queue is not used, the order information of the user can be directly cached into the corresponding database. In high concurrency (excessive amount of user order information), the database pressure increases dramatically, slowing down the response to user orders.
In the embodiment, new order information is received firstly; then storing the new order information into the tail of a preset message queue, wherein at least one unprocessed order information is stored in the preset message queue; and finally, in response to receiving first feedback information which is sent by the order information processor and used for indicating to continue processing the order information, extracting target order information from the head of the preset message queue and sending the target order information to the order information processor for processing. The decoupling of order information receiving and processing is realized; the order processing real-time performance is ensured on the premise of decoupling, the response speed is increased, and the user experience is improved.
In some optional implementations, before storing the new order information into the tail of the preset message queue in step 102, the order information processing method may include: and detecting the working state of the preset message queue at the current moment, and determining whether to continue to cache new order information in the preset message queue according to the detection result.
In some application scenarios, a situation that new order information cannot be normally cached due to abnormal working state of a preset message queue may exist. Therefore, the working state of the preset message queue at the current moment can be detected to determine whether to continue to cache new order information into the preset message queue.
The working state of the preset message queue at the current moment can comprise a normal working state and an abnormal working state. Whether to cache new order information into the preset message queue can be determined by detecting whether the preset message queue works normally at the current moment. That is, when the preset message queue is detected to be in a normal working state, it can be determined that new order information continues to be cached in the preset message queue; when the preset message queue is detected to be in an abnormal working state, the new order information is determined not to be cached in the preset message queue.
In some application scenarios, a first switch for controlling the buffering of the order information into the preset message queue may be provided. When the preset message queue is detected to be in an abnormal working state, the first switch can be used for controlling the order information not to be input into the preset message queue any more. When the preset message queue is detected to be in a normal working state, the order information can be continuously input into the preset message queue through the control of the first switch. The first switch here may be implemented by program code.
Thus, the step 102 may include: and responding to the fact that the new order information is determined to be continuously cached in the preset message queue according to the detection result, and storing the new order information into the tail of the preset message queue.
That is, when the detection result of the preset message queue is in a normal working state, new order information can be continuously stored in the tail of the preset message queue.
In some optional implementations, the order information processing method may further include: and stopping caching the new order information in the preset message queue in response to determining that the new order information is not cached in the preset message queue any more according to the detection result.
In some application scenarios, if the working state of the preset message queue is detected to be abnormal at the current moment, the caching of new order information in the preset message queue can be stopped. For example, when a detection result is detected that a preset message queue at the current time has a condition that messages cannot be sorted according to an existing rule and a corresponding order information processor cannot be found, or a condition that a preset message queue cannot be cached due to abnormality of cached order information, and the like, the preset message queue may be regarded as an abnormal work, and then it is determined that new order information is not to be cached in the preset message queue any more. At this time, the buffering of the new order information in the preset message queue may be stopped, and then the buffering operation is continued after the preset message queue recovers to a normal working state, so as to reduce the buffering pressure of the preset message queue.
In some optional implementations, the order information processing method may further include: suspending sending of new order information to the order information handler in response to detecting: and receiving second feedback information which is sent by the order information processor and used for indicating that the order information is suspended from processing, wherein the time interval between the current time and the last time of receiving the first feedback information sent by the order information processor is greater than the first preset time duration.
Whether to continue sending new order information to the order information processing party can be determined by detecting the working state of the order information processing party. In some application scenarios, the order information processor may send second feedback information indicating that the processing of the order information is suspended, so as to ensure a normal work progress of the order information processor. The second feedback information may include, for example, a representation that "there is currently a need to process other things, please suspend sending new order information"; or may include information indicating that "there is a failure in the current system, the new order information cannot be processed normally, and the sending of the new order information is suspended" and the like.
In other application scenarios, the order information processor may have network abnormality, and then cannot receive order information; for example, the order information processor cannot receive the order information due to network delay, and at this time, the order information processor may not know that the order information comes, and thus does not realize to send the second feedback information. Therefore, whether the time interval between the current time and the last time of receiving the first feedback information sent by the order information processor is greater than the first preset time duration can be detected to determine whether the order information processor works abnormally. The first preset time period here may be, for example, 5 minutes, 10 minutes, or the like. That is, if it is detected that the time interval between the current time and the time when the first feedback information is received last time is greater than 5 minutes, it may be determined that the order information processor is in an abnormal operating state, and then, the transmission of new order information to the order information processor may be suspended.
In some application scenarios, a second switch for controlling the sending of the order information to the order processor may be provided. When the event is detected, the second switch can control the order processing party not to send order information continuously. When the event is not detected, the order information can be continuously transmitted to the order information processor through the second switch control. The second switch here may be implemented by program code.
In some application scenarios, the first switch and the second switch may be simultaneously disposed at two ends of the preset message queue. Namely, the first switch is arranged at the message sending end of the preset message queue, and the second switch is arranged at the message consuming end of the preset message queue. For example, when it is determined that the new order information continues to be cached in the preset message queue, both the first switch and the second switch may be set to be in an on state, so as to ensure the relay transmission of the order information. When it is determined that a fault in the preset message queue occurs due to the fact that the order information cached in the preset message queue is faulty and the detection result of continuously caching the order information is not influenced, new order information may not be cached in the preset message queue, and then the first switch may be temporarily set to the on state (in the switch on state, the order information may be transmitted, in the switch off state, the order information may not be transmitted on and off), and the second switch may be set to the off state, so that the order information with the fault is not sent to the corresponding order information processing party. When it is determined that a fault that the order information cannot be continuously cached in the preset message queue, such as overflow of the order information in the preset message queue, but the detection result of the order information can be continuously consumed, the new order information may not be cached in the preset message queue, and then the second switch may be turned on, the first switch may be turned off, and the order information is not sent to the preset message queue. When the fault is eliminated, the closed switch can be opened again to continue transmitting order information.
In practice, if the order information is continuously transmitted to the order information processor when the above event is detected, a large number of situations may occur in which the order information reception fails. It also puts a great deal of stack pressure on the order information processor's system. Therefore, the order information can be temporarily stored in the preset message queue, so that the processing pressure of an order information processor is relieved, and the order pressing function is realized.
The operation of whether to continuously send the order information is determined by respectively detecting the working states of the order information processor and the preset message queue, so that the bidirectional protection of the self system and the order information processor can be realized, and the stable processing of the order information is realized.
In some optional implementations, after receiving new order information (i.e., step 101 above), the order information processing method may further include: storing the new order information into a preset database; the preset database stores a plurality of pieces of order information and state attribute information of each piece of order information, wherein the state attribute information comprises an unsent state and a sent state.
After receiving the new order information, a copy of the new order information may be stored in the predetermined database. When the new order information is stored in the preset database, the preset database can store the order information and set the state attribute information corresponding to the new order information as a non-sending state. After the order information processor successfully receives the new order information, the state attribute information of the new order information may be set to the sent state. For example, a user submits a sneaker purchase order to a shopping application, the shopping application may store the sneaker purchase order in a preset shopping message queue and a shopping database corresponding to the shopping application, respectively, and the shopping database may set status attribute information corresponding to the sneaker purchase order to a non-sent status. After the footwear supplier successfully receives the footwear purchase order, the shopping database may set the status attribute information for the footwear purchase order to a sent status. The preset database may be, for example, a database that is set in advance and is dedicated to storing order information.
In some optional implementations, the order information processing method may further include: and in response to receiving feedback information that the order information fed back by the order information processor is successfully received, modifying the state attribute information of the order information in the preset database from a non-sent state to a sent state.
After the order information processor successfully receives the order information, it may send feedback information that the order information was successfully received. After the preset database receives the information that the order information is successfully received, the state attribute information of the order information can be changed from a non-sent state to a sent state.
For example, when the message consumer extracts the sneaker purchase order from the preset message queue and sends the sneaker purchase order to the corresponding merchant processing system, the merchant processing system may send feedback information to the shopping application after successfully receiving the sneaker purchase order, and then the shopping application modifies the state attribute information of the sneaker purchase order in the shopping database from an unsent state to a sent state. In some applications, the shopping database may not modify the status attribute information of the shoe purchase order if the merchant processing system temporarily fails to process the shoe purchase order resulting in a failure to send the shoe purchase order. That is, the status attribute information of the sneaker purchase order remains in the unsent status.
After each order information is sent, feedback information that the order information has been successfully received by the order information processing party can be sent to a preset database. The order information in the preset database may present the corresponding status attribute information. That is, the order information successfully received by the order information processor may present the sent state; order information that is not successfully received by the order information handler may be presented in an unsent state.
In some optional implementations, the order information processing method may further include the following steps 1 and 2.
Step 1, executing detection operation for state attribute information of each order information stored in a preset database once every preset time interval.
And 2, for each detection operation, transmitting the order information which is received before the time corresponding to the detection operation and has the status attribute information of the unsent status to an order information processor for processing.
When the order information is processed by using the preset message queue, the order information may be lost. For example, the message sending end does not put the order information into the preset message queue in time, which may cause the situation that the order cannot be processed in time and is lost; presetting the condition that the order cannot be processed in time and is lost due to the fact that the message sent from the message sending end cannot be cached in time in the caching process of the message queue; or, the message consumer side sends the order information extracted from the preset message queue abnormally, so that the order cannot be processed in time and is lost.
In order to solve the problem of the loss of the order information, the step 1 and the step 2 can be introduced as a compensation mechanism. Therefore, when the preset message queue is abnormal, the order information with the state attribute information in the unsent state can be found out in time through the detection operation and processed in time.
The preset time interval may be, for example, 10 minutes, 20 minutes, or the like. That is, if it is determined that the duration between the current time and the previous detection time of the preset database is 10 minutes, the preset database may be detected again, and then, it may be determined that the order information that is not successfully received by the order information processor (that is, the above-mentioned lost order information). It should be noted that the preset time interval can be reset according to the number of order information which fails to be transmitted in practice. For example, the preset time interval may be set to 10 minutes, and if the preset database is checked every 10 minutes, the number of order information in the unsent state is found to be small. The preset time interval may be suitably extended to 20 minutes. In this way, the frequency of detection of the preset database can be reduced, and the pressure on the preset database can be reduced.
For example, after a shirt purchase order is received, it may be stored in a preset message queue and a preset database, respectively. If the merchant processing system does not successfully receive a shirt purchase order from the predetermined message queue, the status attribute information for the shirt purchase order in the predetermined database may not be modified. That is, the shirt purchase order remains unsent. Therefore, the order information which is the same as the shirt purchase order condition can be detected at preset time intervals, the order information which is not successfully received by the order information processor is detected, and the order information is sent to the corresponding order information processor in time.
After order information is processed by introducing a preset message queue, most of the order information is extracted by a message consumption end and sent. A small amount of order information may possibly cause the state attribute information to be in an unsent state due to an abnormal condition, and after the compensation mechanism is introduced, unsent order information can be detected once every preset time interval. The detection frequency is reduced, the system pressure can be effectively reduced, simultaneously, due to the fact that order messages are lost, the number of orders which are not processed in time is small, the processing speed can be increased, and the condition that the order processing is overtime is effectively avoided.
After the order information in the unsent state is detected, the order information can be directly sent to a corresponding order information processor for processing. It should be noted that: the detected order information in the unsent state can be sent to a corresponding order information processor for processing in an active sending mode; step 103 may actively extract the corresponding order information from the preset message queue through the message consuming side and send the corresponding order information to the corresponding order information processing party for processing. That is, the order information can be cooperatively processed through the preset message queue and the compensation mechanism, so that the problem of loss of the order information can be effectively avoided, and the robustness of order information processing is enhanced.
In some application scenarios, if the working state of the preset message queue is detected to be abnormal at the current time, a preset number of order information may be extracted from the preset database at regular time intervals from the current time, and the order information may be sent to the corresponding order information processing party for processing.
That is to say, two processing tasks may exist at the current time, one of which is a first processing task corresponding to the detection operation of the preset database, and the other of which is a second processing task corresponding to the processing of extracting a preset amount of order information from the preset database when the working state of the preset message queue is abnormal. The two work cooperatively and supplement each other, and the order information can be processed as soon as possible.
The predetermined time interval here may be, for example, 1 minute, 2 minutes, or the like. In some optional implementations, the certain time interval is less than a time period between two adjacent times of performing the detection operation by the preset database. That is, when the interval time period for executing two adjacent first processing tasks is 10 minutes, the interval time period for two adjacent second processing tasks may be 1 minute.
When the preset message queue is in an abnormal working state, if the order information is sent from the preset database for processing only by means of the first processing task with longer time, a large amount of order information can be accumulated in the preset database, and higher order pressing pressure is caused to the preset database. At this time, the processing may be performed by a conventional manner. The conventional method may be to extract order information from a preset database during the order information processing process, and send the extracted order information to the corresponding order information processor. Here, when the preset message queue is in an abnormal working state, a preset number of order information may be extracted for processing, where the preset number may be, for example, 1, 2, and the like.
In the time period when the preset message queue is detected to be in the abnormal working state, the order information synchronously stored in the preset database can be used for determining which order information should be processed in the preset message queue at the current moment, and then the order information is determined to be the order information when the preset message queue works abnormally. Extracting the preset number of order information may be to provide that 1 order information is extracted when the above-mentioned preset time interval (for example, 1 minute interval duration in the above-mentioned second processing task) arrives, and then the next 1 order information is extracted when the next preset time interval arrives.
When the amount of the order information is large and the preset message queue is in an abnormal state at the moment, some orders can be processed by using the traditional mode, and the pressure of the preset database is relieved.
It should be noted that the first processing task may exist in real time in the whole order information processing process, and the second processing task may perform auxiliary processing on the order information only when the preset message queue is in an abnormal state. The first processing task works when the preset message queue is in a normal state, and order information which is not successfully sent is less, so that the first processing task can temporarily stop working when the first processing task is abnormal; and when the abnormality of the first detection processing task is eliminated, the operation can be restarted.
Referring to fig. 2, which shows a schematic structural diagram of an embodiment of an order information processing apparatus according to the present disclosure, as shown in fig. 2, the order information processing apparatus includes a receiving module 201, a storing module 202, and an extracting module 203. The receiving module 201 is configured to receive new order information; the storage module 202 is configured to store the new order information into a tail of a preset message queue, where at least one unprocessed order information is stored in the preset message queue; and the extracting module 203 is configured to, in response to receiving first feedback information which is sent by the order information processor and used for instructing to continue processing the order information, extract the target order information from the head of the preset message queue and send the target order information to the order information processor for processing.
It should be noted that specific processing of the receiving module 201, the storing module 202, and the extracting module 203 of the order information processing apparatus and technical effects thereof can refer to the related descriptions of step 101 to step 103 in the corresponding embodiment of fig. 1, which are not repeated herein.
In some optional implementations of this embodiment, the order information processing apparatus further includes a first detection module. The first detection module is used for detecting the working state of the preset message queue at the current moment before the new order information is stored in the tail of the preset message queue, and determining whether to continue to cache the new order information in the preset message queue according to the detection result. And the storage module 202 is further configured to, in response to determining that the new order information continues to be cached in the preset message queue according to the detection result, store the new order information in the tail of the preset message queue.
In some optional implementation manners of this embodiment, the order information processing apparatus may further include a stopping module, where the stopping module is configured to stop buffering the new order information in the preset message queue in response to determining that the new order information is no longer continuously buffered in the preset message queue according to the detection result.
In some optional implementations of this embodiment, the order information processing apparatus may further include a suspending module, where the suspending module is configured to suspend sending of new order information to the order information processor in response to detecting the following event: and receiving second feedback information which is sent by the order information processor and used for indicating that the order information is suspended from processing, wherein the time interval between the current time and the last time of receiving the first feedback information sent by the order information processor is greater than the first preset time duration.
In some optional implementation manners of this embodiment, the order information processing apparatus may further include a storage module, where the storage module is configured to store the new order information into a preset database after receiving the new order information; the preset database stores a plurality of pieces of order information and state attribute information of each piece of order information, wherein the state attribute information comprises an unsent state and a sent state.
In some optional implementation manners of this embodiment, the order information processing apparatus may further include a modification module, where the modification module is configured to modify the state attribute information of the order information in the preset database from a non-sent state to a sent state in response to receiving feedback information that the order information fed back by the order information processor is successfully received.
In some optional implementation manners of this embodiment, the order information processing apparatus may further include a second detection module, where the second detection module is configured to perform, at preset time intervals, a detection operation for detecting state attribute information of each order information stored in a preset database; and for each detection operation, transmitting the order information which is received before the time corresponding to the detection operation and has the status attribute information of the unsent status to an order information processor for processing.
Referring to fig. 3, an exemplary system architecture to which the order information processing method of one embodiment of the present disclosure may be applied is shown.
As shown in fig. 3, the system architecture may include terminal devices 301, 302, 303, a network 304, and a server 305. The network 304 serves as a medium for providing communication links between the terminal devices 301, 302, 303 and the server 305. Network 304 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few. The terminal devices and servers described above may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., Ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The terminal devices 301, 302, 303 may interact with a server 305 over a network 304 to receive or send messages or the like. The terminal devices 301, 302, 303 may have various client applications installed thereon, such as a video distribution application, a search-type application, and a news-information-type application.
The terminal devices 301, 302, 303 may be hardware or software. When the terminal devices 301, 302, 303 are hardware, they may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, mpeg compression standard Audio Layer 3), MP4 players (Moving Picture Experts Group Audio Layer IV, mpeg compression standard Audio Layer 4), laptop portable computers, desktop computers, and the like. When the terminal device 301, 302, 303 is software, it can be installed in the electronic devices listed above. It may be implemented as multiple pieces of software or software modules (e.g., software or software modules used to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
The server 305 may be a server that can provide various services, for example, receives an order information processing request transmitted by the terminal devices 301, 302, 303, analyzes the order information processing request, and transmits an analysis processing result (for example, feedback information corresponding to the order information processing request) to the terminal devices 301, 302, 303.
It should be noted that the order information processing method provided by the embodiment of the present disclosure may be executed by a server, and accordingly, the order information processing apparatus may be provided in the server.
It should be understood that the number of terminal devices, networks, and servers in fig. 3 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 4, shown is a schematic diagram of an electronic device (e.g., the server of FIG. 3) suitable for use in implementing embodiments of the present disclosure. The electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 4, the electronic device may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 401 that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)402 or a program loaded from a storage means 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for the operation of the electronic apparatus are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
Generally, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 408 including, for example, tape, hard disk, etc.; and a communication device 409. The communication means 409 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. While fig. 4 illustrates an electronic device having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 409, or from the storage device 408, or from the ROM 402. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing device 401.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving new order information; storing the new order information into the tail of a preset message queue, wherein at least one unprocessed order information is stored in the preset message queue; and in response to receiving first feedback information which is sent by the order information processor and used for indicating to continue processing the order information, extracting target order information from the head of the preset message queue and sending the target order information to the order information processor for processing.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a module does not in some cases constitute a limitation on the unit itself, for example, a receiving module may also be described as a "module that receives new order information".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (10)

1. An order information processing method is characterized by comprising the following steps:
receiving new order information;
storing the new order information into the tail of a preset message queue, wherein at least one unprocessed order information is stored in the preset message queue;
and in response to receiving first feedback information which is sent by an order information processor and used for indicating to continue processing the order information, extracting target order information from the head of the preset message queue and sending the target order information to the order information processor for processing.
2. The method of claim 1, wherein before said storing said new order information at the end of a predetermined message queue, said method comprises:
detecting the working state of the preset message queue at the current moment, and determining whether to continue to cache the new order information in the preset message queue according to the detection result; and
the storing the new order information into the tail of a preset message queue comprises:
and responding to the fact that the new order information is determined to be continuously cached in the preset message queue according to the detection result, and storing the new order information into the tail of the preset message queue.
3. The method of claim 2, further comprising:
and in response to determining that the new order information is not continuously cached in the preset message queue according to the detection result, stopping caching the new order information in the preset message queue.
4. The method of claim 1, further comprising: suspending sending of the new order information to the order information handler in response to detecting:
and receiving second feedback information which is sent by an order information processor and used for indicating that the order information is suspended from processing, wherein the time interval between the current time and the last time of receiving the first feedback information sent by the order information processor is greater than a first preset time duration.
5. The method of claim 1, wherein after said receiving new order information, said method further comprises:
storing the new order information into a preset database; the preset database stores a plurality of pieces of order information and state attribute information of each piece of order information, wherein the state attribute information comprises an unsent state and a sent state.
6. The method of claim 5, further comprising:
and in response to receiving feedback information that the order information fed back by the order information processor is successfully received, modifying the state attribute information of the order information in the preset database from a non-sent state to a sent state.
7. The method of claim 6, further comprising:
executing detection operation for state attribute information of each order information stored in the preset database once every preset time interval;
and for each detection operation, transmitting the order information which is received before the time corresponding to the detection operation and has the status attribute information of the unsent status to an order information processor for processing.
8. An order information processing apparatus characterized by comprising:
the receiving module is used for receiving new order information;
the storage module is used for storing the new order information into the tail of a preset message queue, and at least one unprocessed order information is stored in the preset message queue;
and the extracting module is used for extracting the target order information from the head of the preset message queue and sending the target order information to the order information processing party for processing in response to receiving first feedback information which is sent by the order information processing party and used for indicating to continue processing the order information.
9. An electronic device, comprising:
one or more processors;
storage means having one or more programs stored thereon which, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-7.
10. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202010520474.4A 2020-06-09 2020-06-09 Order information processing method and device and electronic equipment Pending CN111652691A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010520474.4A CN111652691A (en) 2020-06-09 2020-06-09 Order information processing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010520474.4A CN111652691A (en) 2020-06-09 2020-06-09 Order information processing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN111652691A true CN111652691A (en) 2020-09-11

Family

ID=72348537

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010520474.4A Pending CN111652691A (en) 2020-06-09 2020-06-09 Order information processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111652691A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113379501A (en) * 2021-06-21 2021-09-10 广东三维家信息科技有限公司 Message pushing method and device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6766467B1 (en) * 2000-10-19 2004-07-20 International Business Machines Corporation Method and apparatus for pausing a send queue without causing sympathy errors
CN104408561A (en) * 2014-11-25 2015-03-11 同程网络科技股份有限公司 Job-station based order distributing method
CN106204000A (en) * 2016-07-05 2016-12-07 康存乐付保数据科技(上海)有限公司 A kind of service consumption method for processing payment information and system
CN109150558A (en) * 2017-06-15 2019-01-04 北京京东尚科信息技术有限公司 The methods, devices and systems of managing message queues node
CN110060124A (en) * 2019-04-10 2019-07-26 北京三快在线科技有限公司 Order processing method, apparatus, storage medium and electronic equipment
CN110135925A (en) * 2018-02-08 2019-08-16 北京京东尚科信息技术有限公司 Order processing system, method and apparatus
CN110955640A (en) * 2019-11-26 2020-04-03 深圳市卡牛科技有限公司 Cross-system data file processing method, device, server and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6766467B1 (en) * 2000-10-19 2004-07-20 International Business Machines Corporation Method and apparatus for pausing a send queue without causing sympathy errors
CN104408561A (en) * 2014-11-25 2015-03-11 同程网络科技股份有限公司 Job-station based order distributing method
CN106204000A (en) * 2016-07-05 2016-12-07 康存乐付保数据科技(上海)有限公司 A kind of service consumption method for processing payment information and system
CN107369012A (en) * 2016-07-05 2017-11-21 康存乐付保数据科技(上海)有限公司 A kind of method for processing payment information and system and the prepaid card processing method with performance bond insurance mechanism
CN109150558A (en) * 2017-06-15 2019-01-04 北京京东尚科信息技术有限公司 The methods, devices and systems of managing message queues node
CN110135925A (en) * 2018-02-08 2019-08-16 北京京东尚科信息技术有限公司 Order processing system, method and apparatus
CN110060124A (en) * 2019-04-10 2019-07-26 北京三快在线科技有限公司 Order processing method, apparatus, storage medium and electronic equipment
CN110955640A (en) * 2019-11-26 2020-04-03 深圳市卡牛科技有限公司 Cross-system data file processing method, device, server and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
黑马程序员: "解析Python网络爬虫核心技术、Scrapy框架、分布式爬虫》", 中国铁道出版社, pages: 108 - 110 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113379501A (en) * 2021-06-21 2021-09-10 广东三维家信息科技有限公司 Message pushing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US9462022B2 (en) Mobile application migration to cloud computing platform
CN107729139B (en) Method and device for concurrently acquiring resources
US20220253458A1 (en) Method and device for synchronizing node data
CN112667414A (en) Message queue-based message consumption method and device, computer equipment and medium
US8725800B1 (en) Mobile photo application migration to cloud computing platform
CN111258736B (en) Information processing method and device and electronic equipment
US8745261B1 (en) Optimized video streaming using cloud computing platform
CN111221638B (en) Concurrent task scheduling processing method, device, equipment and medium
CN111488220A (en) Method and device for processing starting request and electronic equipment
CN112379982B (en) Task processing method, device, electronic equipment and computer readable storage medium
CN111258800A (en) Page processing method and device and electronic equipment
CN111652691A (en) Order information processing method and device and electronic equipment
CN113051055A (en) Task processing method and device
CN113760522A (en) Task processing method and device
US9703646B2 (en) Centralized database system
CN112346661B (en) Data processing method and device and electronic equipment
CN113127158B (en) Method and device for executing data processing task
CN114461582A (en) File processing method, device, equipment and storage medium
CN113781154A (en) Information rollback method, system, electronic equipment and storage medium
CN113568695A (en) Corner mark processing method and device for boarder application
CN115250276A (en) Distributed system and data processing method and device
CN113010279A (en) Application program process processing method and device for mobile terminal and electronic equipment
CN112311842A (en) Method and device for information interaction
CN112799863A (en) Method and apparatus for outputting information
CN114513548B (en) Directional call information processing method and device

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