Express delivery order screening method, device and equipment and computer readable storage medium
By training a feature extraction model and using similarity matching technology, the problem of low efficiency in the process of screening express waybills has been solved, and fast and efficient waybill information screening and accurate matching have been achieved.
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 quickly and efficiently filter out associated waybill information, affecting the efficiency of subsequent accurate matching.
By training a feature extraction model, the feature vector of the target express delivery is extracted and matched with the feature vector of the preset reference waybill information. The indexing technology is used to quickly filter out the associated waybill information. The image similarity and category information are combined for weighted filtering. Finally, the target waybill is determined by the matching and ranking model.
It enables the rapid and efficient filtering of associated waybill information during the matching process for express deliveries with lost waybill information, thereby improving the efficiency of subsequent accurate matching.
Smart Images

Figure CN117690145B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of logistics technology, specifically to a method, apparatus, equipment, and computer-readable storage medium for screening 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] Given the large amount of waybill information stored in logistics systems, common express waybill matching methods typically involve two steps: initial screening and precise matching. Initial screening identifies potentially matching waybill information and filters out unmatched ones, thus reducing the computational load in the precise matching stage. However, current initial screening methods struggle to quickly and efficiently identify related waybill information, impacting the efficiency of subsequent precise matching. Summary of the Invention
[0004] This application provides a method, apparatus, device, and computer-readable storage medium for screening express waybills, aiming to solve the technical problem of difficulty in quickly and efficiently screening out associated waybill information in the existing express waybill matching process.
[0005] On the one hand, embodiments of this application provide a method for screening express waybills, including:
[0006] Obtain the target courier to be matched, and the courier information corresponding to the target courier;
[0007] The express delivery information is input into a trained feature extraction model, which outputs the target feature vector of the target express delivery.
[0008] Obtain a reference feature vector obtained by preprocessing the preset reference waybill information through the feature extraction model;
[0009] Based on the similarity between the target feature vector and the reference feature vector, the associated waybill information corresponding to the target express delivery is determined from the preset reference waybill information.
[0010] As a feasible embodiment of this application, the step of inputting the express delivery information into a trained feature extraction model and outputting the target feature vector of the target express delivery includes:
[0011] The text description information and category information in the express delivery information are input into the encoding layer of the trained feature extraction model, and the first embedding vector corresponding to the text description information and the second embedding vector corresponding to the category information are output.
[0012] The first embedding vector is input into the text classification sub-model in the feature extraction model, and the text vector corresponding to the text description information is output.
[0013] The text vector, the second embedding vector, and the numerical information in the express delivery information are concatenated and input into the fully connected layer of the feature extraction model to obtain the target feature vector of the target express delivery.
[0014] As a feasible embodiment of this application, before inputting the express delivery information into the trained feature extraction model and outputting the target feature vector of the target express delivery, the method includes:
[0015] Obtain sample express delivery information, and the sample waybill information corresponding to the sample express delivery information;
[0016] The sample express delivery information and the sample waybill information are input into a preset initial feature extraction model to obtain a first predicted feature vector corresponding to the sample express delivery information and a second predicted feature vector corresponding to the sample waybill information.
[0017] The initial feature extraction model is trained based on the first predicted feature vector and the second predicted feature vector to obtain a trained feature extraction model.
[0018] As a feasible embodiment of this application, the sample waybill information includes positive sample waybill information and negative sample waybill information;
[0019] The step of training the initial feature extraction model based on the first predicted feature vector and the second predicted feature vector to obtain the trained feature extraction model includes:
[0020] Based on the difference between the first predicted feature vector and the predicted feature vector corresponding to the positive sample waybill information in the sample waybill information, the first loss value corresponding to the positive sample waybill information is determined.
[0021] Based on the similarity between the first predicted feature vector and the predicted feature vector corresponding to the negative sample waybill information in the sample waybill information, the second loss value corresponding to the negative sample waybill information is determined.
[0022] The parameters in the initial feature extraction model are updated based on the first loss value and the second loss value to obtain the updated feature extraction model;
[0023] The updated feature extraction model is determined to be a trained feature extraction model when the updated first and second predicted feature vectors obtained by inputting the sample express delivery information and the sample waybill information into the updated feature extraction model meet the preset conditions.
[0024] As a feasible embodiment of this application, determining the associated waybill information corresponding to the target express delivery from the preset reference waybill information based on the similarity between the target feature vector and the reference feature vector includes:
[0025] Obtain the category information corresponding to the target express delivery;
[0026] Based on the similarity threshold corresponding to the category information and the similarity relationship between the target feature vector and the reference feature vector, the associated waybill information corresponding to the target express delivery is determined from the preset reference waybill information.
[0027] As a feasible embodiment of this application, determining the associated waybill information corresponding to the target express delivery from the preset reference waybill information based on the similarity between the target feature vector and the reference feature vector includes:
[0028] Obtain the express delivery image corresponding to the target express delivery, and the reference image corresponding to each of the preset reference waybill information;
[0029] The weights corresponding to each preset reference waybill information are determined based on the image similarity between the express delivery image and the reference image.
[0030] The similarity between the target feature vector and the reference feature vector is weighted according to each of the weights to obtain the weighted similarity corresponding to each of the preset reference waybill information;
[0031] Based on the weighted similarity of each of the preset reference waybill information, the associated waybill information corresponding to the target express delivery is determined from the preset reference waybill information.
[0032] As a feasible embodiment of this application, after determining the associated waybill information corresponding to the target express delivery from the preset reference waybill information based on the similarity between the target feature vector and the reference feature vector, the method includes:
[0033] The associated waybill information and the express delivery information are associated and input into a trained matching and ranking model, and the matching degree between the express delivery information and each associated waybill information is output.
[0034] Based on the matching degree between the express delivery information and each of the associated waybill information, the target waybill information corresponding to the express delivery information is determined from the associated waybill information.
[0035] On the other hand, embodiments of this application also provide a waybill screening device, including:
[0036] The first acquisition module is used to acquire the target express delivery to be matched, and the express delivery information corresponding to the target express delivery;
[0037] The feature extraction module is used to input the express delivery information into a trained feature extraction model and output the target feature vector of the target express delivery.
[0038] The second acquisition module is used to acquire a reference feature vector obtained by preprocessing the preset reference waybill information through the feature extraction model;
[0039] The association filtering module is used to determine the associated waybill information corresponding to the target express delivery from the preset reference waybill information based on the similarity between the target feature vector and the reference feature vector.
[0040] On the other hand, this application embodiment also provides a computer device, the computer device including 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 in the above-described express waybill screening method.
[0041] 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 screening method.
[0042] The express waybill filtering method provided in this application uses a trained feature extraction model to extract the target feature vector of the target express delivery. After obtaining the reference feature vector corresponding to the preset reference waybill information, it can find several reference feature vectors with high similarity to the target feature vector based on indexing technology. This enables the method to quickly and efficiently filter the associated waybill information that is related to the target express delivery from the preset reference waybill information, ensuring the efficiency of subsequent accurate matching. Attached Figure Description
[0043] 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.
[0044] Figure 1 This application provides a flowchart illustrating the steps of a method for screening express waybills.
[0045] Figure 2 This application provides a schematic flowchart illustrating the steps for obtaining feature vectors based on a feature extraction model in an embodiment of the present application.
[0046] Figure 3 A schematic diagram of the model architecture of a feature extraction model provided in an embodiment of this application;
[0047] Figure 4 This application provides a schematic flowchart illustrating the steps involved in training a feature extraction model.
[0048] Figure 5 This is a flowchart illustrating the steps involved in training a feature extraction model based on predicted feature vectors, as provided in an embodiment of this application.
[0049] Figure 6 This application provides a schematic diagram of a process for filtering related waybills based on a similarity threshold.
[0050] Figure 7 A flowchart illustrating the steps for weighting similarity to filter out associated waybills, provided in an embodiment of this application;
[0051] Figure 8 This application provides a schematic flowchart of steps for matching and sorting associated waybills in an embodiment of the present application.
[0052] Figure 9 This is a schematic diagram of the structure of a courier waybill screening device provided in an embodiment of this application;
[0053] Figure 10 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0054] 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.
[0055] 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.
[0056] This application discloses a method, apparatus, device, and computer-readable storage medium for screening express waybills. It is primarily used to quickly filter out associated waybill information related to the lost waybill information during the matching process of express deliveries with lost waybill information, thereby facilitating subsequent accurate matching. Details are as follows.
[0057] like Figure 1 As shown, Figure 1 This is a flowchart illustrating the steps of a courier waybill screening method provided in an embodiment of this application. The courier waybill screening method in this embodiment includes steps 101 to 104:
[0058] 101. Obtain the target courier to be matched, and the courier information corresponding to the target courier.
[0059] In this embodiment of the application, as can be seen from the foregoing description, the target express delivery to be matched typically refers to an express delivery whose waybill information has been lost due to reasons such as waybill detachment or wear and tear. Specifically, the express delivery information corresponding to the target express delivery usually includes the following:
[0060] 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;
[0061] Express delivery attribute values, such as the weight and volume of the express delivery obtained through measuring tools;
[0062] 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.
[0063] 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.
[0064] 102. Input the express delivery information into the trained feature extraction model and output the target feature vector of the target express delivery.
[0065] In this embodiment of the application, the aforementioned express delivery information is input into a trained feature extraction model. The feature extraction model integrates the obtained express delivery information and outputs the target feature vector of the target express delivery.
[0066] Specifically, considering that express delivery information contains not only different textual information but also numerical information, a feature extraction model with a special architecture is provided for hierarchical processing of express delivery information. The specific implementation scheme can be found in subsequent sections. Figure 2 And its explanations and descriptions.
[0067] Furthermore, the feature extraction model provided in this application can process similar information into feature vectors with high similarity, while processing dissimilar information into feature vectors with low similarity. Specifically, the feature extraction model can be trained based on a neural network; specific implementation schemes can be found in subsequent articles. Figure 4 And its explanations and descriptions.
[0068] 103. Obtain the reference feature vector obtained by preprocessing the preset reference waybill information through the feature extraction model.
[0069] In this embodiment, considering that in actual logistics processes, logistics companies typically store express waybill data online to facilitate logistics transportation management, the preset reference waybill information mentioned here usually refers to the waybill information stored in the logistics company's logistics database. Specifically, the waybill information here is usually related to the consigned item at the time of consignment, mainly including the following:
[0070] Origin and destination delivery addresses: These describe the addresses where the item will be sent and received.
[0071] Waybill attribute values: mainly include information such as the weight and volume of the shipped item;
[0072] 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.
[0073] 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.
[0074] Furthermore, considering the large number of waybills stored in logistics databases, typically reaching hundreds of thousands, extracting all waybill information is impractical. Therefore, a common approach is to select candidate waybills by filtering the waybill information in the database. Specifically, as a feasible implementation, candidate waybills can be selected by constructing a candidate matching database. That is, when the routing information of a certain waybill has not been updated for a long time, this waybill can be added to the candidate matching database as a preset reference waybill information.
[0075] Based on this, after obtaining the preset reference waybill information, the express waybill screening device will further use the aforementioned trained feature extraction model to preprocess each preset reference waybill information, obtain several reference feature vectors, and store them in the preset database.
[0076] 104. Based on the similarity between the target feature vector and the reference feature vector, determine the associated waybill information corresponding to the target express delivery from the preset reference waybill information.
[0077] In this embodiment, since the target feature vector and reference feature vector are extracted based on a trained feature extraction model, the similarity between the target feature vector and the reference feature vector can reflect the degree of association between the waybill information and the target express delivery to a certain extent. Specifically, as an optional embodiment of this application, based on the similarity between the target feature vector and the reference feature vector, the waybill information with a similarity higher than a preset threshold can be identified as the associated waybill information corresponding to the target express delivery. That is, the associated waybill information can be quickly filtered based on ANNOY indexing technology. Here, the threshold can be a pre-set fixed value, but to improve the effect of filtering associated waybills, the threshold can be set based on the category information of the target express delivery. For specific implementation schemes, please refer to the following. Figure 6 And its explanations and descriptions.
[0078] Furthermore, in addition to utilizing the similarity between the target feature vector and the reference feature vector to determine the associated waybill information corresponding to the target express delivery from the preset reference waybill information, as another optional embodiment of this application, it can also be determined based on the similarity between the express delivery image of the target express delivery and the consignment image corresponding to the reference waybill information. Specific implementation schemes can be found in subsequent sections. Figure 7 And its explanations and descriptions.
[0079] Furthermore, as described above, the express waybill filtering method provided in this application is mainly used to quickly filter out associated waybill information related to the lost waybill information during the matching process of express packages with lost waybill information, so as to facilitate subsequent accurate matching. Therefore, after filtering out associated waybill information from preset reference waybill information, the express waybill filtering device will further match and sort the associated waybill information to achieve accurate matching of the target express package. Specific implementation schemes can be found in the following sections. Figure 8 And its explanations and descriptions.
[0080] The express waybill filtering method provided in this application uses a trained feature extraction model to extract the target feature vector of the target express delivery. After obtaining the reference feature vector corresponding to the preset reference waybill information, it can find several reference feature vectors with high similarity to the target feature vector based on indexing technology. This enables the method to quickly and efficiently filter the associated waybill information that is related to the target express delivery from the preset reference waybill information, ensuring the efficiency of subsequent accurate matching.
[0081] like Figure 2 As shown, Figure 2 The following is a detailed flowchart illustrating the steps involved in obtaining feature vectors based on a feature extraction model, as provided in this embodiment of the application.
[0082] This application embodiment provides an implementation scheme for processing different information in express delivery information in different ways, specifically including steps 201 to 203:
[0083] 201. Input the text description information and category information in the express delivery information into the encoding layer of the trained feature extraction model, and output the first embedding vector corresponding to the text description information and the second embedding vector corresponding to the category information.
[0084] In this embodiment, the text description and category information in the express delivery information are usually in text form. Therefore, they need to be encoded using a dictionary to convert each word in the text into a numerical ID. Then, an encoding layer, such as a common embedding layer, is used to obtain the embedding of each word, thus forming the final embedding vector. In other words, inputting the text description information from the express delivery information into the encoding layer of a trained feature extraction model can output the first embedding vector corresponding to the text description information, while inputting the category information from the express delivery information into the encoding layer of a trained feature extraction model can output the second embedding vector corresponding to the category information.
[0085] 202. Input the first embedding vector into the text classification sub-model in the feature extraction model, and output the text vector corresponding to the text description information.
[0086] In this embodiment, based on the aforementioned obtained embedding vector, since the text description information contains richer text content, the first embedding vector can be further input into the text classification sub-model in the feature extraction model to obtain the text vector corresponding to the text description information. As a feasible embodiment of this application, the text classification sub-model can be the TextCNN model. Specifically, the text description information is input into the encoding layer of the trained feature extraction model, and the resulting first embedding vector has a dimension of maxlen*embedding_size. The TextCNN model uses three sets of convolutional kernels with dimensions of 2*embedding_size, 3*embedding_size, and 4*embedding_size, three kernels per set. Therefore, the final output is also divided into three sets with dimensions of maxlen-2+1, maxlen-3+1, and maxlen-4+1, three kernels per set. After max-pooling post-processing, each set yields three values, which are concatenated to obtain a vector of dimension 9. This vector is the text vector corresponding to the text description information.
[0087] 203. The text vector, the second embedding vector, and the numerical information in the express delivery information are concatenated and input into the fully connected layer in the feature extraction model to obtain the target feature vector of the target express delivery.
[0088] In this embodiment, the aforementioned text vector, the second embedding vector, and the numerical information from the express delivery information are concatenated and processed through a fully connected layer. The resulting vector representation is the target feature vector of the target express delivery. Specifically, the numerical information in the express delivery information is usually express delivery attribute value, such as the common express delivery weight and volume. Of course, it can also include the length, width, and height of the packaging, the express delivery discovery time, etc., which will not be elaborated further in this embodiment.
[0089] Specifically, for ease of understanding, such as Figure 3 As shown, Figure 3 This is a schematic diagram of the model architecture of a feature extraction model provided in an embodiment of this application.
[0090] like Figure 4 As shown, Figure 4 The following is a detailed flowchart illustrating the steps involved in training a feature extraction model, as provided in an embodiment of this application.
[0091] In this embodiment of the application, a scheme for obtaining a feature extraction model based on neural network training is provided, specifically including steps 401 to 403:
[0092] 401. Obtain sample express delivery information and the sample waybill information corresponding to the sample express delivery information.
[0093] In this embodiment, sample express delivery information refers to express delivery information for which a corresponding waybill message has 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, sample waybill information mainly includes two types: one is positive sample waybill information that matches the sample express delivery information, and the other is negative sample waybill information that does not match the sample express delivery information.
[0094] 402. Input the sample express delivery information and the sample waybill information into a preset initial feature extraction model to obtain the first predicted feature vector corresponding to the sample express delivery information and the second predicted feature vector corresponding to the sample waybill information.
[0095] In this embodiment, the sample express delivery information and sample waybill information are input into a preset initial feature extraction model to obtain a first predicted feature vector corresponding to the sample express delivery information and a second predicted feature vector corresponding to the sample waybill information, respectively. It should be noted that the purpose of the feature extraction model trained here is to process similar text into feature vectors with high similarity, and dissimilar text into feature vectors with low similarity. Therefore, the first and second predicted feature vectors obtained here may not necessarily meet the aforementioned requirements.
[0096] 403. The initial feature extraction model is trained based on the first predicted feature vector and the second predicted feature vector to obtain a trained feature extraction model.
[0097] In this embodiment of the application, based on the idea of backpropagation, and by using the difference between the first predicted feature vector and the second predicted feature vector to train the initial feature extraction model, a final trained feature extraction model can be obtained that can process similar text into feature vectors with high similarity, and process dissimilar text into feature vectors with low similarity.
[0098] Specifically, it should be noted that the training process here requires different processing methods for the positive sample waybill information and the negative sample waybill information mentioned above. For specific implementation details, please refer to the subsequent sections. Figure 5 And its explanations and descriptions.
[0099] like Figure 5 As shown, Figure 5 The flowchart illustrating the steps for obtaining a feature extraction model based on predicted feature vector training, as provided in the embodiments of this application, is detailed below.
[0100] In this embodiment of the application, a scheme is provided for training a feature extraction model by calculating loss values in different ways based on positive and negative sample waybill information in sample waybill information. Specifically, it includes steps 501 to 504:
[0101] 501. Based on the difference between the first predicted feature vector and the predicted feature vector corresponding to the positive sample waybill information in the sample waybill information, determine the first loss value corresponding to the positive sample waybill information.
[0102] In this embodiment of the application, as can be seen from the foregoing description, positive sample waybill information refers to waybill information that matches sample express delivery information. Therefore, it is necessary to make the first predicted feature vector and the second predicted feature vector obtained by the trained feature extraction processing as similar as possible when processing positive sample waybill information and sample express delivery information. Therefore, the difference between the first predicted feature vector and the predicted feature vector corresponding to the positive sample waybill information can be used as the first loss value corresponding to the positive sample waybill information. That is, the larger the difference, the larger the model loss value and the worse the model performance.
[0103] 502. Based on the similarity between the first predicted feature vector and the predicted feature vector corresponding to the negative sample waybill information in the sample waybill information, determine the second loss value corresponding to the negative sample waybill information.
[0104] In this embodiment of the application, compared with the solution provided in step 501 above, since negative sample waybill information refers to waybill information that does not match the sample express delivery information, it is necessary to make the first predicted feature vector and the second predicted feature vector obtained by the trained feature extraction processing as dissimilar as possible when processing negative sample waybill information and sample express delivery information. Therefore, the similarity between the first predicted feature vector and the predicted feature vector corresponding to the negative sample waybill information can be used as the second loss value corresponding to the positive sample waybill information. That is, the greater the similarity, the greater the model loss value and the worse the model performance.
[0105] 503. Update the parameters in the initial feature extraction model based on the first loss value and the second loss value to obtain the updated feature extraction model.
[0106] In this embodiment, after obtaining the first loss value and the second loss value based on the aforementioned steps, the first loss value and the second loss value are added together, and the final loss value obtained reflects the processing effect of the feature extraction model. Therefore, based on the backpropagation algorithm, the parameters in the initial feature extraction model can be updated using the first loss value and the second loss value to obtain an updated feature extraction model, so that the loss value obtained by the updated feature extraction model in processing sample express delivery information and sample waybill information gradually decreases.
[0107] 504, until the updated first predicted feature vector and the second predicted feature vector obtained by inputting the sample express delivery information and the sample waybill information into the updated feature extraction model meet the preset conditions, the updated feature extraction model is determined as the trained feature extraction model.
[0108] In this embodiment of the application, after several iterations of processing the feature extraction model, until a certain update process, the first predicted feature vector and the second predicted feature vector obtained meet the preset conditions. For example, when the loss value calculated based on the first predicted feature vector and the second predicted feature vector is less than the preset threshold, it can be considered that the feature extraction model has been trained. At this time, the updated feature extraction model can be determined as the trained feature extraction model for subsequent feature extraction processing.
[0109] like Figure 6 As shown, Figure 6 A flowchart illustrating the steps for filtering associated waybills based on a similarity threshold, as provided in this application embodiment, is described in detail below.
[0110] In this embodiment of the application, a scheme is provided for filtering out associated waybills by setting a similarity threshold based on category information. Specifically, it includes steps 601 to 602:
[0111] 601, Obtain the category information corresponding to the target express delivery.
[0112] 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.
[0113] 602. Based on the similarity threshold corresponding to the category information and the similarity relationship between the target feature vector and the reference feature vector, determine the associated waybill information corresponding to the target express delivery from the preset reference waybill information.
[0114] In this embodiment, after determining the category information corresponding to the target express delivery, the express waybill screening device queries a preset table to obtain the similarity threshold corresponding to the category information. Then, it compares the similarity between the target feature vector and the reference feature vector with this threshold. The preset table records the similarity thresholds corresponding to different categories. Specifically, the similarity threshold 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 lower the similarity threshold should be, increasing the number of related waybill information filtered out to avoid omissions. Similarly, the higher the degree of misjudgment reflected by the category, the lower the corresponding similarity threshold should also be, increasing the number of related waybill information filtered out to avoid omissions.
[0115] like Figure 7 As shown, Figure 7 The following is a detailed flowchart illustrating a step for weighting similarity to filter out associated waybills, as provided in an embodiment of this application.
[0116] This application embodiment provides an implementation scheme for filtering related waybill information by fusing the similarity between images, specifically including steps 701 to 704:
[0117] 701, Obtain the express delivery image corresponding to the target express delivery, and the reference image corresponding to each of the preset reference waybill information.
[0118] 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 screening device. The reference image corresponding to the preset reference waybill information 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.
[0119] 702, determine the weight corresponding to each of the preset reference waybill information based on the image similarity between the express delivery image and the reference image.
[0120] In this embodiment, the higher the image similarity between the express delivery image and the reference image, the higher the probability that the reference waybill information and the express delivery information match. Therefore, the weight corresponding to each preset reference waybill information can be determined based on the image similarity between the express delivery image and the reference image. Specifically, the weight and image similarity can be positively correlated; that is, generally, the higher the image similarity between the express delivery image and the reference image, the greater the weight corresponding to the preset reference waybill information.
[0121] Specifically, the image similarity between the express delivery image and the reference image can be calculated based on the pixel values of corresponding pixels in the images, for example, by calculating the Euclidean distance between pixel values. Of course, as another feasible embodiment of this application, to simplify the calculation, it can be further calculated by performing a distance transformation on the reference image and the express delivery image, that is, converting the pixel value of each pixel in the image to the distance from that point to the nearest subject region, and then using the result of the distance transformation to calculate the image similarity. Specific implementation schemes will not be elaborated upon in this embodiment of the application.
[0122] 703. The similarity between the target feature vector and the reference feature vector is weighted according to the weights respectively to obtain the weighted similarity corresponding to each preset reference waybill information.
[0123] In this embodiment, the similarity between the target feature vector and the reference feature vector is weighted using the weight determined by image similarity. The final weighted similarity corresponding to the preset reference waybill information is a combination of the similarity between feature vectors and the similarity between images, which better reflects the degree of correlation between the waybill and the express delivery.
[0124] 704. Determine the associated waybill information corresponding to the target express delivery from the preset reference waybill information based on the weighted similarity corresponding to each preset reference waybill information.
[0125] In this embodiment of the application, under normal circumstances, the preset reference waybill information with a weighted similarity higher than a preset similarity threshold can be determined as the associated waybill information corresponding to the target express delivery.
[0126] Of course, it should be noted that the technical solutions provided in the embodiments of this application may be the same as those described above. Figure 6 The provided embodiments are integrated, meaning that the similarity threshold here can also be adopted. Figure 6 The provided implementation scheme is determined by category information. That is, after determining the similarity threshold based on category information, the express waybill screening device will compare the weighted similarity corresponding to each preset reference waybill information with the similarity threshold corresponding to the category information, and determine the preset reference waybill information with a weighted similarity higher than the similarity threshold as the associated waybill information corresponding to the target express.
[0127] like Figure 8 As shown, Figure 8 A flowchart illustrating the steps for matching and sorting associated waybills, as provided in this application embodiment, is described in detail below.
[0128] In this embodiment of the application, steps 801 to 802 are specifically included:
[0129] 801, The associated waybill information and the express delivery information are associated and input into the trained matching and ranking model, and the matching degree between the express delivery information and each of the associated waybill information is output.
[0130] In this embodiment of the application, after obtaining the associated waybill information, the express waybill screening device will further concatenate the associated waybill information and express information and input them into the trained matching and ranking model, so that the matching and ranking model can fully calculate the feature differences between the express information and each associated waybill information, as well as the feature differences between each associated waybill information, so that the final output matching degree can be more accurate.
[0131] 802. Based on the matching degree between the express delivery information and each of the associated waybill information, determine the target waybill information corresponding to the express delivery information from the associated waybill information.
[0132] In this embodiment of the application, after calculating the matching degree between the express delivery information and each associated waybill information through the matching and sorting model, the express delivery waybill screening device will compare each matching degree and use the size relationship between the matching degree between the express delivery information and each associated waybill information to select one or more associated waybill information with the highest matching degree as the target waybill information corresponding to the express delivery information.
[0133] To better implement the express waybill screening method provided in this application embodiment, this application embodiment also provides an express waybill screening device based on the express waybill screening method. For example... Figure 9 As shown, Figure 9 This is a schematic diagram of a courier waybill screening device provided in an embodiment of this application. Specifically, the courier waybill screening device includes:
[0134] The first acquisition module 901 is used to acquire the target express delivery to be matched, and the express delivery information corresponding to the target express delivery;
[0135] Feature extraction module 902 is used to input the express delivery information into a trained feature extraction model and output the target feature vector of the target express delivery.
[0136] The second acquisition module 903 is used to acquire a reference feature vector obtained by preprocessing the preset reference waybill information through the feature extraction model;
[0137] The association filtering module 904 is used to determine the associated waybill information corresponding to the target express delivery from the preset reference waybill information based on the similarity between the target feature vector and the reference feature vector.
[0138] In some embodiments of this application, the feature extraction module is used to input the text description information and category information in the express delivery information into the encoding layer of a trained feature extraction model, and output a first embedding vector corresponding to the text description information and a second embedding vector corresponding to the category information; input the first embedding vector into the text classification sub-model of the feature extraction model, and output a text vector corresponding to the text description information; concatenate the text vector, the second embedding vector and the numerical information in the express delivery information and input them into the fully connected layer of the feature extraction model to obtain the target feature vector of the target express delivery.
[0139] In some embodiments of this application, before inputting the express delivery information into the trained feature extraction model and outputting the target feature vector of the target express delivery, the feature extraction module is further configured to acquire sample express delivery information and sample waybill information corresponding to the sample express delivery information; input the sample express delivery information and the sample waybill information into a preset initial feature extraction model to obtain a first predicted feature vector corresponding to the sample express delivery information and a second predicted feature vector corresponding to the sample waybill information; and train the initial feature extraction model based on the first predicted feature vector and the second predicted feature vector to obtain a trained feature extraction model.
[0140] In some embodiments of this application, the feature extraction module is further configured to: determine a first loss value corresponding to the positive sample waybill information based on the difference between the first predicted feature vector and the predicted feature vector corresponding to the positive sample waybill information in the sample waybill information; determine a second loss value corresponding to the negative sample waybill information based on the similarity between the first predicted feature vector and the predicted feature vector corresponding to the negative sample waybill information in the sample waybill information; update the parameters in the initial feature extraction model based on the first loss value and the second loss value to obtain an updated feature extraction model; and determine the updated feature extraction model as a trained feature extraction model when the updated first predicted feature vector and the updated second predicted feature vector obtained by inputting the sample express delivery information and the sample waybill information into the updated feature extraction model meet preset conditions.
[0141] In some embodiments of this application, the association filtering module is used to obtain category information corresponding to the target express delivery; and determine the associated waybill information corresponding to the target express delivery from the preset reference waybill information based on the similarity threshold corresponding to the category information and the similarity relationship between the target feature vector and the reference feature vector.
[0142] In some embodiments of this application, the association filtering module is used to acquire the express delivery image corresponding to the target express delivery, and the reference image corresponding to each of the preset reference waybill information; determine the weight corresponding to each of the preset reference waybill information based on the image similarity between the express delivery image and the reference image; weight the similarity between the target feature vector and the reference feature vector according to each weight to obtain the weighted similarity corresponding to each of the preset reference waybill information; and determine the associated waybill information corresponding to the target express delivery from the preset reference waybill information based on the weighted similarity corresponding to each of the preset reference waybill information.
[0143] In some embodiments of this application, after determining the associated waybill information corresponding to the target express delivery from the preset reference waybill information based on the similarity between the target feature vector and the reference feature vector, the association filtering module is further configured to associate the associated waybill information and the express delivery information with a trained matching ranking model, output the matching degree between the express delivery information and each of the associated waybill information; and determine the target waybill information corresponding to the express delivery information from the associated waybill information based on the size relationship of the matching degree between the express delivery information and each of the associated waybill information.
[0144] 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.
[0145] 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 screening method provided in any embodiment of this application.
[0146] 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:
[0147] 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.
[0148] 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.
[0149] 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.
[0150] 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.
[0151] 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 screening method provided in any embodiment of this application.
[0152] Therefore, embodiments of this application provide a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), magnetic disk, or 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 screening method provided in any embodiment of this application.
[0153] 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.
[0154] 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.
[0155] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0156] The above provides a detailed description of a courier waybill screening method provided by 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 screening express waybills, characterized in that, include: Obtain the target courier to be matched, and the courier information corresponding to the target courier; The express delivery information is input into a trained feature extraction model, which outputs the target feature vector of the target express delivery. Obtain a reference feature vector obtained by preprocessing the preset reference waybill information through the feature extraction model; Based on the similarity between the target feature vector and the reference feature vector, the associated waybill information corresponding to the target express delivery is determined from the preset reference waybill information; The step of inputting the express delivery information into a trained feature extraction model and outputting the target feature vector of the target express delivery includes: The text description information and category information in the express delivery information are input into the encoding layer of the trained feature extraction model, and the first embedding vector corresponding to the text description information and the second embedding vector corresponding to the category information are output. The first embedding vector is input into the text classification sub-model in the feature extraction model, and the text vector corresponding to the text description information is output. The text vector, the second embedding vector, and the numerical information in the express delivery information are concatenated and then input into the fully connected layer of the feature extraction model to obtain the target feature vector of the target express delivery. 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.
2. The express waybill screening method according to claim 1, characterized in that, Before inputting the express delivery information into the trained feature extraction model and outputting the target feature vector of the target express delivery, the method includes: Obtain sample express delivery information, and the sample waybill information corresponding to the sample express delivery information; The sample express delivery information and the sample waybill information are input into a preset initial feature extraction model to obtain a first predicted feature vector corresponding to the sample express delivery information and a second predicted feature vector corresponding to the sample waybill information. The initial feature extraction model is trained based on the first predicted feature vector and the second predicted feature vector to obtain a trained feature extraction model.
3. The express waybill screening method according to claim 2, characterized in that, The sample waybill information includes positive sample waybill information and negative sample waybill information; The step of training the initial feature extraction model based on the first predicted feature vector and the second predicted feature vector to obtain the trained feature extraction model includes: Based on the difference between the first predicted feature vector and the predicted feature vector corresponding to the positive sample waybill information in the sample waybill information, the first loss value corresponding to the positive sample waybill information is determined. Based on the similarity between the first predicted feature vector and the predicted feature vector corresponding to the negative sample waybill information in the sample waybill information, the second loss value corresponding to the negative sample waybill information is determined. The parameters in the initial feature extraction model are updated based on the first loss value and the second loss value to obtain the updated feature extraction model; The updated feature extraction model is determined to be a trained feature extraction model when the updated first and second predicted feature vectors obtained by inputting the sample express delivery information and the sample waybill information into the updated feature extraction model meet the preset conditions.
4. The express waybill screening method according to claim 1, characterized in that, The step of determining the associated waybill information corresponding to the target express delivery from the preset reference waybill information based on the similarity between the target feature vector and the reference feature vector includes: Obtain the category information corresponding to the target express delivery; Based on the similarity threshold corresponding to the category information and the similarity relationship between the target feature vector and the reference feature vector, the associated waybill information corresponding to the target express delivery is determined from the preset reference waybill information.
5. The express waybill screening method according to claim 1, characterized in that, The step of determining the associated waybill information corresponding to the target express delivery from the preset reference waybill information based on the similarity between the target feature vector and the reference feature vector includes: Obtain the express delivery image corresponding to the target express delivery, and the reference image corresponding to each of the preset reference waybill information; The weights corresponding to each preset reference waybill information are determined based on the image similarity between the express delivery image and the reference image. The similarity between the target feature vector and the reference feature vector is weighted according to each of the weights to obtain the weighted similarity corresponding to each of the preset reference waybill information; Based on the weighted similarity of each of the preset reference waybill information, the associated waybill information corresponding to the target express delivery is determined from the preset reference waybill information.
6. The express waybill screening method according to any one of claims 1 to 5, characterized in that, After determining the associated waybill information corresponding to the target express delivery from the preset reference waybill information based on the similarity between the target feature vector and the reference feature vector, the method includes: The associated waybill information and the express delivery information are associated and input into a trained matching and ranking model, and the matching degree between the express delivery information and each associated waybill information is output. Based on the matching degree between the express delivery information and each of the associated waybill information, the target waybill information corresponding to the express delivery information is determined from the associated waybill information.
7. A sorting device for express delivery waybills, characterized in that, include: The first acquisition module is used to acquire the target express delivery to be matched, and the express delivery information corresponding to the target express delivery; The feature extraction module is used to input the express delivery information into a trained feature extraction model and output the target feature vector of the target express delivery. The second acquisition module is used to acquire a reference feature vector obtained by preprocessing the preset reference waybill information through the feature extraction model; The association filtering module is used to determine the associated waybill information corresponding to the target express delivery from the preset reference waybill information based on the similarity between the target feature vector and the reference feature vector. The step of inputting the express delivery information into a trained feature extraction model and outputting the target feature vector of the target express delivery includes: The text description information and category information in the express delivery information are input into the encoding layer of the trained feature extraction model, and the first embedding vector corresponding to the text description information and the second embedding vector corresponding to the category information are output. The first embedding vector is input into the text classification sub-model in the feature extraction model, and the text vector corresponding to the text description information is output. The text vector, the second embedding vector, and the numerical information in the express delivery information are concatenated and then input into the fully connected layer of the feature extraction model to obtain the target feature vector of the target express delivery. 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.
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, wherein the processor executes the computer program to implement the steps in the express waybill screening 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 in the express waybill screening method according to any one of claims 1 to 6.