Management method and device of waybill association information, electronic equipment and storage medium
By learning the constraint relationships of waybill images through feature extraction parameters, the problem of low recognition accuracy of incorrect binding between waybill images and waybill numbers was solved, and a higher recognition accuracy was achieved.
Patent Information
- Application Number
- CN202111593002.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-23
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2041-12-23
AI Technical Summary
The existing method for correctly identifying errors in binding waybill images with waybill numbers has a low accuracy rate. This is mainly due to the large differences in waybill images caused by differences in imaging from different image acquisition devices and different cargo orientations. Traditional image matching methods cannot effectively identify the correct association between waybill images and waybill numbers.
The target feature vector and reference feature vector of the waybill image are extracted using preset feature extraction parameters. The reference image, positive sample image and negative sample image are learned through the feature extraction parameters to reflect the constraint relationship between multiple images of the same waybill and to determine whether the waybill number and waybill image are correctly associated.
It improves the accuracy of identifying whether the waybill image and waybill number are correctly bound, avoids the problem of small feature distance when learning only based on positive samples, and enhances the recognition accuracy of the association between waybill number and waybill image.
Smart Images

Figure CN116363682B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of logistics technology, specifically to a method, apparatus, electronic device, and computer-readable storage medium for managing waybill-related information. Background Technology
[0002] In recent years, logistics technology has developed rapidly, enabling increasingly refined management of logistics. In this regard, waybill numbers are often linked to waybill images. For example, the waybill image captured by an image acquisition device (such as an X-ray security scanner) is linked (also referred to as "linking" in this article) with the waybill number read by a barcode reader (RFID, barcode scanner) according to the waybill's processing sequence, to facilitate logistics management such as statistical information.
[0003] Factors such as X-ray security scanner malfunctions preventing the capture of the correct waybill image, or sorting machines failing to separate two waybills resulting in two waybill images containing two waybills, can lead to incorrect binding of waybill images and waybill numbers. Therefore, it is necessary to verify whether the waybill image and waybill number are correctly bound. This can be verified by comparing the matching degree of two waybill images using traditional image matching methods.
[0004] However, on the one hand, because the image acquisition devices used to collect waybill images at different locations are different, there are certain color differences in the images of the same waybill from different image acquisition devices; on the other hand, because the goods may pass through the machine in different directions, multiple waybill images of the same waybill may have significant differences. Therefore, the accuracy of using traditional image matching methods to compare the matching degree of two waybill images to determine whether the waybill image and waybill number are correctly bound is low. Summary of the Invention
[0005] This application provides a method, apparatus, electronic device, and computer-readable storage medium for managing waybill association information, aiming to solve the problem of low accuracy in identifying whether a waybill image and waybill number are correctly associated due to the use of traditional image matching methods to compare the matching degree of two waybill images.
[0006] Firstly, this application provides a method for managing waybill-related information, the method comprising:
[0007] Obtain the image of the waybill to be identified associated with the target waybill number;
[0008] According to the preset feature extraction parameters, the target feature vector of the waybill image to be identified is extracted. The feature extraction parameters reflect the constraint relationship between multiple images of the same waybill. The feature extraction parameters are learned through the reference image, positive sample image and negative sample image.
[0009] Obtain a reference feature vector of a reference waybill image for the target waybill number, wherein the reference feature vector is extracted from the reference waybill image based on the feature extraction parameters;
[0010] Based on the reference feature vector and the target feature vector, determine whether the target waybill number is correctly associated with the waybill image to be identified.
[0011] Secondly, this application provides a management device for waybill association information, the management device for waybill association information comprising:
[0012] The first acquisition unit is used to acquire the image of the waybill to be identified associated with the target waybill number;
[0013] The extraction unit is used to extract the target feature vector of the waybill image to be identified according to preset feature extraction parameters. The feature extraction parameters reflect the constraint relationship between multiple images of the same waybill and are learned through a reference image, positive sample image and negative sample image.
[0014] The second acquisition unit is used to acquire a reference feature vector of a reference waybill image of the target waybill number, wherein the reference feature vector is extracted from the reference waybill image based on the feature extraction parameters;
[0015] The identification unit is used to determine whether the target waybill number is correctly associated with the waybill image to be identified, based on the reference feature vector and the target feature vector.
[0016] In some embodiments of this application, the second acquisition unit is specifically used for:
[0017] Obtain other waybill images associated with the target waybill number;
[0018] Based on the feature extraction parameters, feature vectors of the other waybill images are extracted to obtain the reference feature vector.
[0019] In some embodiments of this application, the other waybill images include at least one waybill image, and the identification unit is specifically used for:
[0020] Obtain any two images from the target waybill image set, wherein the target waybill image set includes the other waybill images and the waybill image to be identified, and the any two images include a first image and a second image;
[0021] Based on the reference feature vector and the target feature vector, obtain the second target distance between the feature vector of the first image and the feature vector of the second image;
[0022] Based on the second target distance, determine whether any two images are images of the same waybill;
[0023] When any two images are images of the same waybill, it is determined that the association information of the target waybill number is correct. The correct association information includes that the target waybill number is correctly associated with the image of the waybill to be identified.
[0024] In some embodiments of this application, after determining whether any two images are images of the same waybill based on the second target distance, the identification unit is specifically used for:
[0025] When any two images are not images of the same waybill, a target waybill image that does not match the other images is determined from the target waybill image set;
[0026] It was determined that the target waybill number was incorrectly associated with the target waybill image.
[0027] In some embodiments of this application, the management device for waybill association information further includes a training unit (not shown in the figure). Before extracting the target feature vector of the waybill image to be identified according to preset feature extraction parameters, the training unit is specifically used for:
[0028] Obtain the baseline image, positive sample image, and negative sample image of the sample waybill;
[0029] The first feature vector of the reference image, the second feature vector of the positive sample image, and the third feature vector of the negative sample image are obtained through a preset feature extraction module.
[0030] Based on the first feature vector, the second feature vector, and the third feature vector, the feature extraction loss value of the preset feature extraction module is determined;
[0031] Based on the feature extraction loss value, adjust the preset weight parameters of the feature extraction module until the preset training stop condition is met, and obtain the trained feature extraction module.
[0032] Extract the weight parameters of the trained feature extraction module to serve as the feature extraction parameters.
[0033] In some embodiments of this application, the training unit is specifically used for:
[0034] Based on the first feature vector and the second feature vector, a first feature distance is obtained between the reference image and the positive sample image;
[0035] Based on the first feature vector and the third feature vector, a second feature distance is obtained between the reference image and the negative sample image;
[0036] The feature extraction loss value is determined based on the first feature distance and the second feature distance.
[0037] In some embodiments of this application, the identification unit is specifically used for:
[0038] Obtain the first target distance between the reference feature vector and the target feature vector;
[0039] Based on the first target distance, determine whether the image of the waybill to be identified and the image of the reference waybill are images of the same waybill;
[0040] When the image of the waybill to be identified and the image of the reference waybill are images of the same waybill, it is determined that the target waybill number is correctly associated with the image of the waybill to be identified.
[0041] In some embodiments of this application, the management device for waybill association information further includes a prompting unit (not shown in the figure), the prompting unit being specifically used for:
[0042] When the target waybill number is incorrectly associated with the waybill image to be identified, a prompt message indicating that the target waybill number is incorrectly associated with the waybill image to be identified is output to the preset management platform.
[0043] In some embodiments of this application, the management device for waybill association information further includes a statistics unit (not shown in the figure), which is specifically used for:
[0044] Based on the association result between the target waybill number and the waybill image to be identified, the waybill number association accuracy of the preset waybill number set is obtained, wherein the association result is used to indicate whether the target waybill number and the waybill image to be identified are correctly associated.
[0045] Thirdly, this application also provides an electronic device, which includes a processor and a memory, wherein the memory stores a computer program, and when the processor calls the computer program in the memory, it executes the steps in any of the waybill association information management methods provided in this application.
[0046] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, the computer program being loaded by a processor to execute the steps in the method for managing waybill associated information.
[0047] This application employs preset feature extraction parameters to extract a target feature vector from the image of the waybill to be identified, which is associated with the target waybill number, and a reference feature vector from a reference waybill image of the target waybill number. Based on the target feature vector and the reference feature vector, it determines whether the target waybill number and the waybill image to be identified are correctly associated. Firstly, since it eliminates the need to rely on traditional image matching methods to compare the matching degree of two waybill images, it can also verify whether the waybill image and waybill number are correctly bound, thus improving the accuracy of identifying whether the waybill image and waybill number are correctly bound to each other to a certain extent. Secondly, since the feature extraction parameters reflect the constraint relationships between multiple images of the same waybill, and since these parameters are learned through the reference image, positive sample image, and negative sample image, the problem of learning only based on positive samples of the waybill—which learns the feature constraint relationships between multiple positive samples of the same waybill, and also simultaneously learns the feature constraint relationships between positive and negative samples of the same waybill—is avoided. This avoids the problem that the feature distance between positive and negative samples of the same waybill is also small when extracting positive and negative samples based on the feature extraction parameters. Therefore, the accuracy of identifying whether the target waybill number is correctly associated with the waybill image can be improved. Thus, this application can improve the accuracy of identifying whether the waybill number is correctly associated with the waybill image. Attached Figure Description
[0048] 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 this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0049] Figure 1 This is a schematic diagram of a management system for waybill association information provided in an embodiment of this application;
[0050] Figure 2 This is a flowchart illustrating a method for managing waybill-related information provided in an embodiment of this application;
[0051] Figure 3 This is a schematic diagram of an embodiment of obtaining feature extraction parameters provided in this application.
[0052] Figure 4 This is a schematic diagram illustrating the working principle of a network structure for the feature extraction module provided in this application embodiment;
[0053] Figure 5 This is a schematic diagram illustrating the working principle of a network structure for the feature extraction module provided in this application embodiment;
[0054] Figure 6This is a schematic diagram illustrating a scenario where the associated error message is output to the management platform, as provided in this embodiment of the application.
[0055] Figure 7 This is a schematic diagram of an embodiment of the management device for waybill association information provided in this application;
[0056] Figure 8 This is a schematic diagram of an embodiment of the electronic device provided in this application. Detailed Implementation
[0057] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0058] In the description of the embodiments of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, features defined with "first" and "second" may explicitly or implicitly include one or more of the stated features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0059] To enable any person skilled in the art to implement and use this application, the following description is provided. In this description, details are set forth for purposes of explanation. It should be understood that those skilled in the art will recognize that this application can be implemented without using these specific details. In other instances, well-known processes will not be described in detail to avoid obscuring the description of the embodiments of this application with unnecessary detail. Therefore, this application 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.
[0060] The execution subject of the waybill association information management method in this application embodiment can be the waybill association information management device provided in this application embodiment, or different types of electronic devices such as server equipment, physical host, or user equipment (UE) that integrate the waybill association information management device. The waybill association information management device can be implemented in hardware or software. The UE can be a terminal device such as a smartphone, tablet computer, laptop computer, handheld computer, desktop computer, or personal digital assistant (PDA).
[0061] The electronic device can operate independently or in a cluster.
[0062] See Figure 1 , Figure 1 This is a schematic diagram of a management system for waybill association information provided in this application embodiment. The management system may include an electronic device 100, which integrates a management device for waybill association information. For example, the electronic device can acquire a waybill image to be identified associated with a target waybill number; extract a target feature vector from the waybill image to be identified according to preset feature extraction parameters, wherein the feature extraction parameters reflect the constraint relationship between multiple images of the same waybill, and are learned through a reference image, positive sample images, and negative sample images; acquire a reference feature vector from a reference waybill image of the target waybill number, the reference feature vector being extracted from the reference waybill image based on the feature extraction parameters; and determine whether the target waybill number and the waybill image to be identified are correctly associated based on the reference feature vector and the target feature vector.
[0063] In addition, such as Figure 1 As shown, the management system for waybill-related information may also include a memory 200 for storing data, such as image data and video data.
[0064] It should be noted that, Figure 1 The schematic diagram of the management system for waybill association information shown is merely an example. The management system and scenario for waybill association information described in this application are for the purpose of more clearly illustrating the technical solutions of this application and do not constitute a limitation on the technical solutions provided in this application. As those skilled in the art will know, with the evolution of the management system for waybill association information and the emergence of new business scenarios, the technical solutions provided in this invention are also applicable to similar technical problems.
[0065] The following describes the method for managing waybill-related information provided in the embodiments of this application. In the embodiments of this application, electronic devices are used as the execution subject. For the sake of simplicity and ease of description, the execution subject will be omitted in the subsequent method embodiments.
[0066] Reference Figure 2 , Figure 2This is a flowchart illustrating a method for managing waybill-related information provided in an embodiment of this application. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than here. For example, steps 202 and 203 may be executed simultaneously, or step 202 may be executed first and then step 203, or step 203 may be executed first and then step 202. The method for managing waybill-related information includes steps 201 to 204, wherein:
[0067] 201. Obtain the image of the waybill to be identified associated with the target waybill number.
[0068] The target waybill number refers to the identification number of the waybill to be verified as being correctly bound to the waybill image. For example, if the waybill with waybill number "123" to be verified is correctly bound to waybill image 1, then the target waybill number is "123".
[0069] The waybill image to be identified refers to the waybill image to be verified to see if it is correctly bound to the target waybill number. If the waybill image to be identified 1 is correctly bound to the target waybill number "123", then the waybill image to be identified is waybill image 1.
[0070] In step 201, there are multiple ways to obtain the image of the waybill to be identified, including, for example:
[0071] (1) An image acquisition device (which can be a regular camera, X-ray machine, etc.) is installed above the security conveyor belt where the waybills are placed. The image acquisition device captures video frames or images of the security conveyor belt in real time. An electronic device establishes a network connection with the image acquisition device. Based on this network connection, the video frames or images of the security conveyor belt captured by the image acquisition device are acquired online and used as images of the waybills to be identified.
[0072] (3) The electronic device can also read the security conveyor belt image captured by the image acquisition device (including the image acquisition device integrated into the electronic device or the image acquisition device above the security conveyor belt on which the waybill is placed) from the relevant storage medium storing the image of the security conveyor belt on which the waybill is placed, and use it as the waybill image to be identified.
[0073] (4) Read the video frames or images of the security conveyor belt where the waybill is placed, which are pre-collected and stored inside the electronic device, as the waybill image to be identified.
[0074] 202. Extract the target feature vector of the waybill image to be identified according to the preset feature extraction parameters.
[0075] The feature extraction parameters reflect the constraint relationship between multiple images of the same waybill, and the feature extraction parameters are learned through the reference image, positive sample image and negative sample image.
[0076] The learning process of feature extraction parameters will be described in detail later (such as steps 301 to 305). Please refer to the relevant explanations below. For the sake of simplicity, it will not be repeated here.
[0077] The target feature vector refers to the image spatial features extracted from the image of the waybill to be identified using preset feature extraction parameters.
[0078] In step 202, there are various ways to extract the target feature vector, including, for example:
[0079] (1) Input the image of the waybill to be identified into the feature extraction module trained in step 304. Through the trained feature extraction module, feature extraction is performed on the image of the waybill to be identified according to the feature extraction parameters to obtain the target feature vector of the image of the waybill to be identified.
[0080] (2) Extract the weight parameters of the trained feature extraction module in step 304 to obtain the preset feature extraction parameters; perform feature extraction on the image of the waybill to be identified based on the extracted feature extraction parameters to obtain the target feature vector of the image of the waybill to be identified.
[0081] 203. Obtain the reference feature vector of the reference waybill image of the target waybill number, wherein the reference feature vector is extracted from the reference waybill image based on the feature extraction parameters.
[0082] The reference waybill image refers to the waybill image used to match the target waybill number with the image of the waybill to be identified, in order to determine whether the target waybill number and the image of the waybill to be identified are correctly associated. The reference waybill image can be preset, such as an image obtained by pre-taking a waybill with the target waybill number; or it can be an image of other waybills associated with the target waybill number.
[0083] The reference feature vector refers to the image spatial features extracted from the reference waybill image using preset feature extraction parameters.
[0084] The following example illustrates the process of obtaining the reference feature vector in step 203, using images of a pre-captured waybill with the target waybill number and images of other waybills associated with the target waybill number as reference waybill images.
[0085] (1) The reference waybill image is an image obtained by pre-taking a waybill with the target waybill number (hereinafter referred to as the "target waybill number image"). Step 203 may specifically include the following step 2031A:
[0086] 2031A. Obtain the feature vector of the target waybill number image extracted based on the feature extraction parameters, and use it as the reference feature vector.
[0087] There are multiple ways to “obtain the feature vector of the target waybill number image extracted based on the feature extraction parameters” in step 2031A. For example, it can be obtained in real time by referring to the method in step 202 above; or the feature vector of the target waybill number image extracted based on the feature extraction parameters is stored in a preset database and can be read directly from the preset database.
[0088] (2) The reference waybill image is another waybill image associated with the target waybill number. In this case, step 203 may specifically include the following steps 2031B to 2032B:
[0089] 2031B. Obtain other waybill images associated with the target waybill number.
[0090] Among them, "other waybill images" refers to the waybill images associated with the target waybill number, excluding the waybill image to be identified. For example, if there are waybill images 1, 2, and 3 associated with the target waybill number "345", and the waybill image to be identified is image 1, then image 2 or image 3 is an "other waybill image".
[0091] In some embodiments, a preset database stores a set of target waybill images associated with a target waybill number. Other waybill images can be directly retrieved from the target waybill image set stored in the preset database. Here, the target waybill image set refers to the collection of waybill images associated with a target waybill number.
[0092] In some embodiments, the method of obtaining other waybill images in step 2031B is similar to the method of obtaining the waybill image to be identified in step 201 above. For details, please refer to the relevant description of step 201 above, which will not be repeated here.
[0093] 2032B. Based on the feature extraction parameters, extract the feature vectors of the other waybill images to obtain the reference feature vector.
[0094] The method for obtaining the reference feature vector in step 2032B is similar to the method for obtaining the target feature vector in step 202 above. For details, please refer to the relevant explanation of step 202 above, which will not be repeated here.
[0095] When other waybill images are correctly associated with the target waybill number, by acquiring other waybill images associated with the target waybill number, the feature distance between the feature vectors of other waybill images and the target feature vector of the waybill image to be identified can be used to determine the similarity between the waybill image to be identified and other waybill images correctly associated with the target waybill number. This can effectively determine whether the waybill image to be identified and other waybill images correctly associated with the target waybill number are images of the same waybill, and thus effectively and accurately determine whether the target waybill number and the waybill image to be identified are correctly associated.
[0096] 204. Based on the reference feature vector and the target feature vector, determine whether the target waybill number is correctly associated with the waybill image to be identified.
[0097] There are several ways to determine whether the target waybill number and the waybill image to be identified are correctly associated in step 204. Examples include:
[0098] 1. When the reference waybill image is the target waybill number image (i.e., the target waybill number image is also the image correctly associated with the target waybill number), or when the reference waybill image is another waybill image correctly associated with the target waybill number.
[0099] At this point, step 204 may specifically include the following steps 2041A to 2044A:
[0100] 2041A. Obtain the first target distance between the reference feature vector and the target feature vector.
[0101] The first target distance refers to the feature distance between the reference feature vector and the target feature vector.
[0102] For example, the first target distance can be determined based on the reference feature vector, the target feature vector and the following formula (1).
[0103] d(x,y)=||Xi-Yi||2 Formula (1)
[0104] In formula (1), d(x,y) represents the feature distance between two feature vectors, and Xi and Yi represent two different feature vectors, which can be used to refer to the reference feature vector and the target feature vector, respectively.
[0105] 2042A. Based on the first target distance, determine whether the image of the waybill to be identified and the image of the reference waybill are images of the same waybill.
[0106] For example, it is detected whether the distance to the first target is less than a preset distance threshold; if the distance to the first target is less than the preset distance threshold, it is determined that the waybill image to be identified and the reference waybill image are images of the same waybill; if the distance to the first target is greater than or equal to the preset distance threshold, it is determined that the waybill image to be identified and the reference waybill image are not images of the same waybill.
[0107] The specific value of the preset distance threshold can be set according to the actual business scenario requirements, and there is no restriction on the specific value of the preset distance threshold here.
[0108] 2043A. When the image of the waybill to be identified and the image of the reference waybill are images of the same waybill, it is determined that the target waybill number is correctly associated with the image of the waybill to be identified.
[0109] 2044A. When the image of the waybill to be identified and the image of the reference waybill are not images of the same waybill, it is determined that the target waybill number is incorrectly associated with the image of the waybill to be identified.
[0110] Since the two reference feature vectors and the target feature vector are obtained based on preset feature extraction parameters, and these parameters can learn the feature constraints between the same waybill, and the reference waybill image is correctly associated with the target waybill number; therefore, if the first target distance between the reference feature vector and the target feature vector is less than a preset distance threshold, it can be accurately determined that the waybill image to be identified and the reference waybill image are images of the same waybill, and thus the association between the target waybill number and the waybill image to be identified is correct. If the first target distance between the reference feature vector and the target feature vector is greater than or equal to the preset distance threshold, it can be determined that the waybill image to be identified and the reference waybill image are not images of the same waybill, and thus the association between the target waybill number and the waybill image to be identified is incorrect.
[0111] 2. When the reference waybill image is at least one other waybill image associated with the target waybill number.
[0112] When the reference waybill image is at least one other waybill image associated with the target waybill number, even if the other waybill images used as reference waybill images are not necessarily images correctly associated with the target waybill number, the possibility that multiple images are incorrectly associated with the waybill number is relatively small. If the feature distance between most images in the target waybill image set (for example, more than 80% of the images) is less than a preset distance threshold, it can be determined that most of the images are images of the same waybill, and thus it can be determined that most of the images are correctly associated with the target waybill number. Therefore, by determining whether the feature distance between any two images in the target waybill image set (including other waybill images and the waybill image to be identified) is less than a preset distance threshold, it can be determined whether all the images in the target waybill image set are correctly associated with the target waybill number, or to find the target waybill image that is incorrectly associated with the target waybill number from the target waybill image set.
[0113] At this point, step 204 may specifically include the following steps 2041B to 2045B:
[0114] 2041B. Obtain any two images from the target waybill image set.
[0115] The target waybill image set includes the other waybill images and the waybill image to be identified, and any two images include a first image and a second image.
[0116] For example, the target waybill image set includes images A, B, and C, the waybill image to be identified is image A, and the other waybill images include images B, C, D, and E. Any two images obtained in step 2041B can be in the following three cases: images A and B, images A and C, and images B and C.
[0117] 2042B. Based on the reference feature vector and the target feature vector, obtain the second target distance between the feature vector of the first image and the feature vector of the second image.
[0118] The second target distance refers to the feature distance between the feature vectors of the first image and the feature vectors of the second image.
[0119] The target feature vector obtained in step 202 and the reference feature vector obtained in step 203 include the feature vectors of the first image and the second image. For example, firstly, based on the target feature vector obtained in step 202 and the reference feature vector obtained in step 203, the feature vectors of the first image and the second image can be read; then, the second target distance is calculated based on the feature vectors of the first image and the second image.
[0120] The method for obtaining the distance to the second target in step 2042B is similar to the method for obtaining the distance to the first target in step 2041A. For details, please refer to the relevant explanation of step 2041A above, which will not be repeated here.
[0121] 2043B. Based on the second target distance, determine whether any two images are images of the same waybill.
[0122] For example, it is detected whether the distance to the second target is less than a preset distance threshold; if the distance to the second target is less than the preset distance threshold, it is determined that the first image and the second image (i.e., any two images) are images of the same waybill; if the distance to the second target is greater than or equal to the preset distance threshold, it is determined that the first image and the second image (i.e., any two images) are not images of the same waybill.
[0123] 2044B. When any two images are images of the same waybill, the association information of the target waybill number is determined to be correct.
[0124] The correct association information includes the correct association between the target waybill number and the waybill image to be identified.
[0125] For example, the target waybill image set includes images A, B, and C. The waybill image to be identified is image A, and the other waybill images include images B, C, D, and E. Any two images obtained in step 2041B can fall into three categories: images A and B, images A and C, and images B and C. Steps 2042B to 2043B are executed for each category. When any two images in all three categories are from the same waybill, step 2044B determines that the association information of the target waybill number is correct.
[0126] Since the feature distance (i.e., the second target distance) between any two images is small, it can be assumed that all images in the target waybill image set belong to the same waybill. The possibility of multiple images being incorrectly associated with the waybill number is low. Therefore, by verifying whether any two images associated with the target waybill number belong to the same waybill number, the correctness of the association information can be quickly identified. This approach is applicable to scenarios where the accuracy of binding waybill numbers to waybill images is high. Thus, it can improve the speed of identifying whether the association information of the target waybill number is correctly linked while reducing data processing volume and ensuring recognition accuracy.
[0127] 2045B. When any two images are not images of the same waybill, determine the target waybill image that does not match the other images from the target waybill image set; determine that the target waybill number is incorrectly associated with the target waybill image.
[0128] In step 2045B, "not matching other images" can mean not matching most of the images in the target waybill image set (e.g., the ratio of the number of non-matching images to the number of images in the target waybill image set is greater than a preset ratio threshold). Correspondingly, at this time, the target waybill image refers to the image that does not match most of the images in the target waybill image set (e.g., the ratio of the number of non-matching images to the number of images in the target waybill image set is greater than a preset ratio threshold).
[0129] Alternatively, "not matching other images" in step 2045B can also mean not matching any image in the target waybill image set. Correspondingly, in this case, the target waybill image refers to the image that does not match any image in the target waybill image set.
[0130] There are multiple ways to "determine the target waybill image that does not match other images from the target waybill image set" in step 2045B. Examples include:
[0131] 1) When the target waybill image refers to an image that does not match any of the images in the target waybill image set, the target waybill image can be found through the following steps a1 to a4:
[0132] a1. Traverse each image in the target waybill image set and retrieve the currently traversed image.
[0133] a2. Obtain the feature distances between the currently traversed image and other images in the target waybill image set;
[0134] a3. Check whether the feature distances obtained in a2 are all greater than or equal to the preset distance threshold.
[0135] a4. If all the feature distances obtained in a2 are greater than or equal to the preset distance threshold, then the currently traversed image is determined to be the target waybill image. Otherwise, take the next image as the current traversed image, and repeat steps a2 to a4 until all images in the target waybill image set have been traversed, and determine each target waybill image.
[0136] 2) When the target waybill image refers to most of the images in the target waybill image set, the target waybill image can be found through the following steps b1 to b5:
[0137] b1. Traverse each image in the target waybill image set and take the currently traversed image.
[0138] b2. Obtain the feature distances between the currently traversed image and other images in the target waybill image set;
[0139] b3. Check whether the feature distances obtained in b2 are all greater than or equal to the preset distance threshold.
[0140] b4. Count the number of targets whose feature distance obtained in b2 is greater than or equal to the preset distance threshold.
[0141] b5. If the ratio of the number of target images to the number of images in the target waybill image set is greater than a preset ratio threshold, then the currently traversed image is determined to be the target waybill image. Otherwise, take the next image as the current traversed image, and repeat steps b2 to b5 until all images in the target waybill image set have been traversed, and determine each target waybill image.
[0142] By acquiring other waybill images associated with the target waybill number, and based on the feature distance between the feature vectors of the other waybill images and the target feature vector of the waybill image to be identified, the feature distance between the feature vectors of any two images in the target waybill image set (including the waybill image to be identified and other waybill images) is determined. This allows for the determination of whether any two images belong to the same waybill. On the one hand, it can detect whether the target waybill number and the waybill image to be identified are correctly associated, and it can also comprehensively detect whether all images in the target waybill image set are correctly associated with the target waybill number. On the other hand, it can also find images that are incorrectly associated with the target waybill number from the target waybill image set, thereby improving the accuracy of waybill information and thus improving logistics management efficiency.
[0143] Reference Figure 3 , Figure 4 and Figure 5 The following example illustrates how the feature extraction parameters are obtained in an embodiment of this application. Figure 3 As shown, the feature extraction parameters can be obtained through the following steps 301 to 305:
[0144] 301. Obtain the baseline image, positive sample image, and negative sample image of the sample waybill.
[0145] Among them, the reference image (such as Figure 4 or Figure 5 The "anchor" in this context refers to an image of the sample waybill. Positive sample images (such as...) Figure 4 or Figure 5 The "positive" image in this context refers to an image obtained from another imaging of the same sample document as the reference image. A negative sample image (such as...) Figure 4 or Figure 5 The “negative” in the image refers to an image of objects other than the sample waybill in the reference image.
[0146] That is, the reference image and the positive sample image are images obtained by imaging the same object twice, while the reference image and the negative sample image are images obtained by imaging two different objects separately.
[0147] Since positive and negative sample images are sometimes not available simultaneously, this application also designs a data sampler to generate positive and negative sample images when data is insufficient. For example, when a sample waybill lacks a positive sample image, the data sampler uses data augmentation to generate a positive sample image based on a reference image. The data augmentation methods include: 1. Random rotation between 0 and 359 degrees; 2. Randomly adding noise; 3. Randomly selecting a region and erasing pixels in that region. Furthermore, when a sample waybill has a positive sample image, further data augmentation can still be performed on the positive sample image obtained after augmentation based on the reference image with a certain probability to generate more positive sample images.
[0148] For example, when a sample waybill lacks a negative sample image, the data sampler randomly selects one image from all images as the negative sample image; when the number of images is sufficient, the selected image can be considered approximately 100% negative sample images. When a sample waybill has a negative sample image, it still randomly selects one image from all images with a certain probability as the negative sample image.
[0149] In this way, the data sampler can increase the diversity of the data, so that the learned feature extraction parameters can better reflect the constraint relationship between different images of the same waybill, thereby making the recognition accuracy of whether the waybill number and waybill image are correctly associated higher.
[0150] 302. Obtain the first feature vector of the reference image, the second feature vector of the positive sample image, and the third feature vector of the negative sample image through a preset feature extraction module.
[0151] The first feature vector refers to the image spatial features extracted from the reference image using the weight parameters of the preset feature extraction module.
[0152] The second feature vector refers to the image spatial features extracted from positive sample images using the weight parameters of the preset feature extraction module.
[0153] The third feature vector refers to the image spatial features extracted from negative sample images using the weight parameters of the preset feature extraction module.
[0154] The preset feature extraction module can be formed by connecting an open-source (image feature extraction) backbone network with an embedding layer, for example, such as... Figure 4 As shown, in this embodiment of the application, a ResNet50 network is connected to an Embedding layer to form a preset feature extraction module.
[0155] The preset feature extraction module takes the baseline image, positive sample image, and negative sample image as input, respectively, and extracts features through a ResNet50 network. The output of the ResNet50 network is three-dimensional data in the shape of H×W×C. Therefore, an embedding layer is connected after the ResNet50 network to convert the H×W×C 3D data into one-dimensional data, thereby obtaining one-dimensional feature vectors for the baseline image, positive sample image, and negative sample image: a first feature vector, a second feature vector, and a third feature vector, respectively. The ResNet50 network is fast and has few layers, making it suitable for extracting object features from X-ray images.
[0156] Figure 4 The diagram illustrates the case where there is only one backbone network for extracting image features; therefore, feature extraction can only be performed sequentially on the baseline image, positive sample image, and negative sample image. Further, as... Figure 5 As shown, to improve the extraction speed of the first, second, and third feature vectors, the preset feature extraction module can be configured to use three parallel backbone networks (such as...). Figure 5 Three ResNet50 networks side by side in the middle, Figure 5 The three backbone networks share weights, which allows feature extraction to be performed in parallel on the baseline image, positive sample image, and negative sample image.
[0157] Similarly, an embedding layer can have only one embedding layer or include multiple embedding layers (such as...). Figure 4 or Figure 5 It includes three layers: Embedding_a, Embedding_p, and Embedding_n, which are used to convert 3D data of the reference image, positive sample image, and negative sample image into 1D data, respectively.
[0158] 303. Determine the feature extraction loss value of the preset feature extraction module based on the first feature vector, the second feature vector, and the third feature vector.
[0159] For example, determining the preset feature extraction loss value of the feature extraction module in step 303 may specifically include the following steps 3031 to 3033:
[0160] 3031. Based on the first feature vector and the second feature vector, obtain the first feature distance between the reference image and the positive sample image.
[0161] Among them, the first feature distance (e.g.) Figure 4 or Figure 5 In this context, "d(a,p)" refers to the feature distance between the first feature vector of the reference image and the second feature vector of the positive sample image.
[0162] The method for determining the first feature distance in step 3031 is the same as the method for determining the first target distance in step 2041A above. For details, please refer to the relevant description of step 2041A above, which will not be repeated here.
[0163] 3032. Based on the first feature vector and the third feature vector, obtain the second feature distance between the reference image and the negative sample image.
[0164] Among them, the second feature distance (such as Figure 4 or Figure 5 In this context, "d(a,n)" refers to the feature distance between the first feature vector of the reference image and the third feature vector of the negative sample image.
[0165] The method for determining the second feature distance in step 3032 is the same as the method for determining the first target distance in step 2041A above. For details, please refer to the relevant explanation of step 2041A above, which will not be repeated here.
[0166] 3033. Determine the feature extraction loss value based on the first feature distance and the second feature distance.
[0167] The preset feature extraction module has a corresponding feature extraction loss function. For example, the feature extraction loss function is shown in the following formula (2). By substituting the first feature distance and the second feature distance into the feature extraction loss function, the feature extraction loss value of the preset feature extraction module can be obtained.
[0168] L(a,p,n)=max1+max2+max3 Formula (2)
[0169] In formula (2):
[0170] max1 = max{d(a,p)-d(a,n)+m,0}
[0171] max2 = max{(m+s)-d(a,n),0}
[0172] max3 = max{d(a,p)-(ms),0}
[0173] Where L(a,p,n) is the feature extraction loss value; s is a designed redundancy value, which can avoid judgment errors caused by fluctuations in the feature distance value during inference; m is a preset distance value, used to constrain the difference between the first feature distance and the second feature distance, so as to avoid the negative sample image and the positive sample image or the reference image being too similar, thereby avoiding the difficulty in learning the feature constraint relationship between different images of the same waybill due to the similarity between the negative sample image and the positive sample image or the reference image, so that the preset feature extraction module can correctly learn the feature constraint relationship between different images of the same waybill. In practical applications, the values of m and s can be set according to the actual situation. Here, there is no restriction on the specific values of m and s. For example, m can be 1.0 and s can be 0.2.
[0174] 304. Based on the feature extraction loss value, adjust the preset weight parameters of the feature extraction module until the preset training stop condition is met, and obtain the trained feature extraction module.
[0175] The preset training stop condition can be set according to actual needs. For example, it could be when the feature extraction loss value is less than a preset value, or when the feature extraction loss value basically stops changing, that is, when the difference between the feature extraction loss values corresponding to multiple adjacent training iterations is less than the preset value; or when the number of iterations of the feature extraction module training reaches the maximum number of iterations.
[0176] For example, backpropagation is performed based on the preset feature extraction loss value of the feature extraction module to adjust the preset weight parameters of the feature extraction module until a preset stopping training condition is met, thus obtaining a trained feature extraction module. For example, Figure 4 In this process, the weight parameters of the backbone network (ResNet50 network) in the preset feature extraction module are adjusted through backpropagation. For example, Figure 5 In this process, the weight parameters of the three backbone networks (three ResNet50 networks) in the preset feature extraction module are adjusted through backpropagation.
[0177] 305. Extract the weight parameters of the trained feature extraction module to serve as the feature extraction parameters.
[0178] Through steps 301 to 305, feature extraction parameters are learned, which can reflect the feature constraint relationship between different images of the same waybill. Therefore, when feature vectors are extracted from two images of the same waybill, the feature distance between them is small. Thus, these feature extraction parameters are used to extract feature vectors from the waybill image to be identified and the reference waybill image. Based on the feature distance between the feature vectors of the waybill image to be identified and the reference waybill image, it can be accurately determined whether the waybill image to be identified and the reference waybill image are images of the same waybill, thereby accurately determining whether the target waybill number is correctly associated with the waybill image to be identified.
[0179] Furthermore, since the learning process uses positive and negative sample images of combined waybills and constrains the feature distance relationship between positive and negative samples using the aforementioned formula (2), it avoids the problem that when learning only based on the positive samples of a waybill, the feature constraint relationship between multiple positive samples of the same waybill is learned, and the feature constraint relationship between the positive and negative samples of the same waybill is also learned simultaneously. This avoids the problem that when extracting positive and negative samples of the same waybill based on feature extraction parameters, the feature distance between the positive and negative samples of the same waybill is also small. Therefore, it can improve the recognition accuracy of whether the target waybill number is correctly associated with the waybill image to be identified to a certain extent.
[0180] As can be seen from the above, by using preset feature extraction parameters, a target feature vector is extracted from the image of the waybill to be identified associated with the target waybill number, and a reference feature vector is extracted from the reference waybill image of the target waybill number. Based on the target feature vector and the reference feature vector, it is determined whether the target waybill number and the waybill image to be identified are correctly associated. Firstly, since it does not rely on traditional image matching methods to compare the matching degree of two waybill images, it can also verify whether the waybill image and waybill number are correctly bound, thus improving the accuracy of identifying whether the waybill image and waybill number are correctly bound to each other to a certain extent. Secondly, since the feature extraction parameters reflect the constraint relationships between multiple images of the same waybill, and since the feature extraction parameters are learned through the reference image, positive sample image, and negative sample image, the problem of learning only based on the positive samples of the waybill, which involves learning the feature constraint relationships between multiple positive samples of the same waybill and simultaneously learning the feature constraint relationships between the positive and negative samples of the same waybill, is avoided. This avoids the problem that the feature distance between the positive and negative samples of the same waybill is also small when extracting positive and negative samples of the same waybill based on the feature extraction parameters. Therefore, the accuracy of identifying whether the target waybill number is correctly associated with the waybill image can be improved. It is evident that the embodiments of this application can improve the accuracy of identifying whether the waybill number is correctly associated with the waybill image.
[0181] like Figure 6 As shown, furthermore, to facilitate logistics management, when an error is detected in the binding of a waybill image with the target waybill number, a prompt message indicating the association error can be output to a preset management platform. For example, when the target waybill number is incorrectly associated with the waybill image to be identified, a prompt message indicating the association error between the target waybill number and the waybill image to be identified is output to the preset management platform. As another example, when step 2045B determines that the target waybill number is incorrectly associated with the target waybill image, a prompt message indicating the association error between the target waybill number and the target waybill image is output to the preset management platform.
[0182] The preset management platform can be a logistics management server, a logistics management terminal, etc., and there are no restrictions on the specific form of the preset management platform.
[0183] Furthermore, to facilitate the management of waybill number associations, the method may further include: obtaining the waybill number association accuracy of a preset set of waybill numbers based on the association result between the target waybill number and the waybill image to be identified. The association result is used to indicate whether the target waybill number and the waybill image to be identified are correctly associated.
[0184] For example, "obtaining the waybill number association accuracy of a preset waybill number set based on the association result between the target waybill number and the waybill image to be identified" specifically includes: First, based on the association result between the target waybill number and the waybill image to be identified, counting the number of waybill numbers correctly associated with the target waybill number and the number of waybill numbers incorrectly associated in the preset waybill number set; then, calculating the waybill number association accuracy of the preset waybill number set based on the number of correctly associated waybill numbers and / or the number of incorrectly associated waybill numbers.
[0185] The preset waybill number set refers to the set of all associated waybill numbers, which can specifically be the set of all associated waybill numbers in the target area (such as a certain site).
[0186] To identify sites with low association accuracy and analyze and improve the reasons for this low accuracy, thereby increasing the accuracy of subsequent waybill number associations, the waybill number association accuracy for a specific site can be calculated. In this case, each waybill number already associated with a particular site can be used as the target waybill number (i.e., the preset waybill number set is the set of waybill numbers already associated with a particular site). The image associated with the target waybill number obtained at that site is used as the waybill image to be identified, and it is determined whether the target waybill number and the waybill image to be identified are correctly associated. Then, based on the number of correctly associated waybill numbers and / or incorrectly associated waybill numbers among the waybill numbers already associated with that site, the waybill number association accuracy for that site is calculated.
[0187] For example, the waybill numbers already associated with transit site A include waybill numbers 1, 2, and 3. The images associated with waybill numbers 1, 2, and 3 obtained at transit site A are images 1, 2, and 3, respectively. Through steps 201-204 above, it is determined that waybill number 1 is correctly associated with image 1, waybill number 2 is correctly associated with image 2, and waybill number 3 is incorrectly associated with image 3. Therefore, the accuracy rate of waybill number association at transit site A can be determined to be: 2 / 3 = 67%.
[0188] To better implement the waybill association information management method in this application embodiment, based on the waybill association information management method, this application embodiment also provides a waybill association information management device, such as... Figure 7 The diagram shown is a structural schematic of an embodiment of a waybill association information management device in this application. The waybill association information management device 700 includes:
[0189] The first acquisition unit 701 is used to acquire the image of the waybill to be identified associated with the target waybill number;
[0190] Extraction unit 702 is used to extract the target feature vector of the waybill image to be identified according to preset feature extraction parameters, wherein the feature extraction parameters reflect the constraint relationship between multiple images of the same waybill, and the feature extraction parameters are learned through reference image, positive sample image and negative sample image;
[0191] The second acquisition unit 703 is used to acquire a reference feature vector of a reference waybill image of the target waybill number, wherein the reference feature vector is extracted from the reference waybill image based on the feature extraction parameters.
[0192] The identification unit 704 is used to determine whether the target waybill number is correctly associated with the waybill image to be identified based on the reference feature vector and the target feature vector.
[0193] In some embodiments of this application, the second acquisition unit 703 is specifically used for:
[0194] Obtain other waybill images associated with the target waybill number;
[0195] Based on the feature extraction parameters, feature vectors of the other waybill images are extracted to obtain the reference feature vector.
[0196] In some embodiments of this application, the other waybill images include at least one waybill image, and the identification unit 704 is specifically used for:
[0197] Obtain any two images from the target waybill image set, wherein the target waybill image set includes the other waybill images and the waybill image to be identified, and the any two images include a first image and a second image;
[0198] Based on the reference feature vector and the target feature vector, obtain the second target distance between the feature vector of the first image and the feature vector of the second image;
[0199] Based on the second target distance, determine whether any two images are images of the same waybill;
[0200] When any two images are images of the same waybill, it is determined that the association information of the target waybill number is correct. The correct association information includes that the target waybill number is correctly associated with the image of the waybill to be identified.
[0201] In some embodiments of this application, after determining whether any two images are images of the same waybill based on the second target distance, the identification unit 704 is specifically used for:
[0202] When any two images are not images of the same waybill, a target waybill image that does not match the other images is determined from the target waybill image set;
[0203] It was determined that the target waybill number was incorrectly associated with the target waybill image.
[0204] In some embodiments of this application, the waybill association information management device 700 further includes a training unit (not shown in the figure). Before extracting the target feature vector of the waybill image to be identified according to preset feature extraction parameters, the training unit is specifically used for:
[0205] Obtain the baseline image, positive sample image, and negative sample image of the sample waybill;
[0206] The first feature vector of the reference image, the second feature vector of the positive sample image, and the third feature vector of the negative sample image are obtained through a preset feature extraction module.
[0207] Based on the first feature vector, the second feature vector, and the third feature vector, the feature extraction loss value of the preset feature extraction module is determined;
[0208] Based on the feature extraction loss value, adjust the preset weight parameters of the feature extraction module until the preset training stop condition is met, and obtain the trained feature extraction module.
[0209] Extract the weight parameters of the trained feature extraction module to serve as the feature extraction parameters.
[0210] In some embodiments of this application, the training unit is specifically used for:
[0211] Based on the first feature vector and the second feature vector, a first feature distance is obtained between the reference image and the positive sample image;
[0212] Based on the first feature vector and the third feature vector, a second feature distance is obtained between the reference image and the negative sample image;
[0213] The feature extraction loss value is determined based on the first feature distance and the second feature distance.
[0214] In some embodiments of this application, the identification unit 704 is specifically used for:
[0215] Obtain the first target distance between the reference feature vector and the target feature vector;
[0216] Based on the first target distance, determine whether the image of the waybill to be identified and the image of the reference waybill are images of the same waybill;
[0217] When the image of the waybill to be identified and the image of the reference waybill are images of the same waybill, it is determined that the target waybill number is correctly associated with the image of the waybill to be identified.
[0218] In some embodiments of this application, the management device 700 for waybill association information further includes a prompting unit (not shown in the figure), which is specifically used for:
[0219] When the target waybill number is incorrectly associated with the waybill image to be identified, a prompt message indicating that the target waybill number is incorrectly associated with the waybill image to be identified is output to the preset management platform.
[0220] In some embodiments of this application, the management device 700 for waybill association information further includes a statistics unit (not shown in the figure), which is specifically used for:
[0221] Based on the association result between the target waybill number and the waybill image to be identified, the waybill number association accuracy of the preset waybill number set is obtained, wherein the association result is used to indicate whether the target waybill number and the waybill image to be identified are correctly associated.
[0222] In practice, each of the above units 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, please refer to the previous method embodiments, which will not be repeated here.
[0223] Because the management device for the waybill-related information can execute this application, as shown in the following... Figures 1 to 6 The steps in the management method of waybill association information in any embodiment can be used to achieve the purpose of this application. Figures 1 to 6 For details on the beneficial effects that the management method for waybill association information in any embodiment can achieve, please refer to the preceding description, which will not be repeated here.
[0224] Furthermore, to better implement the waybill association information management method in this application embodiment, based on the waybill association information management method, this application embodiment also provides an electronic device, see below. Figure 8 , Figure 8This illustration shows a structural diagram of an electronic device according to an embodiment of this application. Specifically, the electronic device provided in this embodiment includes a processor 801, which executes a computer program stored in a memory 802 to implement, for example... Figures 1 to 6 The steps of the management method for waybill association information in any embodiment correspond to the following; or, when the processor 801 executes the computer program stored in the memory 802, it implements the following: Figure 7 The functions of each unit in the corresponding embodiment.
[0225] For example, a computer program may be divided into one or more modules / units, one or more of which are stored in memory 802 and executed by processor 801 to complete the embodiments of this application. One or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in a computer device.
[0226] The electronic device may include, but is not limited to, processor 801 and memory 802. Those skilled in the art will understand that the illustrations are merely examples of an electronic device and do not constitute a limitation on the electronic device. It may include more or fewer components than illustrated, or combine certain components, or different components. For example, the electronic device may also include input / output devices, network access devices, buses, etc., with processor 801, memory 802, input / output devices, and network access devices connected via a bus.
[0227] The processor 801 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the electronic device, connecting various parts of the electronic device through various interfaces and lines.
[0228] The memory 802 can be used to store computer programs and / or modules. The processor 801 implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory 802 and by calling the data stored in the memory 802. The memory 802 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 electronic device (such as audio data, video data, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0229] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described management device, electronic equipment, and its corresponding units for managing waybill-related information can be found by referring to, for example... Figures 1 to 6 The specific details of the management method for waybill association information in any embodiment will not be repeated here.
[0230] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0231] Therefore, embodiments of this application provide a computer-readable storage medium storing a plurality of instructions that can be loaded by a processor to execute the present application. Figures 1 to 6 For the steps in the management method of waybill association information corresponding to any embodiment, please refer to the following for specific operations: Figures 1 to 6 The description of the management method for waybill association information in any embodiment will not be repeated here.
[0232] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0233] Because of the instructions stored in the computer-readable storage medium, the present application can be executed as described above. Figures 1 to 6 The steps in the management method of waybill association information in any embodiment can be used to achieve the purpose of this application. Figures 1 to 6For details on the beneficial effects that the management method for waybill association information in any embodiment can achieve, please refer to the preceding description, which will not be repeated here.
[0234] The foregoing has provided a detailed description of a method, apparatus, electronic device, and computer-readable storage medium for managing waybill associated information according to embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. 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 this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for managing waybill-related information, characterized in that, The method includes: Obtain the image of the waybill to be identified associated with the target waybill number; According to the preset feature extraction parameters, the target feature vector of the waybill image to be identified is extracted. The feature extraction parameters reflect the constraint relationship between multiple images of the same waybill. The feature extraction parameters are learned through the reference image, positive sample image and negative sample image of the sample waybill. The reference image and the positive sample image are images obtained by imaging the same sample waybill twice. The reference image and the negative sample image are images obtained by imaging two different objects respectively. Obtain a reference feature vector of a reference waybill image for the target waybill number. The reference feature vector is extracted from the reference waybill image based on the feature extraction parameters. The reference waybill image is another waybill image associated with the target waybill number. The other waybill image includes at least one waybill image. Based on the reference feature vector and the target feature vector, determine whether the target waybill number is correctly associated with the waybill image to be identified.
2. The method for managing waybill associated information according to claim 1, characterized in that, The reference feature vector of the reference waybill image for obtaining the target waybill number includes: Obtain other waybill images associated with the target waybill number; Based on the feature extraction parameters, feature vectors of the other waybill images are extracted to obtain the reference feature vector.
3. The method for managing waybill associated information according to claim 2, characterized in that, The step of determining whether the target waybill number and the waybill image to be identified are correctly associated based on the reference feature vector and the target feature vector includes: Obtain any two images from the target waybill image set, wherein the target waybill image set includes the other waybill images and the waybill image to be identified, and the any two images include a first image and a second image; Based on the reference feature vector and the target feature vector, obtain the second target distance between the feature vector of the first image and the feature vector of the second image; Based on the second target distance, determine whether any two images are images of the same waybill; When any two images are images of the same waybill, it is determined that the association information of the target waybill number is correct. The correct association information includes that the target waybill number is correctly associated with the image of the waybill to be identified.
4. The method for managing waybill associated information according to claim 3, characterized in that, After determining whether any two images belong to the same waybill based on the second target distance, the method further includes: When any two images are not images of the same waybill, a target waybill image that does not match the other images is determined from the target waybill image set; It was determined that the target waybill number was incorrectly associated with the target waybill image.
5. The method for managing waybill association information according to claim 1, characterized in that, Before extracting the target feature vector of the waybill image to be identified according to preset feature extraction parameters, the method further includes: Obtain the baseline image, positive sample image, and negative sample image of the sample waybill; The first feature vector of the reference image, the second feature vector of the positive sample image, and the third feature vector of the negative sample image are obtained through a preset feature extraction module. Based on the first feature vector, the second feature vector, and the third feature vector, the feature extraction loss value of the preset feature extraction module is determined; Based on the feature extraction loss value, adjust the preset weight parameters of the feature extraction module until the preset training stop condition is met, and obtain the trained feature extraction module. Extract the weight parameters of the trained feature extraction module to serve as the feature extraction parameters.
6. The method for managing waybill associated information according to claim 5, characterized in that, The step of determining the feature extraction loss value of the preset feature extraction module based on the first feature vector, the second feature vector, and the third feature vector includes: Based on the first feature vector and the second feature vector, a first feature distance is obtained between the reference image and the positive sample image; Based on the first feature vector and the third feature vector, a second feature distance is obtained between the reference image and the negative sample image; The feature extraction loss value is determined based on the first feature distance and the second feature distance.
7. The method for managing waybill associated information according to claim 1, characterized in that, The step of determining whether the target waybill number and the waybill image to be identified are correctly associated based on the reference feature vector and the target feature vector includes: Obtain the first target distance between the reference feature vector and the target feature vector; Based on the first target distance, determine whether the image of the waybill to be identified and the image of the reference waybill are images of the same waybill; When the image of the waybill to be identified and the image of the reference waybill are images of the same waybill, it is determined that the target waybill number is correctly associated with the image of the waybill to be identified.
8. The method for managing waybill association information according to claim 1, characterized in that, The method further includes: When the target waybill number is incorrectly associated with the waybill image to be identified, a prompt message indicating that the target waybill number is incorrectly associated with the waybill image to be identified is output to a preset management platform.
9. The method for managing waybill association information according to any one of claims 1-8, characterized in that, The target waybill number is any waybill number in a preset waybill number set, and the method further includes: Based on the association result between the target waybill number and the waybill image to be identified, the waybill number association accuracy of the preset waybill number set is obtained, wherein the association result is used to indicate whether the target waybill number and the waybill image to be identified are correctly associated.
10. A management device for waybill-related information, characterized in that, The management device for the waybill association information includes: The first acquisition unit is used to acquire the image of the waybill to be identified associated with the target waybill number; An extraction unit is used to extract the target feature vector of the waybill image to be identified according to preset feature extraction parameters. The feature extraction parameters reflect the constraint relationship between multiple images of the same waybill. The feature extraction parameters are learned through the reference image, positive sample image and negative sample image of the sample waybill. The reference image and the positive sample image are images obtained by imaging the same sample waybill twice. The reference image and the negative sample image are images obtained by imaging two different objects. The second acquisition unit is used to acquire a reference feature vector of a reference waybill image of the target waybill number. The reference feature vector is obtained by extracting the reference waybill image based on the feature extraction parameters. The reference waybill image is another waybill image associated with the target waybill number. The other waybill image includes at least one waybill image. The identification unit is used to determine whether the target waybill number is correctly associated with the waybill image to be identified, based on the reference feature vector and the target feature vector.
11. An electronic device, characterized in that, It includes a processor and a memory, wherein the memory stores a computer program, and when the processor invokes the computer program in the memory, it executes the management method for waybill association information as described in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, It stores a computer program, which is loaded by a processor to execute the steps in the method for managing waybill associated information as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Method and device for extracting image
CN108898186A
Account opening method and device, equipment and computer readable storage medium
CN110288483A