Waybill status update processing method, device, equipment and storage medium
By suspending the unfinished waybill operation request in the logistics data update plan and continuing to process subsequent requests, the problem of long-term thread occupancy during waybill status update is solved, and the speed of waybill status update and order acceptance efficiency are improved.
Patent Information
- Application Number
- CN202111082448.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-15
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2041-09-15
AI Technical Summary
In the existing logistics data update plan, the waybill status update takes up processing threads for a long time, limiting the platform's ability to process requests.
Execute associated operation tasks by obtaining pending waybill operation requests in the memory queue. If there is an unfinished operation task, pause the current waybill operation request, continue to execute subsequent waybill operation requests, and remove or rearrange the pending waybill operation requests under preset conditions.
It effectively avoids the operation tasks associated with abnormal waybill operation requests to occupy threads for a long time, and improves the speed of waybill status update and order acceptance efficiency.
Smart Images

Figure CN113807784B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a processing method, device, equipment and storage medium for updating waybill status. Background Art
[0002] With the continuous development of e-commerce, online shopping has experienced explosive growth, greatly promoting the development of e-commerce logistics services, especially express delivery services, making it an important channel for the circulation of goods. To provide a high-quality online shopping experience, e-commerce platforms need to collaborate with various logistics companies to continuously improve their logistics data update strategies.
[0003] Currently, in the logistics data update solution, the logistics management platform receives waybill operation requests reported by logistics personnel, such as requests to update the waybill status to "shipped". By executing the operation tasks associated with the waybill operation request, and after all the operation tasks of the request are successfully executed, the logistics update data is returned to the e-commerce platform.
[0004] The above-mentioned logistics data update solution has the problem of occupying the processing thread for a long time, which to a certain extent limits the platform's ability to process requests. Summary of the Invention
[0005] The embodiments of the present application provide a processing method, device, equipment and storage medium for updating the waybill status, thereby improving the speed of updating the waybill status.
[0006] A first aspect of an embodiment of the present application provides a method for processing a waybill status update, comprising:
[0007] Obtaining a first waybill operation request to be processed in a memory queue, where the first waybill operation request is used to request an update of a status of the first waybill;
[0008] Execute at least one operation task associated with the first waybill operation request. If there is an incomplete operation task among the at least one operation task, suspend the execution of the incomplete operation task in the first waybill operation request and continue to execute the second waybill operation request in the memory queue that is located after the first waybill operation request. The second waybill operation request is used to request an update of the status of the second waybill. The first waybill and the second waybill are different.
[0009] In an optional embodiment of the first aspect of the present application, suspending execution of unfinished operation tasks in the first waybill operation request includes:
[0010] If the number of executions of the unfinished operation tasks in the first waybill operation request is less than a preset value, the first waybill operation request is placed at the tail of the memory queue and waits for the next execution.
[0011] In an optional embodiment of the first aspect of the present application, suspending execution of unfinished operation tasks in the first waybill operation request includes:
[0012] If the number of unfinished operation tasks in the first waybill operation request is greater than or equal to a preset value, the first waybill operation request is removed from the memory queue, and the removal time is recorded.
[0013] In an optional embodiment of the first aspect of this application, the method further includes:
[0014] All waybill operation requests that were removed within a preset time period are retrieved, and the removed waybill operation requests are added to the memory queue in the order of removal, waiting to be executed again.
[0015] In an optional embodiment of the first aspect of this application, the execution of at least one operation task associated with the first waybill operation request includes:
[0016] The first and second operation tasks associated with the first waybill operation request are executed in parallel.
[0017] The first operation task is used to send an order tracking message associated with the first waybill;
[0018] The second operation task is used to update the status of the first waybill.
[0019] In an optional embodiment of the first aspect of this application, the execution of at least one operation task associated with the first waybill operation request includes:
[0020] Determine whether all operation tasks in the third waybill operation request associated with the first waybill operation request are successfully executed. If all operation tasks are successfully executed, execute at least one operation task associated with the first waybill operation request.
[0021] In an optional embodiment of the first aspect of the present application, if there are unfinished operation tasks among all the operation tasks in the third waybill operation request, the execution of the first waybill operation request is suspended until all the operation tasks in the third waybill operation request are successfully executed.
[0022] In an optional embodiment of the first aspect of this application, the method further includes:
[0023] When all operation tasks associated with the first waybill operation request are successfully executed, a waybill update record is generated. The waybill update record is used to indicate that the status update of the first waybill has been completed.
[0024] In an optional embodiment of the first aspect of this application, the status of the first waybill or the second waybill includes any one of the following:
[0025] Waybill acceptance, waiting for delivery, delivery, rejection or rejection of delivery to warehouse.
[0026] A second aspect of an embodiment of the present application provides a device for processing a waybill status update, including:
[0027] The acquisition module is used to acquire the first waybill operation request to be processed in the memory queue. The first waybill operation request is used to request an update of the status of the first waybill.
[0028] A processing module is used to execute at least one operation task associated with the first waybill operation request. If there is an unfinished operation task among the at least one operation task, the execution of the unfinished operation task in the first waybill operation request is suspended, and the execution of the second waybill operation request located after the first waybill operation request in the memory queue is continued. The second waybill operation request is used to request to update the status of the second waybill, and the first waybill and the second waybill are different.
[0029] In an optional embodiment of the second aspect of the present application, the processing module is configured to:
[0030] If the number of unfinished tasks in the first waybill operation request is less than a preset value, the first waybill operation request is placed at the end of the memory queue, waiting for the next execution.
[0031] In an optional embodiment of the second aspect of this application, the processing module is configured to:
[0032] If the number of unfinished operation tasks in the first waybill operation request is greater than or equal to a preset value, the first waybill operation request is removed from the memory queue, and the removal time is recorded.
[0033] In an optional embodiment of the second aspect of this application, the acquisition module is used to acquire all waybill operation requests that have been removed within a preset time period, and the processing module is used to add the waybill operation requests that have been removed to the memory queue in the order of removal, waiting to be executed again.
[0034] In an optional embodiment of the second aspect of the present application, the processing module is configured to:
[0035] The first and second operation tasks associated with the first waybill operation request are executed in parallel.
[0036] The first operation task is used to send an order tracking message associated with the first waybill;
[0037] The second operation task is used to update the status of the first waybill.
[0038] In an optional embodiment of the second aspect of the present application, the processing module is configured to:
[0039] Determine whether all operation tasks in the third waybill operation request associated with the first waybill operation request have been successfully executed. If all have been successfully executed, execute at least one operation task associated with the first waybill operation request.
[0040] In an optional embodiment of the second aspect of the present application, the processing module is configured to:
[0041] If any of the operation tasks in the third waybill operation request are incomplete, the execution of the first waybill operation request shall be suspended until all operation tasks in the third waybill operation request are successfully executed.
[0042] In an optional embodiment of the second aspect of the present application, the processing module is configured to:
[0043] When all operation tasks associated with the first waybill operation request are successfully executed, a waybill update record is generated. The waybill update record is used to indicate that the status update of the first waybill has been completed.
[0044] In an optional embodiment of the second aspect of this application, the status of the first waybill or the second waybill includes any one of the following:
[0045] Waybill acceptance, waiting for delivery, delivery, rejection or rejection of delivery to warehouse.
[0046] A third aspect of this application provides an electronic device, including:
[0047] Memory;
[0048] Processor; and
[0049] Computer programs;
[0050] The computer program is stored in the memory and configured to be executed by the processor to implement the method as described in any one of the first aspects.
[0051] A fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the method as described in any one of the first aspects.
[0052] A fifth aspect of this application provides a computer program product, including a computer program that, when executed by a processor, implements the method described in any one of the first aspects.
[0053] This application provides a method, apparatus, device, and storage medium for updating waybill status. The method includes: acquiring a first waybill operation request awaiting processing from a memory queue, the first waybill operation request being used to request an update to the status of a first waybill; executing at least one operation task associated with the first waybill operation request; if any of the at least one operation task is incomplete, pausing the execution of the first waybill operation request and continuing to execute a second waybill operation request following the first waybill operation request in the memory queue, the second waybill operation request being used to request an update to the status of a second waybill, wherein the first waybill and the second waybill are different. This solution avoids the operation tasks associated with abnormal waybill operation requests occupying threads for extended periods, improving the speed of waybill status updates and increasing order acceptance efficiency. Attached Figure Description
[0054] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0055] Figure 1 A schematic diagram of a scenario illustrating a method for updating the waybill status provided in an embodiment of the present application;
[0056] Figure 2 A flowchart illustrating the method for updating the status of waybills provided in this application embodiment;
[0057] Figure 3 A schematic diagram of the waybill status provided in an embodiment of the present application;
[0058] Figure 4 A schematic diagram of a memory queue and processing thread provided in an embodiment of this application;
[0059] Figure 5 A schematic diagram of the structure of a processing device for updating the waybill status provided in an embodiment of the present application;
[0060] Figure 6 This is a hardware structure diagram of the electronic device provided in an embodiment of the present application.
[0061] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0062] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0063] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in a sequence other than that illustrated or described herein.
[0064] It should be understood that the terms “comprising” and “having” as used herein, and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units that are expressly listed, but may include other steps or units that are not expressly listed or that are inherent to such process, method, product, or apparatus.
[0065] In the description of the embodiments of this application, the term "correspondence" may indicate that there is a direct or indirect correspondence between two things, or that there is an association between two things, or that there is a relationship of instruction and being instructed, configuration and being configured, etc.
[0066] First, the relevant terms involved in the embodiments of this application are briefly explained.
[0067] Business lines refer to the internal and external logistics capabilities that e-commerce platforms connect with, such as the platform's own courier services and third-party couriers. There are significant differences between these logistics capabilities, such as whether they have in-house R&D capabilities and the granularity of their delivery processes.
[0068] "Successful delivery" means that the shipping company has delivered the item correctly to the address specified by the sender and to the recipient in accordance with regulations. In most cases, the item is signed for at the mailroom or express station, and the delivery service is prematurely terminated before the item is actually handed over to the recipient.
[0069] Waybill operations (waybill actions) refer to the operations performed by logistics personnel or warehouse staff to report logistics data to the logistics management platform through a client application. For example, when a warehouse staff member scans the QR code on a package, this operation indicates that the package has been shipped out of the warehouse.
[0070] Before introducing the processing method for updating the waybill status provided in this application, we first briefly introduce the application scenarios of this processing method.
[0071] Figure 1 This is a schematic diagram illustrating a scenario for the waybill status update processing method provided in an embodiment of this application. For example... Figure 1 As shown, the scenario includes a client 11, a server 12, and a logistics management terminal 13. The client 11 is communicatively connected to both the server 12 and the logistics management terminal 13, and the server 12 is communicatively connected to the logistics management terminal 13.
[0072] Client 11 can be the client of logistics personnel A, warehouse personnel B, or order user C; server 12 can be an e-commerce platform; and logistics management terminal 13 can be a logistics management platform. The logistics management platform can provide process management for logistics operations for internal and external transportation capacity, and can also update logistics business data to the e-commerce platform, such as updating waybill status.
[0073] As an example, warehouse manager B can log in to the logistics management platform via a client to update order inbound and outbound data, such as inbound time and outbound time. Logistics personnel A can log in to the logistics management platform via a client to update order item transportation data, such as current transportation location and transportation start time. Order user C can log in to the e-commerce platform via a client to view order logistics data, such as logistics trajectory and estimated arrival time at the delivery station.
[0074] Optionally, the process management function of the logistics management terminal 13 can be integrated into the server terminal 12. The server terminal 12 can provide process management for logistics business for internal and external transportation capacity, and can also provide logistics update and query services.
[0075] In the current data processing solutions for logistics operations, the logistics management platform receives a waybill operation request, such as a waybill operation request reported by logistics personnel or warehouse personnel. Based on different business line processes, it executes the business condition process corresponding to the waybill operation request, and returns the result after the execution is completed.
[0076] The above data processing solution has the following problems:
[0077] First, the processes for operating the same waybill in different business lines are not unified, and the degree of coupling between each business is high. Modifying any business line will affect other business lines.
[0078] Second, the sequential execution of business processes takes too long, has a high risk of failure, and lacks a sound system compensation plan in case of failure, requiring manual intervention for operation and maintenance, which results in high labor costs.
[0079] Third, the order-taking thread is occupied for a long time and executed serially, which to a certain extent limits the system's ability to process requests.
[0080] As logistics management platform operations become increasingly complex and business processes more refined, traditional data processing solutions for logistics operations can no longer keep up with the explosive growth in data volume. Therefore, there is an urgent need to optimize the data processing solutions for logistics operations.
[0081] To address the aforementioned issues, this application proposes a method for processing waybill status updates. By pre-configuring the association between waybill operation requests and tasks, the method standardizes the waybill status update process across different business lines, achieving business decoupling. By setting a threshold for the number of task executions, abnormal tasks are promptly retrieved, reducing order delays, improving the timeliness of new business integration, and increasing processing speed. Furthermore, by employing multi-threaded concurrent execution, the method further enhances the quantity and speed of business processing.
[0082] The technical solutions provided by the embodiments of this application will be described in detail below through specific examples. It should be noted that the technical solutions provided by the embodiments of this application may include some or all of the following contents. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0083] Figure 2 This is a flowchart illustrating the waybill status update processing method provided in this embodiment. The waybill status update processing method of this embodiment can be applied to the aforementioned logistics management terminal, i.e., the corresponding logistics management platform, or to any device or apparatus capable of executing the method, such as the aforementioned server. This embodiment does not specifically limit its application to this method.
[0084] like Figure 2 As shown, the method for updating the waybill status in this embodiment includes the following steps:
[0085] Step 201: Obtain the first waybill operation request to be processed in the memory queue. The first waybill operation request is used to request an update of the status of the first waybill.
[0086] In this embodiment, the first waybill operation request can be a request triggered by the warehouse manager through the client or a request triggered by the logistics personnel through the client. This embodiment of the application does not specifically limit this.
[0087] The first waybill operation request is used to request an update on the status of the first waybill. The status of the first waybill includes any of the following: waybill accepted, awaiting delivery, delivered, rejected, or rejected for delivery.
[0088] Figure 3 This is a schematic diagram illustrating the status of a waybill provided in an embodiment of this application. For example... Figure 3 As shown, according to the waybill flow process, the waybill status is in the following order: waybill accepted, waiting for delivery, delivery / rejection, and after rejection, it also includes rejection into the warehouse.
[0089] Order acceptance refers to the process of processing an order for outbound delivery, which is the starting point of the delivery process. When warehouse staff process outbound orders, they can trigger a first order operation request, which is used to request that the status of the first order be updated to "order accepted".
[0090] "Awaiting delivery" means the order has been shipped and is being delivered by courier. When logistics personnel initiate transportation, they can trigger a first waybill operation request, which is used to request an update to the status of the first waybill to "Awaiting delivery".
[0091] "Delivered successfully" means that the ordered items have been delivered, the customer has signed for them, and the delivery process is complete. When the logistics personnel process the "item signed for" status, they trigger the first waybill operation request, which is used to request that the status of the first waybill be updated to "delivered successfully".
[0092] Refusal to accept delivery means that the ordered items have been delivered, but the customer refuses to sign for them, and the items need to be returned. When the logistics personnel process the refusal to accept delivery, a first waybill operation request is triggered. This first waybill operation request is used to request that the status of the first waybill be updated to refusal to accept delivery.
[0093] "Rejected Received" refers to an order being returned to the warehouse or receiving station after the customer has refused delivery. When warehouse staff process the order for re-entry, a first waybill operation request is triggered. This first waybill operation request is used to update the status of the first waybill to "Rejected Received".
[0094] Step 202: Execute at least one operation task associated with the first waybill operation request.
[0095] Different types of first waybill operation requests are triggered based on the actions taken by logistics personnel or warehouse staff. The associated operation tasks for these different types of first waybill operation requests may be the same or different. The following is a detailed explanation of the operation tasks associated with different types of first waybill operation requests.
[0096] In one possible implementation, if the first waybill operation request is used to update the status of the first waybill to "waybill accepted," the operation tasks associated with the first waybill operation request include: Task A1, Task A2, and Task A3. Task A1 is used to call external transportation resources, namely, the transport company. Task A2 is used to send order tracking information, such as indicating that the ordered items have been shipped. Task A3 is used to update the order status to "shipped and awaiting shipment."
[0097] In one possible implementation, if the first waybill operation request is used to request an update to the status of the first waybill as awaiting delivery, the operation tasks associated with the first waybill operation request include: Task B1 and Task B2. Task B1 is used to send order tracking information, such as delivery by a certain transportation company and waybill number xxx. Task B2 is used to update the order status to shipped.
[0098] In one possible implementation, if the first waybill operation request is used to request an update to the status of the first waybill as delivered, the operation tasks associated with the first waybill operation request include: task C1 and task C2. Task C1 is used to send order tracking information, such as that the customer has signed for the ordered items. Task C2 is used to update the order status to delivered.
[0099] In one possible implementation, if the first waybill operation request is used to request an update of the first waybill's status to "rejected," the operation tasks associated with the first waybill operation request include: Task D1 and Task D2. Task D1 is used to send order tracking information, such as that the customer has rejected the ordered items. Task D2 is used to update the order status to "rejected."
[0100] In one possible implementation, if the first waybill operation request is used to request an update of the first waybill's status to "rejected delivery," the associated operation tasks include: Task E1, Task E2, and Task E3. Task E1 is used to send order tracking information, such as warehouse personnel receiving the rejected order items. Task E2 is used to update the order status to "rejected delivery." Task E3 is used to trigger a refund operation.
[0101] Step 203: If at least one operation task has an incomplete operation task, suspend the execution of the first waybill operation request.
[0102] As long as there is an unfinished operation task for the first waybill, the execution of the first waybill operation request will be suspended. The suspension may be implemented in the following two ways:
[0103] In one possible implementation, if the number of executions of the unfinished operation tasks in the first waybill operation request is less than a preset value, the first waybill operation request is placed at the end of the memory queue, waiting for the next execution.
[0104] Optionally, if the number of executions of the unfinished operation tasks in the first waybill operation request is less than a preset value, the first waybill operation request is marked as an update failure, and the first waybill operation request is placed at the end of the memory queue to wait for the next execution.
[0105] For example, if the first waybill operation request is used to request an update to the status of the first waybill as awaiting delivery, the two operation tasks associated with the first waybill operation request, namely task B1 and task B2 mentioned above, are executed. If task B1 is executed successfully and the number of times task B2 fails to be executed is less than a preset value (e.g., 3 times), then the first waybill operation request is marked as an update failure, and the first waybill operation request is placed at the end of the memory queue to wait for the next execution. The next execution only needs to execute task B2.
[0106] In one possible implementation, if the number of unfinished operation tasks in the first waybill operation request is greater than or equal to a preset value, the first waybill operation request is removed from the memory queue and the removal time is recorded.
[0107] Optionally, if the number of executions of the unfinished operation tasks in the first waybill operation request is greater than or equal to a preset value, the first waybill operation request is marked as an update failure, and the first waybill operation request is removed from the memory queue, and the removal time is recorded.
[0108] For example, if the first waybill operation request is used to request an update to the status of the first waybill as delivered, the two operation tasks associated with the first waybill operation request, namely task C1 and task C2 mentioned above, are executed. If task C1 is executed successfully and the number of times task C2 fails is greater than or equal to a preset value (e.g., 3 times), then the first waybill operation request is marked as an update and removed from the memory queue, and the removal time is recorded, waiting to be added back to the memory queue.
[0109] Step 204: Continue to execute the second waybill operation request located after the first waybill operation request in the memory queue, where the second waybill operation request is used to request to update the status of the second waybill.
[0110] In this embodiment, the first waybill and the second waybill are different. The difference between the first waybill and the second waybill may include different ordered items corresponding to the waybills, or different order users corresponding to the waybills.
[0111] For example, the first waybill corresponds to order 1, and the second waybill corresponds to order 2. Order 1 and order 2 come from different users, and the items in order 1 and order 2 may be the same or different. Another example is that the first waybill and the second waybill come from the same order, but the items in that order were split into two waybills, meaning the items in the first waybill and the second waybill are different.
[0112] Similar to the first waybill operation request, the second waybill operation request is associated with at least one operation task. Executing the second waybill operation request means executing at least one operation task associated with the second waybill operation request. The specific content of the operation task is related to the status of the second waybill that the second waybill operation request requests to update. Please refer to the example of the operation task of the first waybill operation request above, which will not be repeated here.
[0113] The status of the second waybill also includes any of the following:
[0114] Waybill acceptance, waiting for delivery, delivery, rejection or rejection of delivery to warehouse.
[0115] It should be noted that for the same type of waybill operation request, such as a request to update the waybill status to "order accepted," the pre-configured association between waybill operation requests and tasks ensures that the waybill status update process is consistent across different business lines, making business data processing more standardized. Furthermore, by modifying the pre-configured associations, a unified update process for waybill status across different business lines can be achieved, reducing the workload of operations and maintenance personnel and improving the efficiency of updating logistics management functions.
[0116] The method for updating waybill status shown in this embodiment obtains a first waybill operation request to be processed in a memory queue. This first waybill operation request requests an update to the status of a first waybill. At least one operation task associated with the first waybill operation request is executed. If any of these at least one operation task is incomplete, the execution of the first waybill operation request is paused, and the execution of a second waybill operation request following the first waybill operation request in the memory queue continues. This second waybill operation request requests an update to the status of a second waybill, where the first and second waybills are different. This scheme avoids the operation tasks associated with abnormal waybill operation requests occupying threads for extended periods, improving the speed of waybill status updates and increasing order acceptance efficiency.
[0117] Optionally, in some embodiments, executing at least one operation task associated with the first waybill operation request includes concurrently executing a first operation task and a second operation task associated with the first waybill operation request. The first operation task is used to send an order tracking message associated with the first waybill, and the second operation task is used to update the status of the first waybill.
[0118] Optionally, to further improve order acceptance capabilities, more threads can be added to simultaneously process operations associated with multiple shipping order requests in the memory queue. The following example illustrates the multi-threaded parallel processing process.
[0119] For example, Figure 4 This is a schematic diagram of a memory queue and processing thread provided in an embodiment of this application. Figure 4 As shown, the memory queue includes waybill operation requests 1 to 5. Waybill operation request 1 is associated with tasks a, b, and c; waybill operation request 2 is associated with tasks d and e; waybill operation request 3 is associated with task f; waybill operation request 4 is associated with tasks g and h; and waybill operation request 5 is associated with tasks i, j, and k. Assuming the maximum number of threads for parallel processing is 5, then the number of tasks that can be executed simultaneously is 5. These tasks, a to e, are the operation tasks associated with waybill operation requests 1 and 2 in the memory queue.
[0120] Based on the above embodiments, if the number of executions of incomplete operations in the first waybill operation request is greater than or equal to a preset value, the first waybill operation request is removed from the memory queue, and the removal time is recorded. Optionally, in some embodiments, the first waybill operation request waits for replacement after being removed.
[0121] The process of filling gaps includes: retrieving all rejected waybill operation requests within a preset time period (e.g., 30 minutes ago, or within one day), and adding the rejected waybill operation requests to the memory queue in the order of rejection, waiting to be executed again. Re-executing the rejected waybill operation requests refers to re-executing the unfinished operation tasks associated with the rejected waybill operation requests.
[0122] Optionally, in some embodiments, when the logistics management terminal restarts, the above-described process can be used to re-add the waybill operation requests waiting to be executed in the memory queue before the restart to the memory queue. The waybill operation requests waiting to be executed in the memory queue include: the waybill operation requests executed for the first time and waybill operation requests marked as failed to update (i.e., waybill operation requests waiting to be executed repeatedly).
[0123] For example, based on Figure 3 For example, suppose both Waybill Operation Request 1 and Waybill Operation Request 3 are removed from the memory queue within a preset period. Then, in the order of removal, Waybill Operation Request 1 and Waybill Operation Request 3 are added to the end of the memory queue, awaiting further execution. Assume that the only unfinished task in Waybill Operation Request 1 is Task 3, and Waybill Operation Request 3 has only one Task 6, which is also unfinished. Then, simply add Task 3 and Task 6, in sequence, to the idle threads of the parallel processing thread and re-execute Tasks 3 and 6 to complete the gap repair.
[0124] Through the above-mentioned process of filling gaps, requests for incomplete waybill status updates can be processed in batches without affecting the system's normal order acceptance, thereby improving the system's overall processing capabilities.
[0125] It should be noted that the period of leak repair is longer than the period of repeatedly executing abnormal requests (not removing the queue, directly adding to the end of the queue), and is usually set to one day. Of course, the period of leak repair can be flexibly set according to actual application needs, and this embodiment of the application does not make specific limitations on this.
[0126] Optionally, in some embodiments, before executing at least one operation task associated with the first waybill operation request, the following step may be included: determining whether all operation tasks in the third waybill operation request associated with the first waybill operation request have been successfully executed.
[0127] In a possible implementation, if all operation tasks in the third waybill operation request associated with the first waybill operation request are successfully executed, at least one operation task associated with the first waybill operation request is executed.
[0128] In a possible implementation, if there are unfinished operation tasks among all the operation tasks in the third waybill operation request, the execution of the first waybill operation request is suspended until all the operation tasks in the third waybill operation request are successfully executed.
[0129] In this embodiment, both the first waybill operation request and the third waybill operation request request update the first waybill, and the third waybill operation request is earlier than the first waybill operation request.
[0130] Exemplarily, the third waybill operation request is triggered by the warehouse manager through the client, requesting to update the status of the first waybill to waybill acceptance. The first waybill operation request is triggered by the logistics personnel through the client, requesting to update the status of the first waybill to waiting for delivery. If the third waybill operation request has not been successfully updated, it is necessary to wait until all the operation tasks associated with the third waybill operation request are completed before executing the operation tasks associated with the first waybill operation request. The above solution can ensure the orderly execution of each waybill operation request of the first waybill, ensure the integrity of the logistics information of the first waybill, that is, ensure the successful update of the data of each link in the logistics information of the first waybill.
[0131] Optionally, in some embodiments, when all operation tasks associated with the first waybill operation request are successfully executed, a waybill update record is generated, indicating that the status update of the first waybill has been completed. The waybill update record can be stored in a database to determine whether subsequent waybill operation requests for the same waybill should be executed immediately. For details, see the previous embodiment.
[0132] The above describes the processing method for updating the status of waybills provided in the embodiments of this application. The following will describe the processing apparatus for updating the status of waybills provided in the embodiments of this application.
[0133] In the embodiment of the present application, the processing device for updating the waybill status can be divided into functional modules according to the above method embodiment. For example, each functional module can be divided into different functional modules corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or software functional modules.
[0134] It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. In actual implementation, there may be other division methods. The following uses the example of dividing each functional module according to each function to illustrate.
[0135] Figure 5 This is a schematic diagram of the structure of the processing device for updating the waybill status provided in the embodiment of the present application. Figure 5 As shown, the processing device for updating the waybill status provided in this embodiment includes: an acquisition module 301 and a processing module 302.
[0136] The acquisition module 301 is used to acquire the first waybill operation request to be processed in the memory queue. The first waybill operation request is used to request an update of the status of the first waybill.
[0137] Processing module 302 is used to execute at least one operation task associated with the first waybill operation request. If there is an unfinished operation task among the at least one operation task, the execution of the unfinished operation task in the first waybill operation request is suspended, and the second waybill operation request located after the first waybill operation request in the memory queue is continued. The second waybill operation request is used to request to update the status of the second waybill. The first waybill and the second waybill are different.
[0138] In an optional embodiment of this embodiment, the processing module 302 is configured to:
[0139] If the number of unfinished tasks in the first waybill operation request is less than a preset value, the first waybill operation request is placed at the end of the memory queue, waiting for the next execution.
[0140] In an optional embodiment of this example, the processing module 302 is configured to:
[0141] If the number of unfinished operation tasks in the first waybill operation request is greater than or equal to a preset value, the first waybill operation request is removed from the memory queue, and the removal time is recorded.
[0142] In an optional embodiment of this example, the acquisition module 301 is used to acquire all waybill operation requests that have been removed within a preset time period, and the processing module 302 is used to add the waybill operation requests that have been removed to the memory queue in the order of removal, waiting to be executed again.
[0143] In an optional embodiment of this embodiment, the processing module 302 is configured to:
[0144] The first and second operation tasks associated with the first waybill operation request are executed in parallel.
[0145] The first operation task is used to send an order tracking message associated with the first waybill;
[0146] The second operation task is used to update the status of the first waybill.
[0147] In an optional embodiment of this embodiment, the processing module 302 is configured to:
[0148] Determine whether all operation tasks in the third waybill operation request associated with the first waybill operation request have been successfully executed. If all have been successfully executed, execute at least one operation task associated with the first waybill operation request.
[0149] In an optional embodiment of this embodiment, the processing module 302 is configured to:
[0150] If any of the operation tasks in the third waybill operation request are incomplete, the execution of the first waybill operation request shall be suspended until all operation tasks in the third waybill operation request are successfully executed.
[0151] In an optional embodiment of this embodiment, the processing module 302 is configured to:
[0152] When all operation tasks associated with the first waybill operation request are successfully executed, a waybill update record is generated. The waybill update record is used to indicate that the status update of the first waybill has been completed.
[0153] In an optional embodiment of this example, the status of the first waybill or the second waybill includes any one of the following:
[0154] Waybill acceptance, waiting for delivery, delivery, rejection or rejection of delivery to warehouse.
[0155] The waybill status update processing device provided in this embodiment can execute the technical solution of any of the above method embodiments, and its implementation principle and technical effect are similar, so it will not be described again here.
[0156] Figure 6 The hardware structure diagram of the electronic device provided in the embodiments of this application is as follows: Figure 6 As shown, the electronic device 400 provided in this embodiment includes:
[0157] Memory 401;
[0158] Processor 402; and
[0159] Computer programs;
[0160] Among them, the computer program is stored in the memory 401 and is configured to be executed by the processor 402 to implement the technical solution of any of the above method embodiments. Its implementation principles and technical effects are similar and will not be repeated here.
[0161] Optionally, the memory 401 may be independent or integrated with the processor 402. When the memory 401 is a device independent of the processor 402, the electronic device 400 further includes:
[0162] Bus 403 is used to connect memory 401 and processor 402.
[0163] This application also provides a computer-readable storage medium storing a computer program thereon, which is executed by a processor 402 to implement the technical solutions of any of the foregoing method embodiments.
[0164] This application provides a computer program product, including a computer program, which, when executed by a processor, implements the technical solutions of any of the foregoing method embodiments.
[0165] An embodiment of the present application further provides a chip, including: a processing module and a communication interface, wherein the processing module can execute the technical solution of any of the aforementioned method embodiments.
[0166] Furthermore, the chip also includes a storage module (e.g., a memory), which is used to store instructions, and a processing module is used to execute the instructions stored in the storage module. The execution of the instructions stored in the storage module causes the processing module to execute the technical solution of any of the aforementioned method embodiments.
[0167] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly manifested as execution by a hardware processor, or execution by a combination of hardware and software modules within the processor.
[0168] The memory may include high-speed RAM, and may also include non-volatile storage (NVM), such as at least one disk storage device, and may also be a USB flash drive, external hard drive, read-only memory, disk or optical disc, etc.
[0169] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0170] The aforementioned storage medium can be implemented from any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium can be any available medium accessible to general-purpose or special-purpose computers.
[0171] An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Alternatively, the storage medium can be an integral part of the processor. Both the processor and the storage medium can reside in an application-specific integrated circuit (ASIC). Alternatively, the processor and storage medium can exist as discrete components in an electronic device.
[0172] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A processing method for updating the waybill status, characterized in that: include: Obtaining a first waybill operation request to be processed in a memory queue, where the first waybill operation request is used to request to update a status of the first waybill; Execute at least one operation task associated with the first waybill operation request to update the status of the first waybill, if there is an unfinished operation task among the at least one operation task, suspend the execution of the first waybill operation request, and continue to execute a second waybill operation request located after the first waybill operation request in the memory queue, the second waybill operation request is used to request to update the status of a second waybill, and the first waybill and the second waybill are different; Wherein, the at least one operation task corresponds to the first waybill; The executing at least one operation task associated with the first waybill operation request to update the status of the first waybill includes: Determine whether all operation tasks in the third waybill operation request associated with the first waybill operation request are successfully executed, and if all are successfully executed, execute at least one operation task associated with the first waybill operation request; the waybill updated by the first waybill operation request and the third waybill operation request are both the first waybill, and the third waybill operation request is earlier than the first waybill operation request; If there are unfinished operation tasks among all the operation tasks in the third waybill operation request, the execution of the first waybill operation request is suspended until all the operation tasks in the third waybill operation request are successfully executed.
2. The method according to claim 1, characterized in that The suspending execution of the unfinished operation task in the first waybill operation request includes: If the number of executions of the unfinished operation tasks in the first waybill operation request is less than a preset value, the first waybill operation request is placed at the tail of the memory queue and waits for the next execution.
3. The method according to claim 1, characterized in that The suspending execution of the unfinished operation task in the first waybill operation request includes: If the number of executions of the unfinished operation tasks in the first waybill operation request is greater than or equal to a preset value, the first waybill operation request is removed from the memory queue and the removal time is recorded.
4. The method according to claim 3, characterized in that The method further comprises: All waybill operation requests that were eliminated within a preset time period are obtained, and the eliminated waybill operation requests are added to the memory queue in order of elimination, waiting to be executed again.
5. The method according to claim 1, characterized in that The executing at least one operation task associated with the first waybill operation request includes: executing in parallel a first operation task and a second operation task associated with the first waybill operation request; The first operation task is used to send an order tracking message associated with the first waybill; The second operation task is used to update the status of the first waybill.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: When all operation tasks associated with the first waybill operation request are executed successfully, a waybill update record is generated, and the waybill update record is used to indicate that the status update of the first waybill has been completed.
7. The method according to any one of claims 1 to 5, characterized in that: The status of the first waybill or the second waybill includes any one of the following: Waybill acceptance, waiting for delivery, delivery, rejection or refusal to warehouse.
8. A device for processing a waybill status update, characterized in that: include: An acquisition module, used to acquire a first waybill operation request to be processed in a memory queue, where the first waybill operation request is used to request to update the status of the first waybill; a processing module, configured to execute at least one operation task associated with the first waybill operation request to update the status of the first waybill; if there is an unfinished operation task in the at least one operation task, suspend the execution of the unfinished operation task in the first waybill operation request, and continue to execute a second waybill operation request located after the first waybill operation request in the memory queue, the second waybill operation request is used to request to update the status of a second waybill, and the first waybill and the second waybill are different; wherein the at least one operation task corresponds to the first waybill; The processing module is specifically used to determine whether all operation tasks in the third waybill operation request associated with the first waybill operation request are successfully executed, and if all are successfully executed, execute at least one operation task associated with the first waybill operation request; the waybill updated by the first waybill operation request and the third waybill operation request are both the first waybill, and the third waybill operation request is earlier than the first waybill operation request; If there are unfinished operation tasks among all the operation tasks in the third waybill operation request, the execution of the first waybill operation request is suspended until all the operation tasks in the third waybill operation request are successfully executed.
9. An electronic device, characterized in that: include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and is configured to be executed by the processor to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is executed by a processor to implement the method according to any one of claims 1 to 7.
11. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 7 when being executed by a processor.
Citation Information
Patent Citations
A self-adaptive data acquisition method and system
CN109933611A
File downloading method and related product
CN111262797A
Data report task execution method and device, equipment and storage medium
CN113204416A