Waybill generation method and device, equipment and storage medium

By determining the transportation status and waybill information when receiving the first waybill transportation message, obtaining the receipt information and the goods information of recyclable goods, and generating the corresponding second waybill, the problems of errors and inefficient generation of waybills in the prior art are solved, and the waybill generation with high accuracy and efficiency is achieved.

CN120106703APending Publication Date: 2025-06-06BEIJING JINGDONG ZHENSHI INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510161284.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2021-12-21
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

The existing waybill generation schemes are prone to errors and inefficiency.

Method used

By determining the transportation status and waybill information when receiving the first waybill transportation message, obtaining the receipt information and the goods information of recyclable goods, and generating the corresponding second waybill.

Benefits of technology

It achieves high accuracy and efficiency in the waybill generation process, avoids errors and improves the timeliness of waybill generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120106703A_ABST
    Figure CN120106703A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a waybill generation method and device, equipment and a storage medium. The method comprises the following steps: when a first waybill transportation message is received, determining a first waybill corresponding to the first waybill transportation message, and determining a transportation state and waybill information of the first waybill according to the first waybill transportation message; when it is determined that a second waybill needs to be generated according to the transportation state and the waybill information, receiving information and goods information of recyclable goods in the first waybill are obtained, and the second waybill is a waybill with the delivery information of the first waybill as the receiving information; and generating a second waybill according to the receiving information and the cargo information. According to the technical scheme provided by the embodiment of the invention, the second waybill can be generated with relatively high accuracy and timeliness.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the patent application with application number 202111572655.2 (the filing date of the original application is December 21, 2021, and the name of the invention is A waybill generation method, device, equipment and storage medium). Technical Field

[0002] Embodiments of the present invention relate to the field of warehousing and logistics technology, and in particular, to a waybill generation method, device, equipment and storage medium. Background Art

[0003] In the pharmaceutical cold chain self-operated warehouse distribution orders, in order to ensure that the pharmaceutical cold chain goods under the order can be delivered to the users in a low temperature state, most of them are currently placed in pharmaceutical insulated boxes for distribution.

[0004] Since the medicine insulated box is a recyclable consumable, the courier can take the medicine insulated box back to the courier station after delivering the medicine cold chain goods to the user, so that the station staff can send the medicine insulated box back to the original medicine warehouse by placing an offline order (i.e. generating a waybill offline).

[0005] In the process of implementing the present invention, the inventors discovered that the prior art has the following technical problems: the existing waybill generation solution is prone to errors and low efficiency. Summary of the invention

[0006] The embodiments of the present invention provide a waybill generation method, device, equipment and storage medium, which solve the problems of easy errors and low efficiency in the waybill generation process.

[0007] In a first aspect, an embodiment of the present invention provides a waybill generation method, which may include:

[0008] Upon receiving the first waybill transport message, determining a first waybill corresponding to the first waybill transport message, and determining a transport status and waybill information of the first waybill according to the first waybill transport message;

[0009] When it is determined that a second waybill needs to be generated according to the transportation status and the waybill information, the receiving information and the cargo information of the recyclable cargo in the first waybill are obtained, wherein the second waybill is a waybill that uses the shipping information of the first waybill as the receiving information;

[0010] Generate a second waybill based on the delivery information and the cargo information.

[0011] In a second aspect, an embodiment of the present invention further provides a waybill generating device, which may include:

[0012] A waybill information determination module, configured to determine, upon receiving a first waybill transport message, a transport status and waybill information of a first waybill corresponding to the first waybill transport message according to the first waybill transport message;

[0013] A cargo information acquisition module, used to acquire the cargo information of the recyclable cargo in the first waybill when it is determined that a second waybill needs to be generated according to the transportation status and the waybill information, wherein the second waybill is a waybill that uses the shipping information of the first waybill as the cargo information;

[0014] The second waybill generating module is used to generate the second waybill according to the delivery information and the goods information.

[0015] In a third aspect, an embodiment of the present invention further provides a waybill generating device, which may include:

[0016] one or more processors;

[0017] A memory for storing one or more programs;

[0018] When one or more programs are executed by one or more processors, the one or more processors implement the waybill generation method provided by any embodiment of the present invention.

[0019] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the waybill generation method provided by any embodiment of the present invention.

[0020] The technical solution of the embodiment of the present invention, when receiving the first waybill transport message, can determine the transport status and waybill information of the first waybill corresponding to the first waybill transport message according to the first waybill transport message; because it can be determined whether the first waybill has been delivered to the goods acquirer according to the transport status, and whether there are recyclable goods in the first waybill according to the waybill information, when it is determined that a second waybill that is opposite to the first waybill needs to be generated according to the two, the receipt information and the cargo information of the recyclable goods in the first waybill can be obtained, which are indispensable reference factors in the process of generating the second waybill. At this time, the receipt information of the second waybill is the shipping information of the first waybill; then, the second waybill is generated according to the receipt information and the cargo information. The above technical solution solves the problems of easy errors and low efficiency in the process of generating the second waybill, and achieves the effect of generating the second waybill with high accuracy and timeliness. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 is a flow chart of a waybill generation method in Embodiment 1 of the present invention;

[0022] Figure 2is a flow chart of a waybill generation method in Embodiment 2 of the present invention;

[0023] Figure 3 is a flow chart of a waybill generation method in Embodiment 3 of the present invention;

[0024] Figure 4 It is a schematic diagram of an optional example of a waybill generation method in Embodiments 2 and 3 of the present invention;

[0025] Figure 5 It is a structural block diagram of a waybill generating device in Embodiment 4 of the present invention;

[0026] Figure 6 It is a structural schematic diagram of a waybill generating device in Embodiment 5 of the present invention. DETAILED DESCRIPTION

[0027] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It is also necessary to explain that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0028] Embodiment 1

[0029] Figure 1 This is a flow chart of a waybill generation method provided in Embodiment 1 of the present invention. This embodiment is applicable to the case of automatically generating a second waybill (i.e., a reverse waybill) that is opposite to the first waybill (i.e., a forward waybill). The method can be executed by a waybill generation device provided in an embodiment of the present invention, which can be implemented by software and / or hardware, and which can be integrated in a waybill generation device, which can be various user terminals or servers.

[0030] See also Figure 1 The method of the embodiment of the present invention specifically includes the following steps:

[0031] S110. When a first waybill transport message is received, determine a first waybill corresponding to the first waybill transport message, and determine a transport status and waybill information of the first waybill according to the first waybill transport message.

[0032] Among them, the first waybill transportation message may be certain messages generated by the first waybill during the transportation process, such as a waybill acceptance message (such as receiving the first waybill at a certain time), a waybill circulation message (such as transporting the first waybill from a certain place to a certain place at a certain time), a waybill delivery message (such as a courier delivering the first waybill at a certain time), a waybill delivery message (such as delivering the first waybill to the user at a certain time), etc.

[0033] The first waybill may be a waybill generated because of the need to transport certain goods from the party to which the goods belong to to the party to which the goods are acquired. The party to which the goods belong may be the current owner of the goods, such as the seller, and the party to which the goods are acquired may be the future owner of the goods, such as the buyer.

[0034] The transport status may be the status of the first waybill when the first waybill transport message is generated, such as the waybill acceptance status, waybill circulation status, waybill distribution status, waybill delivery status, etc., which may be directly obtained from the first waybill transport message. The waybill information may be attribute information of the first waybill, such as shipping information, receiving information, waybill identification, and the type of non-recyclable goods in the first waybill, etc., wherein the waybill identification may be information that can identify the first waybill itself, such as business mode (such as self-operated and external operation), transportation mode (such as air and land transportation), transportation time (such as on-time delivery and precise delivery), etc.; non-recyclable goods may be goods that will not be returned to the goods owner after the first waybill is delivered to the goods acquirer. In the above pharmaceutical cold chain self-operated warehouse distribution order, in the first waybill generated to complete this order, pharmaceutical cold chain goods are non-recyclable goods, and pharmaceutical insulation boxes are recyclable goods, that is, goods that need to be returned to the goods owner after being delivered to the goods acquirer; the type of goods may be the type of non-recyclable goods, which may be reflected in multiple aspects such as industry, production line, business department, etc. The waybill information may be directly obtained from the first waybill transportation message, or may be obtained by querying in the relevant system according to the first waybill number in the first waybill transportation message, and the first waybill number is the waybill number of the first waybill.

[0035] S120. When it is determined that a second waybill needs to be generated based on the transportation status and the waybill information, the receipt information and the cargo information of the recyclable cargo in the first waybill are obtained, wherein the second waybill is a waybill that uses the shipping information of the first waybill as the receipt information.

[0036] Among them, the premise of returning the recyclable goods in the first waybill to the party to whom the goods belong may be that there are recyclable goods in the first waybill; of course, it can also be that the first waybill has been delivered to the party to whom the goods are acquired and there are recyclable goods in the first waybill. It should be noted that whether the first waybill has reached the party to whom the goods are acquired can be determined based on the transportation status, and whether there are recyclable goods in the first waybill can be determined based on the waybill information. Therefore, based on the waybill information, or the transportation status and waybill information, it can be determined whether to generate a second waybill for delivering the recyclable goods in the first waybill to the party to whom the goods belong in the first waybill. For example, when the waybill information indicates that there are recyclable goods in the first waybill, it is determined that the second waybill needs to be generated; for another example, when the transportation status indicates that the first waybill has been delivered and the waybill information indicates that there are recyclable goods in the first waybill, it is determined that the second waybill needs to be generated. Those skilled in the art can understand that the delivery information of the second waybill is the delivery information of the first waybill, and the delivery information can be the delivery-related information of the first waybill, such as the name, address, telephone number, etc. of the delivery object (i.e., the party to whom the goods belong), and correspondingly, the delivery information can be the delivery-related information of the second waybill, such as the name, address, telephone number, etc. of the delivery object, and the delivery object and the delivery object can be the same object. The above-mentioned first waybill can be called a forward waybill, and the second waybill can be called a reverse waybill associated with the first waybill.

[0037] If it is determined that a second waybill needs to be generated, then the receipt information and the cargo information of the recyclable goods in the first waybill can be obtained. Optionally, since the receipt information in the first waybill is the shipping information in the second waybill, the method for obtaining the receipt information can include querying it in the relevant system according to the first waybill number. Taking the relevant system as a cargo transportation system as an example, optionally, the shipping information of the first waybill can be queried from the cargo transportation system by calling the Remote Procedure Call Protocol (RPC) interface set on the cargo transportation system, and then the shipping information is used as the receipt information. The cargo information can be the attribute information of the recyclable goods, such as volume (length, width, height, diameter), weight, etc., which can be standardized information that can be directly written in the configuration file, so the method for obtaining the cargo information can include reading the configuration information from the pre-set configuration file, and obtaining the cargo information according to the configuration information. Of course, the above-mentioned methods for obtaining the receipt information and cargo information are all optional methods, not specific limitations on their achievable methods.

[0038] S130: Generate a second waybill according to the delivery information and the cargo information.

[0039] Among them, the second waybill is generated according to the receipt information and the cargo information, which is an indispensable reference factor in the process of generating the second waybill.

[0040] It should be noted that, first of all, the first waybill in the above technical solution may include recyclable goods and non-recyclable goods that need to be transported at the same time to ensure that the target goods (i.e. non-recyclable goods) are transported to the goods acquirer in good condition. Such a first waybill is a waybill that needs to generate a second waybill associated with it. Exemplarily, its suitable application scenarios can be cold chain transportation scenarios such as fresh food, medicine, etc., of course, it can also be other application scenarios, which are not specifically limited here.

[0041] Secondly, compared with the method of manually generating the second waybill, the above technical solution can realize the automatic generation of the second waybill, so that the site staff does not need to manually enter the waybill information and cargo information in the relevant system. Since various systems such as warehousing systems and distribution systems may be isolated according to business and department divisions, the method without manual entry solves the problem of untimely and missed generation of the second waybill due to the need for site staff to query information across systems and insufficient operating authority, thereby ensuring high accuracy and efficiency in the process of generating the second waybill, and reducing the operational complexity of the site staff. Taking pharmaceutical cold chain goods as an example, the above technical solution can automatically generate a second waybill for sending the pharmaceutical incubator box that is delivered at the same time as the pharmaceutical cold chain goods to the original pharmaceutical warehouse after the pharmaceutical cold chain goods are properly delivered. The timely return of the pharmaceutical incubator box improves the circulation rate of the pharmaceutical incubator box and reduces the purchase cost of the pharmaceutical incubator box (this is because the pharmaceutical incubator box needs to be equipped with one more box if it circulates for one more day).

[0042] Again, the above technical solution is executed once each time a first waybill transport message is received, that is, it is continuously executed as the first waybill transport message continues to arrive, which is a streaming computing method. In practical applications, the above technical solution can be optionally completed based on the flink platform as a real-time computing engine, thereby improving the efficiency of generating the second waybill.

[0043] The technical solution of the embodiment of the present invention, when receiving the first waybill transport message, can determine the transport status and waybill information of the first waybill corresponding to the first waybill transport message according to the first waybill transport message; because it can be determined whether the first waybill has been delivered to the goods acquirer according to the transport status, and whether there are recyclable goods in the first waybill according to the waybill information, when it is determined that a second waybill that is opposite to the first waybill needs to be generated according to the two, the receipt information and the cargo information of the recyclable goods in the first waybill can be obtained, which are indispensable reference factors in the process of generating the second waybill. At this time, the receipt information of the second waybill is the shipping information of the first waybill; then, the second waybill is generated according to the receipt information and the cargo information. The above technical solution solves the problems of easy errors and low efficiency in the process of generating the second waybill, and achieves the effect of generating the second waybill with high accuracy and timeliness.

[0044] Embodiment 2

[0045] Figure 2 It is a flow chart of a waybill generation method provided in the second embodiment of the present invention. This embodiment is optimized based on the above-mentioned technical solutions. In this embodiment, optionally, the above-mentioned waybill generation method, before determining that a second waybill needs to be generated based on the transportation status and the waybill information, may also include: obtaining the first waybill number of the first waybill from the waybill information, and determining whether the first waybill number is stored in a pre-set first cache; if so, determining whether a second waybill needs to be generated based on whether the transportation status is a waybill delivery status; otherwise, determining whether the first waybill includes recyclable goods based on the waybill information, and if so, storing the first waybill number in the waybill information in the first cache, and executing the step of determining whether a second waybill needs to be generated based on whether the transportation status is a waybill delivery status. Among them, the explanations of the terms that are the same as or corresponding to the above-mentioned embodiments are not repeated here.

[0046] See also Figure 2 The method of this embodiment may specifically include the following steps:

[0047] S210. When a first waybill transport message is received, determine a first waybill corresponding to the first waybill transport message, and determine a transport status and waybill information of the first waybill according to the first waybill transport message.

[0048] S220, obtaining a first waybill number of the first waybill from the waybill information, and determining whether the first waybill number is stored in a pre-set first cache, if yes, executing S230, otherwise executing S240.

[0049] Among them, the waybill information may be attribute information of the first waybill, so the first waybill number of the first waybill can be obtained from the waybill information. The first cache may be a pre-set local cache or an external cache, wherein the external cache may be a cache set outside the local cache relative to the local cache. Since the waybill corresponding to the waybill number stored in the first cache is a waybill including recyclable goods, when the first cache includes the first waybill number, this indicates that the corresponding first waybill includes recyclable goods, and S230 may be executed to further determine whether the transportation status at this time is the waybill delivery status; otherwise, S240 is executed to first determine whether such a first waybill includes recyclable goods.

[0050] S230. Determine whether to generate a second waybill according to whether the transportation status is a waybill delivery status, wherein the second waybill is a waybill that uses the shipping information of the first waybill as the receiving information.

[0051] Among them, when the transportation status is the waybill delivery status, this means that the non-recyclable goods in the first waybill have been delivered to the goods acquirer, and a second waybill can be generated at this time; otherwise, the non-recyclable goods have not yet been delivered to the goods acquirer, and there is no need to generate a second waybill.

[0052] S240. Determine whether the first waybill includes recyclable goods according to the waybill information. If so, store the first waybill number in the waybill information in the first cache and execute S230.

[0053] Among them, since the waybill information can indicate whether there are recyclable goods in the first waybill, it is first determined whether the first waybill includes recyclable goods based on the waybill information. If so, the first waybill number of the first waybill can be stored in the first cache, so that when the first waybill transportation message of the first waybill is received later, it can be directly determined that such a first waybill includes recyclable goods based on the first waybill number obtained from the first waybill transportation message stored in the first cache, thereby improving the accuracy of determining whether recyclable goods exist. Further, execute S230 to determine the transportation status. Of course, if it is determined based on the waybill information that the first waybill does not include recyclable goods, this means that there is no need to generate a second waybill corresponding to the first waybill, and exit the process.

[0054] S250: If it is determined that a second waybill needs to be generated, the receipt information and the cargo information of the recyclable cargo in the first waybill are obtained, and the second waybill is generated according to the receipt information and the cargo information.

[0055] According to the technical solution of the embodiment of the present invention, for the first waybill number of the first waybill obtained from the waybill information, it can be determined whether the first waybill number is stored in a pre-set first cache. If so, it means that the first waybill includes recyclable goods, and then it can be determined whether to generate a second waybill based on whether the transportation status is a waybill delivery status; otherwise, it means that it is impossible to determine whether the first waybill includes recyclable goods at this time, and then it can be determined whether the first waybill includes recyclable goods based on the waybill information. If so, the first waybill number is stored in the first cache, so that when the first waybill transportation message is received later, it can be directly determined that the first waybill includes recyclable goods based on the first waybill number obtained from the first waybill transportation message stored in the first cache, thereby improving the accuracy of determining whether there are recyclable goods, and then determining whether to generate a second waybill based on whether the transportation status is a waybill delivery status, thereby achieving the effect of accurate and efficient generation of the second waybill.

[0056] On this basis, an optional technical solution is that the waybill information includes the waybill identification and / or the cargo type of the non-recyclable goods in the first waybill, and determining whether the first waybill includes recyclable goods based on the waybill information may include: extracting the target position from each position of the waybill identification; judging whether the non-recyclable goods are target goods that need to be transported together with the recyclable goods based on the position value of the target position and / or the cargo type, and determining whether the first waybill includes recyclable goods based on the judgment result. Among them, the waybill identification may be information that can identify the first waybill itself, which may include a multi-bit field (i.e., multiple positions), each position has its own meaning, such as business mode, transportation mode, transportation time limit, etc., and the specific content of a certain position in its meaning can be determined by the position value of this position, such as the position value of the position of the business mode is 0 for self-operation and 1 for external operation, etc. It should be noted that although the waybill logo includes multiple positions, not every position can determine whether the first waybill includes recyclable goods. Therefore, the target position that can play a role in judging whether the first waybill includes recyclable goods can be extracted from each position of the waybill logo, and the position value on the target position can be determined. The type of goods can be the type of non-recyclable goods, which can be reflected in multiple aspects such as industries (such as fresh food industry, pharmaceutical industry), production lines, business departments, etc. Therefore, it can be determined whether the non-recyclable goods are target goods that need to be transported together with recyclable goods according to the position value and / or the type of goods of the target position, and whether the first waybill includes recyclable goods according to the judgment result, that is, when the first waybill includes the target goods, it also includes recyclable goods; otherwise, it does not include recyclable goods. Of course, in addition to the target position and the type of goods, it can also be judged by the rest of the information in the waybill information, which is not specifically limited here. The above technical solution judges whether recyclable goods exist from multiple dimensions, thereby achieving the effect of accurately judging whether recyclable goods exist.

[0057] On this basis, optionally, the above-mentioned waybill generation method may further include: when monitoring the first keyspace notification event, reading the changed first metadata corresponding to the first keyspace notification event from the pre-set target cache, wherein the first metadata is data used to describe the target location; based on the target location represented by the first metadata, changing the second metadata stored in the first cache so that the extraction logic represented by the changed second metadata can be used to extract the target location; extracting the target location from each location of the waybill identifier may include: extracting the target location from each location of the waybill identifier based on the changed second metadata. Among them, the first keyspace notification event may be an event triggered when the first metadata stored in the target cache changes; the first metadata is data that can be used to describe the target location, that is, according to the first metadata, it can be determined which locations in the waybill information are the target locations. The target cache may be a pre-set cache storing the first metadata. In practical applications, optionally, considering that the number of changes to the first metadata is limited, and the target cache may be a cache with a notification function when the first metadata changes, the target cache may be a redis cache. Of course, it may also be another local cache or an external cache, which is not specifically limited here. After reading the changed first metadata from the target cache, the second metadata stored in the first cache may be changed based on the first metadata, thereby extracting the target location from each location of the waybill identifier based on the changed second metadata, thereby achieving the effect of accurately extracting the target location based on the latest extraction logic (i.e., the changed second metadata).

[0058] On the basis of any technical solution of the embodiment of the present invention, optionally, the first cache may include a first local cache for implementing Bloom filtering; storing the first waybill number in the waybill information in the first cache includes: using the first waybill number in the waybill information as the Bloom filter value in the first local cache; determining whether the first waybill number is stored in the pre-set first cache includes: determining whether each Bloom filter value stored in the first local cache includes the first waybill number. Among them, the Bloom filter can be a filter for retrieving whether a certain element is included in a certain set. In practical applications, considering that there may be millions of waybills in a day, and each waybill may involve multiple waybill transport messages from the beginning to the end, such as waybill flow messages between multiple sites, message retries and retransmissions caused by fault tolerance mechanisms, etc., there may be hundreds of millions of waybill transport messages at the computer bottom layer, and the Bloom filter is suitable for filtering such large amounts of data. The first cache can be a first local cache that can be used to implement Bloom filtering, such as the state in the flink platform (specifically, it can be mapstate). Compared with the method of obtaining information from the external cache by calling the RPC interface set on the external cache, the first local cache has a smaller performance consumption in information acquisition and is very suitable for processing large amounts of data. Therefore, the first waybill number can be directly stored as a Bloom filter value in the first local cache, and then when the first waybill transport message is received again, it can be determined whether such a first waybill number is stored in the first local cache by whether the Bloom filter values ​​of the first local cache include the first waybill number in the first waybill transport message received again, thereby achieving the effect of being able to accurately determine whether the first original waybill number exists when there is a large amount of data.

[0059] In order to better understand the specific implementation process of the above steps, the following is an exemplary description of the waybill generation method of this embodiment in combination with a specific example. It should be noted that in order to describe the example more vividly, the first waybill is a forward waybill and the second waybill is a reverse waybill. For example, see Figure 4, which includes three parts: receiving MQ message, generating reverse waybill and updating MQ message. Receiving MQ message and generating reverse waybill are completed by at least one flink task, and the state in these flink tasks is the first local cache, while updating MQ message is completed by at least one other flink task, and the state in these flink tasks is the second local cache; accordingly, the MQ message in the received MQ message is the first waybill transport message, and the MQ message in the updated MQ message is the second waybill transport message. In order to simplify the description, it will be directly described as flink task, MQ message or state in the following text, but those skilled in the art should accurately determine their specific meanings according to their related content, which will not be repeated here.

[0060] Now let’s elaborate on the first two of these three parts.

[0061] 1. Receiving MQ messages

[0062] 1. Start the flink task according to the configuration parameters and receive the MQ message based on the flink task. The configuration parameters may include the second metadata stored in the state of the flink task, waybill filtering rules, flink task parameters, redis (i.e., target cache) or mysql (i.e., message storage database) configuration, etc.

[0063] 2. Waybill filtering rules: Based on the rule engine configuration, waybill filtering is performed according to three dimensions: cargo type, waybill ID, and customization to determine whether a forward waybill includes a medical incubator.

[0064] 2.1. Filter based on cargo type: Filter the specified type of waybills based on the cargo type in the MQ message.

[0065] 2.2. Filter based on waybill sign: Read the waybill sign in the MQ message. The sign format can be "100001234000F...", and filter based on the sign value combination of different signs.

[0066] 2.3. Configure the rule engine according to business logic, that is, filter based on other information in the waybill information.

[0067] 3. Bloom filter design

[0068] 3.1. Bloom filtering is implemented based on the storage characteristics of state in Flink. The waybill number of the forward waybill retained after filtering (i.e., the first waybill number) is used as the Bloom filter value. The application of state makes the Bloom filter have better performance and stability.

[0069] 3.2. Bloom filtering is implemented based on Redis. However, due to the existence of hot keys in Redis and the timeout of the Redis client under the scale of data, the Flink task will fail, and its performance and stability are relatively general.

[0070] Therefore, when processing based on Flink tasks, the state can be used as Bloom to implement waybill filtering. When processing based on Storm tasks, since the Storm framework does not support state, a local Bloom filter can be built based on the open source Guava component in the Storm task, which requires redis.

[0071] It should be noted that the judgment of whether to generate a reverse waybill can be completed through the cooperation of "2. Waybill filtering rules" and "3. Bloom filter design". Specifically, when an MQ message is received, determine whether the first waybill number in the MQ message is included in each Bloom filter value of state, 1) If the first waybill number is included, further determine whether the transportation status in the MQ message is the waybill delivery status, 11) If so, execute "2. Generate reverse waybill", 12) otherwise exit; 2) If the first waybill number is not included, write the first waybill number in state, and execute the step of "1) If the first waybill number is included, further determine whether the transportation status in the MQ message is the waybill delivery status".

[0072] 4. Flink task metadata changes

[0073] The metadata used to describe the target position (i.e., the first metadata) is stored in redis. As the business logic changes, the first metadata in redis may change accordingly (e.g., the first metadata of the 4th to 6th positions in each position as the target position is changed to the first metadata of the 4th to 7th positions as the target position). At this time, redis can trigger the first key space notification event. When the flink task listens to the first key space notification event, it can read the changed first metadata from redis and change the second metadata in the state based on the reading result. In this way, the flink task can extract the 4th to 7th positions in each position as the target position, thereby achieving the effect of hot update of the extraction logic without restarting or redeploying the flink task.

[0074] 5. Join multiple MQ messages

[0075] In some cases, even if the forward waybill includes a medical incubator and the transportation status in the MQ message is the waybill delivery status, it may not be the right time to generate a reverse waybill. This may be because the received MQ message itself lacks certain fields or because of business expansion, it is impossible to accurately determine whether a reverse waybill can be generated based on the fields in an MQ message. At this time, at least two MQ messages can be connected, and these at least two MQ messages include an MQ message that can represent the transportation status and an MQ message that represents the remaining dimensional information, and these MQ messages are merged and connected, and then the above filtering steps are performed based on the merged connection results. In actual applications, optionally, if the above steps are performed based on a flink task, the merge connection of multiple MQ messages can be processed based on the stream join in flink; if the above steps are performed based on a storm task, the join of multiple MQ messages can be implemented by storing the join relationship in redis. In particular, when implementing the join of multiple MQ messages based on redis, the number of MQ messages and the key data storage size can be controlled.

[0076] 2. Generate a reverse waybill

[0077] 1. Call the RPC interface to query the waybill information of the forward waybill (such as the forward waybill number, the occurrence time of each transportation node, etc.), and complete the basic information of the reverse waybill such as cargo information, receipt information, etc. based on the query results. This is to associate the forward waybill with the reverse waybill so that the entire transportation trajectory of the medical incubator can be monitored later. It realizes the automatic query of the waybill information of the forward waybill through the RPC interface call, thereby solving the problem of untimely and missed generation of the reverse waybill due to the need for site staff to query information across systems and insufficient operating permissions.

[0078] 2. Read configuration information from the configuration file and initialize cargo information such as consignment, weight, volume, etc.

[0079] 3. Assemble and reconstruct the various information in the first two steps and save them in the MySQL database (this is used for subsequent monitoring), and store the reverse waybill number of the reverse waybill in redis (this is used in the "update MQ message" in the subsequent exemplary description).

[0080] 4. Determine whether the generation process of this reverse waybill requires manual processing / review based on the configuration information:

[0081] 4.1. Manual processing: For example, the location of the express delivery station may not support internal logistics transportation, and external logistics transportation is required; the freight settlement method for the medical insulation box is monthly settlement in the contract, but the freight settlement method is not configured in the configuration information; the freight for internal logistics transportation is higher, and an order for external logistics transportation is required; etc. At this time, you can notify the station staff through mobile phone text messages, emails, office instant messaging messages, etc. to conduct conditional queries in the relevant system, manually complete the waybill information and confirm it before submitting the waybill.

[0082] 4.2. Non-manual processing: The system automatically calls the waybill system service interface.

[0083] Embodiment 3

[0084] Figure 3 It is a flow chart of a waybill generation method provided in the third embodiment of the present invention. This embodiment is optimized based on the above-mentioned technical solutions. In this embodiment, optionally, after generating the second waybill according to the receipt information and the cargo information, the above-mentioned waybill generation method may also include: storing the second waybill number of the second waybill in a preset target cache; when monitoring the second key space notification event, reading the newly added second waybill number corresponding to the second key space notification event from the target cache, and storing the read second waybill number in the preset second cache; when receiving the second waybill transport message, determining whether the third waybill number in the second waybill transport message is one of the second waybill numbers stored in the second cache; if so, updating the second waybill transport message to the preset message storage database. Among them, the explanations of the terms that are the same or corresponding to the above-mentioned embodiments are not repeated here.

[0085] See also Figure 3 The method of this embodiment may specifically include the following steps:

[0086] S310. When a first waybill transport message is received, determine a first waybill corresponding to the first waybill transport message, and determine a transport status and waybill information of the first waybill according to the first waybill transport message.

[0087] S320. When it is determined that a second waybill needs to be generated based on the transportation status and the waybill information, the receiving information and the cargo information of the recyclable cargo in the first waybill are obtained, wherein the second waybill is a waybill that uses the shipping information of the first waybill as the receiving information.

[0088] S330: Generate a second waybill according to the delivery information and the cargo information, and store a second waybill number of the second waybill in a preset target cache.

[0089] It should be noted that the target cache in this step and the target cache in the second embodiment of the present invention can be the same or different caches, which is not specifically limited here. In addition, storing the second waybill number of the second waybill in the pre-set target cache and monitoring the second key space notification event in the following steps can be performed by the same task or different tasks in the task cluster, which is not specifically limited here.

[0090] S340: When a second key space notification event is monitored, a newly added second waybill number corresponding to the second key space notification event is read from a target cache, and the read second waybill number is stored in a pre-set second cache.

[0091] Among them, the second key space notification event can be an event triggered when the second metadata stored in the target cache is newly added, and the second cache can be a pre-set local cache or an external cache, which can be the same or different cache as the first cache described above, and is not specifically limited here. When the second key space notification event is monitored, the newly added second waybill number corresponding to the second key space notification event can be read from the target cache, and the reading result can be stored in the second cache, so that when the second waybill transport message is subsequently received, the second waybill number stored in the second cache can be used to determine whether the second waybill transport message is the waybill transport message of the second waybill.

[0092] S350: When a second waybill transport message is received, if the third waybill number in the second waybill transport message is one of the second waybill numbers stored in the second cache, the second waybill transport message is updated to a preset message storage database.

[0093] Among them, the second waybill transport message may be some messages generated by a waybill during the transportation process. The waybill may be the first waybill, the second waybill, or any other waybill except the first waybill and the second waybill, which is not specifically limited here. Therefore, when the second waybill transport message is received, since each second waybill number has been stored in the second cache, it is possible to determine whether the second waybill transport message is the waybill transport message of the second waybill by judging whether the third waybill number in the second waybill transport message is one of the second waybill numbers stored in the second cache. If so, it means that it is the waybill transport message of the second waybill, so that the second waybill transport message can be updated to the pre-set message storage database, thereby achieving the effect of filtering out the waybill transport messages belonging to the second waybill and the waybill transport messages of the second waybill from each second waybill transport message. Full-process monitoring.

[0094] In actual applications, optionally, during the running of the flink task, the flink task may need to be restarted due to reasons such as the abnormal hanging of the flink cluster or the expansion of the task due to the surge in the number of waybills. In this case, the flink task needs to be restarted. Therefore, when the start event of the message update task for implementing the message update is detected, the second waybill number of the second waybill in transportation (i.e., unfinished) can be pulled from the message storage database based on the message update task, and the pulling result can be stored in the second cache to continue to execute the message update task, thereby ensuring that the second waybill transportation message of the second waybill can be effectively updated under abnormal circumstances. In actual applications, optionally, the message update task can be a flink task, the second cache can be a state cache, and the message storage database can be a mysql database. That is, when the message update task is started, the second waybill number of the unfinished second waybill can be pulled from the mysql database in batches based on the flink task and initialized to the flink state cache. In particular, compared with redis, the mysql database has higher data accuracy.

[0095] The technical solution of the embodiment of the present invention is to store the second waybill number of the second waybill in a pre-set target cache, so that when the second key space notification event is monitored, the newly added second waybill number corresponding to the second key space notification event can be read from the target cache, and then the read second waybill number can be stored in the pre-set second cache; in this way, when the second waybill transport message is received, if the third waybill number in the second waybill transport message is one of the second waybill numbers stored in the second cache, this indicates that the second waybill transport message is the waybill transport message of the second waybill, and then the second waybill transport message can be updated to the pre-set message storage database, thereby achieving the effect of filtering out the waybill transport message belonging to the second waybill and the waybill transport message of the second waybill from each second waybill transport message. Full-process monitoring effect.

[0096] On this basis, an optional technical solution, updating the second waybill transport message to a preset message storage database, may include: based on a first preset time interval, treating the second waybill transport message that has not been updated as the waybill transport message to be updated, generating a rollback log file corresponding to each waybill transport message to be updated; updating each waybill transport message to be updated to a preset message storage database, and deleting the rollback log file after all the waybill transport messages to be updated are successfully updated. Wherein, when the second waybill transport message belongs to the waybill transport message of the second waybill, the waybill transport message to be updated may be the second waybill transport message that has not been updated and is obtained at every first preset time interval. Taking the first preset time interval as N seconds as an example, the waybill transport message to be updated may be the second waybill transport message that has been generated but has not been updated to the message storage database and is determined every N seconds. The rollback log (undo.log) file may be a file corresponding to the waybill transport message to be updated obtained this time for implementing the rollback of the update operation. Each waybill transport message to be updated is updated to the message storage database, and the rollback log file is deleted after all the waybill transport messages to be updated are successfully updated, thereby achieving the effect of batch update of the waybill transport messages to be updated. In practical applications, optionally, the above-mentioned message batch update process can be completed based on the time wheel algorithm. Since the time wheel algorithm writes the waybill transport messages to be updated into the message storage database through a local asynchronous processing queue (i.e., an asynchronous task), the writing pressure of the message storage database is greatly reduced.

[0097] On this basis, optionally, the above-mentioned waybill generation method may further include: based on the second preset time interval, determining whether there is an undeleted rollback log file; if so, obtaining the message deletion statement recorded in the undeleted rollback log file, and deleting the waybill transport message to be updated corresponding to the message deletion statement that has been updated in the message storage database. That is, it is regularly checked whether there is an undeleted rollback log file. If it exists, it means that there is a waybill transport message to be updated that has failed to update. On this basis, since the rollback log file records a message deletion statement that is exactly the opposite of the message update operation, the corresponding waybill transport message to be updated that has been updated in the message storage database can be deleted based on the message deletion statement, so that these waybill transport messages to be updated are updated again after the next first preset time interval, thereby achieving the effect of updating each waybill transport message to be updated in the batch update without omission. The above-mentioned first preset time interval and the second preset time interval can be the same or different preset time intervals, which are not specifically limited here.

[0098] On the basis of any technical solution of the embodiments of the present invention, optionally, after updating the second waybill transport message into the message storage database, the above-mentioned waybill generation method may further include: if a first waybill monitoring event is monitored, obtaining a second waybill corresponding to the first waybill monitoring event, and reading a second waybill transport message of the second waybill from the message storage database, thereby achieving an effect of effective monitoring of the second waybill transport message of the entire process of the second waybill; and / or updating the waybill information of the first waybill that has an associated relationship with the second waybill into the message storage database; when a second waybill monitoring event is monitored, obtaining the second waybill corresponding to the second waybill monitoring event The second waybill corresponding to the control event is determined, the first waybill associated with the second waybill is determined, and the second waybill transport message and / or the waybill information of the first waybill of the second waybill are read from the message storage database, thereby achieving the effect of full-process visual monitoring of the first waybill and the second waybill with an associated relationship, and then the operation information (such as waybill number, transportation status, operation type, operation site, operator and operation time) of each link of the return process of each recyclable cargo (such as collection, shipment, arrival or delivery, etc.) can be clarified, so that the responsible person can be found and verified in time when any abnormal situation occurs in the recyclable cargo.

[0099] In order to better understand the specific implementation process of the above steps, the above exemplary description is continued as an example to illustrate the method for generating a waybill in this embodiment. Figure 4 , now we will elaborate on the last of these three parts.

[0100] 3. Update MQ message (i.e. update the transport status of the reverse waybill)

[0101] 1. Start the flink task for message update and receive the MQ message of the entire reverse waybill process.

[0102] 2. Message filtering: filter messages according to the waybill number rules

[0103] 2.1. When the flink task starts, the reverse waybill numbers of the unfinished reverse waybills are batch-pulled from the MySQL database, and the pulled reverse waybill numbers are initialized into the flink state.

[0104] 2.2. During the running of the flink task, the reverse waybill number in the flink state is updated by listening to the second key space notification event of redis. That is, when a new reverse waybill number is stored in redis, redis will trigger the second key space notification event; further, when the flink task listens to the second key space notification event, it can store the key (that is, the reverse waybill number) corresponding to such a second key space notification event in the state, and then when receiving the MQ message, if the third waybill number in the MQ message is stored in the state, the MQ message will be retained and the step of "3. MQ message update" will be entered to realize the message filtering function.

[0105] 3. MQ message update, which is an exception compensation mechanism based on the WAL mechanism and time wheel algorithm.

[0106] 3.1. Design a local asynchronous processing queue based on the time wheel algorithm, and update MQ messages in batches every 5 seconds (the MQ messages at this time are the waybill transport messages to be updated above). The upper limit of a single batch update can be 1000. MQ messages exceeding the upper limit can be updated in the next round.

[0107] 3.2. Write-Ahead Logging (WAL) mechanism: Each time MQ messages are updated in batches, an undo.log file can be written first, and then jdbc (Java database connection, Java API for executing SQL statements) can be called for batch saving, and the undo.log file can be asynchronously deleted after successful saving. This is to take into account the possibility that some MQ messages may fail to update during the batch MQ message update process. Therefore, the undo.log file is deleted after all MQ messages are successfully updated, thereby ensuring that MQ messages are updated without omission.

[0108] 3.3. Fault-tolerance processing: The scheduled task scans the undeleted undo.log files and performs MQ message recovery operations, thereby compensating for the MQ messages that have not been written to the MySQL database.

[0109] Embodiment 4

[0110] Figure 5 This is a structural block diagram of a waybill generating device provided in Embodiment 4 of the present invention. The device is used to execute the waybill generating method provided in any of the above embodiments. The device and the waybill generating method of the above embodiments belong to the same inventive concept. For details not described in detail in the embodiment of the waybill generating device, please refer to the embodiment of the waybill generating method. Figure 5 The device may specifically include: a waybill information determination module 410, a cargo information acquisition module 420 and a second waybill generation module 430.

[0111] The waybill information determination module 410 is used to determine the first waybill corresponding to the first waybill transportation message when receiving the first waybill transportation message, and determine the transportation status and waybill information of the first waybill according to the first waybill transportation message;

[0112] The cargo information acquisition module 420 is used to acquire the cargo information of the recyclable cargo in the first waybill when it is determined that the second waybill needs to be generated according to the transportation status and the waybill information, wherein the second waybill is a waybill that uses the shipping information of the first waybill as the cargo information;

[0113] The second waybill generating module 430 is used to generate a second waybill according to the delivery information and the goods information.

[0114] Optionally, the above-mentioned waybill generating device may further include:

[0115] A first waybill number determination module, used to obtain a first waybill number of the first waybill from the waybill information before determining that a second waybill needs to be generated according to the transportation status and the waybill information, and determine whether the first waybill number is stored in a preset first cache;

[0116] A second waybill determination module is used to determine whether it is necessary to generate a second waybill according to whether the transportation status is a waybill delivery status;

[0117] The first waybill number storage module is used to determine whether the first waybill includes recyclable goods based on the waybill information. If so, the first waybill number in the waybill information is stored in the first cache, and the step of determining whether a second waybill needs to be generated is performed based on whether the transportation status is a waybill delivery status.

[0118] On this basis, optionally, the waybill information includes the waybill identification and / or the cargo type of the non-recyclable cargo in the first waybill, and the first waybill number storage module may include:

[0119] A target position extraction unit, used to extract the target position from each position of the waybill mark;

[0120] The recyclable goods determination unit is used to determine whether the non-recyclable goods are target goods that need to be transported together with the recyclable goods according to the mark value of the target mark and / or the type of goods, and determine whether the first waybill includes the recyclable goods according to the judgment result.

[0121] Optionally, based on the above device, the device may further include:

[0122] A first metadata reading module is used to read the changed first metadata corresponding to the first key space notification event from a preset target cache when monitoring the first key space notification event, wherein the first metadata is data used to describe the target location;

[0123] A second metadata changing module, configured to change the second metadata stored in the first cache based on the target position represented by the first metadata, so that the extraction logic represented by the changed second metadata can be used to extract the target position;

[0124] Correspondingly, the target position extraction unit can be specifically used to extract the target position from each position of the waybill identifier based on the changed second metadata.

[0125] Optionally, the first cache includes a first local cache that can be used to implement Bloom filtering;

[0126] The first waybill number storage module may include: a first waybill number storage unit, configured to use the first waybill number in the waybill information as a Bloom filter value in the first local cache;

[0127] Correspondingly, the first waybill number determination module may include: a first waybill number determination unit, configured to determine whether each Bloom filter value stored in the first local cache includes the first waybill number.

[0128] Optionally, the above-mentioned waybill generating device may further include:

[0129] A second waybill number storage module, configured to store the second waybill number of the second waybill in a preset target cache after generating the second waybill according to the delivery information and the cargo information;

[0130] A second waybill number re-storage module, used for reading a newly added second waybill number corresponding to the second keyspace notification event from the target cache when a second keyspace notification event is monitored, and storing the read second waybill number in a pre-set second cache;

[0131] A third waybill number determination module is used to determine whether the third waybill number in the second waybill transport message is one of the second waybill numbers stored in the second cache when receiving the second waybill transport message;

[0132] The second waybill transport message updating module is used to update the second waybill transport message to a preset message storage database if yes.

[0133] On this basis, optionally, the second waybill transport message updating module may include:

[0134] A rollback log file generating unit, configured to, based on a first preset time interval, use the second waybill transport message that has not been updated as the waybill transport message to be updated, and generate a rollback log file corresponding to each waybill transport message to be updated;

[0135] The rollback log file deletion unit is used to update each waybill transport message to be updated into a preset message storage database, and delete the rollback log file after all the waybill transport messages to be updated are successfully updated.

[0136] On this basis, optionally, the second waybill transport message updating module may further include:

[0137] a rollback log file determining unit, configured to determine whether there is an undeleted rollback log file based on a second preset time interval;

[0138] The to-be-updated waybill transport message deletion unit is used to obtain the message deletion statement recorded in the undeleted rollback log file, and delete the to-be-updated waybill transport message corresponding to the message deletion statement that has been updated in the message storage database.

[0139] Optionally, the above-mentioned waybill generating device may further include:

[0140] A second waybill transport message reading module is used to obtain a second waybill corresponding to the first waybill monitoring event when monitoring the first waybill monitoring event, and read the second waybill transport message of the second waybill from the message storage database;

[0141] and / or,

[0142] A waybill information updating module, used to update waybill information of a first waybill associated with a second waybill into a message storage database;

[0143] A first waybill determining module, configured to, when monitoring a second waybill monitoring event, obtain a second waybill corresponding to the second waybill monitoring event, and determine a first waybill associated with the second waybill;

[0144] The waybill information reading module is used to read the second waybill transportation message of the second waybill and / or the waybill information of the first waybill from the message storage database.

[0145] Optionally, the above-mentioned waybill generating device may further include:

[0146] A second waybill number storage module is used to pull the second waybill number of the second waybill being transported from the message storage database when a start event of the message update task is detected, and store the pull result in the second cache, wherein the message update task includes a flink task for implementing the message update, and the second cache includes a state cache;

[0147] And / or, the target cache includes a redis cache.

[0148] Optionally, the second waybill needs to be generated when the waybill information indicates that the recyclable goods exist in the first waybill.

[0149] The waybill generation device provided in the fourth embodiment of the present invention can determine the transportation status and waybill information of the first waybill corresponding to the first waybill transportation message according to the first waybill transportation message when the waybill information determination module receives the first waybill transportation message; since it can be determined whether the first waybill has been delivered to the goods acquisition party according to the transportation status, and whether there are recyclable goods in the first waybill according to the waybill information, when it is determined that a second waybill opposite to the first waybill needs to be generated according to the two, the goods information acquisition module can obtain the receipt information and the goods information of the recyclable goods in the first waybill, which are indispensable reference factors in the process of generating the second waybill. At this time, the receipt information of the second waybill is the shipping information of the first waybill; then, the second waybill is generated according to the receipt information and the goods information by the second waybill generation module. The above device solves the problems of easy errors and low efficiency in the process of generating the second waybill, and achieves the effect of generating the second waybill with high accuracy and timeliness.

[0150] The waybill generation device provided in the embodiment of the present invention can execute the waybill generation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0151] It is worth noting that in the embodiment of the above-mentioned waybill generation device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0152] Embodiment 5

[0153] Figure 6 This is a schematic diagram of a waybill generating device provided in Embodiment 5 of the present invention, see Figure 6 As shown, the device includes a memory 510, a processor 520, an input device 530, and an output device 540. The number of processors 520 in the device can be one or more. Figure 6 A processor 520 is used as an example; the memory 510, the processor 520, the input device 530 and the output device 540 in the device can be connected via a bus or other means. Figure 6 The connection via bus 550 is taken as an example.

[0154] The memory 510, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the waybill generation method in the embodiment of the present invention (for example, the waybill information determination module 410, the cargo information acquisition module 420 and the second waybill generation module 430 in the waybill generation device). The processor 520 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 510, that is, implements the above-mentioned waybill generation method.

[0155] The memory 510 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the device, etc. In addition, the memory 510 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 510 may further include a memory remotely arranged relative to the processor 520, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0156] The input device 530 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the device. The output device 540 may include a display device such as a display screen.

[0157] Embodiment 6

[0158] Embodiment 6 of the present invention provides a storage medium including computer executable instructions, wherein the computer executable instructions are used to execute a waybill generation method when executed by a computer processor, the method comprising:

[0159] Upon receiving the first waybill transport message, determining a first waybill corresponding to the first waybill transport message, and determining a transport status and waybill information of the first waybill according to the first waybill transport message;

[0160] When it is determined that a second waybill needs to be generated according to the transportation status and the waybill information, the receiving information and the cargo information of the recyclable cargo in the first waybill are obtained, wherein the second waybill is a waybill that uses the shipping information of the first waybill as the receiving information;

[0161] Generate a second waybill based on the delivery information and the cargo information.

[0162] Of course, the storage medium containing computer executable instructions provided in an embodiment of the present invention is not limited to the method operations described above, and the computer executable instructions can also execute related operations in the waybill generation method provided in any embodiment of the present invention.

[0163] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0164] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A waybill generation method, It is characterized in that include: Upon receiving a first waybill transport message, determining a first waybill corresponding to the first waybill transport message, and determining a transport status and waybill information of the first waybill according to the first waybill transport message; When it is determined that a second waybill needs to be generated according to the transportation status and the waybill information, obtaining the receipt information and the cargo information of the recyclable cargo in the first waybill, wherein the second waybill is a waybill that uses the shipping information of the first waybill as the receipt information; The second waybill is generated according to the receipt information and the cargo information.

2. The method according to claim 1, It is characterized in that Before determining that a second waybill needs to be generated according to the transportation status and the waybill information, the method further includes: Obtaining a first waybill number of the first waybill from the waybill information, and determining whether the first waybill number is stored in a pre-set first cache; If yes, determining whether the second waybill needs to be generated according to whether the transport status is a waybill delivery status; Otherwise, determine whether the first waybill includes the recyclable goods based on the waybill information. If so, store the first waybill number in the waybill information in the first cache, and execute the step of determining whether it is necessary to generate the second waybill based on whether the transportation status is the waybill delivery status.

3. The method according to claim 2, It is characterized in that The waybill information includes a waybill identifier and / or a type of non-recyclable goods in the first waybill, and determining whether the first waybill includes the recyclable goods according to the waybill information includes: Extracting the target position from each position of the waybill identification; According to the mark value of the target mark and / or the type of goods, it is determined whether the non-recyclable goods are target goods that need to be transported together with the recyclable goods, and it is determined whether the first waybill includes the recyclable goods based on the judgment result.

4. The method according to claim 3, It is characterized in that Also includes: When a first key space notification event is monitored, reading the changed first metadata corresponding to the first key space notification event from a preset target cache, wherein the first metadata is data used to describe the target location; Based on the target position represented by the first metadata, changing the second metadata stored in the first cache so that the extraction logic represented by the changed second metadata can be used to extract the target position; The step of extracting the target position from each position of the waybill identifier includes: Based on the changed second metadata, the target location is extracted from each location of the waybill identifier.

5. The method according to claim 2, It is characterized in that The first cache comprises a first local cache for implementing Bloom filtering; The storing the first waybill number in the waybill information in the first cache includes: using the first waybill number in the waybill information as a Bloom filter value in the first local cache; The determining whether the first waybill number is stored in a preset first cache includes: determining whether each of the Bloom filter values ​​stored in the first local cache includes the first waybill number.

6. The method according to claim 1, It is characterized in that After generating the second waybill according to the receipt information and the cargo information, the method further includes: Storing the second waybill number of the second waybill in a preset target cache; When a second key space notification event is monitored, the newly added second waybill number corresponding to the second key space notification event is read from the target cache, and the read second waybill number is stored in a pre-set second cache; Upon receiving the second waybill transport message, determining whether a third waybill number in the second waybill transport message is one of the second waybill numbers stored in the second cache; If yes, the second waybill transport message is updated to a preset message storage database.

7. The method according to claim 6, It is characterized in that Updating the second waybill transport message into a preset message storage database includes: Based on the first preset time interval, the second waybill transport message that has not been updated is used as the waybill transport message to be updated, and a rollback log file corresponding to each waybill transport message to be updated is generated; Each of the waybill transport messages to be updated is updated into a preset message storage database, and the rollback log file is deleted after all of the waybill transport messages to be updated are successfully updated.

8. The method according to claim 7, It is characterized in that Also includes: Based on a second preset time interval, determining whether there is the rollback log file that has not been deleted; If so, the message deletion statement recorded in the rollback log file that has not been deleted is obtained, and the to-be-updated waybill transport message corresponding to the message deletion statement that has been updated in the message storage database is deleted.

9. The method according to claim 6, It is characterized in that After the second waybill transport message is updated into a preset message storage database, the method further includes: When a first waybill monitoring event is monitored, obtaining the second waybill corresponding to the first waybill monitoring event, and reading the second waybill transportation message of the second waybill from the message storage database; and / or, updating the waybill information of the first waybill associated with the second waybill into the message storage database; When a second waybill monitoring event is monitored, obtaining the second waybill corresponding to the second waybill monitoring event, and determining the first waybill associated with the second waybill; The second waybill transport message of the second waybill and / or the waybill information of the first waybill are read from the message storage database.

10. The method according to claim 6, It is characterized in that Also includes: When a start event of a message update task is detected, the second waybill number of the second waybill being transported is pulled from the message storage database based on the message update task, and the pulling result is stored in the second cache, wherein the message update task includes a flink task for implementing message update, and the second cache includes a state cache; And / or, the target cache includes a redis cache.

11. The method according to claim 1, It is characterized in that The second waybill needs to be generated when the waybill information indicates that the recyclable goods exist in the first waybill.

12. A waybill generating device, It is characterized in that include: A waybill information determination module, configured to determine, upon receiving a first waybill transport message, a transport status and waybill information of a first waybill corresponding to the first waybill transport message according to the first waybill transport message; a cargo information acquisition module, configured to acquire, when it is determined that a second waybill needs to be generated according to the transportation status and the waybill information, the cargo information of the recyclable cargo in the first waybill, and the second waybill is a waybill that uses the shipping information of the first waybill as the cargo information; The second waybill generating module is used to generate the second waybill according to the delivery information and the cargo information.

13. A waybill generating device, It is characterized in that include: one or more processors; A memory 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 waybill generation method as described in any one of claims 1-11.

14. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the waybill generation method as described in any one of claims 1 to 11 is implemented.