Express delivery order matching method, device and equipment and computer readable storage medium
By using a trained matching and ranking model and image processing technology, the problem of inaccurate matching of express waybills was solved, enabling accurate matching and transportation of express deliveries with goods but no waybills.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SF TECH CO LTD
- Filing Date
- 2022-09-02
- Publication Date
- 2026-06-16
AI Technical Summary
Existing express waybill matching methods are unable to accurately and efficiently filter out matching waybill information, resulting in express deliveries with goods but no waybill being unable to be accurately delivered to customers.
By acquiring express delivery information and waybill information, a trained matching and ranking model is used to perform feature fusion, output the matching degree between the target express delivery and the candidate waybill, and the target matching waybill is selected based on the matching degree. Image processing and category information are then used for further confirmation.
This improves the accuracy and efficiency of express waybill matching, ensuring that packages with goods but no waybill can be correctly matched and delivered to customers.
Smart Images

Figure CN117690146B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of logistics technology, specifically to a method, apparatus, device, and computer-readable storage medium for matching express waybills. Background Technology
[0002] "Goods without waybill" refers to express deliveries where the waybill information is lost during transit due to various reasons (such as the waybill falling off or being worn out). Whether these express deliveries can be re-matched with the corresponding waybill in the system will determine whether these express deliveries can ultimately be delivered to the customer.
[0003] However, under normal circumstances, due to the large number of waybill information entries stored in the system, existing express waybill matching methods are unable to accurately and efficiently filter out matching waybill information. Summary of the Invention
[0004] This application provides a method, apparatus, device, and computer-readable storage medium for matching express waybills, aiming to solve the technical problem that existing express waybill matching methods cannot accurately and efficiently filter out waybill information that matches express delivery.
[0005] On the one hand, embodiments of this application provide a method for matching express waybills, including:
[0006] Obtain the courier information of the target courier to be matched, and the waybill information of the candidate waybill corresponding to the target courier;
[0007] The express delivery information and the waybill information are associated and input into a trained matching and ranking model, and the matching degree between the target express delivery and each of the candidate waybills is output.
[0008] Based on the matching degree between the target express delivery and each of the candidate waybills, the target matching waybill corresponding to the target express delivery is selected from the candidate waybills.
[0009] As a feasible embodiment of this application, the express delivery information includes express delivery description text and express delivery attribute values; the waybill information includes waybill description text and waybill attribute values; the trained matching and ranking model includes a text encoding layer, an encoding and decoding layer, and a matching output layer;
[0010] The express delivery description text and the waybill description text are associated and input into the text encoding layer to obtain the text encoding vector:
[0011] The express delivery attribute value, the waybill attribute value, and the text encoding vector are associated and input into the encoding and decoding layer to obtain the feature interaction vector;
[0012] The text encoding vector and the feature interaction vector are associated and input to the matching output layer to output the matching degree between the target express delivery and each of the candidate waybills.
[0013] As a feasible embodiment of this application, before associating the express delivery description text and the waybill description text into the text encoding layer to obtain the text encoding vector, the method includes:
[0014] Obtain the express delivery image of the target express delivery and the reference image corresponding to the candidate waybill;
[0015] The express delivery image is input into a trained image processing model, which outputs first text information and determines the first text information as the express delivery description text.
[0016] The reference image is input into the image processing model, the second text information is output, and the second text information is determined as the waybill description text.
[0017] As a feasible embodiment of this application, before associating the express delivery information and the waybill information with a trained matching and ranking model and outputting the matching degree between the target express delivery and each of the candidate waybills, the method includes:
[0018] Obtain sample express delivery information and its corresponding express delivery label, and sample waybill information and its corresponding waybill label;
[0019] The sample express delivery information and the sample waybill information are associated and input into a preset initial matching and ranking model, and the predicted matching degree between the sample express delivery information and the sample waybill information is output.
[0020] Based on the predicted matching degree and the matching degree between the express label and the waybill label, the initial matching ranking model is trained to obtain the trained matching ranking model.
[0021] As a feasible embodiment of this application, the step of filtering out the target matching waybill corresponding to the target express delivery from the candidate waybills based on the matching degree relationship between the target express delivery and each of the candidate waybills includes:
[0022] Based on the matching degree between the target express delivery and each of the candidate waybills, the candidate waybills are sorted to generate a waybill sequence;
[0023] The first few candidate waybills in the waybill sequence are determined as the initial matching waybills corresponding to the target express delivery, and reference images corresponding to each initial matching waybill are obtained.
[0024] Based on the image similarity between each of the reference images and the express delivery image of the target express, the target matching waybill corresponding to the target express is determined from the initial matching waybill.
[0025] As a feasible embodiment of this application, determining the first few candidate waybills in the waybill sequence as the initial matching waybill corresponding to the target express delivery includes:
[0026] Obtain the category information corresponding to the target express delivery;
[0027] Based on the quantity corresponding to the category information, the corresponding number of candidate waybills in the waybill sequence are determined as the initial matching waybills corresponding to the target express delivery.
[0028] As a feasible embodiment of this application, after determining the first few candidate waybills in the waybill sequence as the target matching waybill corresponding to the target express delivery and outputting the reference image corresponding to the target matching waybill, the method further includes:
[0029] Calculate the image similarity between each of the reference images and the express delivery image of the target express delivery;
[0030] Based on the image similarity relationship, the target waybill corresponding to the target express delivery is determined from the target matching waybills.
[0031] As a feasible embodiment of this application, obtaining the express delivery information of the target express delivery to be matched, and the waybill information of the candidate waybill corresponding to the target express delivery, includes:
[0032] Obtain the location information of the target express delivery to be matched, as well as the waybill information of each preset waybill in the preset database;
[0033] Based on the origin and destination delivery addresses in the waybill information of each preset waybill, determine the delivery route of the preset waybill.
[0034] Based on the matching relationship between the discovered site information and the sites through which the delivery has passed, candidate waybills are selected from the preset waybills.
[0035] On the other hand, embodiments of this application also provide a courier waybill matching device, including:
[0036] The acquisition module is used to acquire the express delivery information of the target express delivery to be matched, as well as the waybill information of the candidate waybill corresponding to the target express delivery.
[0037] The matching module is used to associate the express delivery information and the waybill information with the trained matching and ranking model, and output the matching degree between the target express delivery and each of the candidate waybills;
[0038] The filtering module is used to filter out the target matching waybill corresponding to the target express delivery from the candidate waybills based on the matching degree between the target express delivery and each of the candidate waybills.
[0039] On the other hand, this application also provides a computer device, which includes a processor, a memory, and a computer program stored in the memory and executable on the processor. The processor executes the computer program to implement the steps in the above-described express waybill matching method.
[0040] On the other hand, embodiments of this application also provide a computer-readable storage medium storing a computer program, which is executed by a processor to implement the steps in the above-described express waybill matching method.
[0041] The express delivery waybill matching method provided in this application integrates express delivery information and waybill information into a trained matching and ranking model. This allows the matching and ranking model to not only fully integrate the feature differences between express delivery information and waybill information, but also to integrate the feature differences between different waybill information. As a result, it can more accurately output the matching degree between the target express delivery and each candidate waybill, thereby effectively improving the express delivery waybill matching effect. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0043] Figure 1 This application provides a flowchart illustrating the steps of a method for matching express waybills.
[0044] Figure 2 This application provides a schematic flowchart illustrating the steps for obtaining matching degree by processing express delivery information based on a neural network model in an embodiment of the present application.
[0045] Figure 3 This is a schematic diagram of the architecture of a matching and ranking model provided in an embodiment of this application;
[0046] Figure 4 This application provides a schematic flowchart illustrating the steps for obtaining descriptive text in an embodiment of the present application.
[0047] Figure 5 This application provides a schematic flowchart illustrating the steps involved in training a matching and ranking model.
[0048] Figure 6 This application provides a schematic flowchart illustrating the steps for determining a target matching waybill.
[0049] Figure 7 This application provides a schematic flowchart illustrating the steps for determining an initial matching waybill.
[0050] Figure 8 This application provides a schematic flowchart illustrating the steps for determining candidate waybills.
[0051] Figure 9 This is a schematic diagram of the structure of a courier waybill matching device provided in an embodiment of this application;
[0052] Figure 10 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0053] 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 the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of the present invention.
[0054] In this application, the term "exemplary" is used to mean "used as an example, illustration, or description." Any embodiment described as "exemplary" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to implement and use the invention. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that the invention can be implemented without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid obscuring the description of the invention with unnecessary detail. Therefore, the invention is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in the embodiments of this application.
[0055] This application discloses a method, apparatus, device, and computer-readable storage medium for matching express delivery waybills. It is mainly used to re-identify express deliveries with lost waybill information, that is, to re-match the express deliveries with lost waybill information with the waybill information in the system to re-determine the waybill data, thereby facilitating the delivery service. Details are as follows.
[0056] like Figure 1 As shown, Figure 1This is a flowchart illustrating the steps of a courier waybill matching method provided in an embodiment of this application. The courier waybill matching method in this embodiment includes steps 101 to 103:
[0057] 101. Obtain the express delivery information of the target express delivery to be matched, and the waybill information of the candidate waybill corresponding to the target express delivery.
[0058] In this embodiment of the application, as can be seen from the foregoing description, the target express delivery to be matched here usually refers to an express delivery whose waybill information has been lost due to reasons such as waybill detachment or wear and tear. In this case, the express delivery information of the target express delivery obtained by the express waybill matching device is mainly provided from the actual perspective of the target express delivery. Specifically, the express delivery information usually includes the following:
[0059] Discover site information, that is, the specific address where the target package is currently located, such as the transit center of XX Community, XX Street, XX District, XX City, XX Province;
[0060] Express delivery attribute values, such as the weight and volume of the express delivery obtained through measuring tools;
[0061] The description text of a package mainly refers to a piece of text information that describes the appearance and shape of the package. It mainly involves information about the package packaging, such as its shape and color.
[0062] Of course, in addition to the above, express delivery information can also include other richer content. For example, where permitted in certain circumstances, express delivery information can also include the type of express delivery, such as books, food, electronic products, etc., as well as express delivery images acquired in real time through an image acquisition device. This application embodiment does not limit the specific connotation of express delivery information.
[0063] Furthermore, considering that in actual logistics processes, logistics companies typically store express waybill data online to facilitate the management of express delivery transportation, the waybill information corresponding to the target express delivery mentioned here usually refers to the waybill information extracted from the logistics company's logistics database. Specifically, this waybill information usually includes relevant information about the consigned item at the time of consignment, mainly including the following:
[0064] Origin and destination delivery addresses: These describe the addresses where the item will be sent and received.
[0065] Waybill attribute values: mainly include information such as the weight and volume of the shipped item;
[0066] Waybill description text: This is the description text of the consigned item, which mainly refers to a piece of text information describing the appearance and shape of the consigned item. It mainly involves the packaging information of the consigned item, such as its shape, color, etc.
[0067] Of course, in addition to the above, waybill information usually includes other information, such as sender / recipient, contact information, waybill number, etc., which will not be elaborated here in the embodiments of this application.
[0068] Furthermore, regarding the description text for express delivery or waybill, considering that these texts are usually entered by personnel, and different personnel have different text description styles, which often leads to inconsistencies, to improve the consistency between description texts, as a feasible embodiment of this application, the description text is obtained by processing the images of the express delivery and the consigned item based on a trained image processing model. Specific implementation schemes can be found in subsequent sections. Figure 4 And its explanations and descriptions.
[0069] Furthermore, it should be noted that considering the large number of waybills stored in logistics databases, typically reaching hundreds of thousands, extracting all waybill information is difficult. Therefore, as a common approach, candidate waybills are obtained by filtering the waybill information in the database. Specifically, as a feasible implementation, candidate waybills can be filtered by constructing a candidate matching database. That is, when the routing information of a waybill has not been updated for a long time, this waybill can be added as a candidate waybill to the candidate matching database, so that the express waybill matching device can directly obtain the waybill information of the candidate waybill from the candidate matching database. Of course, in addition to the above solution, as another feasible embodiment of this application, waybill information can also be filtered by the discovery location information in the express information and the origin and destination delivery addresses in the waybill information. For specific implementation schemes, please refer to the following. Figure 8 And its explanations and descriptions.
[0070] 102. The express delivery information and the waybill information are associated and input into the trained matching and ranking model, and the matching degree of the target express delivery and each of the candidate waybills is output.
[0071] In this embodiment of the application, after obtaining the express delivery information and the waybill information, the express delivery waybill matching device will associate the express delivery information and the waybill information with the matching and ranking model, so that the matching and ranking model can fully realize the interactive calculation of the express delivery information and the waybill information, thereby outputting the matching degree between the target express delivery and each candidate waybill.
[0072] Specifically, considering that both express delivery information and waybill information contain both numerical and textual information, the matching and ranking model requires a specific structure to achieve feature matching of express delivery information and waybill information. For example, Figure 2The diagram illustrates a specific implementation scheme provided in this application for processing express delivery information and waybill information based on a matching and ranking model to obtain the matching degree between the target express delivery and each candidate waybill. For details, please refer to the subsequent sections. Figure 2 And its explanations and descriptions.
[0073] It should be noted that the matching and ranking model provided in this application embodiment can be trained using a large number of data samples and based on a neural network. Specific implementation schemes can be found in the following sections. Figure 5 And its explanations and descriptions.
[0074] 103. Based on the matching degree between the target express delivery and each of the candidate waybills, select the target matching waybill corresponding to the target express delivery from the candidate waybills.
[0075] In this embodiment of the application, after determining the matching degree between the target express delivery and each candidate waybill based on the matching ranking model, the matching degree can describe the degree of matching between the target express delivery and each candidate waybill to a certain extent. Therefore, according to the relationship between the matching degree between the target express delivery and each candidate waybill, the candidate waybill with the highest matching degree is determined as the target matching waybill corresponding to the target express delivery.
[0076] Furthermore, considering the potential errors in the model calculations—that is, the matching degree between the actual matching waybill and the target express delivery may not be the highest—as a feasible embodiment of this application, the candidate waybills can be sorted according to the matching degree relationship between the target express delivery and each candidate waybill. Then, the top few candidate waybills with the highest matching degrees can be used as potential target matching waybills. This facilitates further use of reference images of these waybills to ultimately determine the most probable target matching waybill. Specific implementation details can be found in subsequent sections. Figure 6 And its explanations and descriptions.
[0077] The express delivery waybill matching method provided in this application integrates express delivery information and waybill information into a trained matching and ranking model. This allows the matching and ranking model to not only fully integrate the feature differences between express delivery information and waybill information, but also to integrate the feature differences between different waybill information. As a result, it can more accurately output the matching degree between the target express delivery and each candidate waybill, thereby effectively improving the express delivery waybill matching effect.
[0078] like Figure 2 As shown, Figure 2 A flowchart illustrating the steps for obtaining matching degree by processing express delivery information based on a neural network model, as provided in this application embodiment, is described in detail below.
[0079] In this embodiment of the application, a matching and sorting model is provided, specifically composed of a text encoding layer, an encoding and decoding layer, and a matching output layer, for the text and numerical information contained in express delivery information and waybill information, in order to fully realize the interaction of text and numerical information. Specifically, it includes steps 201 to 203:
[0080] 201. Associate the express delivery description text and the waybill description text and input them into the text encoding layer to obtain the text encoding vector.
[0081] In this embodiment, the text encoding layer is usually a pre-trained text encoder, such as the BERT text encoder, which uses a dictionary to convert each character in the text into a numerical ID, and constructs the input required by the BERT text encoder. That is, the express delivery description text and the waybill description text are converted into IDs and then concatenated. The output of the BERT text encoder is the text encoding vector.
[0082] 202. The express delivery attribute value, the waybill attribute value, and the text encoding vector are associated and input into the encoding and decoding layer to obtain the feature interaction vector.
[0083] In this embodiment of the application, as can be seen from the foregoing description, the express delivery attribute values and waybill attribute values are usually values such as express delivery weight, consigned item weight, express delivery volume, and consigned item volume. The text encoding vector is also composed of values. Therefore, the express delivery attribute values, waybill attribute values, and text encoding vector can be concatenated to form a new vector, which can be used as the input of the encoding and decoding layer.
[0084] Specifically, the encoding and decoding layers here are mainly used to enable full interactive computation of text features and numerical features. Therefore, the encoding and decoding layers here can adopt the TRANSFORMER structure, that is, an attention mechanism is introduced to enable full interactive computation. Then, the output of the last layer of TRANSFORMER is averaged to obtain the final feature interaction vector.
[0085] Furthermore, in addition to the aforementioned method of concatenating express delivery attribute values, waybill attribute values, and text encoding vectors and inputting them into the encoding / decoding layer, the category information of the express delivery and the category information of the consigned item can also be concatenated simultaneously. Specifically, the category information is encoded into an ID, and the category information embedding vector is obtained after encoding. The category information embedding vector, express delivery attribute values, waybill attribute values, and text encoding vector are concatenated and input into the encoding / decoding layer to obtain the feature interaction vector.
[0086] 203. Associate the text encoding vector and the feature interaction vector and input them to the matching output layer to output the matching degree between the target express delivery and each of the candidate waybills.
[0087] In this embodiment, after obtaining the text encoding vector and feature interaction vector based on the aforementioned steps, the express waybill matching device further concatenates the text encoding vector and feature interaction vector and inputs them to the matching output layer. After processing through several fully connected layers, a feature vector with the same dimensions as the candidate waybills is input. Each dimension of this feature vector corresponds to the matching degree of a candidate waybill. Specifically, the matching degree between the target express delivery and each candidate waybill is between 0 and 1. The higher the matching degree, the more likely the candidate waybill is the actual order information corresponding to the target express delivery.
[0088] To facilitate understanding of the matching and ranking model provided in the embodiments of this application, specifically, as follows: Figure 3 As shown, Figure 3 This is a schematic diagram of the architecture of a matching and sorting model provided in an embodiment of this application.
[0089] As shown in 4, Figure 4 A flowchart illustrating the steps for obtaining descriptive text provided in this application embodiment is described in detail below.
[0090] Considering that the descriptive text input by the user may have inconsistent formats and standards, which may affect subsequent feature calculations, this application provides an implementation scheme for obtaining descriptive text based on image processing, specifically including steps 401 to 403:
[0091] 401, Obtain the express delivery image of the target express delivery and the reference image corresponding to the candidate waybill.
[0092] In this embodiment, the target package image typically refers to an image captured in real-time by a user at the location where the target package is discovered, using an image acquisition device such as a mobile phone or camera, and uploaded to the package waybill matching device. The reference image corresponding to the candidate waybill typically refers to an image captured during the transport of the package; this image is usually associated with the corresponding waybill information and stored in a preset database.
[0093] 402, Input the express delivery image into the trained image processing model, output the first text information, and determine the first text information as the express delivery description text.
[0094] In this embodiment of the application, the express delivery image is input into a trained image processing model. The image processing model can identify the main body in the image, namely the express delivery, and then further output text information describing the shape, size, color and other features of the main body. This text information is the express delivery description text.
[0095] 403. Input the reference image into the image processing model, output the second text information, and determine the second text information as the waybill description text.
[0096] In this embodiment of the application, similar to step 402 above, the reference image is input into the image processing model. The image processing model can identify the main body in the image, namely the consignment, and then further output text information describing the shape, size, color and other features of the main body. This text information is the waybill description text.
[0097] like Figure 5 As shown, Figure 5 A flowchart illustrating the steps for training a matching ranking model, as provided in an embodiment of this application, is described in detail below.
[0098] In this embodiment of the application, an implementation scheme for training a matching and ranking model based on the idea of neural networks is provided, specifically including steps 501 to 503:
[0099] 501. Obtain sample express delivery information and its corresponding express delivery label, and sample waybill information and its corresponding waybill label.
[0100] In this embodiment, sample express delivery information refers to express delivery information for which corresponding waybill messages have been found in the past, while sample waybill information refers to other waybill information in the candidate waybill database associated with the express delivery information. Specifically, the waybill tags corresponding to the sample waybill information mainly include two types: one is a positive sample that matches the sample express delivery information, and the other is a negative sample that does not match the sample express delivery information.
[0101] 502, The sample express delivery information and the sample waybill information are associated and input into a preset initial matching and ranking model, and the predicted matching degree between the sample express delivery information and the sample waybill information is output.
[0102] In this embodiment of the application, the sample express delivery information and sample waybill information are concatenated and input into the initial matching and ranking model to obtain the predicted matching degree between the sample express delivery information and the sample waybill information. Of course, the predicted matching degree is not an accurate result and may have some error.
[0103] 503. Based on the predicted matching degree and the matching degree between the express label and the waybill label, the initial matching ranking model is trained to obtain the trained matching ranking model.
[0104] In this embodiment, based on the idea of backpropagation, the difference between the matching degree and the predicted matching degree between the express delivery label and the waybill label is used as the loss value to train the parameters in the initial matching ranking model, thus obtaining a trained matching ranking model. Specifically, the training process involves multiple iterations, that is, using the difference between the matching degree and the predicted matching degree between the express delivery label and the waybill label as the loss value to update the parameters in the initial matching ranking model, obtaining an updated matching ranking model. Then, the sample express delivery information and sample waybill information are associated and input into the updated matching ranking model to obtain the updated predicted matching degree. This process continues until the updated predicted matching degree meets certain conditions, such as the difference between the matching degree and the matching degree between the express delivery label and the waybill label being less than a certain threshold. At this point, the currently updated matching ranking model can be used as the trained matching ranking model for subsequent matching calculations.
[0105] like Figure 6 As shown, Figure 6 A flowchart illustrating the steps for determining a target matching waybill, as provided in this application embodiment, is described in detail below.
[0106] In this embodiment of the application, a scheme is provided to first filter out several initial candidate waybills based on the matching degree between the target express delivery and each candidate waybill, and then further determine the final target matching waybill based on image similarity. Specifically, it includes steps 601 to 603:
[0107] 601. Based on the matching degree between the target express and each of the candidate waybills, sort the candidate waybills to generate a waybill sequence.
[0108] In this embodiment, the express waybill matching device generates a waybill sequence by comparing the matching degree between the target express delivery and each candidate waybill, and arranging the candidate waybills in descending order of matching degree. The higher the rank of the waybill in the sequence, the higher the matching degree of the waybill, and the more likely it is to be the target matching waybill for the target express delivery.
[0109] 602, determine the first few candidate waybills in the waybill sequence as the initial matching waybills corresponding to the target express delivery, and obtain the reference image corresponding to each initial matching waybill.
[0110] In this embodiment of the application, in order to avoid mismatch between express delivery and waybill due to errors, the express delivery and waybill matching device will determine the initial matching waybill corresponding to the target express delivery from the first few candidate waybills in the waybill sequence, and obtain the reference image corresponding to each initial matching waybill from the database. The reference image here is similar to the definition of the reference image mentioned in step 401 above, and will not be described again in this embodiment of the application.
[0111] Furthermore, as a feasible embodiment of this application, the number of initially matched waybills selected can also be associated with the express delivery type. Specifically, the express delivery type can reflect the possibility of misjudgment to a certain extent, and also reflects the value of the express delivery to a certain extent. Therefore, it is convenient for the express waybill matching device to select a corresponding number of initially matched waybills for subsequent image matching. Specific implementation schemes can be found in the following sections. Figure 7 And its explanations and descriptions.
[0112] 603. Based on the image similarity between each of the reference images and the express delivery image of the target express, determine the target matching waybill corresponding to the target express from the initial matching waybill.
[0113] In this embodiment, the express waybill matching device further calculates the image similarity between the reference image and the target express image. Here, the target express image is similar in definition to the express image mentioned in step 401 above, and will not be repeated here. The image similarity can be calculated based on the pixel values of corresponding pixels in the image. Alternatively, as another feasible embodiment, to simplify the calculation, the image similarity can be calculated by performing a distance transformation on the reference image and the express image, that is, converting the pixel value of each pixel in the image to the distance from that point to the nearest main area, and then using the result of the distance transformation. The specific implementation scheme will not be repeated here.
[0114] like Figure 7 As shown, Figure 7 A flowchart illustrating the steps for determining an initial matching waybill, as provided in this application embodiment, is described in detail below.
[0115] In this embodiment of the application, a scheme is provided for filtering out a corresponding number of initial matching waybills based on express delivery category information, specifically including steps 701 to 702:
[0116] 701, Obtain the category information corresponding to the target express delivery.
[0117] In this embodiment, considering that the target express delivery is usually in a packaged state and its category information cannot be directly determined, the category information corresponding to the target express delivery can be estimated and determined based on the consignment category in the waybill information of several candidate waybills with high matching degree. For example, the number of each consignment category in these candidate waybills can be counted, and further confirmation can be made by combining the weight and volume of the target express delivery.
[0118] 702. Based on the quantity corresponding to the category information, determine the corresponding number of candidate waybills in the waybill sequence as the initial matching waybill corresponding to the target express delivery.
[0119] In this embodiment, after determining the category information corresponding to the target express delivery, the express waybill matching device queries a preset table to obtain the quantity corresponding to the category information, and then determines the corresponding quantity of candidate waybills in the waybill sequence as the initial matching waybill corresponding to the target express delivery. The preset table records the quantity corresponding to different category information. Specifically, the quantity is determined based on the express delivery value or the degree of misjudgment reflected by the category. For example, the higher the value reflected by the category, the higher the corresponding quantity should be; the higher the degree of misjudgment reflected by the category, the higher the corresponding quantity should be. Alternatively, as another optional embodiment of this application, the degree of misjudgment can also be determined based on the quantity of each type of consigned item in the candidate waybills. Specifically, the quantity of consigned item categories in the waybill information of several candidate waybills with a high matching degree, such as greater than a preset matching degree threshold, is counted and sorted. If the difference in the quantity of the top-ranked consigned item categories is small, the target express delivery can be considered to be easily misjudged, and more candidate waybills can be selected as the initial matching waybills corresponding to the target express delivery.
[0120] like Figure 8 As shown, Figure 8 A flowchart illustrating the steps for determining candidate waybills provided in this application embodiment is described in detail below.
[0121] In this embodiment of the application, a scheme for filtering candidate waybills based on discovered site information is provided, specifically including steps 801 to 803:
[0122] 801, retrieve the location information of the target express delivery to be matched, as well as the waybill information of each preset waybill in the preset database.
[0123] In this embodiment, the location information for discovering the target express delivery refers to the transit location where the target express delivery is discovered, which will not be elaborated further in this embodiment. The preset database here can refer to the aforementioned candidate matching database, which is a database composed of waybill information whose routing information has not been updated for a long time. In other words, the preset waybill here consists of waybill information whose routing information has not been updated for a long time.
[0124] 802. Based on the origin and destination delivery addresses in the waybill information of each preset waybill, determine the delivery route of the preset waybill.
[0125] In this embodiment of the application, based on the origin and destination delivery addresses in the waybill information of the preset waybill, as well as the route planning, map and other information stored in the logistics database, the delivery sites of the preset waybill can be determined, that is, which sites the preset waybill will be delivered to the customer through.
[0126] 803. Based on the matching relationship between the discovered site information and the delivery route, candidate waybills are selected from the preset waybills.
[0127] In this embodiment, the express delivery order matching device compares the discovered site information with the delivery route information, and then uses the preset order information that includes the discovered site as the candidate order information to reduce the number of orders to be processed, thereby improving the efficiency of subsequent matching calculations.
[0128] To better implement the express waybill matching method provided in the embodiments of this application, an express waybill matching device is also provided in the embodiments of this application, based on the express waybill matching method. Figure 9 As shown, Figure 9 This is a schematic diagram of a courier waybill matching device provided in an embodiment of this application. Specifically, the courier waybill matching device includes:
[0129] The acquisition module 901 is used to acquire the express information of the target express to be matched, and the waybill information of the candidate waybill corresponding to the target express.
[0130] The matching module 902 is used to associate the express delivery information and the waybill information into the trained matching and ranking model, and output the matching degree between the target express delivery and each of the candidate waybills;
[0131] The filtering module 903 is used to filter out the target matching waybill corresponding to the target express delivery from the candidate waybills based on the matching degree between the target express delivery and each of the candidate waybills.
[0132] In some embodiments of this application, the express delivery information includes express delivery description text and express delivery attribute values; the waybill information includes waybill description text and waybill attribute values; the trained matching and ranking model includes a text encoding layer, an encoding / decoding layer, and a matching output layer; the matching module is used to associate the express delivery description text and the waybill description text with the text encoding layer to obtain a text encoding vector; associate the express delivery attribute values, the waybill attribute values, and the text encoding vector with the encoding / decoding layer to obtain a feature interaction vector; associate the text encoding vector and the feature interaction vector with the matching output layer to output the matching degree between the target express delivery and each of the candidate waybills.
[0133] In some embodiments of this application, before associating the express delivery description text and the waybill description text into the text encoding layer to obtain the text encoding vector, the matching module is used to obtain the express delivery image of the target express delivery and the reference image corresponding to the candidate waybill; input the express delivery image into a trained image processing model, output first text information, and determine the first text information as the express delivery description text; input the reference image into the image processing model, output second text information, and determine the second text information as the waybill description text.
[0134] In some embodiments of this application, before associating the express delivery information and the waybill information with a trained matching ranking model and outputting the matching degree between the target express delivery and each candidate waybill, the matching module is further configured to obtain sample express delivery information and its corresponding express delivery tag, and sample waybill information and its corresponding waybill tag; associate the sample express delivery information and the sample waybill information with a preset initial matching ranking model and output the predicted matching degree between the sample express delivery information and the sample waybill information; and train the initial matching ranking model based on the predicted matching degree and the matching degree between the express delivery tag and the waybill tag to obtain a trained matching ranking model.
[0135] In some embodiments of this application, the filtering module is used to sort the candidate waybills according to the matching degree between the target express delivery and each candidate waybill, and generate a waybill sequence; determine the first few candidate waybills in the waybill sequence as the initial matching waybills corresponding to the target express delivery, and obtain a reference image corresponding to each initial matching waybill; and determine the target matching waybill corresponding to the target express delivery from the initial matching waybills according to the image similarity between each reference image and the express delivery image of the target express delivery.
[0136] In some embodiments of this application, the filtering module is used to obtain category information corresponding to the target express delivery; and to determine the corresponding number of candidate waybills in the waybill sequence as the initial matching waybill corresponding to the target express delivery based on the quantity corresponding to the category information.
[0137] In some embodiments of this application, the acquisition module is used to acquire the discovery site information of the target express delivery to be matched, and the waybill information of each preset waybill in the preset database; determine the delivery sites of the preset waybill based on the start and end delivery addresses in the waybill information of each preset waybill; and filter out candidate waybills from the preset waybills based on the matching relationship between the discovery site information and the delivery sites.
[0138] This application also provides a computer device, such as... Figure 10 As shown, Figure 10 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application.
[0139] The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps in the express waybill matching method provided in any embodiment of this application.
[0140] Specifically, a computer device may include components such as a processor 1001 with one or more processing cores, a memory 1002 with one or more storage media, a power supply 1003, and an input unit 1004. Those skilled in the art will understand that... Figure 10 The computer device structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:
[0141] The processor 1001 is the control center of the computer device. It connects various parts of the computer device via various interfaces and lines, and performs various functions and processes data by running or executing software programs and / or modules stored in the memory 1002, and by calling data stored in the memory 1002, thereby providing overall monitoring of the computer device. Optionally, the processor 1001 may include one or more processing cores; preferably, the processor 1001 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 1001.
[0142] The memory 1002 can be used to store software programs and modules. The processor 1001 executes various functional applications and data processing by running the software programs and modules stored in the memory 1002. The memory 1002 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 1002 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 1002 may also include a memory controller to provide the processor 1001 with access to the memory 1002.
[0143] The computer equipment also includes a power supply 1003 that supplies power to the various components. Preferably, the power supply 1003 can be logically connected to the processor 1001 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 1003 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0144] The computer device may also include an input unit 1004, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0145] Although not shown, the computer device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 1001 in the computer device loads the executable files corresponding to the processes of one or more application programs into the memory 1002 according to the following instructions, and the processor 1001 runs the application programs stored in the memory 1002, thereby implementing the steps in the express waybill matching method provided in any embodiment of this application.
[0146] Therefore, embodiments of this application provide a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), a magnetic disk, or an optical disk, etc. A computer program is stored on the computer-readable storage medium, and when executed by a processor, the computer program implements the steps in the express waybill matching method provided in any embodiment of this application.
[0147] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the detailed descriptions of other embodiments above, which will not be repeated here.
[0148] In practice, each of the above units or structures can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above units or structures, please refer to the previous method embodiments, which will not be repeated here.
[0149] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0150] The above provides a detailed description of a courier waybill matching method provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for matching express waybills, characterized in that, include: Obtain the courier information of the target courier to be matched, and the waybill information of the candidate waybill corresponding to the target courier; The express delivery information and the waybill information are associated and input into a trained matching and ranking model, and the matching degree between the target express delivery and each of the candidate waybills is output. Based on the matching degree between the target express delivery and each of the candidate waybills, the target matching waybill corresponding to the target express delivery is selected from the candidate waybills; The express delivery information includes the express delivery description text and express delivery attribute values of the target express delivery; the waybill information includes the waybill description text and waybill attribute values of the waybill extracted from the database, and the waybill information is used to describe the information of the consigned item; the trained matching and ranking model includes a text encoding layer, an encoding and decoding layer and a matching output layer. The step of associating the express delivery information and the waybill information with a trained matching and ranking model, and outputting the matching degree between the target express delivery and each of the candidate waybills, includes: The express delivery description text and the waybill description text are associated and input into the text encoding layer to obtain the text encoding vector: The express delivery attribute value, the waybill attribute value, and the text encoding vector are associated and input into the encoding and decoding layer to obtain the feature interaction vector; The text encoding vector and the feature interaction vector are associated and input to the matching output layer to output the matching degree between the target express delivery and each of the candidate waybills.
2. The express waybill matching method according to claim 1, characterized in that, Before associating the express delivery description text and the waybill description text with the text encoding layer to obtain the text encoding vector, the method includes: Obtain the express delivery image of the target express delivery and the reference image corresponding to the candidate waybill; The express delivery image is input into a trained image processing model, which outputs first text information and determines the first text information as the express delivery description text. The reference image is input into the image processing model, the second text information is output, and the second text information is determined as the waybill description text.
3. The express waybill matching method according to claim 1, characterized in that, Before associating the express delivery information and the waybill information with the trained matching and ranking model, and outputting the matching degree between the target express delivery and each of the candidate waybills, the method includes: Obtain sample express delivery information and its corresponding express delivery label, and sample waybill information and its corresponding waybill label; The sample express delivery information and the sample waybill information are associated and input into a preset initial matching and ranking model, and the predicted matching degree between the sample express delivery information and the sample waybill information is output. Based on the predicted matching degree and the matching degree between the express label and the waybill label, the initial matching ranking model is trained to obtain the trained matching ranking model.
4. The express waybill matching method according to claim 1, characterized in that, The step of filtering out the target matching waybill corresponding to the target express delivery from the candidate waybills based on the matching degree relationship between the target express delivery and each of the candidate waybills includes: Based on the matching degree between the target express delivery and each of the candidate waybills, the candidate waybills are sorted to generate a waybill sequence; The first few candidate waybills in the waybill sequence are determined as the initial matching waybills corresponding to the target express delivery, and reference images corresponding to each initial matching waybill are obtained. Based on the image similarity between each of the reference images and the express delivery image of the target express, the target matching waybill corresponding to the target express is determined from the initial matching waybill.
5. The express waybill matching method according to claim 4, characterized in that, The step of determining the first few candidate waybills in the waybill sequence as the initial matching waybill corresponding to the target express delivery includes: Obtain the category information corresponding to the target express delivery; Based on the quantity corresponding to the category information, the corresponding number of candidate waybills in the waybill sequence are determined as the initial matching waybills corresponding to the target express delivery.
6. The express waybill matching method according to any one of claims 1 to 5, characterized in that, The process of obtaining the express delivery information of the target express delivery to be matched, and the waybill information of the candidate waybill corresponding to the target express delivery, includes: Obtain the location information of the target express delivery to be matched, as well as the waybill information of each preset waybill in the preset database; Based on the origin and destination delivery addresses in the waybill information of each preset waybill, determine the delivery route of the preset waybill. Based on the matching relationship between the discovered site information and the sites through which the delivery has passed, candidate waybills are selected from the preset waybills.
7. A waybill matching device for express delivery, characterized in that, include: The acquisition module is used to acquire the express delivery information of the target express delivery to be matched, as well as the waybill information of the candidate waybill corresponding to the target express delivery. The matching module is used to associate the express delivery information and the waybill information with the trained matching and ranking model, and output the matching degree between the target express delivery and each of the candidate waybills; The filtering module is used to filter out the target matching waybill corresponding to the target express delivery from the candidate waybills based on the matching degree between the target express delivery and each of the candidate waybills; The express delivery information includes the express delivery description text and express delivery attribute values of the target express delivery; the waybill information includes the waybill description text and waybill attribute values of the waybill extracted from the database, and the waybill information is used to describe the information of the consigned item; the trained matching and ranking model includes a text encoding layer, an encoding and decoding layer and a matching output layer. The step of associating the express delivery information and the waybill information with a trained matching and ranking model, and outputting the matching degree between the target express delivery and each of the candidate waybills, includes: The express delivery description text and the waybill description text are associated and input into the text encoding layer to obtain the text encoding vector: The express delivery attribute value, the waybill attribute value, and the text encoding vector are associated and input into the encoding and decoding layer to obtain the feature interaction vector; The text encoding vector and the feature interaction vector are associated and input to the matching output layer to output the matching degree between the target express delivery and each of the candidate waybills.
8. A computer device, characterized in that, The computer device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, the processor executing the computer program to implement the steps of the express waybill matching method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that is executed by a processor to implement the steps of the express waybill matching method according to any one of claims 1 to 6.