Weight rechecking method and device, computer equipment and storage medium

By collecting multiple images during the weighing process, identifying and judging the image category and quality, and automatically performing weight review, the problem that express parcels, goods or parcels that have not passed the transfer in the logistics scenario cannot be automatically reviewed, and the accuracy and simplicity of weight review are improved.

CN120236169APending Publication Date: 2025-07-01SF TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311870047.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-30
Publication Date
2025-07-01

Smart Images

  • Figure CN120236169A_ABST
    Figure CN120236169A_ABST
Patent Text Reader

Abstract

The invention relates to a weight rechecking method and device, computer equipment and a storage medium. The method comprises the following steps: acquiring a plurality of uploaded images for rechecking the weight of a target object; the plurality of images are images acquired in the process of weighing the target object; identifying the image category of each image to obtain an image category identification result; the image category identification result comprises a weighing panoramic image, a dial image and a waybill image; performing image quality judgment on the dial image and the waybill image in the plurality of images to obtain a quality judgment result; according to the image category identification result and the quality judgment result, determining whether the uploaded image is compliant or not; if so, identifying the compliant dial plate image to obtain a dial plate reading, and identifying the compliant waybill image to obtain a waybill identifier; and rechecking the weight of the target object according to the waybill identifier and the dial reading. By adopting the method, the accuracy of weight rechecking can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer vision technology, and particularly to a weight verification method, device, computer device, and storage medium. Background Art

[0002] In the logistics scenario, generally, the freight is charged according to the weight of express parcels, goods or packages. When passing through the transfer station, it is necessary to use measurement devices such as DWS in the transfer station for weight verification. If the verified weight does not match the weight originally recorded in the system, the freight difference needs to be charged. However, for express parcels, goods or packages that do not pass through the transfer station, it is impossible to automatically perform weight verification through the measurement devices in the transfer station, but the courier for the last-mile delivery needs to perform manual weight verification. Due to the many uncertainties in manual weight verification, it is difficult to ensure the accuracy of weight verification. Summary of the Invention

[0003] Based on this, in view of the above technical problems, it is necessary to provide a weight verification method, device, computer device, computer-readable storage medium, and computer program product that can improve the accuracy of weight verification.

[0004] In a first aspect, the present application provides a weight verification method. The method includes:

[0005] Obtain multiple uploaded images for weight verification of a target object; the multiple images are images collected during the weighing process of the target object;

[0006] Identify the image categories of each of the images to obtain an image category recognition result; the image category recognition result includes a weighing panoramic image, a dial image, and a waybill image; the weighing panoramic image is an image containing the overall picture of weighing the target object; the dial image is an image containing the dial of the scale being weighed; the waybill image is an image containing the waybill of the target object;

[0007] Judge the image quality of the dial image and the waybill image in the multiple images to obtain a quality judgment result;

[0008] Determine whether the uploaded images are compliant according to the image category recognition result and the quality judgment result;

[0009] If compliant, identify the dial reading from the compliant dial image and identify the waybill identifier from the compliant waybill image;

[0010] Verify the weight of the target object according to the waybill identifier and the dial reading.

[0011] In one embodiment, identifying the image categories of the images to obtain an image category recognition result includes:

[0012] For each of the images, performing image detection on the image to obtain an image detection result of the image; the image detection result includes at least one of a weighing panorama, a dial, and a waybill;

[0013] Determining the image category of the image according to the image detection result to obtain the image category recognition result of the image.

[0014] In one embodiment, determining the image category of the image according to the image detection result to obtain the image category recognition result of the image includes at least one of the following:

[0015] If the image detection result contains both the weighing panorama and the dial, determining the image category of the image as a weighing panorama image;

[0016] If the image detection result only contains the dial and does not contain the weighing panorama and the waybill, determining the image category of the image as a dial image;

[0017] If the image detection result only contains the waybill and does not contain the weighing panorama and the dial, determining the image category of the image as a waybill image.

[0018] In one embodiment, performing image quality judgment on the dial images and waybill images in the multiple images to obtain a quality judgment result includes:

[0019] Inputting the dial images and waybill images in the multiple images into a pre-trained quality judgment model respectively to output a quality judgment result;

[0020] Wherein, the quality judgment model is a classification model pre-trained based on positive samples and negative samples; the negative samples include samples obtained by performing motion blur processing on the positive samples.

[0021] In one embodiment, determining whether the uploaded images are compliant according to the image category recognition result and the quality judgment result includes:

[0022] If the image category recognition result indicates that the multiple uploaded images include a weighing panorama image, a dial image, and a waybill image, and the quality judgment result indicates that the image quality of the dial image and the waybill image is clear and the image content is complete, determining that the uploaded images are compliant.

[0023] In one embodiment, rechecking the weight of the target object according to the waybill identifier and the dial reading includes:

[0024] Compare the waybill identifier with the waybill identifier corresponding to the target object recorded in the system;

[0025] If the waybill identifiers match, compare the dial indication with the weight of the target object recorded in the system to obtain a weight verification result.

[0026] In one embodiment, determining whether the uploaded image is compliant according to the image category recognition result and the quality judgment result includes:

[0027] Determine whether the uploaded image is compliant according to the image category recognition result and the quality judgment result, and obtain a preliminarily compliant weighing panoramic image, dial image, and waybill image;

[0028] After determining whether the uploaded image is compliant according to the image category recognition result and the quality judgment result, the method further includes:

[0029] Extract feature vectors from the image content corresponding to the dial area in the preliminarily compliant weighing panoramic image to obtain a first feature vector, and extract feature vectors from the image content corresponding to the waybill area in the preliminarily compliant weighing panoramic image to obtain a second feature vector;

[0030] Extract a third feature vector from the image content corresponding to the dial area in the preliminarily compliant dial image;

[0031] Extract a fourth feature vector from the image content corresponding to the waybill area in the preliminarily compliant waybill image;

[0032] Calculate a first similarity between the first feature vector and the third feature vector, and a second similarity between the second feature vector and the fourth feature vector;

[0033] According to the first similarity and the second similarity, perform an advanced compliance judgment on the preliminarily compliant images to obtain compliant weighing panoramic images, dial images, and waybill images, execute identifying the compliant dial image to obtain the dial indication, and identify the compliant waybill image to obtain the waybill identifier.

[0034] In a second aspect, the present application also provides a weight verification device. The device includes:

[0035] An image acquisition module, configured to acquire multiple uploaded images for weight verification of a target object; the multiple images are images acquired during the weighing process of the target object;

[0036] An image category recognition module, configured to recognize the image category of each of the images to obtain an image category recognition result; the image category recognition result includes a weighing panoramic image, a dial image, and a waybill image; the weighing panoramic image is an image including the overall picture of weighing the target object; the dial image is an image including the dial of the scale being weighed; the waybill image is an image including the waybill of the target object.

[0037] An image quality judgment module, configured to judge the image quality of the dial image and the waybill image in the multiple images to obtain a quality judgment result.

[0038] An image compliance judgment module, configured to determine whether the uploaded images are compliant according to the image category recognition result and the quality judgment result.

[0039] A character recognition module, configured to, if compliant, recognize the compliant dial image to obtain the dial reading and recognize the compliant waybill image to obtain the waybill identifier.

[0040] A weight verification module, configured to verify the weight of the target object according to the waybill identifier and the dial reading.

[0041] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor. A computer program is stored in the memory. When the computer program is executed by the processor, the processor executes the steps in the weight verification method described in each embodiment of the present application.

[0042] In a fourth aspect, the present application further provides a computer-readable storage medium. On the computer-readable storage medium, a computer program is stored. When the computer program is executed by a processor, the processor executes the steps in the weight verification method described in each embodiment of the present application.

[0043] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program. When the computer program is executed by a processor, the processor executes the steps in the weight verification method described in each embodiment of the present application.

[0044] The above weight verification method, device, computer device, storage medium and computer program product obtain multiple uploaded images for weight verification of a target object, identify the image categories of each image to obtain an image category recognition result, where the image category recognition result includes a weighing panoramic image, a dial image and a waybill image, perform image quality judgment on the dial image and the waybill image in the multiple images to obtain a quality judgment result, and determine whether the uploaded images are compliant according to the image category recognition result and the quality judgment result. If compliant, identify the compliant dial image to obtain the dial reading, and identify the compliant waybill image to obtain the waybill identifier, and verify the weight of the target object according to the waybill identifier and the dial reading, thereby realizing automatic weight verification based on the multiple uploaded images only by taking and uploading multiple images, and ensuring the compliance of the images by determining whether the uploaded images are compliant according to the image category recognition result and the quality judgment result, thereby improving the accuracy of weight verification. Description of the Drawings

[0045] Figure 1 It is an application environment diagram of the weight verification method in an embodiment;

[0046] Figure 2 It is a flowchart of the weight verification method in an embodiment;

[0047] Figure 3 It is an overall flowchart of the weight verification method in an embodiment;

[0048] Figure 4 It is a labeling diagram of the first sample image in an embodiment;

[0049] Figure 5 It is a labeling diagram of the second sample image in an embodiment;

[0050] Figure 6 It is a structural block diagram of the weight verification device in an embodiment;

[0051] Figure 7 It is an internal structure diagram of a computer device in an embodiment. Detailed Implementation Modes

[0052] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0053] The weight verification method provided in the embodiments of the present application can be applied to, for example Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. During the process of weighing the target object using a scale, the weighing personnel can use the terminal 102 to collect multiple images, and the terminal 102 can upload the multiple images to the server 104. The server 104 can execute the weight verification method in each embodiment of the present application to automatically perform weight verification based on the uploaded multiple images. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. The portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers.

[0054] In other embodiments, the terminal 102 can also independently execute the weight verification method in each embodiment of the present application without transmitting the images to the server for execution.

[0055] In some embodiments, such as Figure 2 shown, a weight verification method is provided. Taking the method applied to Figure 1 the server 104 therein as an example for illustration, it includes the following steps:

[0056] Step 202, obtain multiple images uploaded for weight verification of the target object; the multiple images are images collected during the process of weighing the target object.

[0057] Among them, the target object is the object that needs to be weight-verified. Weight verification refers to re-weighing the target object to verify whether the weight of the target object originally recorded in the system is true and valid.

[0058] In some embodiments, the target object can be an express delivery, parcel, or goods in logistics, etc.

[0059] In some embodiments, the verification personnel can weigh the target object using a scale and collect multiple images using the terminal while weighing, and the terminal uploads the multiple images to the server.

[0060] In some embodiments, if the number of uploaded images is greater than or equal to 2, step 204 and subsequent steps are executed. If the number is less than 2, a prompt message indicating that the number of images is insufficient is output.

[0061] Step 204: Identify the image categories of each image to obtain the image category recognition result. The image category recognition result includes a weighing panoramic image, a dial image, and a waybill image. The weighing panoramic image is an image that includes the overall picture of weighing the target object. The dial image is an image that includes the dial of the scale being weighed. The waybill image is an image that includes the waybill of the target object.

[0062] In some embodiments, the weighing panoramic image may at least include a scale and a target object.

[0063] In some embodiments, the dial image may at least include the dial of the scale being weighed. In some other embodiments, the dial image may include the dial and the entire scale being weighed.

[0064] In some embodiments, the waybill image at least includes the waybill of the target object. In some other embodiments, the waybill image may include the waybill and the entire target object.

[0065] Step 206: Perform image quality judgment on the dial images and waybill images in the multiple images to obtain the quality judgment result.

[0066] In some embodiments, the image quality judgment is a process for judging whether the image is clear and whether the content in the image is complete. The quality judgment result of the dial image is used to represent whether the dial image is clear and whether the dial in the dial image is complete. The quality judgment result of the waybill image is used to represent whether the waybill image is clear and whether the waybill in the waybill image is complete.

[0067] In some embodiments, the server may first crop the dial images and waybill images in the multiple images to obtain a first image and a second image, then perform image quality judgment on the first image and the second image to obtain the quality judgment result, and then execute Step 210 based on the compliant first image and second image. The first image is an image obtained by cropping the dial area from the dial image. The second image is an image obtained by cropping the waybill area from the waybill image.

[0068] Step 208: Determine whether the uploaded images are compliant according to the image category recognition result and the quality judgment result.

[0069] In some embodiments, if they are compliant, then execute Step 210; if not, the server may output a non-compliant prompt message to the terminal. In some embodiments, if not compliant, the server may also output the reason for non-compliance to the terminal to prompt the weighing personnel to supplement compliant images.

[0070] Step 210: If they are compliant, then identify the compliant dial image to obtain the dial reading, and identify the compliant waybill image to obtain the waybill identifier.

[0071] Among them, the dial indication represents the weight of the target object weighed. The waybill identifier is used to uniquely represent the waybill of the target object. For example, the waybill identifier can be the waybill number.

[0072] In some embodiments, among the multiple uploaded images, there may be a dial image and a waybill image. If it is determined to be compliant, the server can recognize the dial image and the waybill image to obtain the dial indication and the waybill identifier. In other embodiments, among the multiple uploaded images, there may also be multiple dial images and / or multiple waybill images. The server can determine the compliant dial images and compliant waybill images from the multiple dial images and multiple waybill images, and recognize the compliant dial images and compliant waybill images to obtain the dial indication and the waybill identifier.

[0073] In some embodiments, the server can use OCR (Optical Character Recognition) technology to recognize the compliant dial image to obtain the dial indication.

[0074] In some embodiments, the server can recognize the graphic code on the waybill in the compliant waybill image to obtain the waybill identifier. The graphic code can be a one-dimensional code or a two-dimensional code, etc. In some embodiments, the server can use the zbar algorithm (an open-source library for graphic code scanning) to recognize the graphic code.

[0075] Step 212: Recheck the weight of the target object according to the waybill identifier and the dial indication.

[0076] In some embodiments, the server can compare the waybill identifier with the waybill identifier corresponding to the target object recorded in the system. If the waybill identifiers match, then compare the dial indication with the weight of the target object recorded in the system to obtain the weight recheck result.

[0077] As Figure 3 shown, it is a schematic diagram of the overall process of the weight compliance method. The weighing personnel use the terminal to take and upload multiple images. If the number of images is less than 2, a result of insufficient number of images is returned. If the number of images is greater than or equal to 2, the image categories (weighing panorama, dial, and waybill) are determined through the detection network, and then the classification network is used to determine whether the dial image and the waybill image are clear and complete. Then, the results of the detection network and the classification network are integrated, and a result of image compliance or non-compliance and the reasons for non-compliance are returned. Finally, the waybill image and the dial image are recognized through the character recognition network to obtain the waybill identifier and the dial indication.

[0078] The above weight verification method obtains multiple uploaded images for weight verification of a target object, identifies the image categories of each image to obtain an image category recognition result, where the image category recognition result includes a weighing panoramic image, a dial image, and a waybill image. It judges the image quality of the dial image and the waybill image in the multiple images to obtain a quality judgment result. According to the image category recognition result and the quality judgment result, it determines whether the uploaded images are compliant. If compliant, it identifies the compliant dial image to obtain the dial reading and identifies the compliant waybill image to obtain the waybill identifier, and verifies the weight of the target object based on the waybill identifier and the dial reading. Thus, it realizes that only by taking and uploading multiple images can the weight be automatically verified according to the uploaded multiple images. Moreover, by determining whether the uploaded images are compliant based on the image category recognition result and the quality judgment result, the compliance of the images can be ensured, thereby improving the accuracy of weight verification. In addition, adopting a three-level cascade architecture, using vision algorithms to analyze the uploaded images, weight verification is achieved without additional hardware overhead, with simple application and resource savings.

[0079] In some embodiments, identifying the image categories of each image to obtain an image category recognition result includes: for each image respectively, performing image detection on the image to obtain an image detection result of the image; the image detection result includes at least one of weighing panorama, dial, and waybill; determining the image category of the image according to the image detection result to obtain the image category recognition result of the image.

[0080] Among them, the weighing panorama includes a scale and a target object.

[0081] In some embodiments, the server can input each image into a pre-trained image detection model respectively to output an image detection result.

[0082] In some embodiments, it can be pre-annotated in the manner as Figure 4 shown for each first sample image used to train the image detection model. The weighing panorama, dial, and waybill in each first sample image are annotated. Whether the dial reading is clear and complete or the text on the waybill is clear and complete, they can all be annotated. Among them, the weighing panorama can be a platform scale + weighing object, an electronic scale + weighing object, or a hand scale + weighing object, etc. The dial can be a hand scale dial, a platform scale dial, or an electronic scale dial, etc. The server can perform model training based on the annotated first sample images to obtain a trained image detection model.

[0083] In some embodiments, the image detection model can be a yolo series model such as yolov8 or a model of the transformer architecture series. If using a yolo series model, multiscale needs to be turned off.

[0084] In some embodiments, if the image detection result contains a weighing panorama, the image category of the image is determined to be a weighing panorama image; if the image detection result only contains a dial and does not contain a weighing panorama and a waybill, the image category of the image is determined to be a dial image; if the image detection result only contains a waybill and does not contain a weighing panorama and a dial, the image category of the image is determined to be a waybill image.

[0085] In some embodiments, the image detection result may further contain interfering objects other than the scale and the target object. The server may determine whether the interfering object is located on the scale surface or the target object. If so, a prompt message indicating an incorrect weighing method is output; if not, the steps of determining the image category of the image according to the image detection result to obtain the image category recognition result of the image and subsequent steps are continued.

[0086] In the above embodiments, for each image, image detection is performed on the image to obtain the image detection result of the image. The image detection result includes at least one of a weighing panorama, a dial, and a waybill. Then, the image category of the image is determined according to the image detection result to obtain the image category recognition result of the image, and the image category can be accurately determined according to the result detected in the image.

[0087] In some embodiments, determining the image category of the image according to the image detection result to obtain the image category recognition result of the image includes at least one of the following: if the image detection result contains both a weighing panorama and a dial, the image category of the image is determined to be a weighing panorama image; if the image detection result only contains a dial and does not contain a weighing panorama and a waybill, the image category of the image is determined to be a dial image; if the image detection result only contains a waybill and does not contain a weighing panorama and a dial, the image category of the image is determined to be a waybill image.

[0088] It can be understood that in the experimental stage, by analyzing the training inference result, it is found that the detection accuracy of the model for the weighing panorama is relatively poor because the model tends to detect an image that does not contain a dial but only contains a weighing object as a weighing panorama. The reason is that the weighing object accounts for a relatively large proportion in the annotation box of the weighing panorama, and the model will extract the feature vector of the weighing object when performing image feature extraction. To solve this problem and improve the overall process accuracy, in this embodiment, combined with the business logic, when the model infers, it is defined that if the image detection result only contains a weighing panorama and does not contain a dial, the image category of the image will not be determined as a weighing panorama image, and only when the image detection result contains both a weighing panorama and a dial will the image category of the image be determined as a weighing panorama image.

[0089] In the above embodiments, if the image detection result only includes the weighing panorama and does not include the dial, the image category of the image will not be the weighing panorama image. Only when the image detection result includes both the weighing panorama and the dial will the image category of the image be determined as the weighing panorama image, which improves the accuracy of identifying the weighing panorama image.

[0090] In some embodiments, the image quality of the dial images and waybill images in multiple images is judged to obtain a quality judgment result, including: inputting the dial images and waybill images in multiple images into a pre-trained quality judgment model respectively, and outputting the quality judgment result; wherein, the quality judgment model is a classification model pre-trained based on positive samples and negative samples; the negative samples include the samples obtained by performing motion blur processing on the positive samples.

[0091] In some embodiments, the dial area and the waybill area can be cropped to obtain multiple second sample images for training the quality judgment model. Then, each second sample image is labeled according to the Figure 5 annotation method shown. The server can perform model training according to the labeled second sample images to obtain a trained quality judgment model.

[0092] In some embodiments, the second sample images include positive samples and negative samples. A positive sample refers to an image with clear and complete image content. A negative sample refers to an image with unclear or incomplete image content.

[0093] In some embodiments, the negative samples can include directly captured images or sample images obtained by performing motion blur processing on positive samples.

[0094] It can be understood that in the actual operation process, by counting the number of complete and clear images and the number of incomplete or unclear images in the statistical data, it is found that the former accounts for a relatively large proportion, and the styles of incomplete or unclear images are diverse and not easy to perform feature learning. Therefore, data augmentation is adopted to increase the diversity of negative samples, and data augmentation methods such as RandomClip (random cropping), CenterClip (central clipping), rotation, or motion blur are used to batch increase the amount of incomplete and unclear image data. Note that in this process, the situations that occur during actual photography need to be simulated. In this business scenario, most of the blurs that occur in images are motion blurs rather than other blurs. Therefore, obtaining negative samples by performing motion blur processing on positive samples is more in line with the actual situation.

[0095] In some embodiments, the classification model can use an efficient-net series model, a ViT model, or a transformer architecture series model, etc.

[0096] In the above embodiments, a classification model is pre-trained based on positive samples and negative samples for image quality judgment. The negative samples include samples obtained by performing motion blur processing on the positive samples, so as to expand the data volume of the negative samples, increase the diversity of the training samples, and further improve the accuracy of the trained quality judgment model.

[0097] In some embodiments, according to the image category recognition result and the quality judgment result, it is determined whether the uploaded image is compliant, including: if the image category recognition result indicates that the uploaded multiple images include a weighing panoramic image, a dial image, and a waybill image, and the quality judgment result indicates that the image quality of the dial image and the waybill image is clear and the image content is complete, then it is determined that the uploaded image is compliant.

[0098] In the above embodiments, if the uploaded multiple images include a weighing panoramic image, a dial image, and a waybill image, and the quality judgment result indicates that the image quality of the dial image and the waybill image is clear and the image content is complete, then it is determined that the uploaded image is compliant, so as to ensure the compliance of the weighing process and improve the accuracy of weight verification.

[0099] In some embodiments, according to the waybill identifier and the dial indication, the weight of the target object is verified, including: comparing the waybill identifier with the waybill identifier corresponding to the target object recorded in the system; if the waybill identifier comparison is consistent, then comparing the dial indication with the weight of the target object recorded in the system to obtain a weight verification result.

[0100] In some embodiments, if the waybill identifier comparison is inconsistent, a prompt message indicating that the waybills are inconsistent is output.

[0101] In some embodiments, if the waybill identifier comparison is consistent, then comparing the dial indication with the weight of the target object recorded in the system. If the difference between the dial indication and the weight of the target object recorded in the system is greater than or equal to a preset difference threshold, it is determined that the weight verification result is weight mismatch. If the difference between the dial indication and the weight of the target object recorded in the system is less than the preset difference threshold, it is determined that the weight verification result is weight match.

[0102] In some embodiments, if the weight verification result is weight mismatch, the server may initiate a freight verification and freight recovery process for the logistics order of the target object.

[0103] In the above embodiments, comparing the waybill identifier with the waybill identifier corresponding to the target object recorded in the system. If the waybill identifier comparison is consistent, then comparing the dial indication with the weight of the target object recorded in the system to obtain a weight verification result, which can perform weight verification efficiently and accurately.

[0104] In some embodiments, determining whether the uploaded images are compliant according to the image category recognition result and the quality judgment result includes: determining whether the uploaded images are compliant according to the image category recognition result and the quality judgment result, and obtaining the preliminarily compliant weighing panoramic image, dial image, and waybill image; after determining whether the uploaded images are compliant according to the image category recognition result and the quality judgment result, the method further includes: extracting features from the image content corresponding to the dial area in the preliminarily compliant weighing panoramic image to obtain a first feature vector, and extracting features from the image content corresponding to the waybill area in the preliminarily compliant weighing panoramic image to obtain a second feature vector; extracting features from the image content corresponding to the dial area in the preliminarily compliant dial image to obtain a third feature vector; extracting features from the image content corresponding to the waybill area in the preliminarily compliant waybill image to obtain a fourth feature vector; calculating a first similarity between the first feature vector and the third feature vector, and a second similarity between the second feature vector and the fourth feature vector; according to the first similarity and the second similarity, performing an advanced compliance judgment on the preliminarily compliant images to obtain compliant weighing panoramic images, dial images, and waybill images, and performing the operation of recognizing the compliant dial image to obtain the dial reading, and recognizing the compliant waybill image to obtain the waybill identifier.

[0105] In some embodiments, the server may calculate the cosine similarity between the first feature vector and the third feature vector to obtain the first similarity, and calculate the cosine similarity between the second feature vector and the fourth feature vector to obtain the second similarity.

[0106] In some embodiments, if the first similarity is greater than or equal to the first similarity threshold and the second similarity is greater than or equal to the second similarity threshold, the advanced compliance judgment of the preliminarily compliant images passes.

[0107] In some embodiments, when the number of uploaded images is greater than 3, the server may further screen the compliant weighing panoramic images, dial images, and waybill images from the compliant images according to the first similarity and the second similarity, perform the operation of recognizing the compliant dial image to obtain the dial reading, and recognize the compliant waybill image to obtain the waybill identifier. For example: If 5 images are uploaded and the image quality is judged to be clear and complete, then further screen the 3 images (weighing panoramic image, dial image, and waybill image) with the highest similarity according to the similarity for advanced screening, perform the operation of recognizing the compliant dial image to obtain the dial reading, and recognize the compliant waybill image to obtain the waybill identifier.

[0108] In the above embodiments, the similarity between the feature vectors of the area of the dial in the panoramic image and the feature vectors of the area of the dial in the dial image, and the similarity between the feature vectors of the area of the waybill in the panoramic image and the feature vectors of the area of the waybill in the waybill image are calculated to further determine whether the image is compliant, which can ensure that each uploaded image is from the same weighing process and improve the accuracy of weight verification.

[0109] It should be understood that although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the arrows, these steps do not necessarily need to be executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages. These steps or stages do not necessarily need to be executed at the same moment, but can be executed at different moments. The execution order of these steps or stages does not necessarily need to be sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.

[0110] Based on the same inventive concept, the embodiments of the present application also provide a weight verification device for implementing the weight verification method involved above. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the weight verification device provided below can refer to the limitations on the weight verification method in the above text and will not be repeated here.

[0111] In some embodiments, as Figure 6 shown, a weight verification device 600 is provided, including: an image acquisition module 602, an image category recognition module 604, an image quality judgment module 606, an image compliance judgment module 608, a character recognition module 610, and a weight verification module 612, where:

[0112] The image acquisition module 602 is configured to acquire multiple uploaded images for weight verification of a target object; the multiple images are images acquired during the weighing process of the target object.

[0113] The image category recognition module 604 is configured to recognize the image category of each image to obtain an image category recognition result; the image category recognition result includes a weighing panoramic image, a dial image, and a waybill image; the weighing panoramic image is an image containing the overall picture of weighing the target object; the dial image is an image containing the dial of the scale being weighed; the waybill image is an image containing the waybill of the target object.

[0114] An image quality judgment module 606 is configured to perform image quality judgment on the dial images and waybill images in multiple images to obtain a quality judgment result.

[0115] An image compliance judgment module 608 is configured to determine whether the uploaded images are compliant according to the image category recognition result and the quality judgment result.

[0116] A character recognition module 610 is configured to, if compliant, recognize the compliant dial image to obtain the dial indication number, and recognize the compliant waybill image to obtain the waybill identifier.

[0117] A weight verification module 612 is configured to verify the weight of the target object according to the waybill identifier and the dial indication number.

[0118] In some embodiments, the image category recognition module 604 is further configured to perform image detection on each image respectively to obtain an image detection result of the image; the image detection result includes at least one of a weighing panorama, a dial, and a waybill; and determine the image category of the image according to the image detection result to obtain the image category recognition result of the image.

[0119] In some embodiments, the image category recognition module 604 is further configured to perform at least one of the following: if the image detection result contains both a weighing panorama and a dial, determine that the image category of the image is a weighing panorama image; if the image detection result only contains a dial and does not contain a weighing panorama and a waybill, determine that the image category of the image is a dial image; if the image detection result only contains a waybill and does not contain a weighing panorama and a dial, determine that the image category of the image is a waybill image.

[0120] In some embodiments, the image quality judgment module 606 is further configured to respectively input the dial images and waybill images in multiple images into a pre-trained quality judgment model, and output a quality judgment result; wherein, the quality judgment model is a classification model pre-trained based on positive samples and negative samples; the negative samples include samples obtained by performing motion blur processing on the positive samples.

[0121] In some embodiments, the image compliance judgment module 608 is further configured to determine that the uploaded images are compliant if the image category recognition result indicates that the uploaded multiple images include a weighing panorama image, a dial image, and a waybill image, and the quality judgment result indicates that the image quality of the dial image and the waybill image is clear and the image content is complete.

[0122] In some embodiments, the weight verification module 612 is further configured to compare the waybill identifier with the waybill identifier corresponding to the target object recorded in the system; if the waybill identifier comparison is consistent, compare the dial indication number with the weight of the target object recorded in the system to obtain a weight verification result.

[0123] In some embodiments, the image compliance judgment module 608 is further configured to determine whether the uploaded images are compliant according to the image category recognition result and the quality judgment result, and obtain the initially compliant weighing panoramic image, dial image, and waybill image; extract the feature vector of the image content corresponding to the dial area in the initially compliant weighing panoramic image to obtain the first feature vector, and extract the feature vector of the image content corresponding to the waybill area in the initially compliant weighing panoramic image to obtain the second feature vector; extract the feature vector of the image content corresponding to the dial area in the initially compliant dial image to obtain the third feature vector; extract the feature vector of the image content corresponding to the waybill area in the initially compliant waybill image to obtain the fourth feature vector; calculate the first similarity between the first feature vector and the third feature vector, and the second similarity between the second feature vector and the fourth feature vector; according to the first similarity and the second similarity, perform an advanced compliance judgment on the initially compliant images to obtain the compliant weighing panoramic image, dial image, and waybill image, execute the recognition of the compliant dial image to obtain the dial reading, and recognize the compliant waybill image to obtain the waybill identifier.

[0124] The above weight verification device acquires multiple uploaded images for weight verification of a target object, recognizes the image categories of the respective images to obtain an image category recognition result, where the image category recognition result includes a weighing panoramic image, a dial image, and a waybill image, performs an image quality judgment on the dial image and the waybill image among the multiple images to obtain a quality judgment result, determines whether the uploaded images are compliant according to the image category recognition result and the quality judgment result, and if compliant, recognizes the compliant dial image to obtain the dial reading, and recognizes the compliant waybill image to obtain the waybill identifier, and verifies the weight of the target object according to the waybill identifier and the dial reading, thereby realizing that only by taking and uploading multiple images can the weight be automatically verified according to the uploaded multiple images, and by determining whether the uploaded images are compliant according to the image category recognition result and the quality judgment result, the compliance of the images can be ensured, thereby improving the accuracy of weight verification.

[0125] Each module in the above weight verification device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory of the computer device in the form of software, so as to facilitate the processor to call and execute the operations corresponding to the above respective modules.

[0126] In one embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 7As shown. The computer device includes a processor, a memory, and a network interface connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the computer device is used to store weight data. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, it implements a weight verification method.

[0127] Those skilled in the art can understand that Figure 7 the structure shown in is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0128] In one embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the steps in the above method embodiments are implemented.

[0129] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by the processor, the steps in the above method embodiments are implemented.

[0130] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by the processor, the steps in the above method embodiments are implemented.

[0131] It should be noted that the data involved in this application (including but not limited to data for analysis, stored data, displayed data, etc.) are all data authorized by the user or fully authorized by all parties.

[0132] Those of ordinary skill in the art can understand that all or part of the processes in the above-described embodiment methods can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above-described method embodiments. Among them, any reference to a memory, database, or other medium used in the various embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tapes, floppy disks, flash memories, optical memories, high-density embedded non-volatile memories, resistive random access memories (ReRAM), magnetoresistive random access memories (MRAM), ferroelectric random access memories (FRAM), phase change memories (PCM), graphene memories, etc. Volatile memories can include random access memory (RAM) or external cache memories, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the various embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the various embodiments provided in the present application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logics, data processing logics based on quantum computing, etc., without limitation.

[0133] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

[0134] The above-described embodiments merely represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A weight verification method, characterized in that, The method includes: Obtaining multiple uploaded images for weight verification of a target object; the multiple images are images collected during the weighing process of the target object; Identifying the image categories of each of the images to obtain an image category recognition result; the image category recognition result includes a weighing panoramic image, a dial image, and a waybill image; the weighing panoramic image is an image containing the overall picture of weighing the target object; the dial image is an image containing the dial of the scale being weighed; the waybill image is an image containing the waybill of the target object; Judging the image quality of the dial images and waybill images in the multiple images to obtain a quality judgment result; Determining whether the uploaded images are compliant according to the image category recognition result and the quality judgment result; If compliant, identifying the compliant dial image to obtain the dial reading, and identifying the compliant waybill image to obtain the waybill identifier; Verifying the weight of the target object according to the waybill identifier and the dial reading.

2. The method according to claim 1, characterized in that The identifying the image categories of each of the images to obtain an image category recognition result includes: For each of the images, performing image detection on the image to obtain an image detection result of the image; the image detection result includes at least one of a weighing panorama, a dial, and a waybill; Determining the image category of the image according to the image detection result to obtain the image category recognition result of the image.

3. The method according to claim 2, characterized in that, The determining the image category of the image according to the image detection result to obtain the image category recognition result of the image includes at least one of the following: If the image detection result contains both the weighing panorama and the dial, determining the image category of the image as a weighing panoramic image; If the image detection result only contains the dial and does not contain the weighing panorama and the waybill, determining the image category of the image as a dial image; If the image detection result only contains the waybill and does not contain the weighing panorama and the dial, determining the image category of the image as a waybill image.

4. The method according to claim 1, wherein The judging the image quality of the dial images and waybill images in the multiple images to obtain a quality judgment result includes: Inputting the dial images and waybill images in the multiple images into a pre-trained quality judgment model respectively to output a quality judgment result; Wherein, the quality judgment model is a classification model pre-trained based on positive samples and negative samples; the negative samples include samples obtained by performing motion blur processing on the positive samples.

5. The method according to any one of claims 1 to 4, characterized in that, The determining whether the uploaded images are compliant according to the image category recognition result and the quality judgment result includes: If the image category recognition result indicates that the multiple uploaded images include a weighing panoramic image, a dial image, and a waybill image, and the quality judgment result indicates that the image quality of the dial image and the waybill image is clear and the image content is complete, determining that the uploaded images are compliant.

6. The method according to any one of claims 1 to 4, characterized in that, The verifying the weight of the target object according to the waybill identifier and the dial reading includes: Comparing the waybill identifier with the waybill identifier corresponding to the target object recorded in the system; If the waybill identifiers match, then compare the dial indication with the weight of the target object recorded in the system to obtain a weight verification result.

7. The method according to any one of claims 1 to 4, characterized in that, Determining whether the uploaded image is compliant based on the image category recognition result and the quality judgment result includes: Based on the image category recognition result and the quality judgment result, determine whether the uploaded image is compliant, and obtain a preliminarily compliant weighing panoramic image, dial image, and waybill image; After determining whether the uploaded image is compliant based on the image category recognition result and the quality judgment result, the method further includes: Extract feature vectors from the image content corresponding to the dial area in the preliminarily compliant weighing panoramic image to obtain a first feature vector, and extract feature vectors from the image content corresponding to the waybill area in the preliminarily compliant weighing panoramic image to obtain a second feature vector; Extract feature vectors from the image content corresponding to the dial area in the preliminarily compliant dial image to obtain a third feature vector; Extract feature vectors from the image content corresponding to the waybill area in the preliminarily compliant waybill image to obtain a fourth feature vector; Calculate the first similarity between the first feature vector and the third feature vector, and the second similarity between the second feature vector and the fourth feature vector; Based on the first similarity and the second similarity, perform an advanced compliance judgment on the preliminarily compliant images to obtain compliant weighing panoramic images, dial images, and waybill images, execute identifying the compliant dial image to obtain the dial indication, and identify the compliant waybill image to obtain the waybill identifier.

8. A weight verification device, characterized in that, The device includes: An image acquisition module for acquiring multiple uploaded images for weight verification of a target object; the multiple images are images acquired during the weighing process of the target object; An image category recognition module for identifying the image category of each of the images to obtain an image category recognition result; the image category recognition result includes a weighing panoramic image, a dial image, and a waybill image; the weighing panoramic image is an image containing the overall picture of weighing the target object; the dial image is an image containing the dial of the scale being weighed; the waybill image is an image containing the waybill of the target object; An image quality judgment module for performing image quality judgment on the dial image and the waybill image in the multiple images to obtain a quality judgment result; An image compliance judgment module for determining whether the uploaded image is compliant based on the image category recognition result and the quality judgment result; A character recognition module for, if compliant, identifying the compliant dial image to obtain the dial indication and identifying the compliant waybill image to obtain the waybill identifier; A weight verification module for verifying the weight of the target object based on the waybill identifier and the dial indication.

9. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 7.