CN114240296A - Waybill generation method, device, equipment and storage medium - Google Patents

Waybill generation method, device, equipment and storage medium Download PDF

Info

Publication number
CN114240296A
CN114240296A CN202111572655.2A CN202111572655A CN114240296A CN 114240296 A CN114240296 A CN 114240296A CN 202111572655 A CN202111572655 A CN 202111572655A CN 114240296 A CN114240296 A CN 114240296A
Authority
CN
China
Prior art keywords
waybill
message
information
transportation
cache
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111572655.2A
Other languages
Chinese (zh)
Inventor
郭庆海
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Zhenshi Information Technology Co Ltd
Original Assignee
Beijing Jingdong Zhenshi Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Zhenshi Information Technology Co Ltd filed Critical Beijing Jingdong Zhenshi Information Technology Co Ltd
Priority to CN202111572655.2A priority Critical patent/CN114240296A/en
Publication of CN114240296A publication Critical patent/CN114240296A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
    • G06Q10/083Shipping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/30Administration of product recycling or disposal
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02WCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO WASTEWATER TREATMENT OR WASTE MANAGEMENT
    • Y02W90/00Enabling technologies or technologies with a potential or indirect contribution to greenhouse gas [GHG] emissions mitigation

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Human Resources & Organizations (AREA)
  • Economics (AREA)
  • Operations Research (AREA)
  • General Physics & Mathematics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Marketing (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Sustainable Development (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Development Economics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention discloses a waybill generating method, a waybill generating device, waybill generating equipment and a storage medium. The method can comprise the following steps: when receiving a first waybill transportation message, 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 a second waybill is determined to be generated according to the transportation state and the waybill information, acquiring receiving information and goods information of recoverable goods in the first waybill, wherein the second waybill is a waybill taking the delivery information of the first waybill as the receiving information; and generating a second waybill according to the receiving information and the goods information. According to the technical scheme of the embodiment of the invention, the second waybill can be generated with higher accuracy and timeliness.

Description

Waybill generation method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of warehouse logistics, in particular to a waybill generation method, a waybill generation device, waybill generation equipment and a storage medium.
Background
In the medical cold chain self-operated warehouse distribution order, in order to ensure that the medical cold chain goods placed in the order can be delivered to the user in a low-temperature state, the medical cold chain goods are mostly placed in a medical insulated cabinet for distribution at present.
Since the medicine heat preservation box is a recyclable consumable item, after the courier sends the medicine cold chain goods to the hands of the user, the courier can bring the medicine heat preservation box back to the express delivery site, so that the site staff sends the medicine heat preservation box back to the original medicine warehouse through the offline ordering mode (i.e. the offline generation of the invoice).
In the process of implementing the invention, the inventor finds that the following technical problems exist in the prior art: the existing waybill generation scheme has the problems of high error probability and low efficiency.
Disclosure of Invention
The embodiment of the invention provides a waybill generation method, a waybill generation device, equipment and a storage medium, and solves the problems of high error probability and low efficiency in the waybill generation process.
In a first aspect, an embodiment of the present invention provides a waybill generation method, which may include:
when receiving a first waybill transportation message, 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 a second waybill is determined to be generated according to the transportation state and the waybill information, acquiring receiving information and goods information of recoverable goods in the first waybill, wherein the second waybill is a waybill taking the delivery information of the first waybill as the receiving information;
and generating a second waybill according to the receiving information and the goods information.
In a second aspect, an embodiment of the present invention further provides an waybill generation device, which may include:
the waybill information determining module is used for determining the transportation state and the waybill information of the first waybill corresponding to the first waybill transportation message according to the first waybill transportation message when the first waybill transportation message is received;
the cargo information acquisition module is used for acquiring the receiving information and the cargo information of the recoverable cargo in the first waybill when determining that a second waybill is required to be generated according to the transportation state and the waybill information, wherein the second waybill is the waybill which takes the delivery information of the first waybill as the receiving information;
and the second waybill generating module is used for generating a second waybill according to the receiving information and the goods information.
In a third aspect, an embodiment of the present invention further provides waybill generation equipment, which may 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 provided by any of the embodiments of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the waybill generation method provided in any embodiment of the present invention.
According to the technical scheme of the embodiment of the invention, when the first waybill transportation message is received, the transportation state and the waybill information of the first waybill corresponding to the first waybill transportation message can be determined according to the first waybill transportation message; whether the first waybill has been delivered to the goods acquirer can be determined according to the transportation state, and whether recyclable goods exist in the first waybill can be determined according to the waybill information, so that when a second waybill which is opposite to the first waybill is determined to be generated according to the first waybill and the second waybill, the receiving information and the goods information of the recyclable goods in the first waybill can be acquired, wherein the receiving information is necessary reference factors in the second waybill generation process, and the receiving information of the second waybill is the delivery information of the first waybill; and generating a second waybill according to the receiving information and the goods information. By the technical scheme, the problems of easy error and low efficiency in the second waybill generation process are solved, and the effect of generating the second waybill with higher accuracy and timeliness is achieved.
Drawings
Fig. 1 is a flowchart of a waybill generation method in an embodiment of the present invention;
fig. 2 is a flowchart of a waybill generation method in the second embodiment of the present invention;
fig. 3 is a flowchart of a waybill generation method in the third embodiment of the present invention;
fig. 4 is a schematic diagram of an alternative example of one waybill generation method in the second and third embodiments of the present invention;
fig. 5 is a block diagram of a waybill generation apparatus according to a fourth embodiment of the present invention;
fig. 6 is a schematic structural diagram of waybill generation equipment in the fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a waybill generation method according to an embodiment of the present invention. The present embodiment is applicable to the case of automatically generating a second waybill (i.e., a reverse waybill) that is the inverse of the first waybill (i.e., a forward waybill). The method can be executed by the waybill generation device provided by the embodiment of the invention, the device can be realized by software and/or hardware, the device can be integrated on waybill generation equipment, and the equipment can be various user terminals or servers.
Referring to fig. 1, the method of the embodiment of the present invention specifically includes the following steps:
s110, when the first waybill transportation message is received, a first waybill corresponding to the first waybill transportation message is determined, and the transportation state and the waybill information of the first waybill are determined according to the first waybill transportation message.
The first waybill transportation message may be some message generated by the first waybill during transportation, such as a waybill pickup message (e.g., the first waybill is picked up at a certain time), a waybill circulation message (e.g., the first waybill is transported from a certain place to a certain place at a certain time), a waybill distribution message (e.g., the first waybill is distributed by a certain courier at a certain time), a waybill delivery message (e.g., the first waybill is delivered to a user at a certain time), etc.
The first waybill may be a waybill generated because of a need to transport a good to the hands of a goods acquirer, which may be the current owner of the good, such as a seller, and which may be the future owner of the good, such as a buyer.
The transportation state may be a state where the first waybill is located when the first waybill transportation message is generated, such as a waybill receiving state, a waybill circulation state, a waybill distribution state, a waybill right-delivery state, and the like, which may be directly obtained from the first waybill transportation message. The waybill information may be attribute information of the first waybill, such as delivery information, receiving information, waybill identification, cargo type of the non-recyclable cargo in the first waybill, and the like, wherein the waybill identification may be information capable of identifying the first waybill itself, such as business mode (such as self-operation and outside-operation), transportation mode (such as air-transportation and land-transportation), transportation timeliness (such as punctual arrival and accurate arrival), and the like; the unrecoverable goods may be goods that do not return to the goods attribution party after the first waybill is delivered to the goods acquirer, in the above medical cold chain self-operation order, in the first waybill generated for completing the order, the medical cold chain goods are unrecoverable goods, and the medical insulation can is recoverable goods, that is, goods that need to return to the goods attribution party after being delivered to the goods acquirer; the type of goods may be a type of non-recyclable goods, which may be embodied in a number of aspects such as an industry, a production line, a business segment, and the like. The waybill information can be directly obtained from the first waybill transportation message, and can also be obtained by inquiring a first waybill number in the first waybill transportation message in a related system, wherein the first waybill number is the waybill number of the first waybill.
And S120, when a second waybill is determined to be required to be generated according to the transportation state and the waybill information, acquiring the receiving information and the goods information of the recyclable goods in the first waybill, wherein the second waybill is the waybill taking the delivery information of the first waybill as the receiving information.
The premise that the recoverable goods in the first waybill are returned to the goods attribution party can be that the first waybill has been delivered to the goods acquirer and the recoverable goods exist in the first waybill, it should be noted that whether the first waybill arrives at the goods acquirer can be determined according to the transportation state, and whether the recoverable goods exist in the first waybill can be determined according to the waybill information, so that whether a second waybill for delivering the recoverable goods in the first waybill to the goods attribution party in the first waybill can be generated according to the transportation state and the waybill information. It will be understood by those skilled in the art that the receiving information of the second waybill is the shipping information of the first waybill, the shipping information may be the shipping-related information of the first waybill, such as the name, address, telephone, etc. of the shipping object (i.e., the goods home agent), and correspondingly, the receiving information may be the receiving-related information of the second waybill, such as the name, address, telephone, etc. of the receiving object, in which case the shipping object and the receiving object may be the same object. The first waybill can be called a forward waybill, and the second waybill can be called a reverse waybill which has an association relationship with the first waybill.
If it is determined that a second waybill needs to be generated, the ship to information and the cargo information for the recyclable cargo within the first waybill may be obtained. Optionally, since the receiving information in the first waybill is the shipping information in the second waybill, the obtaining manner of the receiving information may include querying in a related system according to the first waybill number, taking the related system as a freight transportation system as an example, optionally, the shipping information of the first waybill may be queried from the freight transportation system by calling a Remote Procedure Call Protocol (RPC) interface disposed on the freight transportation system, and then the shipping information is used as the receiving information. The cargo information may be attribute information of the recyclable cargo, such as volume (length, width, height, diameter), weight, etc., which may be standardized information that can be directly written in the configuration file, and thus the cargo information may be acquired in a manner that includes reading the configuration information from a preset configuration file and acquiring the cargo information based on the configuration information. Of course, the above-described manners of acquiring the receiving information and the cargo information are optional, and are not specific limitations on the realizable manners.
And S130, generating a second freight bill according to the receiving information and the goods information.
And generating a second waybill according to the receiving information and the goods information, wherein the second waybill is an indispensable reference factor in the generation process of the second waybill.
It should be noted that, first, the first waybill in the above technical solution may include recoverable goods and non-recoverable goods that the transportation party needs to ensure that the target goods (i.e. non-recoverable goods) are transported to the goods acquirer in a good state at the same time, and such first waybill is the waybill that needs to generate the second waybill associated with the first waybill. For example, the suitable application scenario may be a cold chain transportation scenario such as fresh food, medicine, etc., and of course, the application scenario may also be the rest, which is not specifically limited herein.
Secondly, compared with a mode of manually generating the second waybill, the technical scheme can realize automatic generation of the second waybill, so that site workers do not need to manually input waybill information and goods information in related systems, and because various systems such as a storage system, a distribution system and the like are possibly divided and isolated according to business and departments, the problems that the second waybill is not generated timely and is generated in a missing mode due to the fact that the site workers need to inquire information across systems, operation authority is insufficient and the like are solved in a mode of not manually inputting, so that high accuracy and high efficiency in the second waybill generating process are guaranteed, and operation complexity of the site workers is reduced. Taking the medicine cold chain goods as an example, the above technical scheme can automatically generate the second waybill for sending the medicine insulation box which is delivered simultaneously with the medicine cold chain goods to the originating medicine warehouse after the medicine cold chain goods are delivered properly, and the timely return of the medicine insulation box improves the circulation rate of the medicine insulation box and reduces the purchase cost of the medicine insulation box (because the medicine insulation box needs to be provided with 1 time more boxes for 1 day).
Thirdly, the above technical solution is executed once every time a first waybill transportation message is received, that is, it is continuously executed along with the continuous arrival of the first waybill transportation message, which is a streaming calculation manner. In practical application, optionally, the technical scheme can be completed by using a flink platform as a real-time computing engine, so that the generation efficiency of the second waybill is improved.
According to the technical scheme of the embodiment of the invention, when the first waybill transportation message is received, the transportation state and the waybill information of the first waybill corresponding to the first waybill transportation message can be determined according to the first waybill transportation message; whether the first waybill has been delivered to the goods acquirer can be determined according to the transportation state, and whether recyclable goods exist in the first waybill can be determined according to the waybill information, so that when a second waybill which is opposite to the first waybill is determined to be generated according to the first waybill and the second waybill, the receiving information and the goods information of the recyclable goods in the first waybill can be acquired, wherein the receiving information is necessary reference factors in the second waybill generation process, and the receiving information of the second waybill is the delivery information of the first waybill; and generating a second waybill according to the receiving information and the goods information. By the technical scheme, the problems of easy error and low efficiency in the second waybill generation process are solved, and the effect of generating the second waybill with higher accuracy and timeliness is achieved.
Example two
Fig. 2 is a flowchart of a waybill generation method provided in the second embodiment of the present invention. The present embodiment is optimized based on the above technical solutions. In this embodiment, optionally, before determining that the second waybill needs to be generated according to the transportation state and the waybill information, the waybill generation method may further include: obtaining a first freight note number of the first freight note from the freight note information, and determining whether the first freight note number is stored in a preset first cache; if yes, determining whether a second waybill needs to be generated according to whether the transportation state is a waybill appropriate-delivery state; otherwise, determining whether the first waybill comprises recyclable goods or not according to the waybill information, if so, storing the first waybill number in the waybill information in a first cache, and executing the step of determining whether a second waybill needs to be generated or not according to whether the transportation state is the waybill due state or not. The same or corresponding terms as those in the above embodiments are not explained in detail herein.
Referring to fig. 2, the method of the present embodiment may specifically include the following steps:
s210, when the first waybill transportation message is received, a first waybill corresponding to the first waybill transportation message is determined, and the transportation state and the waybill information of the first waybill are determined according to the first waybill transportation message.
S220, obtaining a first waybill number of the first waybill from the waybill information, determining whether the first waybill number is stored in a preset first cache, if so, executing S230, otherwise, executing S240.
The waybill information can be attribute information of the first waybill, so that 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, where the external cache may be a cache that is set locally 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, which indicates that the corresponding first waybill includes recyclable goods, S230 may be executed to further determine whether the transportation state at this time is a waybill due state; otherwise, S240 is executed to determine whether recyclable goods are included in such first waybill.
And S230, determining whether to generate a second waybill according to whether the transportation state is the waybill due delivery state, wherein the second waybill is a waybill which takes the delivery information of the first waybill as the receiving information.
When the transportation state is the waybill delivery state, the situation shows that the unrecyclable goods in the first waybill are delivered to the goods acquirer, and a second waybill can be generated at the moment; otherwise, the unrecoverable goods are not sent to the goods acquiring party, and a second waybill does not need to be generated at the moment.
S240, determining whether the first waybill comprises recyclable goods or not according to the waybill information, if so, storing the first waybill number in the waybill information in a first cache, and executing S230.
The waybill information can show whether recyclable goods exist in the first waybill, so that whether the recyclable goods exist in the first waybill is determined according to 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, the first waybill number obtained from the first waybill transportation message stored in the first cache can be directly determined to include the recyclable goods in the first waybill, and therefore the accuracy of determining whether the recyclable goods exist is improved. Further, S230 is executed to determine the transportation status. Of course, if it is determined from the waybill information that the first waybill does not include recyclable goods, this indicates that a second waybill corresponding to the first waybill does not need to be generated, and the process exits.
And S250, if the second waybill is determined to need to be generated, acquiring the receiving information and the cargo information of the recoverable cargo in the first waybill, and generating the second waybill according to the receiving information and the cargo information.
According to the technical scheme of the embodiment of the invention, whether the first waybill number of the first waybill obtained from waybill information is stored in a preset first cache can be determined, if yes, the first waybill contains recoverable goods, and whether a second waybill is generated can be determined according to whether the transportation state is the waybill state; otherwise, it is stated that it cannot be determined whether the first waybill includes recyclable goods at this time, it may be determined whether the first waybill includes recyclable goods according to 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 may be directly determined that the first waybill includes recyclable goods according to the first waybill number stored in the first cache and obtained from the first waybill transportation message, thereby improving accuracy of determining whether the recyclable goods exist, and then it may be determined whether to generate the second waybill according to whether the transportation state is the waybill-committed state, thereby achieving an effect of accurate and efficient generation of the second waybill.
On this basis, an optional technical solution is that the waybill information includes a waybill identifier and/or a cargo type of the unrecyclable cargo in the first waybill, and determining whether the first waybill includes the recoverable cargo according to the waybill information may include: extracting target positions from each position of the waybill identification; and judging whether the unrecoverable goods are the target goods which need to be transported together with the recyclable goods according to the position value and/or the goods type of the target position, and determining whether the recyclable goods are included in the first waybill according to the judgment result. The waybill identifier can be information capable of identifying the first waybill, and can include a plurality of fields (namely a plurality of bits), each bit has its own meaning, such as a business mode, a transportation mode, transportation timeliness and the like, and specific content of a certain bit on the meaning can be determined by a bit value on the bit, such as that when the bit value on the bit of the business mode is 0, the operation is represented, and when the operation is 1, the operation is represented, and the like. It should be noted that although the waybill identifier includes a plurality of positions, not every position can determine whether the first waybill includes recyclable goods, so that a target position that can determine whether the first waybill includes recyclable goods can be extracted from each position of the waybill identifier, and a position value on the target position can be determined. The type of goods may be a type of non-recyclable goods that may be embodied in a number of aspects such as industries (e.g., fresh food, pharmaceutical), production lines, business sectors, and the like. Therefore, whether the unrecoverable goods are the target goods which need to be transported together with the recyclable goods can be judged according to the position value and/or the goods type of the target position, and whether the recyclable goods are included in the first waybill is determined according to the judgment result, namely when the target goods are included in the first waybill, the recyclable goods are also included in the first waybill; otherwise, no recyclable goods are included therein. Of course, the determination may be made according to the remaining information in the waybill information, except for the target location and the cargo type, and is not specifically limited herein. According to the technical scheme, whether the recyclable goods exist or not is judged from multiple dimensions, so that the effect of accurately judging whether the recyclable goods exist or not is achieved.
On this basis, optionally, the waybill generation method may further include: when a first key space notification event is monitored, reading changed first metadata corresponding to the first key space notification event from a preset target cache, wherein the first metadata is used for describing a target mark bit; changing the second metadata stored in the first cache based on the first metadata; extracting target positions from the positions identified by the waybill may include: and extracting target mark bits from the mark bits of the waybill identifier based on the changed second metadata. Wherein, the first keyspace notification (keyspace notification) event may be an event triggered when the first metadata stored in the target cache is changed; the first metadata is data that can be used to describe the target bits, i.e., it can be determined from the first metadata which bits in the waybill information are the target bits. In practical applications, optionally, considering that the number of times of changing the first metadata is limited, and the target cache may be a cache having a notification function when the first metadata is changed, so the target cache may be a redis cache, and of course, the target cache may also be a remaining local cache or an external cache, which is not specifically limited herein. After the changed first metadata is read from the target cache, the second metadata stored in the first cache can be changed based on the first metadata, so that the target mark bit can be extracted from each mark bit of the waybill identifier based on the changed second metadata, and the effect of accurately extracting the target mark bit based on the latest extraction logic (namely the changed second metadata) is achieved.
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 a first waybill number in the waybill information in a first cache, including: taking a first waybill number in the waybill information as a bloom filter value in a first local cache; determining whether the first waybill number is stored in a preset first cache, including: it is determined whether the first manifest number is included in each bloom filter value stored in the first local cache. In practical applications, considering that there may be millions of waybills in a day, and each waybill may involve multiple waybill transportation messages from beginning to end, such as waybill circulation messages among multiple sites, retry retransmission of messages due to fault tolerance mechanism, etc., there may be hundreds of millions of waybill transportation messages on the bottom of a computer, and the bloom filter is suitable for such filtering of large data volume. The first cache may be a first local cache that can be used to implement bloom filtering, such as a state (specifically, a mapstate) in the flink platform, and compared with a manner that information needs to be obtained from the external cache by calling an RPC interface disposed on the external cache, the first local cache has smaller performance consumption in information obtaining and is very suitable for processing of a large data volume. Therefore, the first waybill number can be directly stored as the bloom filter value in the first local cache, and then when the first waybill transport message is received again, whether the first waybill number is stored in the first local cache can be determined by whether the bloom filter values of the first local cache include the first waybill number in the first waybill transport message received again, so that the effect that whether the first original waybill number exists or not can be accurately judged in large data volume is achieved.
In order to better understand the specific implementation process of the above steps, the waybill generation method of the present embodiment is exemplarily described below with reference to specific examples. It should be noted that, for more visual description of the example, the first waybill is a forward waybill and the second waybill is a reverse waybill. Illustratively, referring to fig. 4, it includes three parts of receiving MQ messages, generating a reverse waybill and updating MQ messages, wherein the receiving MQ messages and the generating the reverse waybill are completed by at least one flink task, a state of the flink tasks being a first local cache, and the updating MQ messages being completed by at least one other flink task, a state of the flink tasks being a second local cache; accordingly, the MQ message in the received MQ message is the first waybill transportation message, and the MQ message in the updated MQ message is the second waybill transportation message, which will be directly described as a flink task, an MQ message, a state, etc. hereinafter for simplifying the description, but those skilled in the art should accurately determine their specific meanings according to their associated contents, and will not be described herein again.
The first two of these three sections will now be described in detail.
First, receiving MQ message
1. Starting the flink task according to the configuration parameters, and receiving the MQ message based on the flink task, wherein the configuration parameters may include second metadata stored in a state in the flink task, a rumble filtering rule, a flink task parameter, a redis (i.e. target cache) or mysql (i.e. message storage database) configuration, and the like.
2. Waybill filtering rules: and based on rule engine configuration, performing waybill filtering according to three dimensions of cargo type, waybill identification and user definition, and determining whether a certain forward waybill comprises a medicine incubator.
2.1, filtering based on cargo type: filtering the specific type waybill based on the cargo type in the MQ message.
2.2, filtering based on waybill identification: and reading the waybillsign bit of the waybillsign identifier in the MQ message, wherein the bit format can be '100001234000F …', and performing combined filtering according to the bit values of different bits.
And 2.3, configuring the rule engine according to the business logic, namely filtering based on the rest information in the waybill information.
3. Bloom filter design
3.1, bloom filtering is realized based on the storage characteristics of the state in the flink, namely, the waybill number (namely, the first waybill number) of the forward waybill reserved after filtering is used as a bloom filter value, and the application of the state enables the bloom filter to have better performance and stability.
3.2, bloom filtering is realized based on redis, but because redis has a hot spot key and a redis client overtime in the data size, a flink task fails, and the performance and stability of the method are general.
Therefore, when processing is performed based on the flink task, the state can be used as bloom to realize waybill filtering, and when processing is performed based on the storm task, because the storm framework does not support the state, a local bloom filter can be constructed based on the open source guava component in the storm task, and then redis is required to be involved.
It should be noted that the judgment of whether to generate a reverse waybill can be completed by the mutual cooperation of "2, waybill filtering rule" and "3, bloom filter design". Specifically, when an MQ message is received, whether a first waybill number in the MQ message is included in each bloom filter value of a state is determined, 1) if the first waybill number is included, whether a transportation state in the MQ message is a waybill state is further judged, 11) if yes, executing 'two, generating a reverse waybill', and 12) if not, exiting; 2) if the first waybill number is not included, the first waybill number is written in the state and the step of "1) if the first waybill number is included, further determining if the transit state in the MQ message is a waybill committed state" is performed.
4. flink task metadata changes
Storing metadata (namely first metadata) for describing a target marker bit in a redis, wherein the first metadata in the redis may be changed correspondingly with the change of business logic (for example, changing the first metadata with 4-6 th marker bits as target marker bits into the first metadata with 4-7 marker bits as target marker bits), at this time, the redis may trigger a first key space notification event, and when the first key space notification event is monitored, a flink task may read the changed first metadata from the redis and change the second metadata in state based on the reading result, so that the flink task may extract the 4-7 marker bits in each marker bit as the target marker bits, thereby achieving the effect of extracting the hot update of the restart logic on the basis of not needing or redeploying the flink task.
5. Merging connections of MQ messages (join)
In some cases, even if a medical container is included in the forward waybill and the transport state in the MQ messages is waybill-committed, it may not be the time to generate the reverse waybill at this time, which may be because the received MQ messages themselves lack certain fields or because of service extension, which may result in an inaccurate determination of whether the reverse waybill can be generated based on the fields in one MQ message, at this time, at least two MQ messages may be accessed, including the MQ message capable of representing the transport state and the MQ message representing the remaining dimension information, and merged-concatenated on the MQ messages, and then the above-described filtering step is performed based on the merged-concatenated result. In practical applications, optionally, if the above steps are performed based on a flink task, merging connections of multiple MQ messages may be processed based on stream joins in the flink; if the above steps are performed based on the storm task, join of the plurality of MQ messages can be implemented by storing join relationships into redis, and particularly, when the join of the plurality of MQ messages is implemented based on the redis, the number of MQ messages and key data storage size can be controlled.
Secondly, generating a reverse waybill
1. The RPC interface is called to inquire the waybill information (such as a forward waybill number, the occurrence time of each transport node and the like) of the forward waybill, the basic information of the reverse waybill, such as cargo information, receiving information and the like, is supplemented based on the inquiry result, the forward waybill is associated with the reverse waybill so as to be capable of monitoring the whole transportation track of the medicine insulation can in the following process, the automatic inquiry of the waybill information of the forward waybill is realized in a mode called by the RPC interface, and therefore the problems that the reverse waybill is generated untimely and is generated in a missing mode due to the fact that site staff needs to inquire information across systems, operation authority is insufficient and the like are solved.
2. Reading configuration information from the configuration file, and initializing cargo information such as consignment, weight, volume and the like.
3. The various information in the previous 2 steps are assembled and reconstructed and then stored in the mysql database (which is used for subsequent monitoring), and meanwhile, the reverse waybill number of the reverse waybill is stored in the redis (which is applied in the "update MQ message" in the subsequent exemplary explanation).
4. Judging whether the generation process of the reverse waybill needs manual processing/auditing according to the configuration information:
4.1, case of manual treatment: for example, the location of an express delivery site may not support internal logistics transportation, and requires external logistics transportation; the freight settlement method of the medicine incubator is monthly in the contract, but the freight settlement method is not configured in the configuration information; the transportation cost for transporting the internal logistics is higher, and the external logistics transportation needs to be ordered; and the like. At the moment, the site staff can be informed to inquire the conditions in the related system through mobile phone short messages, mails, office instant communication messages and the like, and the waybill is submitted after the waybill information is manually supplemented and confirmed.
4.2, non-manual case: the system automatically calls the waybill system service interface.
EXAMPLE III
Fig. 3 is a flowchart of a waybill generation method provided in the third embodiment of the present invention. The present embodiment is optimized based on the above technical solutions. In this embodiment, optionally, after generating the second waybill according to the receiving information and the cargo information, the waybill generation method may further include: storing a second freight note number of a second freight note in a preset target cache; when a second key space notification event is monitored, reading a newly added second waybill number corresponding to the second key space notification event from the target cache, and storing the read second waybill number into a preset second cache; when the second waybill transportation message is received, determining whether a third waybill number in the second waybill transportation message is one of the second waybill numbers stored in the second cache; and if so, updating the second waybill transportation message into a preset message storage database. The same or corresponding terms as those in the above embodiments are not explained in detail herein.
Referring to fig. 3, the method of this embodiment may specifically include the following steps:
s310, when the first waybill transportation message is received, a first waybill corresponding to the first waybill transportation message is determined, and the transportation state and the waybill information of the first waybill are determined according to the first waybill transportation message.
And S320, when a second waybill is determined to be generated according to the transportation state and the waybill information, acquiring the receiving information and the cargo information of the recyclable cargo in the first waybill, wherein the second waybill is the waybill taking the delivery information of the first waybill as the receiving information.
S330, generating a second waybill according to the receiving information and the goods information, and storing a second waybill number of the second waybill to a preset target cache.
It should be noted that the target cache in this step and the target cache in the second embodiment of the present invention may be the same cache or different caches, and are not specifically limited herein. In addition, the storing of the second waybill number of the second waybill to the preset target cache and the listening for the second key space notification event in the following steps may be performed by the same task or different tasks in the task cluster, and are not specifically limited herein.
S340, when the second key space notification event is monitored, reading a newly added second waybill number corresponding to the second key space notification event from the target cache, and storing the read second waybill number into a preset second cache.
The second key space notification event may be an event triggered when a new addition occurs to the second metadata stored in the target cache, and the second cache may be a preset local cache or an external cache, which may be the same as or different from the first cache described above, and is not specifically limited herein. When the second key space notification event is monitored, a newly added second waybill number corresponding to the second key space notification event can be read from the target cache, and the read result is stored in the second cache, so that when the second waybill transportation message is received subsequently, whether the second waybill transportation message is the waybill transportation message of the second waybill is judged through the second waybill number stored in the second cache.
And S350, when the second waybill transportation message is received, and when the third waybill number in the second waybill transportation message is one of the second waybill numbers stored in the second cache, updating the second waybill transportation message to a preset message storage database.
The second waybill transportation message may be some messages generated during transportation of a certain waybill, and the waybill may be the first waybill, the second waybill or other waybill except the first waybill and the second waybill, which is not specifically limited herein. Therefore, when the second waybill transportation message is received, because each second waybill number is already stored in the second cache, whether the second waybill transportation message is the waybill transportation message of the second waybill can be determined by judging whether the third waybill number in the second waybill transportation message is one of the second waybill numbers stored in the second cache, and if so, the second waybill transportation message is the waybill transportation message of the second waybill, so that the second waybill transportation message can be updated to a preset message storage database, and the effect of whole-course monitoring of filtering the waybill transportation message belonging to the second waybill and the waybill transportation message of the second waybill from each second waybill transportation message is realized.
In practical application, optionally, in the flight task running process, a situation that the flight task needs to be restarted due to reasons that a flight cluster is abnormally hung up, the capacity of the task is expanded due to the rapid increase of the number of the running orders, and the like may occur, and the flight task needs to be restarted at this time. Therefore, when a starting event of a message updating task for realizing message updating is detected, the second waybill number of the second waybill which is in transportation (i.e. not finished) can be pulled from the message storage database based on the message updating task, and the pulling result is stored in the second cache to continue to execute the message updating task, thereby ensuring that the second waybill transportation message of the second waybill can be effectively updated under abnormal conditions. In practical applications, optionally, the message update task may be a flink task, the second cache may be a state cache, and the message storage database may be a mysql database. That is, when the message update task is started, the second invoice number of the incomplete second invoice can be batch-pulled from the mysql database based on the flink task and initialized into the state cache of the flink. In particular, mysql databases have higher data accuracy relative to redis.
According to the technical scheme of the embodiment of the invention, the second waybill number of the second waybill is stored in the preset 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 is stored in the preset second cache; in this way, when the second waybill transportation message is received, if the third waybill number in the second waybill transportation message is one of the second waybill numbers stored in the second cache, which indicates that the second waybill transportation message is the waybill transportation message of the second waybill, the second waybill transportation message can be updated to the preset message storage database, so that the effect of whole-process monitoring of filtering the waybill transportation message belonging to the second waybill and the waybill transportation message of the second waybill from the second waybill transportation messages is achieved.
On this basis, an optional technical solution is that updating the second waybill transportation message to a preset message storage database may include: based on a first preset time interval, taking a second waybill transportation message which is not updated with messages as a waybill transportation message to be updated, and generating a rollback log file corresponding to each waybill transportation message to be updated; and updating each waybill transportation message to be updated into a preset message storage database, and deleting the rollback log file after all the waybill transportation messages to be updated are updated successfully. When the second waybill transportation message belongs to the waybill transportation message of the second waybill, the waybill transportation message to be updated may be the second waybill transportation message which is obtained at intervals of a first preset time interval and is not updated, and taking the first preset time interval as N seconds as an example, the waybill transportation message to be updated may be the second waybill transportation message which is determined at intervals of N seconds and is generated but not updated into the message storage database. Log (undo. log) file may be a file corresponding to the shipping note transportation message to be updated obtained this time and used for implementing rollback of the updating operation. And updating each freight note transportation message to be updated into the message storage database, and deleting the rollback log file after all freight note transportation messages to be updated are updated successfully, thereby realizing the effect of batch updating of the freight note transportation messages to be updated. In practical application, optionally, the message batch updating process may be completed based on a time round algorithm, and since the time round algorithm writes the waybill transportation message 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 reduced to a greater extent.
On this basis, optionally, the waybill generation method may further include: determining whether a rollback log file which is not deleted exists based on a second preset time interval; and if so, acquiring a message deletion statement recorded in the undeleted rollback log file, and deleting the waybill transportation message to be updated, which is updated in the message storage database and corresponds to the message deletion statement. Namely, whether the roll-back log file which is not deleted exists is checked regularly, and if yes, the fact that the waybill transportation message to be updated which fails to be updated exists is indicated. On this basis, since the rollback log file records the message deletion statement which is directly opposite to the message updating operation, the corresponding waybill transportation messages to be updated which are updated in the message storage database can be deleted based on the message deletion statement, so that the waybill transportation messages to be updated are updated again after the next first preset time interval, and therefore the effect of updating each waybill transportation message to be updated in batch is achieved. The first predetermined time interval and the second predetermined time interval may be the same or different predetermined time intervals, and are not specifically limited herein.
On the basis of any technical solution of the embodiment of the present invention, optionally, after the second waybill transportation message is updated to the message storage database, the waybill generation method may further include: if the first waybill monitoring event is monitored, a second waybill corresponding to the first waybill monitoring event is obtained, and a second waybill transportation message of the second waybill is read from the message storage database, so that the effect of effectively monitoring the second waybill transportation message in the whole course of the second waybill is achieved; and/or updating the waybill information of the first waybill which has an incidence relation with the second waybill into a message storage database; when a second waybill monitoring event is monitored, a second waybill corresponding to the second waybill monitoring event is obtained, a first waybill related to the second waybill is determined, and second waybill transportation information of the second waybill and/or waybill information of the first waybill are read from the information storage database, so that the effect of whole-process visual monitoring of the first waybill and the second waybill which are related is achieved, further, operation information (at least one of 6 elements such as an waybill number, a transportation state, an operation type, an operation site, an operator and operation time) of each link (such as receiving, delivery or the like) of each recyclable goods in the return process can be clarified, and accordingly, the responsible person can be timely searched and checked when the recyclable goods are abnormal.
In order to better understand the specific implementation process of the above steps, the following takes the above exemplary description as an example to exemplarily describe the waybill generation method of the present embodiment. Illustratively, referring to FIG. 4, the last of these three sections will now be described in detail.
Thirdly, updating MQ messages (namely updating the transportation state of the reverse waybill)
1. And starting a flight task for realizing message updating, and receiving a reverse waybill full-flow MQ message.
2. And (3) message filtering: filtering messages according to waybill number rules
2.1, when the flink task is started, pulling the reverse waybill numbers of the incomplete reverse waybill in batches from the mysql database, and initializing the pulled reverse waybill numbers into the state of the flink.
2.2, in the running process of the flink task, updating a reverse waybill number in the state of the flink by monitoring a second key space notification event of redis, namely when a new reverse waybill number is stored in the redis, the redis triggers the second key space notification event; furthermore, when listening to a second key space notification event, the flink task may store a key (i.e. a reverse waybill number) corresponding to such a second key space notification event in a state, and then when receiving the MQ message, if a third waybill number in the MQ message is stored in the state, the MQ message is retained, and the step of "3, MQ message update" is entered, thereby implementing the message filtering function.
3. MQ message updates, which are anomaly compensation mechanisms based on the WAL mechanism and the time-round algorithm.
3.1, designing a local asynchronous processing queue based on a time round algorithm, updating the MQ messages in batches every 5 seconds (the MQ messages are the waybill transportation messages to be updated in the previous step), wherein the upper limit of a single batch update can be 1000, and the MQ messages exceeding the upper limit can be updated in the next round.
3.2, Pre-Log System (WAL) mechanism: log files can be written in each batch updating of MQ messages, then jdbc (Java database connection is called for executing Java API of SQL statements) is called for batch storage, and the log files are asynchronously deleted after the storage is successful.
3.3, fault tolerance processing: log file, which is not deleted, is scanned by the timed task, performing MQ message recovery operations, thereby compensating for MQ messages that are not written to the mysql database.
Example four
Fig. 5 is a block diagram of a waybill generation device according to a fourth embodiment of the present invention, where the waybill generation device is configured to execute the waybill generation method according to any of the embodiments. The apparatus and the waybill generation method of the above embodiments belong to the same inventive concept, and details that are not described in detail in the embodiments of the waybill generation apparatus may refer to the embodiments of the waybill generation method. Referring to fig. 5, the apparatus may specifically include: the waybill information determination module 410, the cargo information acquisition module 420 and the second waybill generation module 430.
The waybill information determining module 410 is configured to determine, when receiving the first waybill transportation message, a first waybill corresponding to the first waybill transportation message, and determine a transportation state and waybill information of the first waybill according to the first waybill transportation message;
a cargo information obtaining module 420, configured to obtain the receipt information and the cargo information of the recoverable cargo in the first waybill when it is determined that a second waybill needs to be generated according to the transportation state and the waybill information, where the second waybill is a waybill that takes the delivery information of the first waybill as the receipt information;
and a second waybill generation module 430, configured to generate a second waybill according to the receiving information and the cargo information.
Optionally, the waybill generation device may further include:
the first waybill number determining module is used for obtaining a first waybill number of the first waybill from the waybill information before the second waybill is determined to be generated according to the transportation state and the waybill information, and determining whether the first waybill number is stored in a preset first cache;
the second waybill determining module is used for determining whether a second waybill needs to be generated or not according to whether the transportation state is a waybill proper-throwing state or not if the transportation state is yes;
and the first waybill number storage module is used for determining whether the first waybill comprises recyclable goods or not according to the waybill information if the first waybill comprises the recyclable goods, storing the first waybill number in the waybill information in a first cache if the first waybill number comprises the recyclable goods, and executing the step of determining whether a second waybill needs to be generated or not according to whether the transportation state is the waybill due state or not.
On this basis, optionally, the waybill information includes a waybill identifier and/or a cargo type of the unrecyclable cargo in the first waybill, and the first waybill number storage module may include:
the target position extraction unit is used for extracting target positions from each position of the waybill identification;
and the recoverable goods determining unit is used for judging whether the unrecoverable goods are the target goods which need to be transported together with the recoverable goods according to the position value and/or the goods type of the target position, and determining whether the recoverable goods are included in the first waybill according to the judgment result.
Optionally, on the basis of the above apparatus, the apparatus may further include:
the first metadata reading module is used for reading changed first metadata corresponding to a first key space notification event from a preset target cache when the first key space notification event is monitored, wherein the first metadata is used for describing a target mark bit;
the second metadata change module is used for changing the second metadata stored in the first cache based on the first metadata;
correspondingly, the target marker bit extracting unit may be specifically configured to: and extracting target mark bits from the mark bits of the waybill identifier based on the changed second metadata.
Optionally, the first cache includes a first local cache that may be used to implement bloom filtering;
the first waybill number storage module can include: the first waybill number storage unit is used for taking the first waybill number in the waybill information as a bloom filter value in a first local cache;
accordingly, the first waybill number determination module may include: a first manifest number determination unit to determine whether the first manifest number is included in the bloom filter values stored in the first local cache.
Optionally, the waybill generation device may further include:
the second waybill number storage module is used for storing a second waybill number of the second waybill into a preset target cache after the second waybill is generated according to the receiving information and the goods information;
the second waybill number re-storage module is used for reading a newly-added second waybill number corresponding to the second key space notification event from the target cache when the second key space notification event is monitored, and storing the read second waybill number into a preset second cache;
the third waybill number determining module is used for determining whether the third waybill number in the second waybill transportation message is one of the second waybill numbers stored in the second cache when the second waybill transportation message is received;
and the second waybill transportation message updating module is used for updating the second waybill transportation message into a preset message storage database if the second waybill transportation message is the second waybill transportation message.
On this basis, optionally, the second waybill transportation message updating module may include:
a rollback log file generating unit, configured to generate a rollback log file corresponding to each waybill transportation message to be updated, by using a second waybill transportation message for which no message update is performed as a waybill transportation message to be updated, based on a first preset time interval;
and the rollback log file deleting unit is used for updating each waybill transportation message to be updated into a preset message storage database, and deleting the rollback log file after all the waybill transportation messages to be updated are successfully updated.
On this basis, optionally, the second waybill transportation message updating module may further include:
a rollback log file determining unit configured to determine whether there is a rollback log file that has not been deleted based on a second preset time interval;
and the waybill transportation message deleting unit to be updated is used for acquiring the message deleting statement recorded in the rolling-back log file which is not deleted if the waybill transportation message deleting unit is used for deleting the waybill transportation message to be updated which is updated in the message storage database and corresponds to the message deleting statement.
Optionally, the waybill generation device may further include:
the second waybill transportation message reading module is used for acquiring a second waybill corresponding to the first waybill monitoring event when the first waybill monitoring event is monitored, and reading a second waybill transportation message of the second waybill from the message storage database;
and/or the presence of a gas in the gas,
the waybill information updating module is used for updating waybill information of the first waybill which is associated with the second waybill into the message storage database;
the first waybill determining module is used for acquiring a second waybill corresponding to a second waybill monitoring event when the second waybill monitoring event is monitored, and determining a first waybill related to the second waybill;
and the waybill information reading module is used for reading the second waybill transportation information of the second waybill and/or the waybill information of the first waybill from the information storage database.
Optionally, the waybill generation device may further include:
the second waybill number storage module is used for pulling a second waybill number of a second waybill which is in transportation from the message storage database when a starting event of a message updating task is detected, and storing a pulling result into a second cache, wherein the message updating task comprises a flink task for realizing message updating, and the second cache comprises a state cache;
and/or the target cache comprises a redis cache.
In the waybill generation device provided by the fourth embodiment of the present invention, when the waybill information determination module receives the first waybill transportation message, the transportation state and the waybill information of the first waybill corresponding to the first waybill transportation message may be determined according to the first waybill transportation message; because whether the first waybill is delivered to the goods acquirer can be determined according to the transportation state, and whether recyclable goods exist in the first waybill can be determined according to the waybill information, when a second waybill which is opposite to the first waybill is determined to be generated according to the first waybill and the second waybill, the goods information acquisition module can acquire the receiving information and the goods information of the recyclable goods in the first waybill, wherein the goods information is an indispensable reference factor in the generation process of the second waybill, and the receiving information of the second waybill is the delivery information of the first waybill at the moment; and then, generating a second waybill according to the receiving information and the goods information through a second waybill generating module. By the device, the problems of easy error and low efficiency in the second waybill generation process are solved, and the effect of generating the second waybill with higher accuracy and timeliness is achieved.
The waybill generation device provided by the embodiment of the invention can execute the waybill generation method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
It should be noted that, in the embodiment of the waybill generation apparatus, each included unit and module are only divided according to functional logic, but are not limited to the above division, as long as the corresponding function can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
EXAMPLE five
Fig. 6 is a schematic structural diagram of an waybill generation apparatus according to a fifth embodiment of the present invention, and as shown in fig. 6, the apparatus includes a memory 510, a processor 520, an input device 530, and an output device 540. The number of the processors 520 in the device may be one or more, and one processor 520 is taken as an example in fig. 6; the memory 510, processor 520, input device 530, and output device 540 in the apparatus may be connected by a bus or other means, such as by bus 550 in fig. 6.
The memory 510 is used as a computer-readable storage medium for storing 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 of the device and data processing by executing software programs, instructions and modules stored in the memory 510, that is, implements the waybill generation method described above.
The memory 510 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the device, and the like. Further, the memory 510 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 510 may further include memory located remotely from processor 520, which may be connected to devices through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 530 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the device. The output device 540 may include a display device such as a display screen.
EXAMPLE six
A sixth embodiment of the present invention provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a waybill generation method, including:
when receiving a first waybill transportation message, 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 a second waybill is determined to be generated according to the transportation state and the waybill information, acquiring receiving information and goods information of recoverable goods in the first waybill, wherein the second waybill is a waybill taking the delivery information of the first waybill as the receiving information;
and generating a second waybill according to the receiving information and the goods information.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the operations of the method described above, and may also perform related operations in the waybill generation method provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. With this understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (13)

1. A waybill generation method, comprising:
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 a second waybill is determined to be generated according to the transportation state and the waybill information, acquiring receiving information and goods information of recoverable goods in the first waybill, wherein the second waybill takes the delivery information of the first waybill as the waybill of the receiving information;
and generating the second freight bill according to the receiving information and the goods information.
2. The method of claim 1, further comprising, prior to said when it is determined from said shipping status and said waybill information that a second waybill needs to be generated:
obtaining a first waybill number of the first waybill from the waybill information, and determining whether the first waybill number is stored in a preset first cache;
if yes, determining whether the second waybill needs to be generated according to whether the transportation state is a waybill appropriate delivery state;
otherwise, determining whether the first waybill comprises the recyclable goods according to the waybill information, if so, storing the first waybill number in the waybill information in the first cache, and executing the step of determining whether the second waybill needs to be generated according to whether the transportation state is a waybill committed state.
3. The method of claim 2, wherein the waybill information includes a waybill identification and/or a cargo type of non-recoverable cargo within the first waybill, and wherein determining whether the recoverable cargo is included within the first waybill from the waybill information comprises:
extracting target positions from each position of the waybill identification;
and judging whether the unrecoverable goods are the target goods which need to be transported together with the recyclable goods according to the position value of the target position and/or the goods type, and determining whether the recyclable goods are included in the first waybill according to the judgment result.
4. The method of claim 3, further comprising:
when a first key space notification event is monitored, reading changed first metadata corresponding to the first key space notification event from a preset target cache, wherein the first metadata is used for describing the target mark bit;
changing second metadata stored in the first cache based on the first metadata;
the extracting target positions from the positions of the waybill identifier comprises:
and extracting target positions from each position of the waybill identification based on the changed second metadata.
5. The method of claim 2, wherein 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: taking 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 comprises: determining whether the first manifest number is included in each of the bloom filter values stored in the first local cache.
6. The method of claim 1, further comprising, after the generating the second manifest from the receipt information and the cargo information:
storing a second waybill number of the second waybill in a preset target cache;
when a second key space notification event is monitored, 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 a preset second cache;
when a second waybill transportation message is received, determining whether a third waybill number in the second waybill transportation message is one of the second waybill numbers stored in the second cache;
and if so, updating the second waybill transportation message to a preset message storage database.
7. The method of claim 6, wherein updating the second waybill transportation message to a pre-configured message storage database comprises:
based on a first preset time interval, taking the second waybill transportation message which is not subjected to message updating as a waybill transportation message to be updated, and generating a rollback log file corresponding to each waybill transportation message to be updated;
and updating each waybill transportation message to be updated into a preset message storage database, and deleting the rollback log file after all the waybill transportation messages to be updated are successfully updated.
8. The method of claim 7, further comprising:
determining whether the rollback log file which is not deleted exists based on a second preset time interval;
and if so, acquiring a message deletion statement recorded in the undeleted rollback log file, and deleting the waybill transportation message to be updated which is updated in the message storage database and corresponds to the message deletion statement.
9. The method of claim 6, further comprising, after said updating said second waybill transportation message into a pre-provisioned message storage database:
when a first waybill monitoring event is monitored, acquiring a second waybill corresponding to the first waybill monitoring event, and reading a second waybill transportation message of the second waybill from the message storage database;
and/or the presence of a gas in the gas,
updating the waybill information of the first waybill having an association with the second waybill into the message store database;
when a second waybill monitoring event is monitored, acquiring a second waybill corresponding to the second waybill monitoring event, and determining a first waybill related to the second waybill;
reading the second waybill transportation message of the second waybill and/or the waybill information of the first waybill from the message storage database.
10. The method of claim 6, further comprising:
when a starting event of a message updating task is detected, pulling the second waybill number of the second waybill which is in transportation from the message storage database based on the message updating task, and storing a pulling result into the second cache, wherein the message updating task comprises a flink task for realizing message updating, and the second cache comprises a state cache;
and/or the target cache comprises a redis cache.
11. An waybill generation device, comprising:
the waybill information determining module is used for determining the transportation state and the waybill information of a first waybill corresponding to a first waybill transportation message according to the first waybill transportation message when the first waybill transportation message is received;
a cargo information obtaining module, configured to obtain, when it is determined that a second waybill needs to be generated according to the transportation state and the waybill information, freight information of recoverable cargo in the first waybill and cargo information of the recoverable cargo in the first waybill, where the second waybill is a waybill that takes the freight information of the first waybill as the freight information;
and the second waybill generating module is used for generating the second waybill according to the receiving information and the goods information.
12. An waybill generation device, comprising:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the waybill generation method as recited in any of claims 1-10.
13. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a waybill generation method according to any one of claims 1 to 10.
CN202111572655.2A 2021-12-21 2021-12-21 Waybill generation method, device, equipment and storage medium Pending CN114240296A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111572655.2A CN114240296A (en) 2021-12-21 2021-12-21 Waybill generation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111572655.2A CN114240296A (en) 2021-12-21 2021-12-21 Waybill generation method, device, equipment and storage medium

Publications (1)

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

Family

ID=80760417

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111572655.2A Pending CN114240296A (en) 2021-12-21 2021-12-21 Waybill generation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114240296A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114881487A (en) * 2022-05-12 2022-08-09 拉扎斯网络科技(上海)有限公司 Waybill processing and waybill dispatching method and equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106169127A (en) * 2016-06-30 2016-11-30 乐视控股(北京)有限公司 A kind of order processing method and system
CN107358383A (en) * 2017-06-15 2017-11-17 成都华药共享网络科技有限公司 Logistics freight transport system
CN108985696A (en) * 2018-07-24 2018-12-11 浙江数链科技有限公司 A kind of waybill generation method and device
CN110033216A (en) * 2019-03-19 2019-07-19 广西卡西亚科技有限公司 A method of the tracking of multimodal transport waybill and decision based on Beidou
CN112837089A (en) * 2021-01-13 2021-05-25 谢语哲 Express package recycling processing mode

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106169127A (en) * 2016-06-30 2016-11-30 乐视控股(北京)有限公司 A kind of order processing method and system
CN107358383A (en) * 2017-06-15 2017-11-17 成都华药共享网络科技有限公司 Logistics freight transport system
CN108985696A (en) * 2018-07-24 2018-12-11 浙江数链科技有限公司 A kind of waybill generation method and device
CN110033216A (en) * 2019-03-19 2019-07-19 广西卡西亚科技有限公司 A method of the tracking of multimodal transport waybill and decision based on Beidou
CN112837089A (en) * 2021-01-13 2021-05-25 谢语哲 Express package recycling processing mode

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
胡安: "Y快递公司逆向物流优化研究", 《中国优秀硕士学位论文全文数据库 经济与管理科学辑》, no. 3, 15 March 2017 (2017-03-15), pages 145 - 595 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114881487A (en) * 2022-05-12 2022-08-09 拉扎斯网络科技(上海)有限公司 Waybill processing and waybill dispatching method and equipment

Similar Documents

Publication Publication Date Title
CN103190123B (en) For the method and apparatus distributing the message of issue
CN107038182B (en) Method and device for checking completeness of sub-table data
CN108255620B (en) Service logic processing method, device, service server and system
WO2022062185A1 (en) Warning information pushing method and system, intelligent terminal, and storage medium
US20160294651A1 (en) Method, apparatus, and computer program product for monitoring an electronic data exchange
US20210373914A1 (en) Batch to stream processing in a feature management platform
CN114416703A (en) Method, device, equipment and medium for automatically monitoring data integrity
CN109947729B (en) Real-time data analysis method and device
CN112561447B (en) Intelligent factory logistics management method and device based on big data
CN110708232A (en) Method and system for realizing JIRA message real-time notification
CN114240296A (en) Waybill generation method, device, equipment and storage medium
US11797527B2 (en) Real time fault tolerant stateful featurization
CN111753141B (en) Data management method and related equipment
CN110263060B (en) ERP electronic accessory management method and computer equipment
CN106997369A (en) Data clearing method and device
CN113114776A (en) Data pushing method and device
US11775864B2 (en) Feature management platform
CN112419018B (en) General data reconciliation method, server and storage medium in distributed environment
CN109271431B (en) Data extraction method, device, computer equipment and storage medium
CN111126899B (en) Automatic processing method and device for arbitration delay and computer equipment
CN114372052A (en) Data change record storage method and device, computer equipment and storage medium
JP2020506495A (en) Method and system for replacing shipping containers
CN111652597A (en) Archive management method, device, computer equipment and storage medium
CN115203486A (en) Deduction scheme generation method and device and computer equipment
WO2024174589A1 (en) Service session data tracking method and apparatus, and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination