Deliver express sheet supplementary printing method, device and equipment and storage medium
By preprocessing and multi-dimensional data verification of the face sheet images, the problem of damaged face sheets or loss of information is solved, and flexible query and efficient face sheet re-tuning for couriers is realized, which improves transportation efficiency and customer satisfaction.
Patent Information
- Application Number
- CN202510524868.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2025-08-08
AI Technical Summary
In the prior art, damaged page orders or lost information make couriers unable to flexibly query package information, which reduces transportation efficiency, extends the package stagnation time, increases the possibility of loss, and reduces customer satisfaction.
By obtaining the image information of the face sheet for preprocessing, the waybill number fragment is extracted using edge detection and CNN character segmentation model, the barcode is decoded in combination with the ZBar algorithm, and multi-dimensional data verification is performed to generate a printable face sheet data file.
It has enabled couriers to query parcel information based on barcodes or waybill numbers, which has improved transportation efficiency, shortened package stagnation time, reduced the possibility of loss, and improved customer satisfaction.
Smart Images

Figure CN120451995A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information processing technology, and in particular to a method, device, equipment and storage medium for reprinting a courier's waybill. Background Art
[0002] Currently in the logistics industry, in the event of damaged waybills or loss of waybill information during dispatch, transportation, and delivery, operators need to report the anomaly, and the corresponding management personnel will reprint the waybill through the PC and paste it on the package. The entire process is not flexible and time-consuming. It does not support couriers to query package information and reprint the waybill based on the barcode or waybill number in the collection and delivery APP. While waiting for the management personnel to reprint the waybill, the express delivery efficiency is reduced, the package stagnation time is prolonged, and it is easy to cause the package to be lost, which reduces customer satisfaction. Summary of the Invention
[0003] In order to overcome the shortcomings of the existing technology, the purpose of the present invention is to provide a method, device, equipment and storage medium for couriers to reprint waybills, which can support couriers to query the complete information of the package according to the barcode or the waybill number and reprint the waybill, thereby improving the efficiency of express transportation and delivery, shortening the package stagnation time, significantly reducing the possibility of package loss and improving customer satisfaction.
[0004] The first aspect of the present invention provides a method for couriers to reprint waybills, comprising: obtaining waybill image information, preprocessing the waybill image information to obtain anti-blur image enhancement information; detecting character edges of the anti-blur image enhancement information based on an edge detection algorithm, and determining an image area containing characters based on the character edges; inputting the image area into a preset CNN character segmentation model for character segmentation to obtain a residual waybill number fragment, and decoding the image area using a ZBar algorithm to obtain a barcode decoding result; transmitting the barcode decoding result and the residual waybill number fragment to a cloud database through an AES-256 encryption protocol, and using a distributed index optimization algorithm in the cloud database to query the complete package information corresponding to the barcode decoding result and the residual waybill number fragment; performing multi-dimensional data cross-validation on the complete package information to obtain a verification result, and when the verification result passes, generating a printable waybill data file based on the complete package information.
[0005] Optionally, in a first implementation method of the first aspect of the present invention, the acquiring of face order image information and preprocessing of the face order image information to obtain anti-blur image enhancement information include: acquiring face order image information; using a frequency domain filtering algorithm to remove blur noise in the face order image information to obtain face order image denoising information; using a sharpening filtering algorithm to enhance the clarity of the face order image denoising information to obtain face order image clarity enhancement information; using an adaptive histogram equalization algorithm to enhance the contrast of the face order image clarity enhancement information to obtain anti-blur image enhancement information.
[0006] Optionally, in a second implementation of the first aspect of the present invention, the edge detection algorithm is used to detect the character edges of the anti-blurred image enhancement information, and the image area containing the characters is determined based on the character edges, including: grayscale processing of the anti-blurred image enhancement information to obtain grayscale image information; detecting the character edges of the grayscale image information based on the edge detection algorithm; and determining the image area containing the characters based on the character edges.
[0007] Optionally, in a third implementation method of the first aspect of the present invention, the image area is input into a preset CNN character segmentation model for character segmentation to obtain a residual waybill number fragment, and the image area is decoded using the ZBar algorithm to obtain a barcode decoding result, including: inputting the image area into a preset CNN character segmentation model; extracting features of the image area through the convolution layer in the CNN character segmentation model, and reducing the dimension of the features through the pooling layer in the CNN character segmentation model to obtain significant features; mapping the significant features to the character segmentation result through the fully connected layer in the CNN character segmentation model to obtain a residual waybill number fragment; and decoding the image area using the ZBar algorithm to obtain a barcode decoding result.
[0008] Optionally, in a fourth implementation method of the first aspect of the present invention, the barcode decoding result and the residual waybill number fragment are transmitted to a cloud database through the AES-256 encryption protocol, and a distributed index optimization algorithm is used in the cloud database to query the complete package information corresponding to the barcode decoding result and the residual waybill number fragment, including: encrypting the barcode decoding result and the residual waybill number fragment through the AES-256 encryption protocol to obtain encrypted information; transmitting the encrypted information to a cloud database with a distributed architecture through the Hypertext Transfer Protocol secure protocol; decrypting the encrypted information in the cloud database, and using a distributed index optimization algorithm based on a mixed index of B+ tree and hash table to query the complete package information corresponding to the barcode decoding result and the residual waybill number fragment.
[0009] Optionally, in a fifth implementation method of the first aspect of the present invention, the complete information of the package is cross-validated in multiple dimensions to obtain a verification result. When the verification result is passed, a printable waybill data file is generated based on the complete information of the package, including: verifying whether the receiving address of the complete information of the package is consistent with the previous delivery area division to obtain a first verification result; verifying whether the weight and volume of the package in the complete information of the package are consistent with the previously recorded information to obtain a second verification result; verifying whether the sender and recipient telephone numbers of the complete information of the package have had abnormal call records in the recent period to obtain a third verification result; verifying whether the logistics track of the complete information of the package is normal to obtain a fourth verification result; when the first verification result, the second verification result, the third verification result and the fourth verification result all pass, the waybill information is typeset according to the preset waybill template format to obtain waybill layout information; and generating a printable waybill data file based on the waybill layout information.
[0010] Optionally, in a sixth implementation method of the first aspect of the present invention, the complete information of the package is cross-validated with multi-dimensional data to obtain a verification result. When the verification result is passed, a printable waybill data file is generated according to the complete information of the package, and the method further includes: obtaining a timestamp from a timestamp service platform based on the generation time of the waybill data file; merging the timestamp and the waybill data file to obtain a merged file of the waybill generation time; and uploading the merged file of the waybill generation time to the blockchain.
[0011] The second aspect of the present invention provides a courier's waybill reprinting device, comprising: an acquisition and processing module for acquiring waybill image information, preprocessing the waybill image information, and obtaining anti-blur image enhancement information; a detection and determination module for detecting the character edges of the anti-blur image enhancement information based on an edge detection algorithm, and determining the image area containing the characters based on the character edges; a segmentation and decoding module for inputting the image area into a preset CNN character segmentation model for character segmentation to obtain a residual waybill number fragment, and using the ZBar algorithm to perform a decoding operation on the image area to obtain a barcode decoding result; a transmission query module for transmitting the barcode decoding result and the residual waybill number fragment to a cloud database through the AES-256 encryption protocol, and using a distributed index optimization algorithm in the cloud database to query the complete package information corresponding to the barcode decoding result and the residual waybill number fragment; a verification generation module for performing multi-dimensional data cross-verification on the complete package information to obtain a verification result. When the verification result passes, a printable waybill data file is generated based on the complete package information.
[0012] Optionally, in a first implementation method of the second aspect of the present invention, the acquisition and processing module includes: an acquisition unit for acquiring face sheet image information; a removal unit for removing blur noise in the face sheet image information using a frequency domain filtering algorithm to obtain face sheet image denoising information; a first enhancement unit for enhancing the clarity of the face sheet image denoising information using a sharpening filtering algorithm to obtain face sheet image clarity enhancement information; and a second enhancement unit for contrast enhancing the face sheet image clarity enhancement information using an adaptive histogram equalization algorithm to obtain anti-blur image enhancement information.
[0013] Optionally, in a second implementation of the second aspect of the present invention, the detection and determination module includes: a grayscale unit, used to grayscale the anti-blur image enhancement information to obtain grayscale image information; a detection unit, used to detect the character edges of the grayscale image information based on an edge detection algorithm; and a determination unit, used to determine the image area containing the characters based on the character edges.
[0014] Optionally, in a third implementation of the second aspect of the present invention, the segmentation and decoding module includes: an input unit for inputting the image area into a preset CNN character segmentation model; an extraction and dimensionality reduction unit for extracting features of the image area through the convolution layer in the CNN character segmentation model, and reducing the dimensionality of the features through the pooling layer in the CNN character segmentation model to obtain significant features; a mapping unit for mapping the significant features to the character segmentation results through the fully connected layer in the CNN character segmentation model to obtain residual waybill number fragments; and a decoding unit for performing a decoding operation on the image area using the ZBar algorithm to obtain a barcode decoding result.
[0015] Optionally, in a fourth implementation of the second aspect of the present invention, the transmission query module includes: an encryption unit, used to encrypt the barcode decoding result and the residual waybill number fragment through the AES-256 encryption protocol to obtain encrypted information; a transmission unit, used to transmit the encrypted information to a cloud database with a distributed architecture through the Hypertext Transfer Protocol secure protocol; a decryption query unit, used to decrypt the encrypted information in the cloud database, and use a distributed index optimization algorithm based on a mixed index of B+ tree and hash table to query the complete package information corresponding to the barcode decoding result and the residual waybill number fragment.
[0016] Optionally, in a fifth implementation of the second aspect of the present invention, the verification generation module includes: a first verification unit, used to verify whether the recipient address of the complete package information is consistent with the previous delivery area division, to obtain a first verification result; a second verification unit, used to verify whether the weight and volume of the package with the complete package information are consistent with the previously recorded information, to obtain a second verification result; a third verification unit, used to verify whether the sender and recipient telephone numbers of the complete package information have had abnormal call records in the recent period, to obtain a third verification result; a fourth verification unit, used to verify whether the logistics track of the complete package information is normal, to obtain a fourth verification result; a typesetting unit, used to typeset the waybill information according to a preset waybill template format when the first verification result, the second verification result, the third verification result and the fourth verification result are all passed, to obtain waybill typesetting information; a generation unit, used to generate a printable waybill data file based on the waybill typesetting information.
[0017] Optionally, in the sixth implementation method of the second aspect of the present invention, it also includes: an acquisition module, used to obtain a timestamp from a timestamp service platform based on the generation time of the waybill data file; a merging module, used to merge the timestamp and the waybill data file to obtain a merged file of the waybill generation time; and an uploading module, used to upload the merged file of the waybill generation time to the blockchain.
[0018] The third aspect of the present invention provides a courier's waybill reprinting device, which includes: a memory and at least one processor, wherein the memory stores instructions; at least one processor calls the instructions in the memory to enable the courier's waybill reprinting device to execute each step of the courier's waybill reprinting method described above.
[0019] A fourth aspect of the present invention provides a computer-readable storage medium having instructions stored thereon, which, when executed by a processor, implement the various steps of any of the above-mentioned methods for reprinting a courier's waybill.
[0020] In the technical solution of the present invention, by pre-processing the face order image information, anti-blurred image enhancement information is obtained, so that the lines of the barcode are clearer and more distinguishable, the character edges of the anti-blurred image enhancement information are detected based on the edge detection algorithm, the image area containing the characters is determined according to the character edges, and the image area is input into a preset CNN character segmentation model for character segmentation to obtain residual waybill number fragments. The residual waybill number fragments can support couriers to query the complete package information according to the waybill number, and the image area can support couriers to query the complete package information according to the barcode in the image area after decoding. The complete package information is cross-validated with multi-dimensional data to obtain a verification result, ensuring that the retrieved complete package information is accurate. When the verification result is passed, a printable face order data file is generated according to the complete package information, and the face order is reprinted according to the face order data file, thereby improving the efficiency of express transportation and delivery, shortening the package stagnation time, significantly reducing the possibility of package loss and improving customer satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 A first flow chart of the method for re-printing a courier's waybill provided in an embodiment of the present invention;
[0022] Figure 2 A second flow chart of the method for re-printing a courier's waybill provided in an embodiment of the present invention;
[0023] Figure 3 A third flow chart of the method for re-printing a courier's waybill provided in an embodiment of the present invention;
[0024] Figure 4 A fourth flow chart of the method for re-printing a courier's waybill provided in an embodiment of the present invention;
[0025] Figure 5 A schematic diagram of the structure of a courier's delivery bill reprinting device provided in an embodiment of the present invention;
[0026] Figure 6 Another structural schematic diagram of the device for re-printing a courier's waybill provided in an embodiment of the present invention;
[0027] Figure 7 A schematic diagram of the structure of the courier's waybill reprinting device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0028] The present invention provides a method, device, equipment and storage medium for couriers to reprint waybills, which can support couriers to query the complete information of packages and reprint waybills based on barcodes or waybill numbers, thereby improving the efficiency of express transportation and delivery, shortening the package stagnation time, significantly reducing the possibility of package loss and improving customer satisfaction.
[0029] The terms "first," "second," "third," "fourth," and the like (if any) in the description and claims of the present invention and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to these processes, methods, products, or apparatus.
[0030] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 In one embodiment of the present invention, a method for a courier to reprint a waybill includes:
[0031] 101. Acquire face image information, pre-process the face image information, and obtain anti-blurring image enhancement information;
[0032] In this embodiment, the damaged or blurred waybill is photographed by the delivery terminal to obtain the waybill image information, and then the waybill image information is subjected to noise removal processing, blur removal processing and contrast enhancement processing.
[0033] 102. Detecting character edges of the anti-blur image enhancement information based on an edge detection algorithm, and determining an image region containing the characters based on the character edges;
[0034] In this embodiment, the Canny algorithm is used to anti-blur the character edges in the image enhancement information through multi-step processing (such as Gaussian filtering, gradient calculation, non-maximum suppression, double threshold processing, etc.). The obtained image result is a binary image containing the character edges. At this time, all edge areas in the image will be marked as white, and the other parts will be black, accurately identifying the position and outline of the characters. Once the character edge information is obtained, the next step is to determine the specific image area containing the characters through these character edges.
[0035] 103. Input the image area into a preset CNN character segmentation model to perform character segmentation to obtain a residual waybill number fragment, and use the ZBar algorithm to perform a decoding operation on the image area to obtain a barcode decoding result;
[0036] In this embodiment, the image area to be segmented is input into the CNN model. The input layer is an image segment that has undergone preprocessing such as edge detection and region positioning. The convolution layer of the CNN extracts features from the image through convolution operations. These features can be low-level features (such as edges, corners, etc.) or high-level features (such as the structure and morphology of characters). The pooling layer is usually used after the convolution layer to reduce the spatial dimension of the feature map and highlight important features. After processing by the convolution and pooling layers, the data will pass through the fully connected layer for high-level feature learning. Finally, the CNN will segment the image area into independent character areas based on the learned features to obtain the residual waybill number segment. The ZBar algorithm is used to decode the barcode in the image area to obtain the barcode decoding result. ZBar will scan the input image and look for the barcode area. The barcode is composed of a series of black and white stripes. ZBar determines the position and direction of the barcode by analyzing the arrangement of the black and white areas in the image. Once the barcode area is determined, ZBar will attempt to decode the pattern of these stripes, extract the barcode information and convert it into text or digital information.
[0037] 104. The barcode decoding result and the remaining waybill number fragment are transmitted to the cloud database using the AES-256 encryption protocol. A distributed index optimization algorithm is used in the cloud database to query the complete package information corresponding to the barcode decoding result and the remaining waybill number fragment;
[0038] In this embodiment, AES-256 encryption uses a 256-bit key to encrypt data. The barcode decoding result and the remaining waybill number fragment are encrypted using the AES algorithm. The encrypted data is transmitted to the cloud through a secure channel (such as HTTPS or other encrypted transmission protocols). Since the data is encrypted, even if it is intercepted during transmission, it cannot be directly cracked and read, thereby improving the security of data transmission. After receiving the query request, the cloud database decrypts it and uses a distributed index to quickly find the relevant complete package information based on the barcode decoding result and the remaining waybill number fragment.
[0039] 105. Perform multi-dimensional data cross-verification on the complete information of the package to obtain a verification result. When the verification result passes, a printable label data file is generated based on the complete information of the package;
[0040] In this embodiment, multi-dimensional data cross-verification is performed on the complete information of the package to obtain a verification result. When the verification result passes, it means that the package information is complete and accurate. A printable waybill data file is then generated based on the complete information of the package. The waybill data file contains the package's shipping information, receiving information, logistics status, waybill number, and other content.
[0041] In an embodiment of the present invention, by preprocessing the face order image information, anti-blurred image enhancement information is obtained, so that the lines of the barcode are clearer and more distinguishable, the character edges of the anti-blurred image enhancement information are detected based on the edge detection algorithm, the image area containing the characters is determined according to the character edges, and the image area is input into a preset CNN character segmentation model for character segmentation to obtain residual waybill number fragments. The residual waybill number fragments can support couriers to query the complete information of the package according to the waybill number, and the image area can support couriers to query the complete information of the package according to the barcode in the image area after decoding. The complete information of the package is cross-validated with multi-dimensional data to obtain a verification result, ensuring that the retrieved complete information of the package is accurate. When the verification result is passed, a printable face order data file is generated according to the complete information of the package, and the face order is reprinted according to the face order data file, thereby improving the efficiency of express transportation and delivery, shortening the package stagnation time, significantly reducing the possibility of package loss and improving customer satisfaction.
[0042] See also Figure 2 The second embodiment of the method for re-printing a courier's waybill in the embodiment of the present invention includes:
[0043] 201. Obtaining the label image information;
[0044] In this embodiment, the damaged or blurred waybill is photographed by the waybill scanner of the delivery terminal to obtain the waybill image information, which includes the waybill number image and the barcode image.
[0045] 202. Using a frequency domain filtering algorithm to remove blur noise in the face sheet image information, thereby obtaining face sheet image denoising information;
[0046] In this embodiment, first, a Fourier transform is performed on the single face image to convert the image from the spatial domain to the frequency domain. Based on the noise characteristics of the single face image, a suitable frequency domain filter is selected, and the selected filter is applied to the frequency domain representation of the image to remove the high-frequency part. The image after inverse Fourier transform is a noise-removed version, that is, the denoised information of the single face image. The denoised information of the single face image is clearer than the original image.
[0047] 203. Using a sharpening filter algorithm to enhance the clarity of the single face image denoising information, thereby obtaining single face image clarity enhancement information;
[0048] In this embodiment, according to the characteristics of the face sheet image (such as small text, high accuracy requirements of the barcode, etc.), a suitable sharpening filter is selected, and the sharpening filter is convolved with the image. In this step, the filter will highlight the high-frequency parts of the image (i.e., edges and details) and weaken the low-frequency parts (i.e., smooth areas) to obtain the clarity enhancement information of the face sheet image. The parameters of the sharpening filter need to be adjusted according to the specific situation of the image. Excessive sharpening may cause the image to be over-enhanced, resulting in noise or artifacts, while too weak sharpening may not show a significant improvement in clarity.
[0049] 204. Using an adaptive histogram equalization algorithm to perform contrast enhancement on the single image clarity enhancement information to obtain anti-blurring image enhancement information;
[0050] In this embodiment, first, the original image of the single image clarity enhancement information is divided into multiple small blocks or small windows. For each small block, the histogram of the area is calculated. The histogram represents the pixel value distribution of the area, that is, the frequency distribution of pixels of each gray level in the area. The histogram of each small block is equalized to make the brightness distribution of the area more uniform and enhance its contrast. All the equalized local areas are merged to form a final enhanced image to obtain anti-blur image enhancement information.
[0051] 205. Grayscale processing is performed on the anti-blur image enhancement information to obtain grayscale image information;
[0052] In this embodiment, the original color image of the anti-blur image enhancement information is read, and the image data is ensured to be in RGB format. According to the selected grayscale method (such as the weighted average method), the RGB value of each pixel in the image is calculated to obtain the corresponding grayscale value. The calculated grayscale value replaces the RGB value in the original image to generate a single-channel grayscale image and obtain grayscale image information.
[0053] 206. Detecting character edges of grayscale image information based on an edge detection algorithm;
[0054] In this embodiment, the Canny edge detection algorithm is selected. First, Gaussian smoothing is performed, the gradient map is calculated, and non-maximum suppression is performed. Then, the final edge is obtained through double threshold processing. After edge detection, an image containing edge information is obtained. At this time, the edge part is separated from the background through binarization processing, or the edge image is subjected to morphological processing such as dilation and corrosion to further enhance the continuity of the edge.
[0055] 207. Determine an image region containing the character based on the character edge;
[0056] In this embodiment, the connectivity of the character edges is analyzed, and the extracted connected regions and contours need to be filtered and adjusted to ultimately obtain an image region containing the characters.
[0057] In an embodiment of the present invention, the clarity and visual quality of the face sheet image are significantly improved through steps such as denoising, sharpening and contrast enhancement, which is helpful for subsequent character recognition and processing. The process effectively removes noise and blur in the image, so that even in the case of low-quality or blurred original images, the readability and accuracy of the image can be improved. Through edge detection and region recognition technology, the character area is accurately located, providing a clearer foundation for subsequent character recognition or data extraction. The entire process uses automated algorithms to reduce manual intervention, improve processing efficiency and consistency, and is suitable for large-scale image processing tasks.
[0058] See also Figure 3 The third embodiment of the method for re-printing a courier's waybill in the embodiment of the present invention includes:
[0059] 301. Input the image region into a preset CNN character segmentation model;
[0060] In this embodiment, the image area includes a waybill number area and a barcode area, and the waybill number area is input into a preset CNN character segmentation model.
[0061] 302. Extract features of the image region by using the convolutional layer in the CNN character segmentation model, and reduce the dimension of the features by using the pooling layer in the CNN character segmentation model to obtain significant features;
[0062] In this embodiment, the features of the waybill number area are extracted by the convolution layer in the CNN character segmentation model, and the features are reduced in dimension by the pooling layer in the CNN character segmentation model to obtain significant features.
[0063] 303. Mapping the salient features to the character segmentation results through the fully connected layer in the CNN character segmentation model to obtain the residual waybill number fragment;
[0064] In this embodiment, under the action of the convolution layer and the pooling layer, the model has extracted the significant features in the image of the waybill number area, and reduced the size of the feature map through pooling dimensionality reduction. At this time, the feature map has been converted from the pixel information of the original image to a high-level abstract feature, representing certain significant information in the image. After convolution and pooling, the feature map is a high-dimensional matrix, and each position contains the numerical value of a feature of a certain part of the image. The feature map is then flattened, that is, the two-dimensional feature map is converted into a one-dimensional vector. The flattened feature vector is passed to the fully connected layer, and the fully connected layer performs weighted summation with the input features through the weight matrix and the bias term to obtain the output value. Through the fully connected layer, the model can map the low-dimensional feature vector to a specific character or character segmentation fragment to obtain the residual waybill number fragment.
[0065] 304. Decoding the image area using the ZBar algorithm to obtain a barcode decoding result;
[0066] In this embodiment, the ZBar algorithm is used to decode the barcode area in the image area to obtain the barcode decoding result. ZBar scans the input image and searches for the barcode area. The barcode is composed of a series of black and white stripes. ZBar determines the position and orientation of the barcode by analyzing the arrangement of black and white areas in the image. Once the barcode area is determined, ZBar attempts to decode the pattern of these stripes, extract the barcode information and convert it into text or digital information.
[0067] 305. Encrypt the barcode decoding result and the remaining waybill number fragment using the AES-256 encryption protocol to obtain encrypted information;
[0068] In this embodiment, a 256-bit key and a 16-byte initialization vector are generated. Once the barcode decoding result, the residual waybill number fragment, the key and the initialization vector are prepared, the encryption process can be started. The input plaintext data (i.e., the barcode decoding result and the residual waybill number fragment) are encrypted with the key and the initialization vector using the AES algorithm to obtain encrypted information.
[0069] 306. Transmitting encrypted information to a distributed cloud database via Hypertext Transfer Protocol Security;
[0070] In this embodiment, Hypertext Transfer Protocol Secure (HTTPS) is an encrypted version of the HTTP protocol. Encrypted information is transmitted to a cloud database with a distributed architecture via the Hypertext Transfer Protocol Secure to ensure that the data is not stolen or tampered with during transmission.
[0071] 307. Decrypt the encrypted information in the cloud database and use a distributed index optimization algorithm based on a hybrid index of B+ tree and hash table to query the complete package information corresponding to the barcode decoding result and the remaining waybill number fragment;
[0072] In this embodiment, the encrypted information is decrypted in the cloud database. When the barcode image is blurred or incomplete, a distributed index optimization algorithm based on a hybrid index of B+ tree and hash table is used to query the complete package information corresponding to the remaining waybill number fragment. When the waybill number image is blurred or incomplete, a distributed index optimization algorithm based on a hybrid index of B+ tree and hash table is used to query the complete package information corresponding to the barcode decoding result.
[0073] In an embodiment of the present invention, by combining the feature extraction and pooling layer processing of the CNN model, characters in the image can be accurately extracted and segmented, and the accuracy of character recognition can be improved. The ZBar decoding algorithm and the AES-256 encryption protocol are combined to ensure the security and privacy protection of barcode information, enhance the security of data transmission, and utilize the Hypertext Transfer Protocol security and distributed architecture to efficiently transmit encrypted information to the cloud, ensuring stable storage and processing of data. The hybrid index optimization algorithm in the cloud database is used to improve query efficiency, ensuring that relevant information can be obtained quickly and accurately in a big data environment.
[0074] See also Figure 4 The fourth embodiment of the method for re-printing a courier's waybill in the embodiment of the present invention includes:
[0075] 401. Verify whether the receiving address of the complete package information is consistent with the previous delivery area division, and obtain a first verification result;
[0076] In this embodiment, the receiving address of the complete package information is verified to see whether it matches the previous delivery area division, and a first verification result is obtained. If the receiving address matches the delivery area division, a verification success result is returned.
[0077] 402. Verify whether the weight and volume of the complete package information are consistent with the previously recorded information, and obtain a second verification result;
[0078] In this embodiment, the weight and volume of the package with complete package information are verified to see if they are consistent with the previously recorded information, and a second verification result is obtained. If the weight and volume are both within a reasonable error range, the verification is passed.
[0079] 403. Verify whether the sender or recipient's phone number containing the complete package information has any recent abnormal call records, and obtain a third verification result.
[0080] In this embodiment, the third verification result is obtained by verifying whether the sender / receiver's phone number with the complete package information has any abnormal call records in the recent period. If the call records of the sender / receiver's phone number are not marked as abnormal, the verification is passed.
[0081] 404. Verify whether the logistics track of the complete package information is normal, and obtain a fourth verification result;
[0082] In this embodiment, the logistics track of the complete information of the package is verified to be normal, and a fourth verification result is obtained. If the logistics track of the package meets the normal transportation standards, no abnormal events are found, and the transportation time of the package is reasonable, the status update is normal, and there is no stagnation or abnormality, the system will mark it as verified passed.
[0083] 405. When the first verification result, the second verification result, the third verification result, and the fourth verification result all pass, the waybill information is typeset according to the preset waybill template format to obtain the waybill typeset information;
[0084] In this embodiment, when the first verification result, the second verification result, the third verification result and the fourth verification result are all passed, the waybill information will be laid out according to the preset waybill template format. The waybill template will specify the layout position of each information. For example, the shipper information and consignee information will usually be located at the top or left side of the waybill, while the barcode and waybill number may be located in the middle or on the right. Based on the package information confirmed by the verification results, the system will fill in the corresponding information into each field of the template to obtain the waybill layout information.
[0085] 406. Generate a printable label data file based on the label layout information;
[0086] In this embodiment, a suitable file format is selected according to the printing device and actual needs, and the final printing layout is constructed based on the already typeset face sheet layout information and a printable face sheet data file is generated.
[0087] 407. Based on the generation time of the waybill data file, obtain a timestamp from the timestamp service platform;
[0088] In this embodiment, when the waybill data file is generated, a time point is generated, which marks the creation time of the file. Based on the creation time, an accurate and reliable timestamp is requested from the timestamp service platform.
[0089] 408. Merge the timestamp and the waybill data file to obtain a merged file of the waybill generation time;
[0090] In this embodiment, the timestamp is effectively embedded in the waybill data file to obtain a merged file of the waybill generation time. For example, in the JSON file, a timestamp field is added to the waybill data structure, and the timestamp is added as a new key-value pair to the outermost layer of the waybill data. If the waybill is stored in PDF or image format, the timestamp can be embedded as metadata.
[0091] 409. Upload the merged file of the waybill generation time to the blockchain;
[0092] In this embodiment, a suitable blockchain platform is selected, the merged file of the waybill generation time is converted into a data format suitable for storage in the blockchain, and a transaction is generated including the hash value of the merged file of the waybill generation time and related metadata. According to the requirements of the blockchain platform, the transaction is digitally signed and broadcast to the blockchain network for verification and confirmation by the nodes in the network. Once the transaction passes the verification of the network nodes, it will be added to a new block of the blockchain and become an unchangeable record. The record will exist permanently on the blockchain.
[0093] In the embodiment of the present invention, the accuracy and consistency of the package information are ensured by comprehensively verifying the receiving address, package information, telephone records and logistics tracks, thereby reducing errors and potential risks. After the information is verified, it is automatically typeset according to the waybill template format to generate a printable file, which simplifies the operation process and improves work efficiency. The time of data generation is traceable through the timestamp service platform, and the waybill file is uploaded in combination with blockchain technology, thereby enhancing the security and non-tamperability of the data and ensuring the authenticity and tamper-proofness of the information.
[0094] The above describes the method for re-printing the courier's face sheet in the embodiment of the present invention. The following describes the device for re-printing the courier's face sheet in the embodiment of the present invention. Figure 5 In one embodiment of the present invention, a device for re-printing a courier's waybill includes:
[0095] An acquisition and processing module 501 is used to acquire face image information, pre-process the face image information, and obtain anti-blur image enhancement information;
[0096] A detection and determination module 502 is configured to detect character edges of the anti-blur image enhancement information based on an edge detection algorithm, and determine an image region containing the characters according to the character edges;
[0097] The segmentation and decoding module 503 is used to input the image area into a preset CNN character segmentation model to perform character segmentation, obtain the residual waybill number fragment, and use the ZBar algorithm to perform a decoding operation on the image area to obtain a barcode decoding result;
[0098] Transmission query module 504, configured to transmit the barcode decoding result and the remaining waybill number fragment to a cloud database using the AES-256 encryption protocol, and to use a distributed index optimization algorithm in the cloud database to query the complete package information corresponding to the barcode decoding result and the remaining waybill number fragment;
[0099] The verification generation module 505 is used to perform multi-dimensional data cross-verification on the complete information of the package to obtain a verification result. When the verification result passes, a printable label data file is generated based on the complete information of the package.
[0100] In this embodiment, by preprocessing the face order image information, anti-blurred image enhancement information is obtained, so that the lines of the barcode are clearer and more distinguishable, the character edges of the anti-blurred image enhancement information are detected based on the edge detection algorithm, the image area containing the characters is determined according to the character edges, and the image area is input into a preset CNN character segmentation model for character segmentation to obtain residual waybill number fragments. The residual waybill number fragments can support couriers to query the complete package information based on the waybill number, and the image area can support couriers to query the complete package information based on the barcode in the image area after decoding. The complete package information is cross-validated with multi-dimensional data to obtain a verification result, ensuring that the retrieved complete package information is accurate. When the verification result is passed, a printable face order data file is generated according to the complete package information, and the face order is reprinted according to the face order data file, thereby improving the efficiency of express transportation and delivery, shortening the package stagnation time, significantly reducing the possibility of package loss and improving customer satisfaction.
[0101] See also Figure 6 Another embodiment of the courier's face slip reprinting device in the embodiment of the present invention includes:
[0102] An acquisition and processing module 501 is used to acquire face image information, pre-process the face image information, and obtain anti-blur image enhancement information;
[0103] A detection and determination module 502 is configured to detect character edges of the anti-blur image enhancement information based on an edge detection algorithm, and determine an image region containing the characters according to the character edges;
[0104] The segmentation and decoding module 503 is used to input the image area into a preset CNN character segmentation model to perform character segmentation, obtain the residual waybill number fragment, and use the ZBar algorithm to perform a decoding operation on the image area to obtain a barcode decoding result;
[0105] Transmission query module 504, configured to transmit the barcode decoding result and the remaining waybill number fragment to a cloud database using the AES-256 encryption protocol, and to use a distributed index optimization algorithm in the cloud database to query the complete package information corresponding to the barcode decoding result and the remaining waybill number fragment;
[0106] Verification generation module 505 is used to perform multi-dimensional data cross-verification on the complete package information to obtain a verification result. When the verification result passes, a printable label data file is generated based on the complete package information;
[0107] In this embodiment, the acquisition processing module 501 includes: an acquisition unit 5011, used to acquire face single image information; a removal unit 5012, used to use a frequency domain filtering algorithm to remove blur noise in the face single image information, and obtain face single image denoising information; a first enhancement unit 5013, used to use a sharpening filtering algorithm to enhance the clarity of the face single image denoising information, and obtain face single image clarity enhancement information; a second enhancement unit 5014, used to use an adaptive histogram equalization algorithm to enhance the contrast of the face single image clarity enhancement information, and obtain anti-blur image enhancement information.
[0108] In this embodiment, the detection and determination module 502 includes: a grayscale unit 5021, which is used to grayscale the anti-blur image enhancement information to obtain grayscale image information; a detection unit 5022, which is used to detect the character edges of the grayscale image information based on the edge detection algorithm; and a determination unit 5023, which is used to determine the image area containing the characters based on the character edges.
[0109] In this embodiment, the segmentation and decoding module 503 includes: an input unit 5031, which is used to input the image area into a preset CNN character segmentation model; an extraction and dimensionality reduction unit 5032, which is used to extract features of the image area through the convolution layer in the CNN character segmentation model, and reduce the dimensionality of the features through the pooling layer in the CNN character segmentation model to obtain significant features; a mapping unit 5033, which is used to map the significant features to the character segmentation results through the fully connected layer in the CNN character segmentation model to obtain residual waybill number fragments; a decoding unit 5034, which is used to perform decoding operations on the image area using the ZBar algorithm to obtain a barcode decoding result.
[0110] In this embodiment, the transmission query module 504 includes: an encryption unit 5041, which is used to encrypt the barcode decoding result and the residual waybill number fragment through the AES-256 encryption protocol to obtain encrypted information; a transmission unit 5042, which is used to transmit the encrypted information to a cloud database with a distributed architecture through the Hypertext Transfer Protocol secure protocol; a decryption query unit 5043, which is used to decrypt the encrypted information in the cloud database, and use a distributed index optimization algorithm based on a hybrid index of a B+ tree and a hash table to query the complete package information corresponding to the barcode decoding result and the residual waybill number fragment.
[0111] In this embodiment, the verification generation module 505 includes: a first verification unit 5051, which is used to verify whether the recipient address of the complete package information is consistent with the previous delivery area division, and obtain a first verification result; a second verification unit 5052, which is used to verify whether the weight and volume of the package in the complete package information are consistent with the previously recorded information, and obtain a second verification result; a third verification unit 5053, which is used to verify whether the sender and recipient telephone numbers of the complete package information have had abnormal call records in the recent period, and obtain a third verification result; a fourth verification unit 5054, which is used to verify whether the logistics track of the complete package information is normal, and obtain a fourth verification result; a typesetting unit 5055, which is used to typeset the waybill information according to the preset waybill template format when the first verification result, the second verification result, the third verification result and the fourth verification result are all passed, and obtain the waybill typesetting information; a generation unit 5056, which is used to generate a printable waybill data file based on the waybill typesetting information.
[0112] In this embodiment, it also includes: an acquisition module 506, which is used to obtain a timestamp from a timestamp service platform based on the generation time of the waybill data file; a merging module 507, which is used to merge the timestamp and the waybill data file to obtain a merged file of the waybill generation time; and an uploading module 508, which is used to upload the merged file of the waybill generation time to the blockchain.
[0113] above Figure 5 and Figure 6 The courier's waybill reprinting device in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The courier's waybill reprinting device in the embodiment of the present invention is described in detail from the perspective of hardware processing.
[0114] Figure 7 : This is a schematic diagram of the structure of a courier's waybill reprinting device provided in an embodiment of the present invention. The courier's waybill reprinting device 600 may have relatively large differences due to different configurations or performance, and may include one or more processors (central processing units, CPU) 610 (for example, one or more processors) and a memory 620, and one or more storage media 630 (for example, one or more mass storage devices) storing application programs 633 or data 632. The memory 620 and the storage medium 630 may be temporary storage or permanent storage. The program stored in the storage medium 630 may include one or more modules (not shown in the figure), each of which may include a series of instruction operations in the courier's waybill reprinting device 600. Furthermore, the processor 610 may be configured to communicate with the storage medium 630 to execute a series of instruction operations in the storage medium 630 on the courier's waybill reprinting device 600 to implement the steps of the courier's waybill reprinting method provided in the above-mentioned method embodiments.
[0115] The courier's delivery bill reprinting device 600 may also include one or more power supplies 640, one or more wired or wireless network interfaces 650, one or more input and output interfaces 660, and / or one or more operating systems 631, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. It will be understood by those skilled in the art that Figure 7 The structure of the courier's waybill reprinting device shown does not constitute a limitation on the courier's waybill reprinting device, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[0116] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the method for reprinting a courier's waybill.
[0117] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, devices, and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0118] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc., various media that can store program code.
[0119] Finally, it should be noted that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art will be able to modify the technical solutions described in the aforementioned embodiments or substitute equivalents for some of the technical features. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.
Claims
1. A method for re-printing a courier's delivery note, characterized in that: include: Acquire face order image information, pre-process the face order image information, and obtain anti-blur image enhancement information; detecting character edges of the anti-blur image enhancement information based on an edge detection algorithm, and determining an image region containing characters according to the character edges; Input the image area into a preset CNN character segmentation model to perform character segmentation to obtain a residual waybill number fragment, and use the ZBar algorithm to perform a decoding operation on the image area to obtain a barcode decoding result; Transmitting the barcode decoding result and the remaining waybill number fragment to a cloud database using the AES-256 encryption protocol, and using a distributed index optimization algorithm in the cloud database to query the complete package information corresponding to the barcode decoding result and the remaining waybill number fragment; The complete information of the package is cross-validated with multi-dimensional data to obtain a verification result. When the verification result is passed, a printable label data file is generated based on the complete information of the package.
2. The method for re-printing a courier's delivery note according to claim 1, characterized in that: The acquiring of the face order image information and preprocessing of the face order image information to obtain anti-blur image enhancement information includes: Get the image information of the label; Using a frequency domain filtering algorithm to remove blur noise in the face sheet image information to obtain face sheet image denoising information; Using a sharpening filter algorithm to enhance the clarity of the denoised face image information to obtain face image clarity enhancement information; An adaptive histogram equalization algorithm is used to perform contrast enhancement on the single face image clarity enhancement information to obtain anti-blur image enhancement information.
3. The method for re-printing a courier's delivery note according to claim 1, characterized in that: The detecting the character edges of the anti-blur image enhancement information based on an edge detection algorithm, and determining the image area containing the characters according to the character edges, comprises: grayscale processing is performed on the anti-blur image enhancement information to obtain grayscale image information; Detecting character edges of the grayscale image information based on an edge detection algorithm; An image region containing the character is determined according to the character edge.
4. The method for re-printing a courier's delivery note according to claim 1, characterized in that: The image area is input into a preset CNN character segmentation model for character segmentation to obtain a residual waybill number fragment, and the image area is decoded using a ZBar algorithm to obtain a barcode decoding result, including: Inputting the image region into a preset CNN character segmentation model; Extracting features of the image region through a convolutional layer in the CNN character segmentation model, and performing dimensionality reduction on the features through a pooling layer in the CNN character segmentation model to obtain salient features; Mapping the salient features to the character segmentation results through a fully connected layer in the CNN character segmentation model to obtain a residual waybill number fragment; The image area is decoded using the ZBar algorithm to obtain a barcode decoding result.
5. The method for re-printing a courier's delivery note according to claim 1, characterized in that: The barcode decoding result and the remaining waybill number fragment are transmitted to a cloud database via an AES-256 encryption protocol, and a distributed index optimization algorithm is used in the cloud database to query the complete package information corresponding to the barcode decoding result and the remaining waybill number fragment, including: Encrypting the barcode decoding result and the residual waybill number fragment using the AES-256 encryption protocol to obtain encrypted information; Transmitting the encrypted information to a distributed cloud database via Hypertext Transfer Protocol (HTTP); The encrypted information is decrypted in the cloud database, and a distributed index optimization algorithm based on a hybrid index of a B+ tree and a hash table is used to query the complete package information corresponding to the barcode decoding result and the residual waybill number fragment.
6. The method for re-printing a courier's delivery note according to claim 1, characterized in that: The multi-dimensional data cross-verification of the complete package information is performed to obtain a verification result. When the verification result is passed, a printable label data file is generated based on the complete package information, including: Verify whether the receiving address of the complete package information is consistent with the previous delivery area division, and obtain a first verification result; Verifying whether the weight and volume of the package in the complete package information are consistent with the previously recorded information, and obtaining a second verification result; Verify whether the phone number of the sender or recipient of the complete package information has any abnormal call records recently, and obtain a third verification result; Verifying whether the logistics track of the complete information of the package is normal, and obtaining a fourth verification result; When the first verification result, the second verification result, the third verification result, and the fourth verification result are all passed, the face sheet information is typeset according to a preset face sheet template format to obtain face sheet typeset information; Generate a printable face sheet data file according to the face sheet layout information.
7. The method for re-printing a courier's delivery note according to claim 1, characterized in that: The multi-dimensional data cross-verification of the complete package information is performed to obtain a verification result. When the verification result passes, a printable label data file is generated according to the complete package information, and the process further includes: Obtaining a timestamp from a timestamp service platform based on the generation time of the shipping order data file; Merging the timestamp and the waybill data file to obtain a waybill generation time merged file; The merged file of the waybill generation time is uploaded to the blockchain.
8. A device for re-printing a courier's waybill, characterized in that: include: An acquisition and processing module is used to acquire face order image information, pre-process the face order image information, and obtain anti-blur image enhancement information; a detection and determination module, configured to detect character edges of the anti-blur image enhancement information based on an edge detection algorithm, and determine an image region containing characters according to the character edges; A segmentation and decoding module is used to input the image area into a preset CNN character segmentation model to perform character segmentation, obtain a residual waybill number fragment, and use the ZBar algorithm to perform a decoding operation on the image area to obtain a barcode decoding result; a transmission query module, configured to transmit the barcode decoding result and the residual waybill number fragment to a cloud database via an AES-256 encryption protocol, and to query the cloud database for complete package information corresponding to the barcode decoding result and the residual waybill number fragment using a distributed index optimization algorithm; The verification generation module is used to perform multi-dimensional data cross-verification on the complete information of the package to obtain a verification result. When the verification result is passed, a printable face sheet data file is generated based on the complete information of the package.
9. A courier's waybill reprinting device, characterized in that: The courier's waybill reprinting device includes: a memory and at least one processor, wherein the memory stores instructions; At least one of the processors calls the instructions in the memory to enable the courier's waybill reprinting device to execute each step of the courier's waybill reprinting method as described in any one of claims 1-7.
10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the various steps of the method for reprinting the courier's waybill as described in any one of claims 1 to 7 are implemented.