Parcel number generation method and device
The method and device for dynamically generating parcel numbers in the logistics industry solves the problem of users having difficulty accurately determining the number of parcels, achieves flexible and efficient parcel number generation, and improves the mailing experience.
Patent Information
- Application Number
- CN202510813150.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2025-09-23
AI Technical Summary
In the logistics industry, users' shipments are large and it is difficult to accurately determine the number of packages in advance, which makes it inconvenient to generate package numbers and affects the shipping experience.
Provided are a package number generation method and device, which can dynamically generate a package number when the number of packages under a waybill is uncertain, and set a no-package-number service identifier for the waybill number. By generating a sequence string combined with the waybill number, a package number that meets user needs is generated.
Even when the number of packages is uncertain, the package number required by the user can be efficiently generated, reducing the operation process and time, and improving the shipping experience.
Smart Images

Figure CN120688951A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a package number generation method and device. Background Art
[0002] In the logistics industry, a single waybill number can correspond to multiple package numbers. The number of package numbers corresponds to the number of packages waiting to be collected. By assigning package numbers to packages waiting to be collected, the collection and delivery processes are completed. A waybill number and its associated package numbers are typically generated only after the number of packages associated with the waybill number is known. However, many users ship large volumes, making it difficult to accurately determine the number of packages in advance. This creates inconvenience for users and impacts their shipping experience. Summary of the Invention
[0003] In view of this, an embodiment of the present invention provides a package number generation method and device, which can dynamically generate the package number required by the user even when the number of packages under the waybill is uncertain, ensuring that subsequent collection and other tasks are performed flexibly and efficiently, reducing operational procedures and time consumption, facilitating users to mail packages, and improving the user's mailing experience.
[0004] In a first aspect, an embodiment of the present invention provides a method for generating a package number, comprising:
[0005] Receive order requests sent by users;
[0006] In response to the order request meeting the condition of uncertain total number of packages, generating and returning a waybill number corresponding to the order request, and setting a no-package-number service flag for the waybill number;
[0007] Receive a package number generation request; wherein the package number generation request includes: a waybill number and a target package number;
[0008] In response to the service identifier of whether or not the waybill number is set, a sequence string having a target number of packages is generated;
[0009] For each sequence string, combine the sequence string with the waybill number to generate the package number under the waybill number.
[0010] Optionally, the package number generation request further includes: a generation type;
[0011] Generate a sequence string with the target number of packages, including:
[0012] In response to the addition of the generated type representation, all package numbers under the waybill number are deleted; with the initial number as the base, a sequence string with the target number of packages is generated;
[0013] In response to the generation type characterization supplement, a maximum sequence string corresponding to the waybill number is obtained; based on the maximum sequence string, a sequence string having a quantity equal to the target number of packages is generated.
[0014] Optionally, after combining the sequence string and the waybill number to generate the package number under the waybill number, the following is also included:
[0015] Get the package information corresponding to the package number;
[0016] Generate and return the shipping label information corresponding to the package number based on the package number and package information.
[0017] Optionally, after generating and returning the waybill number corresponding to the order request, the following is also included:
[0018] Set the waybill number to the order control status;
[0019] Receive a release request; wherein the release request includes: a waybill number;
[0020] Get the total number of packages corresponding to the waybill number;
[0021] In response to the total number of packages corresponding to the waybill number being greater than 0, the waybill number being set with a service indicator of whether or not there are packages, and the waybill number being in a controlled state, the waybill number is modified to a non-controlled state.
[0022] Optionally, after generating and returning the waybill number corresponding to the order request, the following is also included:
[0023] Receive a package number modification request; wherein the package number generation request includes: a waybill number;
[0024] In response to whether the waybill number is set with a package number service identifier, the package number under the waybill number is modified according to the package number modification request.
[0025] Optionally, based on the package number modification request, modify the package number under the waybill number, including:
[0026] In response to the package number modification request including at least one target package number, deleting all package numbers under the waybill number and determining the at least one target package number as the package number under the waybill number;
[0027] In response to the package number modification request including the modified package number, the total number of packages corresponding to the waybill number is determined; and the package number under the waybill number is modified according to the modified package number and the total number of packages.
[0028] Optionally, the package number under the waybill number is modified based on the modified package number and the total package number, including:
[0029] In response to the modified number of packages being less than the total number of packages, all package numbers under the waybill number are deleted; and a package number having the modified number of packages under the waybill number is generated;
[0030] In response to the modified number of packages being greater than the total number of packages, the difference between the modified number of packages and the total number of packages is determined as the number of newly added packages; a maximum sequence string corresponding to the waybill number is obtained; and a package number having the same number of newly added packages as the number of the waybill number is generated based on the maximum sequence string.
[0031] In a second aspect, an embodiment of the present invention provides a package number generating device, comprising:
[0032] A first receiving module is used to receive an order request sent by a user;
[0033] A waybill number generation module is configured to generate and return a waybill number corresponding to an order request in response to an order request meeting a condition of an uncertain total number of packages, and to set a no-package-number service flag for the waybill number;
[0034] The second receiving module is configured to receive a request for generating a package number, wherein the request for generating a package number includes: a waybill number and the number of packages in this package;
[0035] A sequence string generation module, configured to generate a sequence string having a target number of packages in response to a service identifier of whether or not the waybill number is set;
[0036] The package number generation module is used to combine the sequence string and the waybill number for each sequence string to generate the package number under the waybill number.
[0037] In a third aspect, an embodiment of the present invention provides an electronic device, including:
[0038] one or more processors;
[0039] The storage device is used to store one or more programs. When the one or more programs are executed by one or more processors, the one or more processors implement the method of any of the above embodiments.
[0040] In a fourth aspect, an embodiment of the present invention provides a computer-readable medium having a computer program stored thereon, which implements the method of any of the above embodiments when the program is executed by a processor.
[0041] In a fifth aspect, an embodiment of the present invention provides a computer program product, including a computer program, which implements the method of any of the above embodiments when the computer program is executed by a processor.
[0042] One embodiment of the above invention has the following advantages or beneficial effects: If the order request sent by the user meets the condition of uncertain total package number, a waybill number corresponding to the order request is generated and returned, and a no-package-count service flag is set for the waybill number. If the waybill number in the package number generation request is set with a no-package-count service flag, a package number is generated for the target number of packages. Utilizing the solution of this embodiment of the present invention, even when the number of packages under the waybill is uncertain, the package number required by the user can be dynamically generated, ensuring that subsequent collection and other tasks can be performed flexibly and efficiently, reducing operational processes and time consumption, and improving the user's mailing experience.
[0043] In addition, users can also change the generated package number by sending package number generation requests and package number modification requests for the same waybill number multiple times to obtain a package number that meets the user's actual needs, making the package collection process more efficient and smooth.
[0044] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The accompanying drawings are provided for a better understanding of the present invention and are not intended to limit the present invention.
[0046] Figure 1 This is a schematic diagram of a process for generating a package number provided by an embodiment of the present invention;
[0047] Figure 2 is a schematic diagram of a process of a package number generation method provided by another embodiment of the present invention;
[0048] Figure 3 is a schematic diagram of a process of a package number generation method provided by another embodiment of the present invention;
[0049] Figure 4 This is a schematic diagram of a processing flow for a package number generation request provided by one embodiment of the present invention;
[0050] Figure 5 This is a schematic diagram of a processing flow for a package number modification request provided by an embodiment of the present invention;
[0051] Figure 6 1 is a schematic structural diagram of a package number generating device provided by an embodiment of the present invention;
[0052] Figure 7 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0053] The following description of exemplary embodiments of the present invention is made in conjunction with the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding. These details should be considered as merely exemplary. Therefore, it should be appreciated by those skilled in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0054] It should be noted that the acquisition, storage, use, and processing of data in the technical solutions of the embodiments of the present invention comply with the relevant provisions of national laws and regulations.
[0055] Figure 1 FIG. 1 is a schematic diagram of a process of generating a package number according to an embodiment of the present invention. Figure 1 As shown, the method includes:
[0056] Step 101: Receive an order request from a user.
[0057] The user is an individual user or a business user who wants to mail a package.
[0058] Step 102: In response to the order request meeting the condition of uncertain total number of packages, a waybill number corresponding to the order request is generated and returned, and a no-package-number service flag is set for the waybill number.
[0059] The uncertainty condition for the total number of packages can be set based on the business. This uncertainty condition can include: the total number of packages in the order request is 0, there are no package details in the order request, or the request type for the order request is uncertainty.
[0060] If the order request meets the condition of uncertain total package count, generate a waybill number corresponding to the order request and return the generated waybill number to the user. Set the waybill number as a "no package count" service flag. Save the mapping between the user ID and the waybill number.
[0061] The waybill number can be set to the controlled status. When the package number corresponding to the waybill number is 0, that is, there is no package number under the waybill number, by setting the waybill number to the controlled status, the waybill number will not be issued to the subsequent links and subsequent production operations will not be processed.
[0062] Step 103: Receive a package number generation request; wherein the package number generation request includes: a waybill number and a target package number.
[0063] The target number of packages is the number of package numbers that need to be generated for the package number generation request. The package number generation request can be configured based on business needs. Users can submit multiple package number generation requests for the same waybill number to generate multiple package numbers for the same waybill number in batches, effectively meeting the production needs of different users.
[0064] Step 104: In response to whether the waybill number is set with a service identifier of a number of packages, a sequence string having a target number of packages is generated.
[0065] Step 105: For each sequence string, combine the sequence string with the waybill number to generate a package number under the waybill number.
[0066] The display format of the sequence string can be adjusted based on business needs. Package numbers can be set in the sequence string. For example, if the waybill number is AB01 and the target number of packages is 3, the three package numbers generated are: 1, 2, and 3. The resulting sequence string is: 1-0-, 2-0-, 3-0-. The 0 indicates that the package number belongs to a waybill with an uncertain number of packages. The generated package numbers are: AB01-1-0-, AB01-2-0-, AB01-3-0-. Setting package numbers in the sequence string facilitates steps such as labeling, sorting, and statistics.
[0067] The above solution generates package numbers for the target number of packages. After the package numbers are generated, they can be processed. This processing can include printing the package numbers, generating collection tasks, generating transportation tasks, generating delivery tasks, calculating collection fees, and performing related statistical analysis.
[0068] In the solution of this embodiment of the present invention, if the order request sent by the user meets the condition of an uncertain total package count, a waybill number corresponding to the order request is generated and returned, and a service flag indicating no package count is set for the waybill number. If the waybill number in the package number generation request is set with a service flag indicating no package count, each sequence string is combined with the waybill number to generate a package number corresponding to the target number of packages. Using this solution, even when the package count is uncertain, the package number required by the user can be dynamically generated, ensuring that subsequent collection and other tasks can be carried out flexibly and efficiently, reducing operational processes and time consumption, and improving the user's shipping experience.
[0069] In addition, users can also change the generated package number by sending package number generation requests and package number modification requests for the same waybill number multiple times to obtain a package number that meets the user's actual needs, making the package mailing process more efficient and smooth.
[0070] In the solution of the embodiment of the present invention, after combining the sequence string and the waybill number to generate the package number under the waybill number, it also includes: obtaining the package information corresponding to the package number; and generating and returning the waybill information corresponding to the package number based on the package number and the package information.
[0071] Package information may include the delivery address, shipping address, waybill type, package type, and time limit information. The package number and package information are combined to generate the corresponding shipping label information. This shipping label information is returned to the user, facilitating subsequent steps such as shipping label printing, package labeling, and package delivery and sorting.
[0072] Figure 2 FIG. 1 is a schematic diagram of a process of generating a package number according to another embodiment of the present invention. Figure 2 As shown, the method includes:
[0073] Step 201: Receive an order request sent by a user.
[0074] Step 202: In response to the order request meeting the condition of uncertain total number of packages, a waybill number corresponding to the order request is generated and returned, and a no-package-number service flag is set for the waybill number.
[0075] Step 203: Receive a package number generation request; wherein the package number generation request includes: waybill number, target package number and generation type.
[0076] Step 204: In response to the service identifier of whether or not the waybill number is set, and the type representation is added, all package numbers under the waybill number are deleted; and a sequence string with the target number of packages is generated based on the initial number.
[0077] The generation type can indicate a new addition or supplement. The generation type indicates a new addition, and the system needs to recreate a new package number based on the waybill number. Delete the package number of this user under the waybill number, and generate the required package number according to the rule of uncertain total number of packages. The initial number can be set as needed. The initial number is usually 1 or 0. For example, if the waybill number is AB01, the target number of packages is 2, and the initial number is 1, then the generated sequence string is: 1-0-, 2-0-. The generated package numbers are: AB01-1-0-, AB01-2-0-. Among them, 0 indicates that the package number belongs to a waybill with an uncertain number of packages, and 1 and 2 are package labels.
[0078] Step 205: In response to the service identifier of whether or not the waybill number is set, and the type characterization is added, the maximum sequence string corresponding to the waybill number is obtained; based on the maximum sequence string, a sequence string with the target number of packages is generated.
[0079] The system generates a new package number based on the existing package numbers associated with the waybill number. Based on the existing package numbers associated with the waybill number, the system generates the required package number according to the rules for an uncertain total number of packages. For example, if the waybill number is AB01 and two package numbers have already been generated: AB01-1-0- and AB01-2-0-, the current maximum sequence string is 2-0-. If the target number of packages is one, the new sequence string generated is 3-0-, and the new package number is AB01-3-0-.
[0080] Step 206: For each sequence string, combine the sequence string with the waybill number to generate a package number under the waybill number.
[0081] In this embodiment of the present invention, the package number generation request sent by the user includes a generation type. When a new generation type is specified, the system creates a new package number based on the waybill number. When a supplemental generation type is specified, the system creates a new package number based on the existing package number associated with the waybill number. Users can flexibly generate the required package numbers by selecting different generation types, adapting to various sorting and collection scenarios.
[0082] Figure 3 FIG. 1 is a schematic diagram of a process of generating a package number provided by another embodiment of the present invention. Figure 3 As shown, the method includes:
[0083] Step 301: Receive an order request sent by a user.
[0084] Step 302: In response to the order request meeting the condition of uncertain total number of packages, generate and return the waybill number corresponding to the order request, set a no-package-number service identifier for the waybill number, and set the waybill number to the order control state.
[0085] Set the waybill number to the controlled status. By setting the waybill number to the controlled status, the processing of the waybill number will stop at this stage and will not be sent to subsequent stages, and subsequent production and operation activities will not be carried out.
[0086] Step 303: Receive a release request; wherein the release request includes: waybill number.
[0087] When a user sends a package number generation request or a package number modification request, they can also send a control release request. A control release request is used to change the waybill number to a non-controlled state, allowing production operations such as collection to be performed on the waybill number.
[0088] Step 304: Obtain the total number of packages corresponding to the waybill number.
[0089] Step 305: In response to the total number of packages corresponding to the waybill number being greater than 0, the waybill number being set with a service flag indicating whether or not there are packages, and the waybill number being in a controlled state, the waybill number is modified to a non-controlled state.
[0090] In the solution of the embodiment of the present invention, after receiving the release request sent by the user, if the number of packages corresponding to the waybill number is greater than 0, and the waybill number is set with a service identifier of no package number, and the waybill number is in a controlled state, the waybill number is modified to a non-controlled state so that the waybill number can be sent to the subsequent links to continue the subsequent production operation processing.
[0091] In one embodiment of the present invention, after generating and returning the waybill number corresponding to the order request, the process further includes: receiving a package number modification request; wherein the package number generation request includes: the waybill number; and in response to whether the waybill number is set with a package number service identifier, modifying the package number corresponding to the waybill number according to the package number modification request.
[0092] Specifically, if the package number modification request includes at least one target package number, all package numbers associated with the waybill number are deleted and the at least one target package number is determined as the package number corresponding to the waybill number. Some users have independent R&D capabilities and can generate or obtain package numbers in advance. They can send these generated or obtained package numbers to the system via a package number modification request. The system trusts the package numbers sent by users and directly updates the package numbers associated with the waybill number based on the user's package number.
[0093] If the modification request does not include the target package number, and the package number modification request includes a modified package count, the modified package count in the modification request is obtained; the total package count corresponding to the waybill number is determined; and based on the modified package count and the total package count, the package number corresponding to the waybill number is modified. When a user sends a package number modification request including a modified package count, the system generates a package number for the waybill number based on the modified package count. Furthermore, for scenarios such as modifying the package count, logistics company operators can also generate the required package number by sending a package number modification request including a modified package count.
[0094] In one embodiment of the present invention, the package number associated with the waybill number is modified based on the modified package number and the total package number, including: in response to the modified package number being less than the total package number, deleting all package numbers associated with the waybill number; generating a package number associated with the waybill number with the modified package number as the number of packages; in response to the modified package number being greater than the total package number, determining the difference between the modified package number and the total package number as the number of newly added packages; obtaining the maximum package number corresponding to the waybill number; and generating a package number associated with the waybill number with the newly added package number as the number of packages based on the maximum package number.
[0095] If the modified package count is less than the total package count, delete all package numbers under the waybill number and generate and return a package number equal to the modified package count. When the package count is changed from large to small, delete all package numbers under the waybill number. Using the initial number as the base, generate a sequence string of the modified package count, thereby generating a package number equal to the modified package count. The initial number is usually 1 or 0. For example, if the waybill number is AB01, the modified package count is 4, the total package count is 5, and the initial number is 1, then delete all package numbers under the waybill number AB01, generating four package numbers: AB01-1-0-, AB01-2-0-, AB01-3-0-, and AB01-4-0-. AB01-MN- represents the Mth package under the AB01 waybill. When N is 0, the package number belongs to a waybill with an uncertain number of packages.
[0096] If the number of modified packages is greater than the total number of packages, the difference between the number of modified packages and the total number of packages is determined as the number of newly added packages; the maximum sequence string corresponding to the waybill number is obtained; and based on the maximum sequence string, the newly added package numbers under the waybill number are generated; wherein the number of newly added package numbers is the number of newly added packages.
[0097] When changing the package number from a small number to a large number, a new package number is generated based on the original package number. For example, if the package number for waybill AB01 is changed to 6 and the total number of packages is 4, two new package numbers will be added to the existing package number. The four existing package numbers are: AB01-1-0-, AB01-2-0-, AB01-3-0-, and AB01-5-0-. The current maximum sequence string is: 5-0-. Based on this, two new sequence strings are regenerated: 6-0 and 7-0, resulting in the two new package numbers: AB01-6-0- and AB01-7-0-.
[0098] Figure 4 FIG. 1 is a schematic diagram of a processing flow of a package number generation request provided by an embodiment of the present invention. Figure 4 As shown, the merchant sends an order request to the adaptation layer. The number of packages in the order request is 0, and the order request does not include package details.
[0099] The adaptation layer determines that the order request meets the uncertainty condition for the total package count. Based on the merchant information, it completes the service identifiers required by the logistics department and sets the "no total package count" service identifier. The order system recognizes the "no package count" service identifier and does not verify the package count in the waybill number. It supports users uploading custom package number generation rules.
[0100] After the Order Fulfillment Center (OFC) receives the order, it identifies that the total number of packages corresponding to the waybill number is 0 and the waybill number is set with a service indicator of whether there is a total number of packages. The waybill number is set to the control status and will not be issued to subsequent production links.
[0101] like Figure 4As shown in the figure, the merchant sends a package number generation request to Cloud Print. The package number generation request includes the waybill number, merchant ID, target package number, and generation type. If this is the first time this waybill is printed, the generation type is New; otherwise, the generation type is Supplemental.
[0102] Cloud Print will interact with OFC to obtain the package number. OFC generates multiple package numbers under the waybill based on the merchant account, waybill number, target number of packages, and generation type. The specific process is as follows:
[0103] When the generation type is New, all package numbers under this waybill number are deleted and new package numbers are generated for this waybill number. For example, if the waybill number is AB01 and the target number of packages is 3, the original package numbers under this waybill number will be deleted and new package numbers will be generated as follows: AB01-1-0-, AB01-2-0-, AB01-3-0-.
[0104] When generating a supplementary package, a package number equal to the target number of packages will be generated based on the existing package numbers under this waybill. For example, if the waybill number is AB01 and three package numbers have already been generated: AB01-1-0-, AB01-2-0-, and AB01-3-0-, and the target number of packages is 1, the next package number generated for the waybill number AB01 will be: AB01-4-0-.
[0105] After confirming the package number, Cloud Print obtains package information such as the delivery location and returns the package number and package information to the merchant. The merchant prints the package label based on the package number and package information.
[0106] Figure 5 FIG. 1 is a schematic diagram of a processing flow of a package number modification request provided by an embodiment of the present invention. Figure 5 As shown, the modification process is divided into merchant modification and operation modification. The specific process is as follows:
[0107] Merchants can only accurately determine the target package count when their products are shipped. The merchant sends a package number modification request, including the waybill number, to the adaptation layer. The adaptation layer pushes the package number modification request to the OFC.
[0108] After receiving a package number modification request, OFC performs the following judgment: If the total number of packages corresponding to the waybill number is not 0, the waybill number has a service flag indicating no package number, and the waybill number is in a controlled state, the waybill number is modified to a non-controlled state, causing the operations system to issue a pickup task for the waybill number. If the waybill number has a service flag indicating no package number, and the package number modification request includes a target package number, the package number associated with the waybill number is updated using the received target package number.
[0109] If the tracking number is identified as having no package count service indicator, and the package number generation request includes modifying the package count, the processing flow is as follows: when the package count is changed from large to small, all package numbers under the tracking number are deleted, and a new package number is generated under the tracking number with the modified package count.
[0110] When changing the number of packages from smaller to larger, a new package number is added to the existing package number and the package number corresponding to the waybill number is updated. For example, if the total number of packages in waybill AB01 is 4 and the number of packages is changed to 6, two new package numbers will be added to the existing package numbers. The four existing package numbers are: AB01-1-0-, AB01-2-0-, AB01-3-0-, and AB01-5-0-. The two new package numbers can be: AB01-6-0- and AB01-7-0-. The package numbers under waybill AB01 include: AB01-1-0-, AB01-2-0-, AB01-3-0-, AB01-5-0-, AB01-6-0-, and AB01-7-0-.
[0111] The two newly added package numbers can also be: JDV01-6-0-, JDV01-7-0-. The package numbers under waybill AB01 include: AB01-1-0-, AB01-2-0-, AB01-3-0-, AB01-5-0-, JDV01-6-0-, JDV01-7-0-. JDV01 represents the newly added package number for waybill AB01.
[0112] If the number of packages remains unchanged, that is, the total number of packages is equal to the number of modified packages, then the number of packages is considered to be unchanged and the package number under the waybill remains unchanged.
[0113] After the system regenerates the package number, it sends the package number for which the label needs to be printed to Cloud Print. Cloud Print assembles the package number and package information, generates and returns the label information, which is used to print the package label.
[0114] Figure 6 FIG. 1 is a schematic diagram of a package number generating device provided by an embodiment of the present invention. Figure 6 As shown, the device includes:
[0115] The first receiving module 601 is used to receive an order request sent by a user;
[0116] The waybill number generating module 602 is configured to generate and return a waybill number corresponding to the order request in response to the order request meeting the condition of uncertain total package number, and set a no package number service flag for the waybill number;
[0117] The second receiving module 603 is configured to receive a package number generation request, wherein the package number generation request includes: a waybill number and a target package number;
[0118] A sequence string generating module 604 is configured to generate a sequence string having a target number of packages in response to a service flag indicating whether or not the waybill number is set;
[0119] The package number generating module 605 is used to combine the sequence string with the waybill number for each sequence string to generate a package number under the waybill number.
[0120] Optionally, the package number generation request further includes: a generation type;
[0121] The sequence string generation module 604 is specifically used to:
[0122] In response to the addition of the generated type representation, all package numbers under the waybill number are deleted; with the initial number as the base, a sequence string with the target number of packages is generated;
[0123] In response to the generation type characterization supplement, a maximum sequence string corresponding to the waybill number is obtained; based on the maximum sequence string, a sequence string having a quantity equal to the target number of packages is generated.
[0124] Optionally, it also includes:
[0125] The waybill information generation module is used to: obtain the package information corresponding to the package number;
[0126] Generate and return the shipping label information corresponding to the package number based on the package number and package information.
[0127] Optionally, the order control module is used to:
[0128] Set the waybill number to the order control status;
[0129] Receive a release request; wherein the release request includes: a waybill number;
[0130] Get the total number of packages corresponding to the waybill number;
[0131] In response to the total number of packages corresponding to the waybill number being greater than 0, the waybill number being set with a service indicator of whether or not there are packages, and the waybill number being in a controlled state, the waybill number is modified to a non-controlled state.
[0132] Optionally, it also includes:
[0133] The package number modification module is used to receive a package number modification request; wherein the package number generation request includes: a waybill number;
[0134] In response to whether the waybill number is set with a package number service identifier, the package number under the waybill number is modified according to the package number modification request.
[0135] Optionally, the package number modification module is specifically used to:
[0136] In response to the package number modification request including at least one target package number, deleting all package numbers under the waybill number and determining the at least one target package number as the package number under the waybill number;
[0137] In response to the package number modification request including the modified package number, the total number of packages corresponding to the waybill number is determined; and the package number under the waybill number is modified according to the modified package number and the total number of packages.
[0138] Optionally, the package number modification module is specifically used to:
[0139] In response to the modified number of packages being less than the total number of packages, all package numbers under the waybill number are deleted; and a package number having the modified number of packages under the waybill number is generated;
[0140] In response to the modified number of packages being greater than the total number of packages, the difference between the modified number of packages and the total number of packages is determined as the number of newly added packages; a maximum sequence string corresponding to the waybill number is obtained; and a package number having the same number of newly added packages as the number of the waybill number is generated based on the maximum sequence string.
[0141] An embodiment of the present invention provides an electronic device, including:
[0142] one or more processors;
[0143] The storage device is used to store one or more programs. When the one or more programs are executed by one or more processors, the one or more processors implement the method of any of the above embodiments.
[0144] An embodiment of the present invention provides a computer program product, including a computer program. When the computer program is executed by a processor, the method of any of the above embodiments is implemented.
[0145] Reference below Figure 7 , which shows a schematic structural diagram of a computer system 700 of a terminal device suitable for implementing an embodiment of the present invention. Figure 7 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0146] like Figure 7 As shown, computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage unit 708 into a random access memory (RAM) 703. Various programs and data required for the operation of system 700 are also stored in RAM 703. CPU 701, ROM 702, and RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to bus 704.
[0147] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, mouse, and the like; an output section 707 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and speakers; a storage section 708 including devices such as a hard disk; and a communication section 709 including a network interface card such as a LAN card or a modem. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. Removable media 711, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 710 as needed, so that computer programs read from the media can be installed in the storage section 708 as needed.
[0148] In particular, according to embodiments disclosed herein, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed herein include a computer program product comprising a computer program embodied on a computer-readable medium, the computer program containing program code for executing the methods illustrated in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 709 and / or installed from removable media 711. When executed by central processing unit (CPU) 701, the computer program performs the aforementioned functions defined in the system of the present invention.
[0149] It should be noted that the computer-readable medium described in the present invention may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. Computer-readable storage media may include, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present invention, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such a propagated data signal may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical fiber cable, RF, or any suitable combination thereof.
[0150] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0151] The modules described in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be located within a processor. For example, they may be described as: a first receiving module, a waybill number generation module, a second receiving module, a sequence string generation module, and a package number generation module. In some cases, the names of these modules do not limit the modules themselves. For example, the first receiving module may also be described as a "module for receiving order requests sent by users."
[0152] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiments, or may exist independently without being incorporated into the device. The computer-readable medium carries one or more programs, and when the one or more programs are executed by the device, the device includes:
[0153] Receive order requests sent by users;
[0154] In response to the order request meeting the condition of uncertain total number of packages, generating and returning a waybill number corresponding to the order request, and setting a no-package-number service flag for the waybill number;
[0155] Receive a package number generation request; wherein the package number generation request includes: a waybill number and a target package number;
[0156] In response to the service identifier of whether or not the waybill number is set, a sequence string having a target number of packages is generated;
[0157] For each sequence string, combine the sequence string with the waybill number to generate the package number under the waybill number.
[0158] According to the technical solution of an embodiment of the present invention, if the order request sent by the user meets the condition of uncertain total package number, a waybill number corresponding to the order request is generated and returned, and a service flag of no package number is set for the waybill number. If the waybill number in the package number generation request is set with a service flag of no package number, each sequence string is combined with the waybill number to generate a package number for that waybill number. Utilizing the solution of an embodiment of the present invention, even when the package number is uncertain, the package number required by the user can be flexibly generated, ensuring that subsequent collection and other tasks can be carried out flexibly and efficiently, reducing operational processes and time consumption, and improving the user experience.
[0159] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A method for generating a package number, characterized in that: include: Receive order requests sent by users; In response to the order request meeting the condition of uncertain total number of packages, generating and returning a waybill number corresponding to the order request, and setting a no-package-number service flag for the waybill number; Receive a package number generation request; wherein the package number generation request includes: the waybill number and the target package number; In response to the fact that the waybill number is provided with a service flag indicating whether or not there is a number of packages, generating a sequence string having a quantity equal to the target number of packages; For each of the sequence strings, the sequence string is combined with the waybill number to generate a package number associated with the waybill number.
2. The method according to claim 1, characterized in that The package number generation request further includes: a generation type; The generated sequence string having the target number of packages includes: In response to the generation of the new type representation, all package numbers under the waybill number are deleted; based on the initial number, a sequence string with the target number of packages is generated; In response to the generation type characterization supplement, a maximum sequence string corresponding to the waybill number is obtained; and based on the maximum sequence string, a sequence string having a quantity equal to the target number of packages is generated.
3. The method according to claim 1, characterized in that After combining the sequence string with the waybill number to generate the package number associated with the waybill number, the method further includes: Obtaining the package information corresponding to the package number; Generate and return the shipping label information corresponding to the package number based on the package number and the package information.
4. The method according to claim 1, wherein After generating and returning the waybill number corresponding to the order request, the method further includes: Setting the waybill number to the order control status; receiving a control release request; wherein the control release request includes: the waybill number; Get the total number of packages corresponding to the waybill number; In response to the total number of packages corresponding to the waybill number being greater than 0, the waybill number being set with a service identifier of no package number, and the waybill number being in a controlled order state, the waybill number is modified to a non-controlled order state.
5. The method according to claim 1, wherein After generating and returning the waybill number corresponding to the order request, the method further includes: Receive a package number modification request; wherein the package number generation request includes: the waybill number; In response to the fact that the waybill number is set with a service identifier of whether there is a number of packages, the package number under the waybill number is modified according to the package number modification request.
6. The method according to claim 5, characterized in that The modifying process of the package number under the waybill number according to the package number modification request includes: In response to the package number modification request including at least one target package number, deleting all package numbers associated with the waybill number and determining the at least one target package number as the package number associated with the waybill number; In response to the package number modification request including the modified package number, the total number of packages corresponding to the waybill number is determined; and the package number under the waybill number is modified according to the modified package number and the total number of packages.
7. The method according to claim 6, characterized in that The modifying of the package number under the waybill number according to the modified package number and the total package number includes: In response to the modified number of packages being less than the total number of packages, deleting all package numbers under the waybill number; and generating a package number under the waybill number having the modified number of packages; In response to the modified number of packages being greater than the total number of packages, determining the difference between the modified number of packages and the total number of packages as the number of newly added packages; obtaining a maximum sequence string corresponding to the waybill number; and generating, based on the maximum sequence string, a package number under the waybill number whose quantity is the number of newly added packages.
8. A package number generating device, characterized in that: include: A first receiving module is used to receive an order request sent by a user; a waybill number generating module, configured to generate and return a waybill number corresponding to the order request in response to the order request meeting the condition of uncertain total number of packages, and set a no-package-number service flag for the waybill number; A second receiving module is configured to receive a package number generation request, wherein the package number generation request includes: the waybill number and the number of packages this time; a sequence string generating module, configured to generate a sequence string having a target number of packages in response to a service identifier of whether or not the waybill number is set; The package number generating module is used for combining the sequence string with the waybill number for each of the sequence strings to generate a package number associated with the waybill number.
9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer-readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
11. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 7.