Method and device for generating collection and distribution amount

By receiving statistical requests and automatically generating data processing scripts, the problem of frequent code modifications in the existing technology is solved, and data statistical processing with strong flexibility and scalability is realized to adapt to the needs of business changes.

CN119065646APending Publication Date: 2024-12-03BEIJING JINGDONG ZHENSHI INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310636030.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-31
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

The existing technology requires frequent code modification during the data statistics process, resulting in heavy development tasks and poor scalability and flexibility, and is unable to effectively respond to the needs of increased and changed business types.

Method used

By receiving statistical requests, the statistical properties of the Lampai project are determined and data processing scripts are automatically generated without hard code writing, and the data processing scripts are automatically configured, the table association and calculation strategies are supported, and the new Lampai project is flexibly expanded.

Benefits of technology

It realizes automated data processing script generation, reduces development burden, improves scalability and flexibility, and can automatically obtain statistical strategies based on the statistical attributes of different recruitment projects, simplifying the code writing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119065646A_ABST
    Figure CN119065646A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a device for generating a collection and distribution amount, and relates to the technical field of computers. The specific embodiment of the method comprises the following steps: receiving a statistical request, wherein the statistical request indicates to-be-counted dispatch items; determining one or more statistical attributes corresponding to the collection and dispatch items; determining one or more statistical strategies respectively corresponding to the one or more statistical attributes; according to each statistical strategy, generating a data processing script corresponding to the to-be-counted service; and executing the data processing script to obtain the dispatch amount of each dispatch object corresponding to the dispatch item. According to the implementation mode, the corresponding statistical strategy can be obtained according to the statistical attribute of the to-be-counted dispatch item, the corresponding data processing script is automatically generated, and hard code writing does not need to be carried out on each dispatch item. And meanwhile, when a new collection and distribution project is expanded, only a corresponding statistical strategy needs to be configured for the corresponding statistical attribute, so that the flexibility and the expandability are high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and device for generating a dispatch volume. Background Art

[0002] In the prior art, when performing data volume statistics for different businesses, it is usually necessary to write different code scripts according to the computing requirements of different businesses, and implement data statistics by executing the code scripts. With the increase in business types and the continuous changes in business, the code layer needs to be constantly modified during the data statistics process, resulting in heavy code development tasks and poor scalability and flexibility of the code. Summary of the invention

[0003] In view of this, an embodiment of the present invention provides a method and device for generating the pickup and dispatch volume. After receiving a statistical request, the corresponding statistical strategy can be obtained according to the statistical attributes of the pickup and dispatch project to be counted, and the corresponding data processing script can be automatically generated. There is no need to write hard code for each pickup and dispatch project. It is only necessary to pre-configure multiple statistical strategies and automatically obtain the statistical strategies according to the statistical attributes corresponding to different pickup and dispatch projects, thereby realizing the process of automatically configuring the data processing script. At the same time, through the above process, when expanding a new pickup and dispatch project, it is only necessary to configure the corresponding statistical strategy for its corresponding statistical attributes, which is highly flexible and scalable.

[0004] To achieve the above objective, according to one aspect of an embodiment of the present invention, a method for generating dispatch volume is provided.

[0005] A method for generating the pickup volume according to an embodiment of the present invention includes: receiving a statistical request, wherein the statistical request indicates a pickup project to be counted; determining one or more statistical attributes corresponding to the pickup project; the statistical attributes include a pickup object and any one or more of the following: pickup time, pickup address, pickup task identifier, pickup site; determining one or more statistical strategies corresponding to the one or more statistical attributes; generating a data processing script corresponding to the business to be counted according to each of the statistical strategies; and executing the data processing script to obtain the pickup volume of each pickup object corresponding to the pickup project.

[0006] Optionally, the data corresponding to the dispatch project is stored in multiple data tables; the execution of the data processing script to obtain the dispatch quantity of each dispatch object corresponding to the dispatch project includes: executing the data processing script to filter out the attribute values ​​corresponding to each of the dispatch attributes from the multiple data tables according to the statistical strategy, and obtaining the dispatch quantity based on the attribute values ​​and the statistical strategy.

[0007] Optionally, the statistical strategy includes a table association strategy and a calculation strategy; the data table corresponds to multiple levels of sub-data tables; the attribute values ​​corresponding to each of the pickup attributes are screened out from the multiple data tables according to the statistical strategy, and the pickup quantity is obtained according to the attribute values ​​and the statistical strategy, including: according to the table association strategy, determining the target sub-data table corresponding to the pickup attribute from the multiple sub-data tables of each level in turn, determining the attribute value corresponding to the pickup attribute according to the target sub-data table; obtaining the pickup quantity according to the attribute value and the calculation strategy.

[0008] Optionally, when the statistical request indicates multiple pickup and dispatch projects to be counted, the statistical request also indicates the pickup and dispatch type of the pickup and dispatch project; the generation of the data processing script corresponding to the business to be counted includes: determining multiple target pickup and dispatch projects belonging to the same pickup and dispatch type from the multiple pickup and dispatch projects to be counted; generating a preprocessing script corresponding to each of the target pickup and dispatch projects according to the statistical strategies corresponding to each of the target pickup and dispatch projects; merging the preprocessing scripts corresponding to each of the target pickup and dispatch projects to generate the data processing script.

[0009] Optionally, the generating of preprocessing scripts corresponding to each of the target dispatch projects includes: determining a priority order between each of the statistical strategies; and generating a preprocessing script corresponding to the target dispatch project according to each of the statistical strategies and the priority order.

[0010] Optionally, the method also includes: obtaining the current time and a statistical period corresponding to the dispatch project, and generating the data processing script according to the current time, the statistical period and the data preprocessing script.

[0011] Optionally, before determining one or more statistical attributes corresponding to the pickup and dispatch project, it also includes: generating scheduling parameters corresponding to the statistical request; generating a statistical task according to the identifier of the pickup and dispatch project and the scheduling parameters, and executing the statistical task to obtain the pickup and dispatch volume of the pickup and dispatch project.

[0012] Optionally, the method further includes: in the event that the statistical task fails to execute, re-executing the step of generating scheduling parameters corresponding to the statistical request until the dispatch volume or the number of loop executions is greater than a preset threshold.

[0013] To achieve the above objective, according to another aspect of an embodiment of the present invention, a device for generating the dispatch volume is provided.

[0014] A device for generating the pickup and dispatch volume in an embodiment of the present invention includes: a receiving module, used to receive a statistical request, wherein the statistical request indicates a pickup and dispatch project to be counted; a determining module, used to determine one or more statistical attributes corresponding to the pickup and dispatch project; the statistical attributes include the pickup and dispatch object and any one or more of the following: pickup and dispatch time, pickup and dispatch address, pickup and dispatch task identifier, pickup and dispatch site; determining one or more statistical strategies corresponding to the one or more statistical attributes respectively; a generating module, used to generate a data processing script corresponding to the business to be counted according to each of the statistical strategies; and an executing module, used to execute the data processing script to obtain the pickup and dispatch volume of each of the pickup and dispatch objects corresponding to the pickup and dispatch project.

[0015] To achieve the above objective, according to another aspect of an embodiment of the present invention, an electronic device for generating dispatch volume is provided.

[0016] An electronic device for generating the amount of dispatches according to an embodiment of the present invention includes: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement a method for generating the amount of dispatches according to an embodiment of the present invention.

[0017] To achieve the above objective, according to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided.

[0018] A computer-readable storage medium according to an embodiment of the present invention stores a computer program thereon, and when the program is executed by a processor, a method for generating a dispatch volume according to an embodiment of the present invention is implemented.

[0019] One embodiment of the above invention has the following advantages or beneficial effects: after receiving a statistical request, the corresponding statistical strategy can be obtained according to the statistical attributes of the pickup and dispatch project to be counted, and the corresponding data processing script can be automatically generated. There is no need to write hard code for each pickup and dispatch project. It is only necessary to pre-configure multiple statistical strategies and automatically obtain statistical strategies according to the statistical attributes corresponding to different pickup and dispatch projects, thereby realizing the process of automatically configuring data processing scripts. At the same time, through the above process, when expanding a new pickup and dispatch project, it is only necessary to configure the statistical strategy of the corresponding statistical attributes for its corresponding statistical attributes, which is highly flexible and scalable.

[0020] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0022] Figure 1is a flow chart of a method for generating a dispatch volume according to an embodiment of the present invention;

[0023] Figure 2 is a schematic diagram of a process for determining the amount of pickup and dispatch according to a table association strategy and a calculation strategy according to an embodiment of the present invention;

[0024] Figure 3 is a schematic diagram of a flow chart of generating a data processing script according to an embodiment of the present invention;

[0025] Figure 4 is a schematic diagram of a flow chart of generating a data preprocessing script according to an embodiment of the present invention;

[0026] Figure 5 is a schematic diagram of a process for obtaining the number of dispatches based on statistical tasks according to an embodiment of the present invention;

[0027] Figure 6 is a schematic diagram of main modules of a device for generating a dispatch volume according to an embodiment of the present invention;

[0028] Figure 7 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0029] Figure 8 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0030] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0031] It should be pointed out that the embodiments of the present invention and the technical features therein may be combined with each other without conflict.

[0032] It should be noted that the collection, collection, updating, analysis, processing, use, transmission, storage and other aspects of user personal information involved in the technical solution of this disclosure are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information, network security and national security.

[0033] Figure 1 It is a schematic diagram of the main steps of a method for generating the dispatch volume according to an embodiment of the present invention.

[0034] like Figure 1 As shown, the method for generating the dispatch volume in the embodiment of the present invention mainly includes the following steps:

[0035] Step S101: receiving a statistical request, where the statistical request indicates the pickup and dispatch items to be counted;

[0036] Step S102: determining one or more statistical attributes corresponding to the pickup and dispatch item; the statistical attributes include the pickup and dispatch object and any one or more of the following: pickup and dispatch time, pickup and dispatch address, pickup and dispatch task identifier, and pickup and dispatch site;

[0037] Step S103: determining one or more statistical strategies corresponding to the one or more statistical attributes respectively;

[0038] Step S104: Generate a data processing script corresponding to the business to be counted according to each statistical strategy;

[0039] Step S105: Execute the data processing script to obtain the dispatch quantity of each dispatch object corresponding to the dispatch project.

[0040] Among them, the collection and delivery items to be counted can be understood as specific businesses corresponding to collection and delivery. For example, the collection process can correspond to large package collection business, small package collection business, preferential package collection business, express delivery collection business, next-day delivery business, Fengchao delivery business, etc. In an optional embodiment, each collection and delivery item corresponds to multiple statistical attributes, so that orders corresponding to the collection and delivery items can be determined from the total number of orders through multiple statistical attributes.

[0041] In an optional embodiment, the statistical strategy in step S103 refers to a calculation process that can determine the attribute value corresponding to the statistical attribute. For example, the collection volume of the preferential package collection business with a collection time of January 1, 2022 to June 1, 2022 is pre-statisticed. Then, the statistical strategy corresponding to the collection time refers to the calculation process that can be screened out from the full amount of orders for the collection time of January 1, 2022 to June 1, 2022, and the statistical strategy corresponding to the collection task identifier is the calculation process of screening out the preferential package collection business from the full amount of orders. The following is an explanation with a specific example. Usually, the basic information of each order is represented by a long character string, and the number of digits of the long character string corresponds to the type of statistical attribute or the number of digits of the required basic information. For example, the 1st to 8th digits represent the time, the 12th digit represents the pickup and delivery task identifier, the 20th digit represents the pickup and delivery site, and the 24th to 28th digits represent the pickup and delivery address. The statistical strategy corresponding to the pickup and delivery time is to filter the 1st to 8th digits to obtain orders with dates between January 1, 2022 and June 1, 2022. The statistical strategy corresponding to the pickup and delivery task identifier promptly filters the 12th digit to obtain orders that belong to the special preferential pickup and delivery business.

[0042] It should be noted that for simple data, numerical values ​​can be directly obtained through statistical strategies, while for some complex data, it is necessary to obtain them in sequence from multiple data tables with subordinate relationships, and finally obtain the attribute value. Therefore, when the data corresponding to the pickup and dispatch project is stored in multiple data tables, in an optional embodiment, step S105 may further include: executing a data processing script to filter out the attribute values ​​corresponding to each pickup and dispatch attribute from multiple data tables according to the statistical strategy, and obtain the pickup and dispatch quantity according to the attribute value and the statistical strategy.

[0043] In an optional embodiment of the present invention, the statistical strategy may include a table association strategy and a calculation strategy. Among them, the table association strategy can be understood as the process of obtaining a data table from a data table and obtaining an attribute value from the data table, and the calculation strategy can be understood as the process of adding, subtracting, multiplying, dividing, and or equaling the obtained attribute value. In an optional embodiment, in the process of executing the data processing script, the priority of the table association strategy is higher than the calculation strategy, that is, it is necessary to obtain the attribute value from the data table first before further calculating the attribute value. Specifically, the process of obtaining the dispatch quantity in step S105 is as follows: Figure 2 As shown, further comprising:

[0044] Step S201: According to the table association strategy, a target sub-data table corresponding to the pickup and dispatch attribute is determined from multiple sub-data tables at each level in turn, and an attribute value corresponding to the pickup and dispatch attribute is determined according to the target sub-data table;

[0045] Step S202: Obtain the dispatch quantity based on the attribute value and calculation strategy.

[0046] By setting the priority between table association strategies and calculation strategies, it is possible to obtain the attribute values ​​and dispatch quantities corresponding to each statistical attribute in sequence according to the priority during the execution of the data processing script, thereby automatically determining the dispatch quantity without the need for hard code writing, reducing the development burden.

[0047] In a further optional embodiment, when the statistical request indicates multiple collection and delivery projects to be counted, the statistical request also indicates the collection and delivery type of the collection and delivery project. In the embodiment of the present invention, not only can the collection and delivery volume be counted for a single collection and delivery project, but also the collection and delivery volume of multiple collection and delivery projects of the same collection and delivery type can be counted according to the collection and delivery type. For example, the collection and delivery volumes corresponding to large package delivery business, small package delivery business, special preferential collection and delivery business, and express delivery collection and delivery business can be counted separately; the collection volume (that is, the sum of the special preferential collection and delivery business and the express delivery collection and delivery business) and the delivery volume (the sum of the large package delivery business and the small package delivery business) can also be counted.

[0048] Specifically, step S104 can be as follows: Figure 3 As shown, including:

[0049] Step S301: determining a plurality of target dispatching projects belonging to the same dispatching type from a plurality of dispatching projects to be counted;

[0050] Step S302: generating a preprocessing script corresponding to each target pickup and dispatch project according to the statistical strategy corresponding to each target pickup and dispatch project;

[0051] Step S303: Merge the pre-processing scripts corresponding to each target dispatch project to generate a data processing script.

[0052] Through the above process, the pre-processing scripts corresponding to multiple target dispatch projects under the same dispatch type are merged to obtain a data processing script that can directly obtain the dispatch volume corresponding to the dispatch type, without the need to manually rewrite hard code according to the dispatch type, thereby improving data processing efficiency.

[0053] In a further optional embodiment, in the case where there are multiple statistical strategies, there may be different priority orders among the multiple statistical strategies. For example, other statistical strategies may be executed only after some statistical strategies are processed. Therefore, the process of generating the preprocessing script in step S302 may also be as follows: Figure 4 As shown, including:

[0054] Step S401: Determine the priority order among various statistical strategies;

[0055] Step S402: Generate a preprocessing script corresponding to the target dispatch project according to various statistical strategies and priority orders.

[0056] Among them, the priority order between the statistical strategies corresponding to each target pickup project is pre-configured according to the actual calculation process. The priority order corresponding to the same statistical strategy in different pickup projects may be the same or different, and the present invention does not limit this.

[0057] In an optional embodiment, the process of generating a data processing script from a data preprocessing script in step S303 may also include: obtaining the current time and the statistical period corresponding to the collection and dispatch project, and generating a data processing script based on the current time, the statistical period and the data preprocessing script. In other words, the data processing script is based on the data preprocessing script, with the script generation time and the statistical period corresponding to the collection and dispatch project added. Subsequently, the collection and dispatch volume corresponding to a certain statistical period can be determined based on the script generation time and the statistical period time, and then it can be judged whether the collection and dispatch project has achieved the expected completion. For example, if collection and dispatch project A is to complete 10,000 preferential collection and delivery within one year, then the statistical period corresponding to collection and dispatch project A can be one year, and the generated data processing script will count the collection and dispatch volume of the preferential collection and delivery business in the previous year from the current time.

[0058] In another optional embodiment, after receiving the statistical request, a corresponding statistical task can be created according to the statistical request, and the number of dispatches for the dispatch project can be obtained by executing the statistical task. Figure 5 As shown, including:

[0059] Step S501: Generate scheduling parameters corresponding to the statistical request;

[0060] Step S502: Generate a statistical task based on the identification of the collection and dispatch project and the scheduling parameters, and execute the statistical task to obtain the collection and dispatch volume of the collection and dispatch project.

[0061] Among them, the scheduling parameters refer to the parameters required in the process of creating statistical tasks, such as scheduling time, scheduling object, and scheduling cycle, etc. By creating statistical tasks, it is convenient to manage the number of pick-ups and dispatches generated each time, and it is also possible to understand whether the number of pick-ups and dispatches has been successfully generated based on the execution results and execution status of the task. In a further optional embodiment, in the event that the statistical task fails to execute, the step of generating the scheduling parameters corresponding to the statistical request is re-executed until the number of pick-ups and dispatches is obtained or the number of loop executions is greater than the preset threshold.

[0062] In addition, in some special cases, there may be errors in the calculation of the number of pickups and dispatches. For example, due to equipment problems in the operation process, the pickup and dispatcher cannot perform the correct operation, that is, there is no collection or delivery mark in the order, but it is marked with other marks. In the case of active feedback and application for reissue of wages in the subsequent period, it is necessary to modify the statistical attributes according to the specific process of the error mark, so that the number of pickups and dispatches can be counted according to the wrong mark. In the case of errors in the statistics of the number of pickups and dispatches due to abnormal production system data, the number of pickups and dispatches can be re-counted according to the correct production system data when the pickup and dispatcher applies for reissue. In other words, in the case of errors in the statistics of the number of pickups and dispatches, the number of pickups and dispatches can be re-counted according to the reissue request after receiving the reissue request. In the process of re-counting, the statistical attributes, statistical strategies, and the priority relationship between statistical strategies can be modified according to the actual situation to obtain the correct number of pickups and dispatches.

[0063] For example, taking the reissue of a merchant's "Special Delivery Collection Order Quantity" as an example, because an error occurred in the merchant type configuration process, the code was configured from 1001 to 1000, so when determining the collection and dispatch volume, it was not counted in the collection and dispatch volume corresponding to the special delivery. After receiving the employee's complaint and initiating a reissue request, the configuration strategy of the merchant type in the statistical strategy corresponding to the "Special Delivery Collection Order Quantity" was adjusted from 1001 to 1000, so that the collection and dispatch volume can be recalculated using the new statistical rules, and during the recalculation process, the orders corresponding to the incorrect code 1000 can also be counted in the correct collection and dispatch volume.

[0064] According to the method for generating the pickup volume of an embodiment of the present invention, after receiving a statistical request, the corresponding statistical strategy can be obtained according to the statistical attributes of the pickup project to be counted, and the corresponding data processing script can be automatically generated. There is no need to write hard code for each pickup project. It is only necessary to pre-configure multiple statistical strategies and automatically obtain the statistical strategies according to the statistical attributes corresponding to different pickup projects, thereby realizing the process of automatically configuring the data processing script. At the same time, through the above process, when expanding a new pickup project, it is only necessary to configure the statistical strategy of the corresponding statistical attributes, which is highly flexible and scalable.

[0065] Figure 6 It is a schematic diagram of main modules of a device for generating dispatch volume according to an embodiment of the present invention.

[0066] like Figure 6 As shown, the device 600 for generating the amount of dispatched goods in the embodiment of the present invention includes:

[0067] A receiving module 601 is used to receive a statistical request, where the statistical request indicates a collection and dispatching project to be counted;

[0068] Determination module 602, used to determine one or more statistical attributes corresponding to the pickup and dispatch project; the statistical attributes include the pickup and dispatch object and any one or more of the following: pickup and dispatch time, pickup and dispatch address, pickup and dispatch task identifier, pickup and dispatch site; determine one or more statistical strategies corresponding to the one or more statistical attributes respectively;

[0069] A generating module 603 is used to generate a data processing script corresponding to the business to be counted according to each of the statistical strategies;

[0070] The execution module 604 is used to execute the data processing script to obtain the dispatch quantity of each dispatch object corresponding to the dispatch project.

[0071] In an optional embodiment of the present invention, the data corresponding to the pickup and dispatch project is stored in multiple data tables; the execution module 604 is also used to execute the data processing script to filter out the attribute values ​​corresponding to each of the pickup and dispatch attributes from the multiple data tables according to the statistical strategy, and obtain the pickup and dispatch quantity based on the attribute values ​​and the statistical strategy.

[0072] In an optional embodiment of the present invention, the statistical strategy includes a table association strategy and a calculation strategy; the data table corresponds to multiple levels of sub-data tables; the execution module 604 is also used to determine, according to the table association strategy, the target sub-data table corresponding to the pickup attribute from the multiple sub-data tables of each level in turn, and determine the attribute value corresponding to the pickup attribute according to the target sub-data table; and obtain the pickup quantity according to the attribute value and the calculation strategy.

[0073] In an optional embodiment of the present invention, when the statistical request indicates multiple pickup and dispatch projects to be counted, the statistical request also indicates the pickup and dispatch type of the pickup and dispatch project; the generation module 603 is also used to determine multiple target pickup and dispatch projects belonging to the same pickup and dispatch type from the multiple pickup and dispatch projects to be counted; according to the statistical strategies corresponding to each of the target pickup and dispatch projects, a preprocessing script corresponding to each of the target pickup and dispatch projects is generated; the preprocessing scripts corresponding to each of the target pickup and dispatch projects are merged to generate the data processing script.

[0074] In an optional embodiment of the present invention, the generation module 603 is also used to determine the priority order between each of the statistical strategies; and generate a preprocessing script corresponding to the target dispatch project according to each of the statistical strategies and the priority order.

[0075] In an optional embodiment of the present invention, the generation module 603 is also used to obtain the current time and the statistical period corresponding to the delivery project, and generate the data processing script according to the current time, the statistical period and the data preprocessing script.

[0076] In an optional embodiment of the present invention, the execution module 604 is also used to generate scheduling parameters corresponding to the statistical request before determining one or more statistical attributes corresponding to the pickup and dispatch project; generate a statistical task according to the identifier of the pickup and dispatch project and the scheduling parameters, and execute the statistical task to obtain the pickup and dispatch volume of the pickup and dispatch project.

[0077] In an optional embodiment of the present invention, the execution module 604 is also used to, when the statistical task fails to execute, re-execute the step of generating scheduling parameters corresponding to the statistical request until the dispatch volume or the number of loop executions is greater than a preset threshold.

[0078] According to the device for generating the pickup and dispatch volume according to the embodiment of the present invention, after receiving the statistical request, the corresponding statistical strategy can be obtained according to the statistical attributes of the pickup and dispatch project to be counted, and the corresponding data processing script can be automatically generated. There is no need to write hard code for each pickup and dispatch project. It is only necessary to pre-configure multiple statistical strategies and automatically obtain the statistical strategies according to the statistical attributes corresponding to different pickup and dispatch projects, thereby realizing the process of automatically configuring the data processing script. At the same time, through the above process, when expanding a new pickup and dispatch project, it is only necessary to configure the corresponding statistical strategy for its corresponding statistical attributes, which is highly flexible and scalable.

[0079] Figure 7 An exemplary system architecture 700 is shown to which the method for generating the number of dispatches or the apparatus for generating the number of dispatches according to the embodiments of the present invention can be applied.

[0080] like Figure 7 As shown, system architecture 700 may include terminal devices 701, 702, 703, network 704 and server 705. Network 704 is used to provide a medium for communication links between terminal devices 701, 702, 703 and server 705. Network 704 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0081] The user can use the terminal devices 701, 702, 703 to interact with the server 705 through the network 704 to receive or send data, etc. Various communication client applications can be installed on the terminal devices 701, 702, 703, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0082] The terminal devices 701 , 702 , and 703 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0083] Server 705 may be a server that provides various services, such as a background management server that provides support for statistical requests sent by users using terminal devices 701, 702, and 703. The background management server may analyze and process the received statistical requests and other data, and feed back the processing results (such as the number of deliveries for a delivery project) to the terminal device.

[0084] It should be noted that the method for generating the dispatch volume provided in the embodiment of the present invention is generally executed by the server 705, and accordingly, the device for generating the dispatch volume is generally set in the server 705.

[0085] It should be understood that Figure 7 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0086] Reference below Figure 8 , which shows a schematic diagram of the structure of a computer system 800 of a terminal device suitable for implementing an embodiment of the present invention. Figure 8 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0087] like Figure 8 As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage part 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the system 800 are also stored. The CPU 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) first interface 805 is also connected to the bus 804.

[0088] The following components are connected to the I / O first interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network first interface card such as a LAN card, a modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O first interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that a computer program read therefrom is installed into the storage section 808 as needed.

[0089] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and / or installed from the removable medium 811. When the computer program is executed by the central processing unit (CPU) 801, the above-mentioned functions defined in the system of the present invention are executed.

[0090] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with a request execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with a request execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0091] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable requests for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer requests.

[0092] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be set in a processor, for example, it may be described as: a processor includes a receiving module, a determining module, a generating module and an executing module. The names of these modules do not constitute a limitation on the modules themselves in some cases, for example, the receiving module may also be described as a "module for receiving statistical requests".

[0093] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs. When the above one or more programs are executed by a device, the device includes: receiving a statistical request, the statistical request indicates the pickup and dispatch project to be counted; determining one or more statistical attributes corresponding to the pickup and dispatch project; the statistical attributes include the pickup and dispatch object and any one or more of the following: pickup and dispatch time, pickup and dispatch address, pickup and dispatch task identifier, pickup and dispatch site; determining one or more statistical strategies corresponding to the one or more statistical attributes; generating a data processing script corresponding to the business to be counted according to each of the statistical strategies; executing the data processing script to obtain the pickup and dispatch volume of each pickup and dispatch object corresponding to the pickup and dispatch project.

[0094] According to the technical solution of the embodiment of the present invention, after receiving the statistical request, the corresponding statistical strategy can be obtained according to the statistical attributes of the pickup and dispatch project to be counted, and the corresponding data processing script can be automatically generated. There is no need to write hard code for each pickup and dispatch project. It is only necessary to pre-configure multiple statistical strategies and automatically obtain statistical strategies according to the statistical attributes corresponding to different pickup and dispatch projects, thereby realizing the process of automatically configuring data processing scripts. At the same time, through the above process, when expanding a new pickup and dispatch project, it is only necessary to configure the corresponding statistical strategy for its corresponding statistical attributes, which is highly flexible and scalable.

[0095] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for generating the amount of dispatch, characterized in that: include: Receiving a statistical request, wherein the statistical request indicates a collection and dispatching project to be counted; Determine one or more statistical attributes corresponding to the pickup and dispatch item; the statistical attributes include the pickup and dispatch object and any one or more of the following: pickup and dispatch time, pickup and dispatch address, pickup and dispatch task identifier, and pickup and dispatch site; determining one or more statistical strategies corresponding to the one or more statistical attributes respectively; Generate a data processing script corresponding to the business to be counted according to each of the statistical strategies; Execute the data processing script to obtain the dispatch quantity of each dispatch object corresponding to the dispatch project.

2. The method according to claim 1, characterized in that The data corresponding to the dispatching project is stored in multiple data tables; The executing of the data processing script to obtain the dispatch quantity of each dispatch object corresponding to the dispatch project includes: Execute the data processing script to filter out the attribute values ​​corresponding to each of the dispatch attributes from the multiple data tables according to the statistical strategy, and obtain the dispatch quantity according to the attribute value and the statistical strategy.

3. The method according to claim 2, characterized in that The statistical strategy includes a table association strategy and a calculation strategy; the data table corresponds to multiple levels of sub-data tables; the attribute values ​​corresponding to each of the dispatch attributes are screened out from the multiple data tables according to the statistical strategy, and the dispatch quantity is obtained according to the attribute value and the statistical strategy, including: According to the table association strategy, a target sub-data table corresponding to the dispatching attribute is determined from the multiple sub-data tables at each level in turn, and an attribute value corresponding to the dispatching attribute is determined according to the target sub-data table; The dispatch quantity is obtained according to the attribute value and the calculation strategy.

4. The method according to claim 1, characterized in that: In the case where the statistical request indicates a plurality of dispatching projects to be counted, the statistical request further indicates the dispatching types of the dispatching projects; The step of generating a data processing script corresponding to the business to be counted includes: Determine multiple target dispatching projects belonging to the same dispatching type from multiple dispatching projects to be counted; Generate preprocessing scripts corresponding to each of the target delivery projects according to the statistical strategies corresponding to each of the target delivery projects; The pre-processing scripts corresponding to each of the target dispatch projects are merged to generate the data processing script.

5. The method according to claim 4, characterized in that The generating of the preprocessing scripts corresponding to the target pickup and dispatching projects respectively includes: Determining the priority order among the statistical strategies; According to each of the statistical strategies and the priority order, a preprocessing script corresponding to the target dispatch project is generated.

6. The method according to claim 4 or 5, characterized in that: The current time and the statistical period corresponding to the delivery project are obtained, and the data processing script is generated according to the current time, the statistical period and the data preprocessing script.

7. The method according to claim 1, characterized in that Before determining one or more statistical attributes corresponding to the dispatching project, the method further includes: generating a scheduling parameter corresponding to the statistical request; A statistical task is generated according to the identification of the pickup and dispatch project and the scheduling parameters, and the statistical task is executed to obtain the pickup and dispatch volume of the pickup and dispatch project.

8. The method according to claim 7, characterized in that Also includes: In the event that the statistical task fails to execute, the step of generating the scheduling parameters corresponding to the statistical request is re-executed until the dispatch volume or the number of loop executions is greater than a preset threshold.

9. A device for generating the amount of dispatched goods, characterized in that: include: A receiving module, used for receiving a statistical request, wherein the statistical request indicates a collection and dispatching project to be counted; A determination module is used to determine one or more statistical attributes corresponding to the pickup and dispatch project; the statistical attributes include the pickup and dispatch object and any one or more of the following: pickup and dispatch time, pickup and dispatch address, pickup and dispatch task identifier, pickup and dispatch site; determine one or more statistical strategies corresponding to the one or more statistical attributes respectively; A generating module, used for generating a data processing script corresponding to the business to be counted according to each of the statistical strategies; An execution module is used to execute the data processing script to obtain the dispatch quantity of each dispatch object corresponding to the dispatch project.

10. An electronic device for generating a dispatch quantity, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.

11. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.