CN109389306B - User order synchronization method and device - Google Patents

User order synchronization method and device Download PDF

Info

Publication number
CN109389306B
CN109389306B CN201811161414.7A CN201811161414A CN109389306B CN 109389306 B CN109389306 B CN 109389306B CN 201811161414 A CN201811161414 A CN 201811161414A CN 109389306 B CN109389306 B CN 109389306B
Authority
CN
China
Prior art keywords
order
queue
user
orders
priority
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
CN201811161414.7A
Other languages
Chinese (zh)
Other versions
CN109389306A (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.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group 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 China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN201811161414.7A priority Critical patent/CN109389306B/en
Publication of CN109389306A publication Critical patent/CN109389306A/en
Application granted granted Critical
Publication of CN109389306B publication Critical patent/CN109389306B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06316Sequencing of tasks or work
    • 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
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/067Enterprise or organisation modelling
    • 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

Abstract

The embodiment of the invention provides a user order synchronization method and device, relates to the field of data transmission, and can be used for preferentially processing a user order needing urgent processing in time and improving user experience. The method comprises the following steps: acquiring a user order and order data corresponding to the user order; the order data comprises order types and background configuration parameters of the orders; dividing the user order into a common order and a priority order according to the type of the order and the background configuration parameters of the order; sending the priority order to an order production database in real time; and sending a preset number of ordinary orders to an order production database every other ordinary period time.

Description

User order synchronization method and device
Technical Field
The present invention relates to the field of data transmission, and in particular, to a method and an apparatus for synchronizing a user order.
Background
Currently, when an operator processes a user order, the operator firstly obtains order data from an order placing database, then uses kafka to synchronize to an order producing database, an auditor performs identity verification, audit, account opening and other processing on the order producing database, and the order can be delivered to the user only after being processed. In the existing processing mode, user orders need to be queued in a Kafka queue firstly, and the Kafka sends all the user orders in the Kafka queue to an order production database according to the time sequence of the user orders entering the Kafka queue, and then the user orders are processed by an order examiner. However, some user orders (active orders in colleges and universities, live orders, etc.) need to be processed immediately, and if such user orders are queued in the Kafka queue, a relatively long wait time is needed, and the user experience is degraded.
Disclosure of Invention
The embodiment of the invention provides a user order synchronization method and device, which can be used for preferentially processing a user order needing urgent processing in time and improving user experience.
In order to achieve the above purpose, the embodiment of the invention adopts the following technical scheme:
in a first aspect, a method for synchronizing user orders is provided, including:
acquiring a user order and order data corresponding to the user order; the order data comprises order types and background configuration parameters of the orders;
dividing the user order into a common order and a priority order according to the type of the order and the background configuration parameters of the order;
sending the priority order to an order production database in real time;
and sending a preset number of ordinary orders to an order production database every other ordinary period time.
According to the technical scheme provided by the embodiment, whether the user order needs to be subjected to urgent processing or not is determined according to the order type and the background configuration parameters of the order, the urgent processing needs to be determined as the priority order, the user order which does not need to be subjected to urgent processing is the ordinary order, the priority order which needs to be subjected to urgent processing is sent to the order production database in real time, so that the remote order examination personnel can process the order, the ordinary order which does not need to be subjected to urgent processing is periodically sent to the order production database, so that the order examination personnel can process the order, the user order which needs to be subjected to urgent processing can be processed more timely, and the user experience degree is improved.
Optionally, the sending the priority order to the order production database in real time includes:
sending the priority order to a priority order queue for queuing;
and sending the priority orders in the priority order queue to an order production database in real time by using a push mode.
Optionally, sending a preset number of ordinary orders to the order production database every other ordinary period duration includes:
sending the ordinary order to an ordinary order queue for queuing;
and sending a preset number of ordinary orders in the ordinary order queue to an order production database every ordinary period time by using a pull mode.
Optionally, before sending a preset number of ordinary orders to the order production database every ordinary period time, the method further includes:
acquiring the queue length of a priority order queue;
judging whether the queue length of the priority order queue is greater than a preset value;
when the queue length of the priority order queue is determined to be smaller than or equal to a preset value, setting the common period duration as a first preset duration;
when the queue length of the priority order queue is determined to be larger than a preset value, setting the common period time length as the sum of a first preset time length and a second preset time length;
the second preset time length is calculated according to the queue length of the priority order queue and a preset formula.
Illustratively, the preset formula is:
Figure BDA0001820119750000021
wherein, count is the length of the priority order queue, and s is a second preset duration.
In a second aspect, a device for synchronizing user orders is provided, which includes: the system comprises an acquisition module, a classification module and a synchronization module;
the acquisition module is used for acquiring a user order and order data corresponding to the user order; the order data comprises order types and background configuration parameters of the orders;
the classification module is used for classifying the user orders into ordinary orders and priority orders according to the types of the orders and the background configuration parameters of the orders;
the synchronization module is used for transmitting the priority order to the order production database in real time;
and the synchronization module is also used for sending a preset number of ordinary orders to the order production database every ordinary period time.
Optionally, the synchronization module is specifically configured to:
sending the priority order determined by the classification module to a priority order queue for queuing;
and sending the priority orders in the priority order queue to an order production database in real time by using a push mode.
Optionally, the synchronization module is specifically configured to:
sending the common order determined by the classification module to a common order queue for queuing;
and sending a preset number of ordinary orders in the ordinary order queue to an order production database every ordinary period time by using a pull mode.
Optionally, the system further comprises a control module, wherein the control module comprises an acquisition unit and a processing unit;
the acquiring unit is used for acquiring the queue length of the priority order queue;
the processing unit is used for judging whether the queue length of the priority order queue acquired by the acquisition unit is larger than a preset value or not;
when the processing unit determines that the queue length of the priority order queue acquired by the acquisition unit is smaller than or equal to a preset value, the common cycle time length is set as a first preset time length;
when the processing unit determines that the queue length of the priority order queue acquired by the acquisition unit is greater than a preset value, the common cycle time length is set as the sum of a first preset time length and a second preset time length;
the second preset time length is calculated according to the queue length of the priority order queue and a preset formula.
In a third aspect, a device for synchronizing a user order is provided, which comprises a memory, a processor, a bus and a communication interface; the memory is used for storing computer execution instructions, and the processor is connected with the memory through a bus; the processor executes the computer-executable instructions stored by the memory to cause the synchronization apparatus of the user order to perform the method of synchronizing the user order as provided by the first aspect when the synchronization apparatus of the user order is running.
In a fourth aspect, there is provided a computer storage medium comprising computer executable instructions which, when executed on a computer, cause the computer to perform the method of synchronizing user orders as provided in the first aspect.
The embodiment of the invention provides a user order synchronization method and a user order synchronization device, wherein the method comprises the following steps: acquiring a user order and order data corresponding to the user order; the order data comprises order types and background configuration parameters of the orders; dividing the user order into a common order and a priority order according to the type of the order and the background configuration parameters of the order; sending the priority order to an order production database in real time; and sending a preset number of ordinary orders to an order production database every other ordinary period time. According to the technical scheme provided by the embodiment of the invention, whether the user order needs to be subjected to urgent processing is determined according to the order type and the background configuration parameters of the order, the urgent processing needs to be determined as the priority order, the user order not needing urgent processing is the ordinary order, the priority order needing urgent processing is sent to the order production database in real time, so that the remote order examination personnel can process the order, and the ordinary order not needing urgent processing is periodically sent to the order production database so that the order examination personnel can process the order, so that the user order needing urgent processing can be processed more timely, and the user experience degree is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a user order synchronization method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating another method for synchronizing user orders according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a synchronization apparatus for a user order according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of another user order synchronization apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that, in the embodiments of the present invention, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "e.g.," an embodiment of the present invention is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
It should be noted that, in the embodiments of the present invention, "of", "corresponding" and "corresponding" may be sometimes used in combination, and it should be noted that, when the difference is not emphasized, the intended meaning is consistent.
For the convenience of clearly describing the technical solutions of the embodiments of the present invention, in the embodiments of the present invention, the words "first", "second", and the like are used for distinguishing the same items or similar items with basically the same functions and actions, and those skilled in the art can understand that the words "first", "second", and the like are not limited in number or execution order.
In the prior art, an operator generally sends all user orders to an order production database according to a time sequence for processing the user orders, but in this way, some user orders that need urgent processing (such as college activity orders and field orders) may take a long time to be known by an order auditor, which may cause the user orders that need urgent processing to be unable to be processed in time, and reduce the user experience.
In view of the above problem, referring to fig. 1, an embodiment of the present invention provides a method for synchronizing a user order, including:
101. the method comprises the steps of obtaining a user order and order data corresponding to the user order.
Specifically, the order data includes an order type and a background configuration parameter of the order; the user order is generally entered into the order placing database after being transacted by staff or the user on line, so the user order and the corresponding order data are obtained from the order placing database.
102. And dividing the user order into a common order and a priority order according to the type of the order and the background configuration parameters of the order.
Illustratively, the categories of the user orders are divided into user orders requiring urgent processing (such as activity orders of colleges and universities, live orders handled by places such as business halls, and the like) and user orders not requiring urgent processing (such as time-limited preferential services handled by users and the like) according to whether urgent processing is required or not; the two categories can also be judged according to background configuration parameters when the user order is generated (for example, the background configuration parameters corresponding to the user order generated by a server used in promotion activities in colleges and universities and average user business changes are different).
103. And sending the priority order to an order production database in real time.
After the user order reaches the order production database, the order auditor can check the order; for example, when the priority order is sent in real time, the priority order sent each time may be one or more.
Optionally, in practice, the priority order needs to be placed in a queue for queuing before being sent, and then can be extracted from the queue and sent to the order production database, so as shown in fig. 2, step 103 specifically includes:
1031. and sending the priority order to a priority order queue for queuing.
Illustratively, the priority order queue here may be a kafka queue.
1032. And sending the priority orders in the priority order queue to an order production database in real time by using a push mode.
In practice, when sending the priority order to the order production database, if the auditor is not present, a prompt message may be sent to the communications tool of the auditor to enable the auditor to time the priority order for processing.
104. And sending a preset number of ordinary orders to an order production database every other ordinary period time.
Optionally, when actually sending a user order, the user order needs to be placed in a queue first, and then a priority order is extracted from the queue and sent to the short message gateway; in addition, although the priority order is sent in real time, the efficiency of sending the priority order is not high to obtain the priority order, so that a situation that a plurality of priority orders still exist in a priority order queue can be caused, and the purpose that the priority order in the priority order queue is processed more quickly can not be achieved, so that the size of the priority order queue needs to be adjusted according to the length of the priority order queue, and when the priority order is more, the common period time length is prolonged, so that the priority order in the priority order queue is sent as soon as possible, and then the common order in the common order queue is sent; therefore, referring to fig. 2, the step 104 specifically includes:
1041. and sending the ordinary order to an ordinary order queue for queuing.
1042. And acquiring the queue length of the priority order queue.
For example, because the consumption of computer resources is large when the priority order queue length is obtained in real time, and the procedure involved in repeatedly and uninterruptedly reading the priority order queue length is more complicated than the procedure involved in periodically reading the priority order queue length, in practice, the length of the priority order queue is generally stored in the Redis using Python script timing (which is shorter than the normal cycle time and can be regarded as real time), and then the length of the priority order queue is periodically (which is longer than the Python script timing time but still shorter than the normal cycle time) read from the Redis.
1043. And judging whether the queue length of the priority order queue is greater than a preset value.
Illustratively, the preset value is 0;
executing 1045 when the length of the priority order queue is determined to be larger than the preset value; when the queue length of the priority order queue is determined to be smaller than or equal to the preset value, 1044 is executed.
1044. The normal cycle duration is set to a first preset duration.
1045. And setting the common period time length as the sum of the first preset time length and the second preset time length.
Optionally, the second preset duration is calculated according to a preset formula according to the queue length of the priority order queue, and the damaged formula is as follows:
Figure BDA0001820119750000071
wherein, count is the length of the priority order queue, and s is a second preset duration.
1046. And sending a preset number of ordinary orders in the ordinary order queue to an order production database every ordinary period time by using a pull mode.
The embodiment of the invention provides a user order synchronization method, which comprises the following steps: acquiring a user order and order data corresponding to the user order; the order data comprises order types and background configuration parameters of the orders; dividing the user order into a common order and a priority order according to the type of the order and the background configuration parameters of the order; sending the priority order to an order production database in real time; and sending a preset number of ordinary orders to an order production database every other ordinary period time. According to the technical scheme provided by the embodiment of the invention, whether the user order needs to be subjected to urgent processing is determined according to the order type and the background configuration parameters of the order, the urgent processing needs to be determined as the priority order, the user order not needing urgent processing is the ordinary order, the priority order needing urgent processing is sent to the order production database in real time, so that the remote order examination personnel can process the order, and the ordinary order not needing urgent processing is periodically sent to the order production database so that the order examination personnel can process the order, so that the user order needing urgent processing can be processed more timely, and the user experience degree is improved.
In order to better implement the synchronization method for the user order provided in the foregoing embodiment, referring to fig. 3, an embodiment of the present invention further provides a synchronization apparatus 01 for a user order, including: an acquisition module 31, a classification module 32 and a synchronization module 33;
an obtaining module 31, configured to obtain a user order and order data corresponding to the user order; the order data comprises order types and background configuration parameters of the orders;
the classification module 32 is used for classifying the user orders into ordinary orders and priority orders according to the types of the orders and the background configuration parameters of the orders;
a synchronization module 33, configured to send the priority order to the order production database 02 in real time;
the synchronization module 33 is further configured to send a preset number of ordinary orders to the order production database 02 every ordinary period.
Optionally, the synchronization module 33 is specifically configured to:
sending the priority order determined by the classification module 32 to a priority order queue for queuing;
the push mode is used to send the priority orders in the priority order queue to the order production database 02 in real time.
Optionally, the synchronization module 33 is specifically configured to:
sending the ordinary order determined by the classification module 32 to an ordinary order queue for queuing;
and sending a preset number of ordinary orders in the ordinary order queue to the order production database 02 every ordinary period time by using a pull mode.
Optionally, the system further includes a control module 34, where the control module 34 includes an obtaining unit 341 and a processing unit 342;
an obtaining unit 341, configured to obtain a queue length of a priority order queue;
a processing unit 342, configured to determine whether the queue length of the priority order queue acquired by the acquiring unit 341 is greater than a preset value;
when the processing unit 342 determines that the queue length of the priority order queue acquired by the acquiring unit 341 is less than or equal to a preset value, the common cycle duration is set to be a first preset duration;
when the processing unit 342 determines that the queue length of the priority order queue acquired by the acquiring unit 341 is greater than the preset value, the common cycle duration is set to be the sum of a first preset duration and a second preset duration;
the second preset time length is calculated according to the queue length of the priority order queue and a preset formula.
The synchronization device for the user order provided by the embodiment of the invention comprises: the system comprises an acquisition module, a classification module and a synchronization module; the acquisition module is used for acquiring a user order and order data corresponding to the user order; the order data comprises order types and background configuration parameters of the orders; the classification module is used for classifying the user orders into ordinary orders and priority orders according to the types of the orders and the background configuration parameters of the orders; the synchronization module is used for transmitting the priority order to the order production database in real time; and the synchronization module is also used for sending a preset number of ordinary orders to the order production database every ordinary period time. Therefore, according to the technical scheme provided by the embodiment of the invention, when the user order needs to be synchronized into the order production database, whether the user order needs to be subjected to urgent processing or not can be determined according to the order type and the background configuration parameters of the order, the urgent processing needs to be determined as the priority order, the user order which does not need to be subjected to urgent processing is the ordinary order, and the priority order which needs to be subjected to urgent processing is sent to the order production database in real time, so that the remote examination order personnel can process the order, and the ordinary order which does not need to be subjected to urgent processing is periodically sent to the order production database so that the examination personnel can process the order, so that the user order which needs to be subjected to urgent processing can be processed more timely, and the user experience degree is improved.
Referring to fig. 4, another user order synchronization apparatus is provided in the embodiment of the present invention, which includes a memory 41, a processor 42, a bus 43, and a communication interface 44; the memory 41 is used for storing computer execution instructions, and the processor 42 is connected with the memory 41 through a bus 43; when the synchronization means of the user order is running, the processor 42 executes the computer-executable instructions stored in the memory 41 to cause the synchronization means of the user order to perform the synchronization method of the user order as provided in the above embodiments.
In particular implementations, processor 42(42-1 and 42-2) may include one or more CPUs, such as CPU0 and CPU1 shown in FIG. 4, for example, as one embodiment. And as an example, the means for synchronizing the user orders may include a plurality of processors 42, such as processor 42-1 and processor 42-2 shown in fig. 4. Each of the processors 42 may be a Single-core processor (Single-CPU) or a Multi-core processor (Multi-CPU). Processor 42 may refer herein to one or more devices, circuits, and/or processing cores that process data (e.g., computer program instructions).
The Memory 41 may be a Read-Only Memory 41 (ROM) or other types of static storage devices that can store static information and instructions, a Random Access Memory (RAM) or other types of dynamic storage devices that can store information and instructions, an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc Read-Only Memory (CD-ROM) or other optical Disc storage, optical Disc storage (including Compact Disc, laser Disc, optical Disc, digital versatile Disc, blu-ray Disc, etc.), a magnetic Disc storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 41 may be self-contained and coupled to the processor 42 via a communication bus 43. The memory 41 may also be integrated with the processor 42.
In a specific implementation, the memory 41 is used for storing data in the present application and computer-executable instructions corresponding to software programs for executing the present application. Processor 42 may perform various functions of the synchronization mechanism of the user's order by running or executing software programs stored in memory 41 and invoking data stored in memory 41.
The communication interface 44 is any device such as a transceiver for communicating with other devices or communication Networks, such as a control system, a Radio Access Network (RAN), a Wireless Local Area Network (WLAN), and the like. The communication interface 44 may include a receiving unit implementing a receiving function and a transmitting unit implementing a transmitting function.
The bus 43 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus 43 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 4, but this does not indicate only one bus or one type of bus.
The embodiment of the present invention further provides a computer storage medium, where the computer storage medium includes computer execution instructions, and when the computer execution instructions run on a computer, the computer is enabled to execute the user order synchronization method provided in the foregoing embodiment.
The embodiment of the invention also provides a computer program which can be directly loaded into the memory and contains software codes, and the computer program can realize the synchronization method of the user order after being loaded and executed by the computer.
Those skilled in the art will recognize that, in one or more of the examples described above, the functions described in this invention may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
Through the above description of the embodiments, it is clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical functional division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another device, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form. Units described as separate parts may or may not be physically separate, and parts displayed as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed to a plurality of different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially or partially contributed to by the prior art, or all or part of the technical solutions may be embodied in the form of a software product, where the software product is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (8)

1. A method for synchronizing user orders, comprising:
acquiring a user order and order data corresponding to the user order; the order data comprises order types and background configuration parameters of the orders;
dividing the user order into a common order and a priority order according to the type of the order and the background configuration parameters of the order;
sending the priority order to an order production database in real time;
sending a plurality of preset ordinary orders to the order production database at intervals of an ordinary period;
the synchronization method further comprises:
acquiring the queue length of the priority order queue;
judging whether the queue length of the priority order queue is greater than a preset value;
when the queue length of the priority order queue is determined to be smaller than or equal to a preset value, setting the common period time length as a first preset time length;
when the queue length of the priority order queue is determined to be larger than the preset value, setting the common period time length as the sum of the first preset time length and the second preset time length;
the second preset time length is calculated according to a preset formula according to the queue length of the priority order queue;
the preset formula is as follows:
Figure FDA0002704476270000011
wherein, count is the length of the priority order queue, and s is the second preset duration.
2. The method for synchronizing user orders according to claim 1, wherein said sending said priority orders to an order production database in real time comprises:
sending the priority order to a priority order queue for queuing;
and sending the priority orders in the priority order queue to an order production database in real time by using a push mode.
3. The method for synchronizing customer orders according to claim 1, wherein said sending a predetermined number of said generic orders to said order production database every generic period duration comprises:
sending the common order to a common order queue for queuing;
and sending a preset number of ordinary orders in the ordinary order queue to the order production database every ordinary period time by using a pull mode.
4. A synchronization apparatus for a user's order, comprising: the system comprises an acquisition module, a classification module and a synchronization module;
the acquisition module is used for acquiring a user order and order data corresponding to the user order; the order data comprises order types and background configuration parameters of the orders;
the classification module is used for classifying the user order into a common order and a priority order according to the type of the order and the background configuration parameters of the order;
the synchronization module is used for transmitting the priority order to an order production database in real time;
the synchronization module is further configured to send a preset number of the ordinary orders to the order production database every ordinary period duration;
the synchronization device also comprises a control module, wherein the control module comprises an acquisition unit and a processing unit;
the acquiring unit is used for acquiring the queue length of the priority order queue;
the processing unit is used for judging whether the queue length of the priority order queue acquired by the acquisition unit is larger than a preset value;
when the processing unit determines that the queue length of the priority order queue acquired by the acquisition unit is smaller than or equal to a preset value, the common cycle time length is set as a first preset time length;
when the processing unit determines that the queue length of the priority order queue acquired by the acquisition unit is greater than the preset value, the common cycle time length is set as the sum of the first preset time length and the second preset time length;
the second preset time length is calculated according to a preset formula according to the queue length of the priority order queue;
the preset formula is as follows:
Figure FDA0002704476270000021
wherein, count is the length of the priority order queue, and s is the second preset duration.
5. The apparatus for synchronizing a user order according to claim 4, wherein the synchronization module is specifically configured to:
sending the priority order determined by the classification module to a priority order queue for queuing;
and sending the priority orders in the priority order queue to an order production database in real time by using a push mode.
6. The apparatus for synchronizing a user order according to claim 4, wherein the synchronization module is specifically configured to:
sending the common order determined by the classification module to a common order queue for queuing;
and sending a preset number of ordinary orders in the ordinary order queue to the order production database every ordinary period time by using a pull mode.
7. The user order synchronization device is characterized by comprising a memory, a processor, a bus and a communication interface; the memory is used for storing computer execution instructions, and the processor is connected with the memory through the bus; the computer-executable instructions stored by the memory are executed by the processor when the synchronization apparatus of the user order is running to cause the synchronization apparatus of the user order to perform the synchronization method of the user order according to any one of claims 1 to 3.
8. A computer storage medium comprising computer executable instructions which, when executed on a computer, cause the computer to perform the method of synchronizing a user order according to any one of claims 1 to 3.
CN201811161414.7A 2018-09-30 2018-09-30 User order synchronization method and device Active CN109389306B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811161414.7A CN109389306B (en) 2018-09-30 2018-09-30 User order synchronization method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811161414.7A CN109389306B (en) 2018-09-30 2018-09-30 User order synchronization method and device

Publications (2)

Publication Number Publication Date
CN109389306A CN109389306A (en) 2019-02-26
CN109389306B true CN109389306B (en) 2021-01-26

Family

ID=65419168

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811161414.7A Active CN109389306B (en) 2018-09-30 2018-09-30 User order synchronization method and device

Country Status (1)

Country Link
CN (1) CN109389306B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110598889A (en) * 2019-09-04 2019-12-20 长沙格力暖通制冷设备有限公司 Vehicle scheduling method, system and storage medium
CN111401992A (en) * 2020-03-06 2020-07-10 上海数据交易中心有限公司 Data distribution method and device, storage medium and terminal

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6883031B1 (en) * 2000-09-14 2005-04-19 Lucent Technologies Inc. RUSH-DCS—an adaptable high performance interface for services
CN101702205A (en) * 2009-11-17 2010-05-05 湖南大学 Quick sorting method for order form
CN105159782A (en) * 2015-08-28 2015-12-16 北京百度网讯科技有限公司 Cloud host based method and apparatus for allocating resources to orders
CN108596385A (en) * 2018-04-19 2018-09-28 安吉汽车物流股份有限公司 The queuing strategy and device of vehicle, readable medium, logistics system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101582842A (en) * 2008-05-16 2009-11-18 华为技术有限公司 Congestion control method and congestion control device
US20130204656A1 (en) * 2012-02-03 2013-08-08 Weeels, Inc. Method and Application for Batch-Based Queue Management System
EP2637097A1 (en) * 2012-03-05 2013-09-11 Accenture Global Services Limited Differentiated service-based graceful degradation layer
CN106127423A (en) * 2016-08-29 2016-11-16 徐东 A kind of intelligent kitchen order display management method and system thereof
CN106358222B (en) * 2016-08-30 2019-11-22 重庆邮电大学 Dynamic enhancement type district disturbance coordination method based on traffic forecast

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6883031B1 (en) * 2000-09-14 2005-04-19 Lucent Technologies Inc. RUSH-DCS—an adaptable high performance interface for services
CN101702205A (en) * 2009-11-17 2010-05-05 湖南大学 Quick sorting method for order form
CN105159782A (en) * 2015-08-28 2015-12-16 北京百度网讯科技有限公司 Cloud host based method and apparatus for allocating resources to orders
CN108596385A (en) * 2018-04-19 2018-09-28 安吉汽车物流股份有限公司 The queuing strategy and device of vehicle, readable medium, logistics system

Also Published As

Publication number Publication date
CN109389306A (en) 2019-02-26

Similar Documents

Publication Publication Date Title
US20150347305A1 (en) Method and apparatus for outputting log information
CN108572970B (en) Structured data processing method and distributed processing system
WO2014173151A1 (en) Method, device and terminal for data processing
CN109271261B (en) Event unified processing method, device and storage medium
CN110032451A (en) Distributed multilingual message realization method, device and server
CN109389306B (en) User order synchronization method and device
CN111142746B (en) System quota calculation method and device
CN109787884B (en) Message pushing method and device
CN111240812A (en) Task execution method and device
CN109783151A (en) The method and apparatus of rule change
CN108616668B (en) Method for monitoring dialing task, electronic device and computer readable storage medium
CN111666145A (en) Message processing method and system of message queue and computer equipment
CN110784377A (en) Method for uniformly managing cloud monitoring data in multi-cloud environment
CN112365238A (en) TODO automatic reminding method, system, electronic equipment and readable storage medium
CN110069533B (en) Event subscription method and device based on blockchain
CN113422808B (en) Internet of things platform HTTP information pushing method, system, device and medium
CN110990381B (en) Processing method and device of server, storage medium and electronic device
EP2690560A2 (en) Method of benchmarking the behaviour of a replacement information system with the old system
CN111047362A (en) Statistical management method and system for use activity of intelligent sound box
CN109299948A (en) A kind of red packet sending method, device, wearable device and storage medium
CN111401819B (en) Intersystem data pushing method and system
CN111291127B (en) Data synchronization method, device, server and storage medium
US20210124618A1 (en) Methods, apparatuses and systems for integrating and managing automated dataflow systems
CN108805741B (en) Fusion method, device and system of power quality data
CN112583699A (en) Method, system, equipment and storage medium for automatic transmitting welcome language by departments

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