CN113781133A - Order data processing method and device - Google Patents

Order data processing method and device Download PDF

Info

Publication number
CN113781133A
CN113781133A CN202010574918.2A CN202010574918A CN113781133A CN 113781133 A CN113781133 A CN 113781133A CN 202010574918 A CN202010574918 A CN 202010574918A CN 113781133 A CN113781133 A CN 113781133A
Authority
CN
China
Prior art keywords
cache
time
order
message information
preset
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
CN202010574918.2A
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 Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information 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 Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202010574918.2A priority Critical patent/CN113781133A/en
Publication of CN113781133A publication Critical patent/CN113781133A/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
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Accounting & Taxation (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Finance (AREA)
  • Software Systems (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an order data processing method and device, and relates to the technical field of computers. One specific implementation mode of the method comprises the steps that the order real-time message information is consumed and stored in a cache, and an identifier generated according to the order real-time message information is placed in a queue in the cache; writing the order real-time message information data in the memory into a database in batch according to a preset time interval set by the cache; and querying the queue in the cache by the timing task, circularly traversing the identifiers with the earliest preset number of queues, and further performing statistical processing on the identifiers with the preset minimum time granularity and storing the identifiers in a database. Therefore, the method and the device can solve the problems of poor timeliness and low efficiency of the conventional order data processing.

Description

Order data processing method and device
Technical Field
The invention relates to the technical field of computers, in particular to an order data processing method and device.
Background
With the rapid development of internet technology, electronic commerce has been immersed in the aspects of our lives, bringing about profound influences on the society. People's clothing and eating residents can not open the electronic commerce, the order form in the electronic commerce occupies an absolute core position, and the order form directly shows whether the daily operation of the whole company is normal or not, whether the operation is healthy or not, plays an important guiding role for the strategic establishment of the company and even determines the survival and death of the company, so the display, the monitoring and the alarm of the order form amount become the most important things for the company.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
the information acquisition, statistics, display and detection of order form quantity data generally directly acquire order form data information through scripts or commands, and the order form data can be persistently stored in a hard disk or a database. And single data information of the database is inquired through a code program for counting, the current order data information cannot be displayed in real time, the current order data information needs to be inquired according to the day or the month, and the current order data information is displayed in an unintuitive mode such as report statistics, a curve graph, a histogram, a pie chart and the like. In addition, the alarm part is generally lost or the report data is checked manually to detect and judge whether the single quantity is normal or not, which wastes time and labor and has poor monitoring effect.
Disclosure of Invention
In view of this, embodiments of the present invention provide an order data processing method and apparatus, which can solve the problems of poor timeliness and low efficiency of the existing order data processing.
In order to achieve the above object, according to an aspect of the embodiments of the present invention, there is provided an order data processing method, including storing order real-time message information into a cache, and placing an identifier generated according to the order real-time message information into a queue in the cache; writing the order real-time message information data in the memory into a database in batch according to a preset time interval set by the cache; and querying the queue in the cache by the timing task, circularly traversing the identifiers with the earliest preset number of queues, and further performing statistical processing on the identifiers with the preset minimum time granularity and storing the identifiers in a database.
Optionally, generating an identifier according to the order real-time message information includes:
and acquiring dimension data and time in the order real-time message information, and combining the dimension data and the time into a second-level or minute-level identifier according to preset dimensions to be placed into a queue in a cache.
Optionally, the method further comprises:
receiving a query request, acquiring a query time period in the request, and judging whether the query time period is consistent with a storage time period set in a current cache or not;
if yes, returning the statistical processing result in the cache; if not, inquiring the database and constructing a cache corresponding to the inquiry time period for statistical processing.
Optionally, after performing the statistical processing with the preset minimum time granularity, the method further includes:
and comparing the statistical processing result of the current time point with the statistical processing result of the same time point in a preset certain day, and starting an alarm program if the comparison result meets a preset threshold value.
Optionally, after the alarm procedure is started, the method includes:
and alarming the target alarm group in a preset informing mode.
Optionally, after performing statistical processing at a preset minimum time granularity and storing the statistical processing in the database, the method includes:
and obtaining a corresponding statistical processing result according to the service request so as to display in the front-end page.
In addition, the invention also provides an order data processing device which comprises an acquisition module, a queue and a processing module, wherein the acquisition module is used for consuming the order real-time message information and storing the order real-time message information into the cache, and putting the identifier generated according to the order real-time message information into the queue in the cache;
the processing module is used for writing the order real-time message information data in the memory into the database in batches according to the preset time interval set by the cache; and querying the queue in the cache by the timing task, circularly traversing the identifiers with the earliest preset number of queues, and further performing statistical processing on the identifiers with the preset minimum time granularity and storing the identifiers in a database.
Optionally, the processing module is further configured to:
receiving a query request, acquiring a query time period in the request, and judging whether the query time period is consistent with a storage time period set in a current cache or not;
if yes, returning the statistical processing result in the cache; if not, inquiring the database and constructing a cache corresponding to the inquiry time period for statistical processing.
One embodiment of the above invention has the following advantages or benefits: because the consumption order real-time message information is stored in the cache, and the mark generated according to the order real-time message information is put into the queue in the cache; writing the order real-time message information data in the memory into a database in batch according to a preset time interval set by the cache; the queue in the cache is inquired through the timed task, the marks with the earliest preset number are circularly traversed, and then the statistics processing is carried out according to the preset minimum time granularity and the marks are stored in the database, so the technical problems of poor timeliness and low efficiency of the existing order data processing are solved. Therefore, the technical effects of consuming, analyzing, counting, storing and displaying the order real-time data messages, visually displaying the order real-time data messages according to the order types in real time, supporting the multi-dimensional inquiry of the synchronous ring ratio, the synchronous ratio and the history, supporting the multi-platform display of the PC and the mobile terminal and supporting the customized alarm setting are achieved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic view of a main flow of an order data processing method according to a first embodiment of the present invention;
FIG. 2 is a schematic view of a main flow of an order data processing method according to a second embodiment of the present invention;
fig. 3 is a schematic view of a main flow of an order data processing method according to a third embodiment of the present invention;
FIG. 4 is a schematic diagram of an order data processing method according to the present invention;
FIG. 5 is a schematic diagram of the main modules of an order data processing apparatus according to an embodiment of the present invention;
FIG. 6 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 7 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic view of a main flow of an order data processing method according to a first embodiment of the present invention, as shown in fig. 1, the order data processing method includes:
step S101, the consumption order real-time message information is stored in a cache, and an identifier generated according to the order real-time message information is put into a queue in the cache.
In some embodiments, the order real-time message may be an mq message sent after the order placing is successful, where the message content includes user information, shopping information, platform channel information, order type, order placing time, and the like, and is a large and full-user order placing information.
In the preferred embodiment, the order real-time message information is consumed, parsed to distinguish order types, and then stored in the Guava Cache in minute and second dimensions. The Guava Cache provides a Cache recycling mode based on capacity, time and reference. The LRU algorithm is adopted in the capacity-based mode, and a garbage recycling mechanism of the Java virtual machine is well utilized based on reference recycling. The cache constructor adopts a constructor mode to provide cache objects with various set parameters, an internal class Segment in a cache core class LocalCache is inherited to a RetrantLock, and six queues are arranged to realize a rich local cache scheme.
As another example, the specific implementation process that may generate the identifier according to the order real-time message information includes:
and acquiring dimension data and time in the order real-time message information, and combining the dimension data and the time into a second-level or minute-level identifier according to preset dimensions to be placed into a queue in a cache. For example: according to the dimension data and time in the message, keys (i.e. identifiers) pieced into the second level or the minute level are put into the queue, and the combined dimensions can be many, such as:
order type 1_20200409161830 represents that order type 1 generates an order 18 minutes and 30 seconds at 09/16/04/2020
Platform 1_ channel 1_202004091618 represents that platform 1 channel 1 generates an order 18 points at 16 on 09/04/2020
Step S102, writing the order real-time message information data in the memory into a database in batch according to a preset time interval set by the cache; and querying the queue in the cache by the timing task, circularly traversing the identifiers with the earliest preset number of queues, and further performing statistical processing on the identifiers with the preset minimum time granularity and storing the identifiers in a database.
In some embodiments, according to the setting of the Guava Cache, the order real-time message information data in the memory is written into the Redis in batch every 500ms, that is, the order real-time message information data is accumulated in the Redis first, for example, the order amount of the same order type at the same time, and the accumulated data may be used for real-time data display of a front-end page. The Remote Dictionary is an open source, is written by using ANSI C language, supports network, can be based on memory and can also be persisted log-type and Key-Value database, and provides API of multiple languages.
In addition, it should be noted that, by querying the key queue in the cache by a timed task, a preset number (for example, 1000) of keys that are earliest in the queue are traversed circularly, a specific order real-time message information data is queried, and the order real-time message information data is subjected to statistical processing at a preset minimum time granularity and stored in the database, for example, statistical processing and persistence are performed at a minimum granularity of minutes, and stored in the MySQL database. MySQL is a relational database management system.
For example, the following steps are carried out: the order quantity generated at 20200409161830 is the order type 1 at this time by performing cumulative statistics on the keys of each dimension combination of the order real-time message information data (different order real-time messages, but the spelled keys may be the same), then storing the statistics in the database, and storing the data in the current and two days, such as the cumulative result of the keys (order type 1_ 20200409161830). The total daily order amount, hourly order amount, etc. for order type 1 can also be obtained by parsing 20200409161830. In addition, different time dimension dimensions (e.g., order type 1) may be selected: the same ratio and ring ratio are carried out according to days, hours, minutes or seconds. That is, the embodiment of the present invention supports the query of the statistics of the order real-time message information data by 1 minute, 5 minutes, 10 minutes, 30 minutes, 60 minutes, week, month, and designated time period.
Meanwhile, the invention can directly display the data curves (such as the data curves of the day and the data curves of the two days of yesterday) according to the statistical processing result and supports the addition of the data curves with the established date for carrying out the ring comparison.
As another embodiment, after the statistical processing is performed with the preset minimum time granularity, the statistical processing result at the current time point may be compared with the statistical processing result at the same preset time point on a certain day, and if the comparison result meets the preset threshold, the alarm program is started.
It should be noted that the embodiment of the present invention supports personalized setting of the alarm threshold for different orders, for example, different alarm thresholds may be set according to different order types. In addition, the present invention supports second-level order type monitoring.
Also, an on or off function of an alarm program may be set. And the authority application and allocation of alarming can be set, namely the alarming monitoring authority can be allocated to aim at different objects.
It should be noted that the present invention can also determine whether the preset alarm condition is met by judging the trend of the N point data in succession in the preset time period, such as a steep drop alarm and an order drop 0 alarm.
In a further embodiment, after the alarm program is started, the present invention may alarm the target alarm group in a preset notification manner. For example: the invention sets the alarm group through different mailboxes and mobile phones, and alarms in a mail and short message mode after reaching the alarm threshold value.
In addition, voice alarm can be set in the embodiment of the invention, for example, the voice alarm is carried out in a mode supported by a self-contained component of the browser. Preferably, the voice alarm system supports voice alarm according to ten gears of ten percent, twenty percent, fifty percent and the like.
As still another embodiment, a query request is received, a query time period in the request is obtained, and whether the query time period is consistent with a storage time period set in a current cache is judged; if yes, returning the statistical processing result in the cache; if not, inquiring the database and constructing a cache corresponding to the inquiry time period for statistical processing.
For example: the data and trend conditions of current order types can be inquired in real time through the PC and the mobile phone, the cache is directly inquired for the data in the current time and in two days, the database is inquired for historical data, the cache is constructed after the historical data is inquired, and the response speed of the next inquiry is improved.
It is also worth mentioning that different order views are supported, and in particular, the statistical processing results can be viewed according to different types.
In summary, the order data processing method provided by the invention solves the problem that the existing order data display monitoring alarm mode cannot be used for statistical display, query and customized setting of the alarm mode in real time, effectively, intuitively, multi-dimensionally, multi-platform and multi-mode. The invention adopts a communication process sequence to consume, analyze, count, store and display the order real-time data message, can realize real-time and visual display according to the order type, supports the multi-dimensional inquiry of the synchronous ring ratio, the synchronous ratio and the history, supports the multi-platform display of a PC and a mobile terminal and supports the customized alarm setting.
Fig. 2 is a schematic view of a main flow of an order data processing method according to a second embodiment of the present invention, which may include:
step S201, the consumption order real-time message information is stored in a cache.
Step S202, obtaining dimension data and time in order real-time message information, and combining the dimension data and the time into a queue with a second-level or minute-level identifier placed in a cache according to preset dimension combinations.
Step S203, writing the order real-time message information data in the memory into the database in batch according to the preset time interval set by the cache.
Step S204, a queue in the cache is queried through the timing task, the identifier with the earliest preset number is circularly traversed, and then statistical processing is carried out according to the preset minimum time granularity and the identifier is stored in a database.
Step S205, comparing the statistical processing result of the current time point with the statistical processing result of the same time point in a preset certain day, and starting an alarm program if the comparison result meets a preset threshold value.
In some embodiments, the target alarm group is alerted through a preset notification mode.
Fig. 3 is a schematic diagram of a main flow of an order data processing method according to a third embodiment of the present invention, which may include:
step S301, the consumption order real-time message information is stored in a cache.
Step S302, obtaining dimension data and time in order real-time message information, and combining the dimension data and the time into a queue of second-level or minute-level identifiers placed in a cache according to preset dimension combinations.
Step S303, writing the order real-time message information data in the memory into the database in batch according to the preset time interval set by the cache.
Step S304, a queue in the cache is queried through the timing task, the identifier with the earliest preset number of the queues is circularly traversed, and then statistical processing is carried out according to the preset minimum time granularity.
Step S305, receiving the query request, obtaining the query time period in the request, and determining whether the query time period is consistent with the storage time period set in the current cache, if so, performing step S306, and if not, performing step S307.
And step S306, returning the statistical processing result in the cache.
Step S307, queries the database and constructs a cache corresponding to the query time period for statistical processing.
Fig. 4 is a schematic diagram of the structure of the order data processing method according to the present invention, and the present invention is configured to perform statistics, display, monitoring alarm and second level monitoring on order data. And processing results of statistics, display, monitoring alarm and second-level monitoring and order real-time message information data can be written into Redis. Among them, configuration service (TP config) can be provided for Redis. Of course, the order real-time message information data and the processing result can also be stored in the MySQL database in a persistent mode.
Further, when order data is counted, order real-time message information needs to be consumed, the order types are analyzed to be distinguished, and then the order types are stored in the Guava Cache according to the dimension of minutes and seconds. And writing the order real-time message information data in the memory into Redis in batches every 500ms according to the setting of the Guava Cache. The method comprises the steps of querying a key queue in a cache by a timed task (preferably, the keys in the queue can be statistically processed by adopting JMQ message middleware), circularly traversing a preset number (for example, 1000) of keys which are earliest in the queue, querying specific order real-time message information data, carrying out statistics and persistence on the order real-time message information data with the minimum granularity of minutes, and storing the order real-time message information data in a MySQL database. The order real-time message information data which is subjected to statistical counting can be processed through an order decompression and error interface in advance.
In addition, when order data are displayed, statistical results obtained according to business requirements can be displayed in the web. Namely, a corresponding statistical processing result is obtained according to the service request so as to be displayed in the front-end page.
Also, the order real-time message information data may be verified (preferably, the order real-time message information data may be verified by using JMQ message middleware) to determine whether the alarm condition is satisfied. Under the condition that the alarm condition is determined to be met, different alarm interfaces can be called according to the service requirement to perform an alarm program, for example: a short message interface, a traffic light interface, a commodity cashback interface, a commodity sales promotion library interface, a commodity sales promotion information interface and the like. The commodity cashback interface, the commodity sales promotion library interface and the commodity sales promotion information interface can be regarded as needing to carry out some commodity activities when the order real-time message information data meet the alarm condition, and the traffic light interface can be regarded as needing to control a monitoring switch and the like of the commodity when the order real-time message information data meet the alarm condition.
Fig. 5 is a schematic diagram of main blocks of an order data processing apparatus according to an embodiment of the present invention, and as shown in fig. 5, the order data processing apparatus 500 includes an acquisition module 501 and a processing module 502. The obtaining module 501 consumes the order real-time message information and stores the order real-time message information into a cache, and places an identifier generated according to the order real-time message information into a queue in the cache; the processing module 502 writes the order real-time message information data in the memory into the database in batch according to the preset time interval set by the cache; and querying the queue in the cache by the timing task, circularly traversing the identifiers with the earliest preset number of queues, and further performing statistical processing on the identifiers with the preset minimum time granularity and storing the identifiers in a database.
In some embodiments, the obtaining module 501 generates an identifier according to the order real-time message information, including:
and acquiring dimension data and time in the order real-time message information, and combining the dimension data and the time into a second-level or minute-level identifier according to preset dimensions to be placed into a queue in a cache.
In some embodiments, the processing module 502 is further configured to:
receiving a query request, acquiring a query time period in the request, and judging whether the query time period is consistent with a storage time period set in a current cache or not;
if yes, returning the statistical processing result in the cache; if not, inquiring the database and constructing a cache corresponding to the inquiry time period for statistical processing.
In some embodiments, after the processing module 502 performs the statistical processing with the preset minimum time granularity, the method further includes:
and comparing the statistical processing result of the current time point with the statistical processing result of the same time point in a preset certain day, and starting an alarm program if the comparison result meets a preset threshold value.
In some embodiments, after the processing module 502 initiates the alarm procedure, it includes:
and alarming the target alarm group in a preset informing mode.
In some embodiments, after the processing module 502 performs statistical processing at the preset minimum time granularity and stores the statistical processing in the database, the processing module includes:
and obtaining a corresponding statistical processing result according to the service request so as to display in the front-end page.
It should be noted that the order data processing method and the order data processing apparatus according to the present invention have corresponding relationships in the specific implementation contents, and therefore, the repeated contents are not described again.
Fig. 6 illustrates an exemplary system architecture 600 of an order data processing method or an order data processing apparatus to which an embodiment of the present invention may be applied.
As shown in fig. 6, the system architecture 600 may include terminal devices 601, 602, 603, a network 604, and a server 605. The network 604 serves to provide a medium for communication links between the terminal devices 601, 602, 603 and the server 605. Network 604 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 601, 602, 603 to interact with the server 605 via the network 604 to receive or send messages or the like. The terminal devices 601, 602, 603 may have installed thereon various communication client applications, such as shopping applications, web browser applications, search applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 601, 602, 603 may be various electronic devices having order data processing screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 605 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 601, 602, 603. The backend management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (for example, target push information, product information — just an example) to the terminal device.
It should be noted that the order data processing method provided by the embodiment of the present invention is generally executed by the server 605, and accordingly, the computing device is generally disposed in the server 605.
It should be understood that the number of terminal devices, networks, and servers in fig. 6 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 7, shown is a block diagram of a computer system 700 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU)701, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM703, various programs and data necessary for the operation of the computer system 700 are also stored. The CPU701, the ROM702, and the RAM703 are connected to each other via a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a liquid crystal order data processor (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, according to the embodiments 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 embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 701.
It should be noted that the computer readable medium shown in the present invention 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 invention, 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 the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, 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: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
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 invention. 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 or flowchart illustration, and combinations of blocks in the block diagrams 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 modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes an acquisition module and a processing module. Wherein the names of the modules do not in some cases constitute a limitation of the module itself.
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to store the consumption order real-time message information in a cache and place an identifier generated from the order real-time message information in a queue in the cache; writing the order real-time message information data in the memory into a database in batch according to a preset time interval set by the cache; and querying the queue in the cache by the timing task, circularly traversing the identifiers with the earliest preset number of queues, and further performing statistical processing on the identifiers with the preset minimum time granularity and storing the identifiers in a database.
According to the technical scheme of the embodiment of the invention, the problems of poor timeliness and low efficiency of the existing order data processing can be solved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. An order data processing method, comprising:
the consumption order real-time message information is stored in a cache, and an identifier generated according to the order real-time message information is put into a queue in the cache;
writing the order real-time message information data in the memory into a database in batch according to a preset time interval set by the cache;
and querying the queue in the cache by the timing task, circularly traversing the identifiers with the earliest preset number of queues, and further performing statistical processing on the identifiers with the preset minimum time granularity and storing the identifiers in a database.
2. The method of claim 1, wherein generating the identifier from the order real-time message information comprises:
and acquiring dimension data and time in the order real-time message information, and combining the dimension data and the time into a second-level or minute-level identifier according to preset dimensions to be placed into a queue in a cache.
3. The method of claim 1 or 2, further comprising:
receiving a query request, acquiring a query time period in the request, and judging whether the query time period is consistent with a storage time period set in a current cache or not;
if yes, returning the statistical processing result in the cache; if not, inquiring the database and constructing a cache corresponding to the inquiry time period for statistical processing.
4. The method of claim 1, further comprising, after performing the statistical processing at a preset minimum time granularity:
and comparing the statistical processing result of the current time point with the statistical processing result of the same time point in a preset certain day, and starting an alarm program if the comparison result meets a preset threshold value.
5. The method of claim 4, wherein after initiating the alert procedure, comprising:
and alarming the target alarm group in a preset informing mode.
6. The method according to any one of claims 1 to 5, wherein after the statistical processing at the predetermined minimum time granularity and storing in the database, comprising:
and obtaining a corresponding statistical processing result according to the service request so as to display in the front-end page.
7. An order data processing apparatus, comprising:
the acquisition module is used for storing the consumption order real-time message information into a cache and putting an identifier generated according to the order real-time message information into a queue in the cache;
the processing module is used for writing the order real-time message information data in the memory into the database in batches according to the preset time interval set by the cache; and querying the queue in the cache by the timing task, circularly traversing the identifiers with the earliest preset number of queues, and further performing statistical processing on the identifiers with the preset minimum time granularity and storing the identifiers in a database.
8. The apparatus of claim 7, wherein the processing module is further configured to:
receiving a query request, acquiring a query time period in the request, and judging whether the query time period is consistent with a storage time period set in a current cache or not;
if yes, returning the statistical processing result in the cache; if not, inquiring the database and constructing a cache corresponding to the inquiry time period for statistical processing.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6.
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-6.
CN202010574918.2A 2020-06-22 2020-06-22 Order data processing method and device Pending CN113781133A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010574918.2A CN113781133A (en) 2020-06-22 2020-06-22 Order data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010574918.2A CN113781133A (en) 2020-06-22 2020-06-22 Order data processing method and device

Publications (1)

Publication Number Publication Date
CN113781133A true CN113781133A (en) 2021-12-10

Family

ID=78835029

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010574918.2A Pending CN113781133A (en) 2020-06-22 2020-06-22 Order data processing method and device

Country Status (1)

Country Link
CN (1) CN113781133A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102620080B1 (en) * 2022-12-27 2024-01-02 쿠팡 주식회사 Method and apparatus for processing order data

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107786623A (en) * 2016-09-20 2018-03-09 平安科技(深圳)有限公司 Message asynchronous processing method and device
CN109783258A (en) * 2019-02-21 2019-05-21 北京奇艺世纪科技有限公司 A kind of message treatment method, device and server
CN110275900A (en) * 2019-06-25 2019-09-24 浪潮软件股份有限公司 A method of order and early warning are monitored based on Redis caching technology
CN110719318A (en) * 2019-09-06 2020-01-21 上海陆家嘴国际金融资产交易市场股份有限公司 Message processing method and system
CN110766512A (en) * 2019-09-19 2020-02-07 北京三快在线科技有限公司 Order processing method and device, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107786623A (en) * 2016-09-20 2018-03-09 平安科技(深圳)有限公司 Message asynchronous processing method and device
CN109783258A (en) * 2019-02-21 2019-05-21 北京奇艺世纪科技有限公司 A kind of message treatment method, device and server
CN110275900A (en) * 2019-06-25 2019-09-24 浪潮软件股份有限公司 A method of order and early warning are monitored based on Redis caching technology
CN110719318A (en) * 2019-09-06 2020-01-21 上海陆家嘴国际金融资产交易市场股份有限公司 Message processing method and system
CN110766512A (en) * 2019-09-19 2020-02-07 北京三快在线科技有限公司 Order processing method and device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102620080B1 (en) * 2022-12-27 2024-01-02 쿠팡 주식회사 Method and apparatus for processing order data

Similar Documents

Publication Publication Date Title
CN108984553B (en) Caching method and device
CN111414376A (en) Data early warning method and device
US10754830B2 (en) Activity information schema discovery and schema change detection and notification
CN114091704B (en) Alarm suppression method and device
WO2023029592A1 (en) Data processing method and apparatus
CN112948223A (en) Method and device for monitoring operation condition
US20230269304A1 (en) Method and apparatus for processing notification trigger message
CN116450622B (en) Method, apparatus, device and computer readable medium for data warehouse entry
CN113781133A (en) Order data processing method and device
CN113595886A (en) Instant messaging message processing method and device, electronic equipment and storage medium
CN116955856A (en) Information display method, device, electronic equipment and storage medium
CN113282455A (en) Monitoring processing method and device
CN114417112A (en) Data processing method, data processing apparatus, electronic device, and storage medium
CN115277355A (en) Method, device, equipment and medium for processing state code data of monitoring system
US20180137520A1 (en) Real time situation detection across systems
CN114817297A (en) Method and device for processing data
CN112887426A (en) Information flow pushing method and device, electronic equipment and storage medium
CN112749204A (en) Method and device for reading data
CN113779017A (en) Method and apparatus for data asset management
CN112862554A (en) Order data processing method and device
CN113722193A (en) Method and device for detecting page abnormity
CN113535768A (en) Production monitoring method and device
CN112699116A (en) Data processing method and system
CN111127077A (en) Recommendation method and device based on stream computing
CN116361112B (en) Alarm convergence 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