CN114238309A - Logistics single performance detection method and delayed task processing method - Google Patents

Logistics single performance detection method and delayed task processing method Download PDF

Info

Publication number
CN114238309A
CN114238309A CN202111249469.5A CN202111249469A CN114238309A CN 114238309 A CN114238309 A CN 114238309A CN 202111249469 A CN202111249469 A CN 202111249469A CN 114238309 A CN114238309 A CN 114238309A
Authority
CN
China
Prior art keywords
detection
task
time
tasks
target
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
CN202111249469.5A
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.)
Wuzhou Online E Commerce Beijing Co ltd
Original Assignee
Wuzhou Online E Commerce Beijing 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 Wuzhou Online E Commerce Beijing Co ltd filed Critical Wuzhou Online E Commerce Beijing Co ltd
Priority to CN202111249469.5A priority Critical patent/CN114238309A/en
Publication of CN114238309A publication Critical patent/CN114238309A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06F16/221Column-oriented storage; Management thereof
    • 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/2453Query optimisation
    • G06F16/24532Query optimisation of parallel queries
    • 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
    • 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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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/28Databases characterised by their database models, e.g. relational or object models
    • 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/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
    • G06Q10/083Shipping
    • G06Q10/0838Historical data
    • 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/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
    • G06Q10/087Inventory or stock management, e.g. order filling, procurement or balancing against orders
    • G06Q10/0875Itemisation or classification of parts, supplies or services, e.g. bill of materials
    • 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/10Office automation; Time management
    • G06Q10/109Time management, e.g. calendars, reminders, meetings or time accounting
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/12Payment architectures specially adapted for electronic shopping systems
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/22Payment schemes or models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0633Lists, e.g. purchase orders, compilation or processing
    • G06Q30/0635Processing of requisition or of purchase orders
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/12Hotels or restaurants

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Strategic Management (AREA)
  • Data Mining & Analysis (AREA)
  • General Business, Economics & Management (AREA)
  • Economics (AREA)
  • Accounting & Taxation (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Finance (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Operations Research (AREA)
  • Development Economics (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses a logistics single performance detection method, a delay task processing method and a delay task processing device. According to the method, a large number of detection tasks in each second are stored in a sparse storage mode, detection task records can be generated even when the detection tasks are not available, so that the initial position and the end position of each second of the detection tasks can be quickly determined without multiple database queries, and meanwhile, the detection tasks in tens of millions of seconds can be quickly read by combining the characteristic that the data quantity supported by a non-relational database is not limited by the memory and the characteristic of reading the whole data. By adopting the mode of replacing the storage space of the detection tasks with the reading time of the detection tasks, the batch processing of the detection tasks in seconds is optimized, and ten million detection tasks can be intensively triggered in seconds; therefore, the performance of detecting the logistics list performance under the condition of large concurrency of the logistics list can be effectively improved, and the data volume index of the detection task is effectively improved.

Description

Logistics single performance detection method and delayed task processing method
Technical Field
The application relates to the technical field of logistics management, in particular to a method and a device for detecting logistics single performance, a method and a device for processing a delay task, a delay queue system and electronic equipment.
Background
A delay queue system is a system that can perform detection tasks at specified times in the future. The delay queue system can be widely applied to various fields, detects tasks with completion time requirements in corresponding fields, detects whether the tasks are completed on time, and can detect the number of the tasks to be detected per second from 0 to a certain magnitude.
A typical field of application is the field of logistics management. The logistics industry is sensitive to performance timeliness and unusual monopolies, prompting logistics parties to focus on the projected arrival time of packages, and to expect awareness of packages that perform overtime, as well as timely intervention and problem resolution. For this reason, a delay queue system is generally used to calculate the timeout time of the package based on the age. The existing delay queue system mainly adopts the following implementation modes: the method comprises the steps of realizing a delay queue based on a Redis ordered set, realizing a delay queue based on a relational database and timing scheduling, and realizing a delay queue based on message middleware. With the popularization of online shopping, logistics orders generated by a plurality of product lines of a logistics management platform reach high concurrency of ten thousand levels per second, and due to special detection rules in the field of logistics, a delay queue system needs to be responsible for ten million levels of logistics order performance detection tasks per second and hundred million levels of logistics order overtime detection calculation.
However, in implementing the present invention, the inventor has found that in the case where the logistics single concurrency amount is drastically increased, the existing delay queuing system has at least the following problems: only the detection request number of the logistics list performance of thousand levels per second is supported, and the detection request number of ten thousand levels per second under the condition that the concurrency of the logistics list is increased rapidly is not supported; the magnitude of the trigger tasks at the same moment only reaches ten thousand levels, and millions or even tens of millions of trigger tasks can not be centralized in a single second under the condition that the concurrency of the logistics list is increased rapidly, so that whether goods of the logistics list complete the fulfillment before the predicted time can not be detected on time under the condition that the concurrency of the logistics list is increased rapidly, and the logistics list which does not fulfill on time can not be known in time. In summary, under the condition of a large concurrent amount of a logistics list, the existing delay task system has the problem of poor performance.
Disclosure of Invention
The application provides a logistics list performance detection method to solve the problem that in the prior art, detection performance is poor under the condition that the concurrency of logistics lists is large. The application further provides a logistics list performance detection device, a delayed task processing method and device, a delayed queue system and electronic equipment.
The application provides a logistics single performance detection method, which comprises the following steps:
storing logistics single performance detection tasks corresponding to second-level trigger time and with the quantity being a second-level processing quantity threshold in a non-relational database, wherein the detection tasks comprise detection task serial numbers;
distributing an unoccupied detection task serial number corresponding to the target performance time of the logistics list, and storing logistics list information into a detection task corresponding to the unoccupied detection task serial number;
reading detection tasks of which the quantity is a second-level processing quantity threshold value corresponding to the target second-level trigger time from a database according to the initial position and the end position of the detection tasks corresponding to the target second-level trigger time;
and executing the detection tasks corresponding to the logistics list in the read detection tasks to detect whether the logistics list performs on time.
Optionally, the method further includes:
and setting target performance time of a plurality of logistics lists received at different moments as the same time according to a logistics list detection rule.
Optionally, receiving a logistics list detection request through a streaming computing service;
the step of allocating the unoccupied detection task serial number corresponding to the target performance time to the logistics list comprises the following steps:
storing the occupied detection task serial number of the second-level trigger time to a cache;
determining the unoccupied detection task serial number according to the occupied detection task serial number in the cache;
the executing of the detection tasks corresponding to the logistics list in the read detection tasks comprises the following steps:
and executing a detection task corresponding to the logistics list within the second-level trigger time through the streaming computing service.
Optionally, the allocating an unoccupied detection task serial number corresponding to the target performance time of the logistics list includes:
and if the generated sequence number of the detection task in the current second-level time is greater than the second-level processing quantity threshold, determining the serial number of the unoccupied detection task according to the next second time and the sequence number counted again.
Optionally, the reading, from the database, the detection task record whose number is the threshold of the processing number at the second level and corresponding to the target second-level trigger time according to the start position and the end position of the detection task corresponding to the target second-level trigger time includes:
and reading the detection task records of which the number is the second-level processing number threshold corresponding to the target second-level trigger time from the database by the second-level timing scheduler according to the starting position and the ending position of the detection task corresponding to the target second-level trigger time.
Optionally, the duration of the target performance time relative to the generation time of the detection task includes: month level duration, year level duration.
The application also provides an order overtime payment detection method, which comprises the following steps:
storing order overtime payment detection tasks corresponding to second-level trigger time and having the quantity of a second-level processing quantity threshold in a non-relational database, wherein the detection tasks comprise detection task serial numbers;
allocating an unoccupied detection task serial number corresponding to the target payment time of the order, and storing order information into a detection task corresponding to the unoccupied detection task serial number;
reading detection tasks of which the quantity is a second-level processing quantity threshold value corresponding to the target second-level trigger time from a database according to the initial position and the end position of the detection tasks corresponding to the target second-level trigger time;
and executing the detection tasks corresponding to the orders in the read detection tasks to detect whether the orders are paid on time.
The application also provides an overtime order receiving detection method, which comprises the following steps:
the method comprises the steps that order overtime order taking detection tasks with the quantity corresponding to second-level trigger time and the second-level processing quantity threshold are stored in a non-relational database, wherein the detection tasks comprise detection task serial numbers;
allocating an unoccupied detection task serial number corresponding to the target payment time of the order, and storing order information into a detection task corresponding to the unoccupied detection task serial number;
reading detection tasks of which the quantity is a second-level processing quantity threshold value corresponding to the target second-level trigger time from a database according to the initial position and the end position of the detection tasks corresponding to the target second-level trigger time;
and executing the detection tasks corresponding to the orders in the read detection tasks to detect whether the orders are received on time.
The application also provides a delayed task processing method, which comprises the following steps:
storing detection tasks corresponding to second-level trigger time and having the quantity of second-level processing quantity threshold in a non-relational database, wherein the detection tasks comprise detection task serial numbers;
distributing an unoccupied detection task serial number corresponding to the target completion time of the task to be executed, and storing the information of the task to be executed into the detection task corresponding to the unoccupied detection task serial number;
reading detection tasks of which the quantity is a second-level processing quantity threshold value corresponding to the target second-level trigger time from a database according to the initial position and the end position of the detection tasks corresponding to the target second-level trigger time;
and executing the detection task corresponding to the task to be executed in the read detection tasks to detect whether the task to be executed is completed on time.
The present application further provides a deferred task processing apparatus, including:
the detection task storage unit is used for storing detection tasks which correspond to the second-level trigger time and are in the number of second-level processing number threshold values in a non-relational database, and the detection tasks comprise detection task serial numbers;
the task serial number distribution unit is used for distributing an unoccupied detection task serial number corresponding to the target completion time of the task to be executed, and storing the information of the task to be executed into the detection task corresponding to the unoccupied detection task serial number;
the detection task reading unit is used for reading the detection tasks of which the quantity is the second-level processing quantity threshold value corresponding to the target second-level trigger time from the database according to the initial position and the end position of the detection tasks corresponding to the target second-level trigger time;
and the detection task execution unit is used for executing the detection task corresponding to the task to be executed in the read detection tasks so as to detect whether the task to be executed is completed on time.
The present application also provides a computer-readable storage medium having stored therein instructions, which when run on a computer, cause the computer to perform the various methods described above.
The present application also provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the various methods described above.
Compared with the prior art, the method has the following advantages:
according to the logistics list performance detection method provided by the embodiment of the application, a large number of detection tasks in each second are stored in a sparse storage mode, detection task records can be generated even when the detection tasks are not available, so that the initial position and the end position of each second detection task can be quickly determined without multiple database queries, meanwhile, ten-million detection tasks in each second can be quickly read by combining the characteristic that the data quantity supported by a non-relational database is not limited by a memory and the characteristic of reading whole data, namely, the storage space of the detection tasks is used for replacing the reading time of the detection tasks, the batch processing of the detection tasks in each second is optimized, and ten-million detection tasks can be intensively triggered in each second; therefore, the performance of detecting the logistics list performance under the condition of large concurrency of the logistics list can be effectively improved, and the data volume index of the detection task is effectively improved. In addition, the processing mode fully considers the capacity and persistent storage problems of the detection tasks, so that the detection task triggering far away from the current time (such as months) is supported, and no upper limit is provided for the support of the future time.
According to the delay task processing method provided by the embodiment of the application, a sparse storage mode is adopted for a large number of detection tasks in each second, detection task records can be generated even when the detection tasks are not available, so that the initial position and the end position of each second detection task can be quickly determined without multiple database queries, meanwhile, ten-million detection tasks in each second can be quickly read by combining the characteristic that the data quantity supported by a non-relational database is not limited by a memory and the characteristic of whole data reading, namely, the storage space of the detection tasks is used for replacing the reading time of the detection tasks, the batch processing of the detection tasks in each second is optimized, and ten-million detection tasks can be intensively triggered in each second; therefore, under the condition that the concurrency of the tasks to be executed with the completion time requirement is large, the detection performance for detecting whether the detection of the tasks to be executed is completed on time can be effectively improved, and the data volume index of the detected tasks is effectively improved. In addition, the processing mode fully considers the capacity and persistent storage problems of the detection tasks, so that the detection task triggering far away from the current time (such as months) is supported, and no upper limit is provided for the support of the future time.
Drawings
FIG. 1 is a schematic flow chart diagram of an embodiment of a method for detecting logistics single performance provided by the present application;
FIG. 2 is a schematic diagram of an application scenario of an embodiment of a method for detecting logistics single performance provided by the present application;
FIG. 3 is a schematic diagram of an apparatus interaction of an embodiment of a method for logistics single performance detection provided by the present application;
fig. 4 is a schematic diagram of a specific implementation of an embodiment of a logistics single performance detection system provided by the present application.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. This application is capable of implementation in many different ways than those herein set forth and of similar import by those skilled in the art without departing from the spirit of this application and is therefore not limited to the specific implementations disclosed below.
In the application, a logistics single performance detection method and device, a delayed task processing method and device, a delayed queue system and electronic equipment are provided. Each of the schemes is described in detail in the following examples.
First embodiment
The application provides a logistics single performance detection method, and the execution subject of the method includes but is not limited to a delay queue system, and can be any device capable of implementing the method.
Please refer to fig. 1, which is a flowchart illustrating an embodiment of a method for detecting logistics single performance according to the present application. In this embodiment, the method may include the steps of:
step S101: and storing the logistics single performance detection tasks corresponding to the second-level trigger time and with the quantity being a second-level processing quantity threshold in a non-relational database, wherein the detection tasks comprise detection task serial numbers.
In order to facilitate intuitive understanding of the logistics single performance detection method provided in the embodiment of the present application, an application scenario of the method is briefly described below. Please refer to fig. 2, which is a schematic view of an application scenario of an embodiment of the method provided in the present application. In this embodiment, the method is applied to a logistics single performance detection system. The system can generate logistics lists of tens of thousands of levels per second and above through the logistics management platform; whether the logistics lists are completed on time or not is detected through the delayed task processing server, the detected abnormal logistics lists which are not completed on time can be sent to the logistics management platform, and the logistics management platform sends alarm information of the logistics lists which are not completed on time to the client of the management user, so that the management user can timely know the logistics lists which are not completed on time, and timely intervention is facilitated for solving problems. In specific implementation, a logistics list production device can be deployed in a server of the logistics management platform, and a logistics list performance detection device can be deployed in a server of the delayed task processing.
With the popularization of online shopping, the quantity of logistics lists generated by a plurality of product lines of the logistics management platform can reach the ten thousand per second level. For example, in the e-commerce industry, the promotion often occupies a large flow rate, and has two characteristics of package concentration and time concentration, and the single quantity of logistics generated by the promotion can reach ten thousand per second.
The logistics list performance detection device executes the method and is responsible for tens of millions of logistics list performance detection tasks and hundreds of millions of logistics list performance detection calculations per second. The logistics scene has a special detection rule, taking order warehouse-out detection as an example, the order packaged in a warehouse is required to be notified 18:00 days ago and needs to be delivered out of the warehouse before 20:00 days, which means that orders in multiple hours in one day are all concentrated at 20:00 o' clock to perform warehouse-out detection, which is why ten thousand levels of logistics orders generated per second can cause tens of millions of levels of logistics order fulfillment detection tasks per second, and therefore, a large number of logistics order overtime detection tasks need to be generated at the same time.
As shown in fig. 3, the logistics single performance detection apparatus is configured to store, in a non-relational database, a number of logistics single performance detection tasks corresponding to the second-level trigger time and corresponding to the second-level processing number threshold, where the detection tasks include detection task serial numbers, where the serial numbers include the second-level trigger time and the intra-second number; the logistics list production device is used for generating logistics list information, sending a logistics list detection request to the logistics list performance detection device and sending the logistics list information to the logistics list performance detection device; the logistics list performance detection device is used for distributing an unoccupied detection task serial number corresponding to the target performance time of the logistics list and storing logistics list information into a detection task corresponding to the unoccupied detection task serial number; reading detection tasks of which the quantity is a second-level processing quantity threshold value corresponding to the target second-level trigger time from a database according to the initial position and the end position of the detection tasks corresponding to the target second-level trigger time; and executing the detection tasks corresponding to the logistics list in the read detection tasks to detect whether the logistics list performs on time. The logistics list performance detection device can also be used for sending the logistics list which is not completed on time to the abnormal logistics list processing device, and the abnormal logistics list processing device can display the abnormal logistics list to a user for checking.
The logistics list can be a logistics list of a logistics sub-link in a logistics link, such as a main line transportation logistics list from abroad to China in a cross-border logistics link. The logistics list can also be a distribution list for online shopping directly facing the consumer, such as take-out orders, Taobao orders and the like. The logistics list information comprises logistics list identification and target performance time, and can also comprise common logistics information such as distribution addresses and the like. The target performance time may be package distribution time, package warehousing-in-to-out time, clearance completion time, and the like. The target performance time may be in the order of minutes, hours, or other time units.
The method provided by the embodiment of the application can convert each received detection request into a detection task. The detection task is a detection task for the logistics list, and is used for detecting whether the logistics list is completed in the expected performance time (target performance time). In this embodiment, the detection tasks are stored in a non-relational database. The non-relational database may be a distributed, column-oriented database, which may be referred to as a big data storage engine, a distributed storage system of structured data, such as an Hbase database selected to support big throughput and big data. The inspection tasks stored in the database may include key value pairs, with the inspection task serial number (inspection task identification) as a key and the logistics list information (text) as a value. The detection task identification is used for inquiring the detection task, and the logistics list information is used for executing the detection task.
In a logistics scene, a huge number of logistics single performance detection tasks need to be executed every minute, in order to effectively execute the detection tasks, a detection task batch processing mode with the unit of second is generally adopted, and the detection tasks within one second are intensively triggered, so that the triggering time of the logistics single performance detection tasks is second-level triggering time.
Since a plurality of inspection tasks are included within one second, the inspection task serial number includes a second level trigger time and an intra-second number. The second-level trigger time indicates that the task is triggered at the second, and may be a timestamp of the second-level time, which may be used to read all detection tasks of the second from the database when the second-level time is reached. The number in seconds indicates the first digit of the detection task in the second, so that the position of the detection task can be determined, and in addition, the identification of all the detection tasks in one second is unique. The first number in a second indicates the start positions of all the detection tasks in the second, and the last number in the second indicates the end positions of all the detection tasks in the second.
The second-level trigger time can be determined according to the target performance time of the logistics list. The logistics single performance detection device is insensitive to the logistics single performance detection task with the target performance time of minute level and above, and does not require triggering the logistics single performance detection task precisely in a certain second. That is, the logistics single performance detection task may correspond to any second-level trigger time within its target performance time, as long as the detection task can be read for execution within the target performance time (e.g., 2021/10/1515: 30).
In the present embodiment, the logistics single performance detection tasks corresponding to the triggering time in the second level and in the number of the second level processing number threshold are stored in the non-relational database. That is, the number of detection task records corresponding to one second in the database is a fixed number. The second-level processing quantity threshold may be set according to the magnitude of detection tasks that can be collectively read by the system per second, and if ten million detection tasks can be read per second, the second-level processing quantity threshold is ten million. According to the method provided by the embodiment of the application, the number of the detection tasks in one second is a fixed number, so that the starting positions and the ending positions of all the detection tasks in the second can be directly determined, and the detection task serial numbers do not need to be read one by one to determine whether all the detection tasks in the second are read.
Therefore, the system provided by the embodiment of the application adopts a mode of presetting a detection task serial number (key) when a storage structure of detection task trigger time is considered. In this storage method, the key space is sparse, and the key range is scanned even without a task. This results in wasted computational resources in the case of sparse detection tasks and the need to manage key occupancy. However, in a scene with a large amount of concurrent logistics list, the detection tasks are distributed more densely every second, and a large amount of logistics list detection tasks can be processed through batch processing optimization. Table 1 shows detection task data in the present embodiment.
Detecting task identifiers Logistics list identification
1634567172 00000000 AX0215463165
1634567172 00000001 AX0215463165
1634567172 00000002 Asf466464656
1634567172 00000003 645665116316
163456717299999999 641166889436
1634567173 00000000 189156165166
1634567173 00000001 Air conditioner
1634567173 00000002 Air conditioner
163456717399999999 Air conditioner
163456717400000000 444215463165
163456717400000001 545566464656
163456717400000002 789665116316
TABLE 1 detection task data in this example
As can be seen from table 1, the detection task sequence number includes a time stamp of the trigger time in seconds and an intra-second number. The starting position and the ending position of the detection task in each second are hidden in the detection task serial number, the starting position corresponds to the sequence number 00000000, the ending position corresponds to the sequence number 99999999, the starting position and the ending position can be directly determined without more calculation, therefore, the whole data corresponding to the second can be quickly read, and tens of millions of trigger tasks are centralized in a single second.
In another implementation mode, an ordered set of redis is adopted to store the trigger time of the detection task, the ordered set of redis uses ordered storage, in the storage mode, the key space is compact, and keys cannot be generated at the moment of detecting the task without delay. Although this implementation may reduce storage space or reduce processing time, it often costs more processing time because batch optimization cannot be performed. Table 2 shows detection task data for another implementation.
Detecting task identifiers Logistics list identification
1634567172 00000000 AX0215463165
1634567172 00000001 AX0215463165
1634567172 00000002 Asf466464656
1634567172 00000003 645665116316
163456717201000000 641166889436
1634567173 00000000 189156165166
1634567173 00000001 564464646666
1634567173 00000002 444456775757
163456717300000100 785778575757
163456717400000000 444215463165
163456717400000001 545566464656
163456717400000002 789665116316
TABLE 2 detection task data in the prior art
As can be seen from table 2, compared with the compact storage scheme adopted by another implementation, assuming that 1634567172 stores 100 ten thousand detection tasks in one second, the number of the detection tasks in the second is 1-1000000, when 1634567172 is reached, it is necessary to check each data of 1-1000000 for each second, that is, whether the second belongs to the second: in order to determine how many large ranges of detection task data need to be read frequently, 100 ten thousand pieces of data per second may need to be read 100 ten thousand times, and frequent reading of the database results in that ten million trigger tasks in a single second cannot be supported.
Step S103: and allocating an unoccupied detection task serial number corresponding to the target performance time of the logistics list, and storing the logistics list information into the detection task corresponding to the unoccupied detection task serial number.
The method adopts a mode of presetting a detection task serial number, after a logistics list detection request is received, an unoccupied detection task serial number corresponding to the target performance time of the logistics list can be distributed to the logistics list, and logistics list information is stored in a detection task corresponding to the unoccupied detection task serial number.
In this embodiment, the logistics list performance detection device receives ten-thousand-level logistics lists with high concurrency in one second, and accordingly ten-million-level detection tasks can be generated, and the detection tasks can be numbered according to the generation sequence of the detection tasks in one second, that is, the number in one second in the sequence numbers of the detection tasks is the generation sequence number of the detection tasks in the time in one second.
For example, the target performance time of the logistics list a is 2021/10/1815: 28 minutes, the time for receiving the logistics list a is 2021/10/155: 15:23, and for the first logistics list received in the second, the performance condition that ten million logistics lists can be detected in one second is set, that is, the processing quantity threshold value at the second level is ten million, then the detection task sequence number may be: 2021101815282300000001. where 202110181528 indicates the target performance time, 23 indicates the 23 rd second in the minute, and 00000001 indicates that the inspection task is the first inspection task in 2021/10/1815: 28 minutes, 23 th second.
In this embodiment, the generation sequence number is less than or equal to a second-level processing amount threshold; the detection task sequence number can be distributed in the following way: and if the generated sequence number of the detection task in the current second-level time is greater than the second-level processing quantity threshold, determining the unoccupied detection task identifier according to the next second time and the sequence number counted again. Therefore, when the serial number of the current second is full, the next second moves forward, the number threshold value of detection tasks per second can be guaranteed not to be exceeded, all tasks within one second can be quickly read, and therefore the detection tasks of tens of millions of levels per second can be intensively triggered.
In one example, step S203 may include the following sub-steps: storing the occupied detection task serial number of the second-level trigger time to a cache, such as a Redis cache system; and determining the unoccupied detection task sequence number according to the occupied detection task sequence number in the cache. Therefore, the using condition of the serial number in the second can be cached, the residual space of the current second is recorded in a mode of caching the used serial number, the determining mode of the detection task serial number is simplified, the determining speed of the detection task serial number is effectively improved, the situation that the serial number is repeatedly occupied can be ensured, and the logistics single performance detection performance under the high concurrency condition is ensured.
In this embodiment, each logistics list receiving message forms a detection task in the form of a "detection task sequence number + logistics list information", the detection task sequence number is stored as a key of a big data storage engine (such as Hbase), and the logistics list information is used as the storage content of the big data storage engine. In the aspect of generating a detection task serial number, the time of the logistics single future trigger detection is recorded, the sparse storage structure conforms to the Hbase query structure so as to facilitate range query, and the number of detection tasks which can be stored in the same second is limited, so that the number of serial numbers occupied in the second can be recorded, and the sequence is extended to the next second after the serial number of the second is full. For this reason, the method may use redis to record the condition of occupied serial numbers, ensuring that duplicate occupation and full conditions do not occur.
In this embodiment, the delay processing time of the target fulfillment time relative to the generation time of the detection task may be a month-level time, such as three months later for the target fulfillment time of the logistics list. The delay processing time may also be a year-level time, such as a target performance time of the logistics list after one year. Therefore, the logistics list with long performance time can be supported, and the application requirement that the performance can be completed only by the logistics list in the field of logistics management for a long time is met. For example, in a merchant stocking scenario of logistics, the trunk transportation often takes weeks or even months, so the future time of support should be a long span.
According to the method provided by the embodiment of the application, the detection task serial number comprises the second-level trigger time of the detection task and the generation sequence number of the detection task in the second-level time, the detection task identifier of the composite structure is stored in the non-relational database, and a fixed number (a second-level processing number threshold value) of detection tasks is generated for each second, so that a data base can be provided for batch processing optimization supporting centralized processing of tens of millions of detection tasks in units of seconds.
So far, a generation method of the logistics single performance detection task is explained. The following describes a trigger execution mode of the detection task.
Step S105: and reading the detection tasks of which the quantity is the second-level processing quantity threshold value corresponding to the target second-level trigger time from the database according to the initial position and the final position of the detection tasks corresponding to the target second-level trigger time.
The method provided by the embodiment of the application can check whether the logistics list with the target performance time being the current minute time is completed on time every second. In order to detect whether the logistics list of ten million levels per second is finished on time under the condition of large concurrent amount of the logistics list, the method directly and wholly reads the fixed amount of detection tasks corresponding to the current second level moment from the non-relational database when the logistics list performance condition is detected, so that the detection tasks of ten million levels in seconds can be quickly read, and the detection tasks can include the detection tasks with the logistics list information being empty. In this way, 0 to a plurality of detection tasks with the trigger time of the current second can be read every second, and ten million detection tasks can be triggered in a concentrated manner by taking the second as a unit.
As described above, the start position and the end position of the detection task in each second may be hidden in the detection task sequence number, for example, the start position corresponds to the sequence number 00000000, the end position corresponds to the sequence number 99999999, and the start position and the end position can be directly determined without further calculation, so that the whole data corresponding to the second can be quickly read, and tens of millions of trigger tasks are supported in a single second set.
In one example, step S105 can be implemented as follows: and reading the detection task records of which the number is the second-level processing number threshold corresponding to the target second-level trigger time from the non-relational database according to the initial position and the end position of the detection task corresponding to the target second-level trigger time by a second-level timing scheduler. Therefore, the detection task of one second can not be missed, and the accuracy of the logistics single performance detection is effectively improved.
In particular implementations, a distributed task scheduling service (e.g., schedulex) may be used to trigger the pulses per second, and a streaming consuming service (e.g., blink) may receive the pulses and initiate the scan. The principle is that the "future time" of the physical distribution list message produced by the physical distribution list producing end (physical distribution list producing apparatus) may have become the "present time" at present after the lapse of time. All the inspection task sequence numbers up to the pulse time are taken out and sent to the message processing end, and the processing ensures that no one second is missed.
Step S107: and executing the detection tasks corresponding to the logistics list in the read detection tasks to detect whether the logistics list performs on time.
The logistics list fulfillment detection device can execute ten million detection tasks within one second after acquiring the detection tasks, and timely detect the logistics list which is not fulfilled on time. In the method provided by this embodiment, the detection tasks read from the non-relational database within one second include the detection task corresponding to the logistics list and the detection task in which the logistics list is empty, and only the detection task corresponding to the logistics list needs to be executed.
In one example, the physical distribution list performance detection device may receive a physical distribution list detection request through a streaming computing service (e.g., blink streaming service, etc.); accordingly, detection tasks within one second can be performed by the streaming computing service. Therefore, ten million logistics lists triggered by one second can be detected in parallel in a distributed mode through the server cluster, and dynamic adjustment of performance parameters is supported, so that concurrency quantity indexes can be effectively improved.
As shown in fig. 4, in this embodiment, the logistics management platform (logistics list production apparatus) sends a large number of concurrent logistics list detection requests to the logistics list performance detection apparatus through a message middleware (such as MetaQ). The logistics list performance detection device receives a large number of concurrent logistics lists through a streaming computing service (such as blink), generates detection tasks corresponding to the logistics lists, and writes tens of millions of detection tasks per second into a big data storage engine (such as Hbase). The detection task serial number is a key in a non-relational database, the logistics list information is a value in the non-relational database, and the detection task serial number comprises second-level trigger time and a generation sequence number of a logistics list performance detection task. And then, generating pulse per second trigger through a timing scheduler (such as schedule, etc.), receiving the pulse and starting scanning by the blink streaming consumption service, and reading the detection tasks corresponding to the target second-level trigger time and having the number of second-level processing quantity thresholds from the database according to the start position and the end position of the detection tasks corresponding to the target second-level trigger time. Finally, the detection task is performed by the streaming computing service. Experiments prove that the configuration can support 1 million data which is consumed to the same second within 6 minutes, and ensure that no data is lost. Therefore, the delay queue based on the big data storage engine and the streaming computing service can be realized, the delay queue supporting large concurrency, large data volume and high single-time trigger task volume is realized, and the logistics single-performance detection performance is effectively improved.
As can be seen from the foregoing embodiments, according to the logistics list fulfillment detection method provided in the embodiments of the present application, a sparse storage manner is adopted for a large number of detection tasks per second, and a detection task record is generated even when there is no detection task, so that an initial position and an end position of a detection task per second can be quickly determined without multiple database queries, and meanwhile, by combining a characteristic that a data amount supported by a non-relational database is not limited by a memory and an entire data reading characteristic, ten-million detection tasks per second can be quickly read, that is, a storage space of a detection task is used to replace a reading time of a detection task, a batch processing of the detection tasks in units of seconds is optimized, and ten-million detection tasks can be intensively triggered in units of seconds; therefore, the performance of detecting the logistics list performance under the condition of large concurrency of the logistics list can be effectively improved, and the data volume index of the detection task is effectively improved. In addition, the processing mode fully considers the capacity and persistent storage problems of the detection tasks, so that the detection task triggering far away from the current time (such as months) is supported, and no upper limit is provided for the support of the future time.
Second embodiment
In the foregoing embodiment, a method for detecting logistics single performance is provided, and correspondingly, a device for detecting logistics single performance is also provided. The apparatus corresponds to an embodiment of the method described above. Since the apparatus embodiments are substantially similar to the method embodiments, they are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for relevant points. The device embodiments described below are merely illustrative.
The application provides a single detection device that performs in commodity circulation includes:
the system comprises a detection task storage unit, a non-relational database and a data processing unit, wherein the detection task storage unit is used for storing logistics single performance detection tasks which correspond to second-level trigger time and are in number of second-level processing number thresholds, and the detection tasks comprise detection task serial numbers;
the task sequence number distribution unit is used for distributing an unoccupied detection task sequence number corresponding to the target performance time of the logistics list and storing the logistics list information into the detection task corresponding to the unoccupied detection task sequence number;
the detection task reading unit is used for reading the detection tasks of which the quantity is the second-level processing quantity threshold value corresponding to the target second-level trigger time from the database according to the initial position and the end position of the detection tasks corresponding to the target second-level trigger time;
and the detection task execution unit is used for executing the detection task corresponding to the logistics list in the read detection tasks so as to detect whether the logistics list performs on time.
Third embodiment
In the foregoing embodiment, a method for detecting logistics single performance is provided, and correspondingly, a method for processing a delay task is also provided, where the method for processing a delay task is not limited to a specific application scenario. The method corresponds to the embodiment of the method described above. Since this embodiment is basically similar to the first embodiment, the description is simple, and the relevant points can be referred to the partial description of the first embodiment. The method embodiments described below are merely illustrative.
In this embodiment, the method for processing a deferred task may include the following steps:
step 1: storing detection tasks corresponding to second-level trigger time and having the quantity of second-level processing quantity threshold in a non-relational database, wherein the detection tasks comprise detection task serial numbers;
step 2: distributing an unoccupied detection task serial number corresponding to the target completion time of the task to be executed, and storing the information of the task to be executed into the detection task corresponding to the unoccupied detection task serial number;
and step 3: reading detection tasks of which the quantity is a second-level processing quantity threshold value corresponding to the target second-level trigger time from a database according to the initial position and the end position of the detection tasks corresponding to the target second-level trigger time;
and 4, step 4: and executing the detection task corresponding to the task to be executed in the read detection tasks to detect whether the task to be executed is completed on time.
As can be seen from the foregoing embodiments, in the delay task processing method provided in the embodiments of the present application, a sparse storage manner is adopted for a large number of detection tasks per second, and a detection task record is generated even when there is no detection task, so that a start position and an end position of a detection task per second can be quickly determined without multiple database queries, and meanwhile, in combination with a characteristic that a data amount supported by a non-relational database is not limited by a memory and a whole-block data reading characteristic, a million-level detection task per second can be quickly read, that is, a storage space of a detection task is used to replace a reading time of a detection task, so that detection task batch processing in units of seconds is optimized, and ten million detection tasks can be intensively triggered in units of seconds; therefore, under the condition that the concurrency of the tasks to be executed with the completion time requirement is large, the detection performance for detecting whether the detection of the tasks to be executed is completed on time can be effectively improved, and the data volume index of the detected tasks is effectively improved. In addition, the processing mode fully considers the capacity and persistent storage problems of the detection tasks, so that the detection task triggering far away from the current time (such as months) is supported, and no upper limit is provided for the support of the future time.
Fourth embodiment
In the foregoing embodiment, a method for processing a deferred task is provided, and correspondingly, the present application further provides a deferred task processing apparatus. The apparatus corresponds to an embodiment of the method described above. Since the apparatus embodiments are substantially similar to the method embodiments, they are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for relevant points. The device embodiments described below are merely illustrative.
The present application provides a deferred task processing apparatus, including:
the detection task storage unit is used for storing detection tasks which correspond to the second-level trigger time and are in the number of second-level processing number threshold values in a non-relational database, and the detection tasks comprise detection task serial numbers;
the task serial number distribution unit is used for distributing an unoccupied detection task serial number corresponding to the target completion time of the task to be executed, and storing the information of the task to be executed into the detection task corresponding to the unoccupied detection task serial number;
the detection task reading unit is used for reading the detection tasks of which the quantity is the second-level processing quantity threshold value corresponding to the target second-level trigger time from the database according to the initial position and the end position of the detection tasks corresponding to the target second-level trigger time;
and the detection task execution unit is used for executing the detection task corresponding to the task to be executed in the read detection tasks so as to detect whether the task to be executed is completed on time.
Fifth embodiment
In the foregoing embodiment, a method for processing a deferred task is provided, and accordingly, the present application also provides an electronic device. The apparatus corresponds to an embodiment of the method described above. Since the apparatus embodiments are substantially similar to the method embodiments, they are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for relevant points. The device embodiments described below are merely illustrative.
An electronic device of the present embodiment includes: a processor and a memory; a memory for storing a program for implementing the method according to any one of the preceding claims, the device being powered on and the program for running the method via the processor.
Sixth embodiment
In the foregoing embodiment, a method for processing a delay task is provided, and correspondingly, the present application further provides a delay queue system. The system corresponds to the embodiment of the method described above. Since the system embodiments are substantially similar to the method embodiments, they are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for relevant points. The system embodiments described below are merely illustrative.
A delay queue system of this embodiment includes: a task producing device and a delayed task processing device.
The task production device is used for generating a task to be executed with a completion time requirement and sending the task to be executed to the delayed task processing device. The delay task processing device is described in the fifth embodiment, and is not described herein again.
The task production device can deploy a task generation server and can produce tasks with the requirement of completion time in the order of tens of thousands of seconds or more. The task production device can be deployed at a delayed task processing server, can support tens of thousands of tasks per second to complete detection requests, can support tens of millions of detection tasks which are collectively triggered per second, detects whether the tasks to be executed are completed before the predicted time, and timely acquires the tasks which are not completed on time.
As shown in fig. 2, the task production device is deployed on a physical management platform, and can generate a logistics list of ten thousand per second or more; correspondingly, the logistics list which is not performed on time can be detected in time through the delay task processing server side, so that timely intervention and problem solving can be facilitated.
As can be seen from the foregoing embodiments, in the delay queue system provided in the embodiments of the present application, a sparse storage manner is adopted for a large number of detection tasks per second, and a detection task record is generated even when there is no detection task, so that a start position and an end position of a detection task per second can be quickly determined without multiple database queries, and meanwhile, in combination with a characteristic that a data amount supported by a non-relational database is not limited by a memory and a whole-block data reading characteristic, ten-million detection tasks per second can be quickly read, that is, a storage space of a detection task is used to replace a reading time of a detection task, a batch processing of detection tasks in units of seconds is optimized, and ten-million detection tasks can be intensively triggered in units of seconds; therefore, under the condition that the concurrency of the tasks to be executed with the completion time requirement is large, the detection performance for detecting whether the detection of the tasks to be executed is completed on time can be effectively improved, and the data volume index of the detected tasks is effectively improved. In addition, the processing mode fully considers the capacity and persistent storage problems of the detection tasks, so that the detection task triggering far away from the current time (such as months) is supported, and no upper limit is provided for the support of the future time.
Seventh embodiment
In the above embodiment, a method for detecting logistics order performance is provided, and correspondingly, a method for detecting order overtime payment is also provided. The method corresponds to the embodiment of the method described above. Since this embodiment is basically similar to the first embodiment, the description is simple, and the relevant points can be referred to the partial description of the first embodiment. The method embodiments described below are merely illustrative.
In this embodiment, the order timeout payment detection method may include the following steps:
step 1: storing order overtime payment detection tasks corresponding to second-level trigger time and having the quantity of a second-level processing quantity threshold in a non-relational database, wherein the detection tasks comprise detection task serial numbers;
step 2: allocating an unoccupied detection task serial number corresponding to the target payment time of the order, and storing order information into a detection task corresponding to the unoccupied detection task serial number;
and step 3: reading detection tasks of which the quantity is a second-level processing quantity threshold value corresponding to the target second-level trigger time from a database according to the initial position and the end position of the detection tasks corresponding to the target second-level trigger time;
and 4, step 4: and executing the detection tasks corresponding to the orders in the read detection tasks to detect whether the orders are paid on time.
The order can be an order generated by the e-commerce platform. In order to effectively sell goods, it is generally required that the order be paid within a certain time limit, for example, after payment within 1 hour, if payment is over time, the buyer user may be contacted to remind him to pay as early as possible, and if payment is not available later, the inventory of goods occupied by the order may be released. By adopting the method provided by the embodiment of the application, whether the orders of tens of millions per second are paid overtime or not can be quickly detected.
Eighth embodiment
In the above embodiment, a method for detecting logistics order performance is provided, and correspondingly, a method for detecting order overtime payment is also provided. The method corresponds to the embodiment of the method described above. Since this embodiment is basically similar to the first embodiment, the description is simple, and the relevant points can be referred to the partial description of the first embodiment. The method embodiments described below are merely illustrative.
In this embodiment, the order timeout payment detection method may include the following steps:
step 1: the method comprises the steps that order overtime order taking detection tasks with the quantity corresponding to second-level trigger time and the second-level processing quantity threshold are stored in a non-relational database, wherein the detection tasks comprise detection task serial numbers;
step 2: allocating an unoccupied detection task serial number corresponding to the target payment time of the order, and storing order information into a detection task corresponding to the unoccupied detection task serial number;
and step 3: reading detection tasks of which the quantity is a second-level processing quantity threshold value corresponding to the target second-level trigger time from a database according to the initial position and the end position of the detection tasks corresponding to the target second-level trigger time;
and 4, step 4: and executing the detection tasks corresponding to the orders in the read detection tasks to detect whether the orders are received on time.
The order may be an order from the take-away platform, and the merchant in the on-line store needs to confirm the order from the take-away platform in time. In order to deliver the food to the buyer on time, the platform usually requires the merchant to confirm the order within a certain time limit, for example, the order is received within 15 minutes, if the merchant receives the order within a time limit, the merchant can contact the off-line store to remind the user to receive the order as soon as possible, and the problem that the food cannot be delivered to the buyer user on time is avoided. By adopting the method provided by the embodiment of the application, whether orders are received overtime or not can be quickly detected.
Although the present application has been described with reference to the preferred embodiments, it is not intended to limit the present application, and those skilled in the art can make variations and modifications without departing from the spirit and scope of the present application, therefore, the scope of the present application should be determined by the claims that follow.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
1. Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.
2. As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.

Claims (10)

1. A method for detecting logistics single performance is characterized by comprising the following steps:
storing logistics single performance detection tasks corresponding to second-level trigger time and with the quantity being a second-level processing quantity threshold in a non-relational database, wherein the detection tasks comprise detection task serial numbers;
distributing an unoccupied detection task serial number corresponding to the target performance time of the logistics list, and storing logistics list information into a detection task corresponding to the unoccupied detection task serial number;
reading detection tasks of which the quantity is a second-level processing quantity threshold value corresponding to the target second-level trigger time from a database according to the initial position and the end position of the detection tasks corresponding to the target second-level trigger time;
and executing the detection tasks corresponding to the logistics list in the read detection tasks to detect whether the logistics list performs on time.
2. The method of claim 1, further comprising:
and setting target performance time of a plurality of logistics lists received at different moments as the same time according to a logistics list detection rule.
3. The method of claim 1,
receiving a logistics list detection request through a streaming computing service;
the step of allocating the unoccupied detection task serial number corresponding to the target performance time to the logistics list comprises the following steps:
storing the occupied detection task serial number of the second-level trigger time to a cache;
determining the unoccupied detection task serial number according to the occupied detection task serial number in the cache;
the executing of the detection tasks corresponding to the logistics list in the read detection tasks comprises the following steps:
and executing a detection task corresponding to the logistics list within the second-level trigger time through the streaming computing service.
4. The method of claim 1,
the step of allocating the unoccupied detection task serial number corresponding to the target performance time to the logistics list comprises the following steps:
and if the generated sequence number of the detection task in the current second-level time is greater than the second-level processing quantity threshold, determining the serial number of the unoccupied detection task according to the next second time and the sequence number counted again.
5. The method of claim 2,
the reading of the detection task record corresponding to the target second-level trigger time and with the quantity being the second-level processing quantity threshold from the database according to the detection task starting position and the detection task ending position corresponding to the target second-level trigger time comprises the following steps:
and reading the detection task records of which the number is the second-level processing number threshold corresponding to the target second-level trigger time from the database by the second-level timing scheduler according to the starting position and the ending position of the detection task corresponding to the target second-level trigger time.
6. The method of claim 1,
the duration of the target performance time relative to the generation time of the detection task comprises: month level duration, year level duration.
7. An order timeout payment detection method, comprising:
storing order overtime payment detection tasks corresponding to second-level trigger time and having the quantity of a second-level processing quantity threshold in a non-relational database, wherein the detection tasks comprise detection task serial numbers;
allocating an unoccupied detection task serial number corresponding to the target payment time of the order, and storing order information into a detection task corresponding to the unoccupied detection task serial number;
reading detection tasks of which the quantity is a second-level processing quantity threshold value corresponding to the target second-level trigger time from a database according to the initial position and the end position of the detection tasks corresponding to the target second-level trigger time;
and executing the detection tasks corresponding to the orders in the read detection tasks to detect whether the orders are paid on time.
8. An order overtime order receiving detection method is characterized by comprising the following steps:
the method comprises the steps that order overtime order taking detection tasks with the quantity corresponding to second-level trigger time and the second-level processing quantity threshold are stored in a non-relational database, wherein the detection tasks comprise detection task serial numbers;
allocating an unoccupied detection task serial number corresponding to the target payment time of the order, and storing order information into a detection task corresponding to the unoccupied detection task serial number;
reading detection tasks of which the quantity is a second-level processing quantity threshold value corresponding to the target second-level trigger time from a database according to the initial position and the end position of the detection tasks corresponding to the target second-level trigger time;
and executing the detection tasks corresponding to the orders in the read detection tasks to detect whether the orders are received on time.
9. A method for processing a deferred task, comprising:
storing detection tasks corresponding to second-level trigger time and having the quantity of second-level processing quantity threshold in a non-relational database, wherein the detection tasks comprise detection task serial numbers;
distributing an unoccupied detection task serial number corresponding to the target completion time of the task to be executed, and storing the information of the task to be executed into the detection task corresponding to the unoccupied detection task serial number;
reading detection tasks of which the quantity is a second-level processing quantity threshold value corresponding to the target second-level trigger time from a database according to the initial position and the end position of the detection tasks corresponding to the target second-level trigger time;
and executing the detection task corresponding to the task to be executed in the read detection tasks to detect whether the task to be executed is completed on time.
10. A deferred task processing apparatus, comprising:
the detection task storage unit is used for storing detection tasks which correspond to the second-level trigger time and are in the number of second-level processing number threshold values in a non-relational database, and the detection tasks comprise detection task serial numbers;
the task serial number distribution unit is used for distributing an unoccupied detection task serial number corresponding to the target completion time of the task to be executed, and storing the information of the task to be executed into the detection task corresponding to the unoccupied detection task serial number;
the detection task reading unit is used for reading the detection tasks of which the quantity is the second-level processing quantity threshold value corresponding to the target second-level trigger time from the database according to the initial position and the end position of the detection tasks corresponding to the target second-level trigger time;
and the detection task execution unit is used for executing the detection task corresponding to the task to be executed in the read detection tasks so as to detect whether the task to be executed is completed on time.
CN202111249469.5A 2021-10-26 2021-10-26 Logistics single performance detection method and delayed task processing method Pending CN114238309A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111249469.5A CN114238309A (en) 2021-10-26 2021-10-26 Logistics single performance detection method and delayed task processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111249469.5A CN114238309A (en) 2021-10-26 2021-10-26 Logistics single performance detection method and delayed task processing method

Publications (1)

Publication Number Publication Date
CN114238309A true CN114238309A (en) 2022-03-25

Family

ID=80743280

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111249469.5A Pending CN114238309A (en) 2021-10-26 2021-10-26 Logistics single performance detection method and delayed task processing method

Country Status (1)

Country Link
CN (1) CN114238309A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7962382B1 (en) * 2007-07-20 2011-06-14 Wells Fargo Bank, N.A. Payment broker system and method
US20150269652A1 (en) * 2014-03-24 2015-09-24 Alibaba Group Holding Limited Method and system for processing periodic orders
US20160034862A1 (en) * 2014-07-31 2016-02-04 Ncr Corporation Dynamic network timeout tuning
US20160147955A1 (en) * 2014-11-20 2016-05-26 Netspective Communications Llc Tasks scheduling based on triggering event and work lists management
CN110060118A (en) * 2019-02-27 2019-07-26 浙江执御信息技术有限公司 A kind of order is honoured an agreement full link method for real-time monitoring, device and computer equipment
CN110221905A (en) * 2019-05-22 2019-09-10 网联清算有限公司 Timed task monitoring method, device, system, equipment and storage medium
CN110837409A (en) * 2018-08-16 2020-02-25 北京京东尚科信息技术有限公司 Method and system for executing task regularly
CN111782620A (en) * 2020-06-19 2020-10-16 多加网络科技(北京)有限公司 Credit link automatic tracking platform and method thereof
CN112104519A (en) * 2020-08-06 2020-12-18 北京健康之家科技有限公司 Delayed message delivery method and device, storage medium and computer equipment
CN113421081A (en) * 2021-06-21 2021-09-21 蚂蚁智信(杭州)信息技术有限公司 Payment processing method and device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7962382B1 (en) * 2007-07-20 2011-06-14 Wells Fargo Bank, N.A. Payment broker system and method
US20150269652A1 (en) * 2014-03-24 2015-09-24 Alibaba Group Holding Limited Method and system for processing periodic orders
US20160034862A1 (en) * 2014-07-31 2016-02-04 Ncr Corporation Dynamic network timeout tuning
US20160147955A1 (en) * 2014-11-20 2016-05-26 Netspective Communications Llc Tasks scheduling based on triggering event and work lists management
CN110837409A (en) * 2018-08-16 2020-02-25 北京京东尚科信息技术有限公司 Method and system for executing task regularly
CN110060118A (en) * 2019-02-27 2019-07-26 浙江执御信息技术有限公司 A kind of order is honoured an agreement full link method for real-time monitoring, device and computer equipment
CN110221905A (en) * 2019-05-22 2019-09-10 网联清算有限公司 Timed task monitoring method, device, system, equipment and storage medium
CN111782620A (en) * 2020-06-19 2020-10-16 多加网络科技(北京)有限公司 Credit link automatic tracking platform and method thereof
CN112104519A (en) * 2020-08-06 2020-12-18 北京健康之家科技有限公司 Delayed message delivery method and device, storage medium and computer equipment
CN113421081A (en) * 2021-06-21 2021-09-21 蚂蚁智信(杭州)信息技术有限公司 Payment processing method and device

Similar Documents

Publication Publication Date Title
US10331483B1 (en) Scheduling data access jobs based on job priority and predicted execution time using historical execution data
CN107133234B (en) Method, device and system for updating cache data
CN110333951B (en) Commodity purchase request distribution method
US20160142369A1 (en) Service addressing in distributed environment
US10771306B2 (en) Log monitoring system
CN102541918A (en) Method and equipment for identifying repeated information
CN107276970B (en) Unbinding and binding method and device
CN110389989B (en) Data processing method, device and equipment
US9146952B1 (en) System and method for distributed back-off in a database-oriented environment
CN112101860A (en) Method and equipment for synchronizing inventory calculation
CN101957849A (en) Static statement generation method and device
US8539492B1 (en) Managing data dependencies among multiple jobs using separate tables that store job results and dependency satisfaction
CN106547751B (en) Cache data updating method and device
US20190188291A1 (en) Utilization of Optimized Ordered Metadata Structure for Container-Based Large-Scale Distributed Storage
US20210096993A1 (en) Cache coherency engine
CN114238309A (en) Logistics single performance detection method and delayed task processing method
CN108629653A (en) A kind of low delay inventory reduces service system and method
CN111309746A (en) Asynchronous parallel data synchronization method and device
CN106372156A (en) Data caching method and system
CN114022240A (en) Manufacturing cost deviation processing method and system
CN110688350B (en) Method and device for storing logs
CN107819804B (en) Cloud storage device system and method for determining data in cache of cloud storage device system
CN112836987B (en) Freight note scheduling method and device, computer storage medium and electronic equipment
CN116126546B (en) Performance optimization method and device, electronic equipment and medium
CN110990466B (en) Data synchronization 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