Electronic face sheet processing method and apparatus, computer device, and storage medium
By recognizing and processing the image information of electronic waybills, a waybill printing image template is generated, which solves the problem of complex operation in traditional waybill printing technology and improves printing efficiency and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-21
- Publication Date
- 2026-04-14
AI Technical Summary
Traditional waybill printing technology is complex to operate and has low printing efficiency because it requires coupling between different platforms, printers and waybills.
By acquiring the image information of the initial electronic waybill, the type of each target element is identified using a pre-trained target element recognition model, and symbol placeholder processing is performed to generate a waybill printing image template, thus simplifying the waybill printing process.
It improved the printing efficiency and accuracy of electronic waybills, reduced the waybill printing process, and enabled seamless use on various platforms.
Smart Images

Figure CN114881182B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence, and in particular to an electronic waybill processing method, apparatus, computer equipment, and storage medium. Background Technology
[0002] With the rapid development of the express delivery industry, electronic waybills have become ubiquitous. Electronic waybills, also known as economy waybills or QR code waybills, have become the preferred courier label for many logistics service providers primarily due to their standardized layout, low material consumption, and large information capacity. For example, printing electronic waybills and affixing them to the outer packaging of express items as courier labels can effectively improve logistics efficiency.
[0003] However, traditional waybill printing technology, from the design of electronic waybills to the final printing, typically requires transferring the electronic waybill to templates for various platforms, and then having the templates translate and print according to the different platform languages. This process is complex due to the coupling between different platforms, printers, and waybills, easily leading to operational inconvenience.
[0004] Therefore, existing waybill printing technology suffers from low printing efficiency due to the excessive number of waybill processing steps. Summary of the Invention
[0005] Therefore, it is necessary to provide an electronic waybill processing method, apparatus, computer equipment, and storage medium to address the aforementioned technical problems, thereby reducing the waybill printing process, obtaining high-precision universal templates, and thus improving the printing efficiency and accuracy of electronic waybills.
[0006] In a first aspect, this application provides an electronic waybill processing method, the method comprising:
[0007] Obtain the image information of the initial electronic waybill;
[0008] Obtain each target element from the image information and determine the element type of each target element;
[0009] Based on the element type of each target element, symbol placeholder processing is performed on each target element in the image information to obtain the label printing image template;
[0010] The label printing image template is sent to the terminal. The label printing image template is used by the terminal to generate a label printing instruction based on the target electronic label and the label printing image template after receiving the label printing request of the target electronic label. The label printing instruction is used to instruct the target printer to print the target electronic label.
[0011] In some embodiments of this application, the step of obtaining each target element in the image information and obtaining the element type of each target element includes:
[0012] Based on the pre-trained target element recognition model, each target element in the image information is obtained, and the element type of each target element is determined.
[0013] The pre-trained target element recognition model includes at least one of the following: a preliminary convolutional layer, a classification convolutional layer, and a long short-term memory neural network.
[0014] In some embodiments of this application, the pre-trained target element recognition model includes a preliminary convolutional layer. The step of obtaining each target element in the image information based on the pre-trained target element recognition model and obtaining the element type of each target element includes:
[0015] Based on a preset edge detection algorithm, edge detection is performed on the image information of the initial electronic waybill to obtain candidate boxes for each element in the image information;
[0016] The initial convolutional layer is used to obtain the element feature values in each element candidate box;
[0017] Based on a preset support vector machine, the feature values of elements in each candidate box are classified and predicted to obtain each target element in the image information and the element type of each target element. The element type includes at least one of the following: text type, image type, barcode type, and QR code type.
[0018] In some embodiments of this application, the pre-trained target element recognition model includes a classification convolutional layer. The step of performing symbol placeholder processing on each target element in the image information according to the element type of each target element to obtain a label printing image template includes:
[0019] Determine the position information of each target element in the image information;
[0020] Based on the position information and element type of each target element, symbol placeholder processing is performed on each target element in the image information to obtain the element placeholder corresponding to each target element;
[0021] Based on the element type of each target element, the corresponding classification convolutional layer is determined and used to obtain the deep element information of each target element.
[0022] Based on the element depth information and element placeholders of each target element, the label printing image template is obtained.
[0023] In some embodiments of this application, the classification convolutional layer includes at least one of a text convolutional layer, an image convolutional layer, a barcode convolutional layer, and a QR code convolutional layer. The step of determining and obtaining the element-depth information of each target element through the corresponding classification convolutional layer based on the element type of each target element includes:
[0024] If the element type of the target element is text, then the font type and font size of the target element are obtained through the text convolutional layer as the deep information of the element;
[0025] If the target element is an image, then the core pixel value of the target element is obtained through the image convolutional layer and used as the deep information of the element.
[0026] If the element type of the target element is a barcode, then the encoding method and barcode size of the target element are obtained through the barcode convolutional layer as the deep information of the element;
[0027] If the target element is a QR code, the encoding method and mask information of the target element are obtained through the QR code convolutional layer and used as the deep information of the element.
[0028] In some embodiments of this application, the pre-trained target element recognition model includes a long short-term memory neural network, and the step of obtaining the label printing image template based on the deep information of each target element and element placeholders includes:
[0029] The long short-term memory neural network is used to perform correlation analysis on the deep information of each target element and the element placeholders to obtain the correlation information between each target element and the template language information corresponding to each target element.
[0030] The associated information and template language information are normalized to obtain the processed image information;
[0031] The processed image information is determined and used as the image template for the label printing.
[0032] In some embodiments of this application, before obtaining each target element in the image information based on the pre-trained target element recognition model and determining the element type of each target element, the method further includes:
[0033] Construct an initial target element recognition model, which includes a preliminary convolutional layer, a classification convolutional layer, and a long short-term memory neural network. The classification convolutional layer includes at least one of a text convolutional layer, an image convolutional layer, a barcode convolutional layer, and a QR code convolutional layer.
[0034] A sample faceplate image set is obtained, and the sample faceplate image set is divided into a training set and a test set; the sample faceplate image set includes multiple sample faceplate images with labeled element types;
[0035] The initial target element recognition model is pre-trained using the training set to obtain the pre-trained target element recognition model.
[0036] The target element recognition model after initial training was tested and adjusted using the test set to obtain the trained target element recognition model.
[0037] Secondly, this application provides an electronic waybill processing method, the method comprising:
[0038] After receiving a waybill printing request from the target electronic waybill, respond to the waybill printing request and obtain a pre-stored waybill printing image template. The waybill printing request carries the target printing content of the target electronic waybill, and the waybill printing image template includes preset element placeholders.
[0039] Replace the placeholder elements in the label printing image template with the target printing content to obtain the replaced label printing image template.
[0040] Based on the printer type of the target printer and the replaced label printing image template, a label printing instruction is generated, wherein the target printer is a printer device determined by the user.
[0041] The label printing instruction is sent to the target printer, which instructs the target printer to print the target electronic label according to the replaced label printing image template.
[0042] In some embodiments of this application, before generating a waybill printing instruction based on the printer type of the target printer and the replaced waybill printing image template, and before the target printer is a printer selected by the user, the method further includes:
[0043] Obtain printer device information; the printer device information includes a printer list, which is a list of at least one candidate printer;
[0044] Display the list of printers;
[0045] When a user selects a printer from the printer list, the selected printer is identified as the target printer.
[0046] Thirdly, this application provides an electronic waybill processing device, the device comprising:
[0047] The image acquisition module is used to acquire image information of the initial electronic waybill;
[0048] An element recognition module is used to acquire each target element in the image information and obtain the element type of each target element;
[0049] The template acquisition module is used to perform symbol placeholder processing on each target element in the image information according to the element type of each target element to obtain the label printing image template.
[0050] The template sending module is used to send the waybill printing image template to the terminal. The waybill printing image template is used by the terminal to generate a waybill printing instruction based on the target electronic waybill and the waybill printing image template after receiving the waybill printing request of the target electronic waybill, and to send the waybill printing instruction to the target printer. The waybill printing instruction is used to instruct the target printer to print the target electronic waybill according to the waybill printing image template.
[0051] Fourthly, this application provides an electronic waybill processing device, the device comprising:
[0052] The request-response module is used to respond to the waybill printing request after receiving the waybill printing request of the target electronic waybill, and to obtain a pre-stored waybill printing image template. The waybill printing request carries the target printing content of the target electronic waybill, and the waybill printing image template includes preset element placeholders.
[0053] The template processing module is used to replace the element placeholders in the waybill printing image template with the target printing content to obtain the replaced waybill printing image template.
[0054] The instruction generation module is used to generate a waybill printing instruction based on the printer type of the target printer and the replaced waybill printing image template, wherein the target printer is a printer device determined by the user.
[0055] The instruction sending module is used to send the waybill printing instruction to the target printer, the waybill printing instruction being used to instruct the target printer to print the target electronic waybill according to the replaced waybill printing image template.
[0056] Fifthly, this application also provides a computer device, the computer device comprising:
[0057] One or more processors;
[0058] Memory; and
[0059] One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the electronic waybill processing method.
[0060] Sixthly, this application also provides a computer-readable storage medium having a computer program stored thereon, the computer program being loaded by a processor to execute the steps in the electronic waybill processing method.
[0061] In a seventh aspect, embodiments of this application provide a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the first and / or second aspects described above.
[0062] The aforementioned electronic waybill processing method, apparatus, computer equipment, and storage medium allow the server to acquire the initial electronic waybill image information, then obtain each target element from the image information. Based on the element type of each target element, symbolic placeholder processing is performed on each target element in the image information to achieve the creation and acquisition of the waybill printing image template. The universal template created using this solution can be used seamlessly by various platforms, eliminating the need for each platform to separately encode and print electronic waybills. This reduces the waybill printing process and improves the accuracy of the template by element type, thus improving both the printing efficiency and accuracy of electronic waybills. Attached Figure Description
[0063] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0064] Figure 1 This is a schematic diagram of a scenario for the electronic waybill processing method in an embodiment of this application;
[0065] Figure 2 This is a flowchart illustrating the electronic waybill processing method in the embodiments of this application;
[0066] Figure 3 This is a schematic diagram of the interface of the initial electronic waybill in the embodiments of this application;
[0067] Figure 4 This is a schematic diagram of the target element recognition model in the embodiments of this application;
[0068] Figure 5 This is a flowchart illustrating another electronic waybill processing method in an embodiment of this application;
[0069] Figure 6 This is a flowchart illustrating the target electronic waybill printing steps in an embodiment of this application;
[0070] Figure 7 This is a schematic diagram of the electronic waybill processing device in the embodiments of this application;
[0071] Figure 8 This is a schematic diagram of the electronic waybill processing device in the embodiments of this application;
[0072] Figure 9 This is a schematic diagram of the structure of the computer device in the embodiments of this application. Detailed Implementation
[0073] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0074] In the description of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, features defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0075] In the description of this application, the word "for example" is used to mean "used as an example, illustration, or description." Any embodiment described as "for example" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use the invention. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that the invention can be made without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid obscuring the description of the invention with unnecessary detail. Therefore, the invention is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.
[0076] In this application's embodiments, the electronic waybill processing method primarily involves computer vision (CV) technology within the field of artificial intelligence (AI). Artificial intelligence utilizes digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceiving the environment, acquiring knowledge, and using that knowledge to obtain optimal results—theories, methods, technologies, and application systems. In other words, artificial intelligence is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine capable of reacting in a manner similar to human intelligence.
[0077] Computer vision is a science that studies how to enable machines to "see." More specifically, it refers to machine vision, which uses cameras and computers to replace human eyes in recognizing, tracking, and measuring targets, and then performs image processing to create images more suitable for human observation or transmission to instruments for detection. As a scientific discipline, computer vision studies related theories and technologies, attempting to build artificial intelligence systems capable of extracting information from images or multidimensional data. Computer vision technologies typically include image processing, image recognition, image semantic understanding, image retrieval, optical character recognition (OCR), video processing, video semantic understanding, video content / behavior recognition, 3D object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous localization and mapping (SLAM), and other technologies, as well as common biometric recognition technologies such as facial recognition and fingerprint recognition. In this application, for the image information of electronic waybills, CV mainly implements target element recognition under image detection and image identification in Image Semantic Understanding (ISU), predicting and identifying target elements in the image and outputting the prediction results. It is understood that the target element can be any content determined by actual business needs, such as text, images, barcodes, QR codes, etc., or other attribute content. The specific implementation of this application does not limit this.
[0078] In the embodiments of this application, it should be noted that the electronic waybill processing method provided in this application is executed in a computer device. The processing objects of each computer device exist in the form of data or information, such as time, which is essentially time information. It can be understood that if size, quantity, size, location, etc. are mentioned in subsequent embodiments, they are all corresponding data that exist so that the computer device can process them. The specifics will not be elaborated here.
[0079] This application provides an electronic waybill processing method, apparatus, computer equipment, and storage medium, which will be described in detail below.
[0080] See Figure 1 , Figure 1 This is a schematic diagram illustrating a scenario for the electronic waybill processing method provided in this application. This method can be applied to an electronic waybill processing system. The electronic waybill processing system includes a printing device 100, a terminal 200, and a server 300. The printing device 100 can be a laser printer, inkjet printer, dot matrix printer, thermal printer, etc. The terminal 200 can be a device that includes both receiving and transmitting hardware, i.e., a device with receiving and transmitting hardware capable of performing bidirectional communication on a bidirectional communication link. Such a device can include cellular or other communication devices, having a single-line display, a multi-line display, or a cellular or other communication device without a multi-line display. Specifically, the terminal 200 can be a desktop terminal or a mobile terminal; more specifically, it can be a mobile phone, tablet computer, laptop computer, etc. The server 300 can be a standalone server, or a server network or server cluster, including but not limited to computers, network hosts, single network servers, multiple network server sets, or cloud servers composed of multiple servers. Among them, cloud servers consist of a large number of computer or network servers based on cloud computing, and the network includes, but is not limited to, wide area networks, metropolitan area networks or local area networks.
[0081] Those skilled in the art will understand that Figure 1 The application environment shown is merely one applicable scenario for the solution in this application and does not constitute a limitation on the application scenario of the solution in this application. Other application environments may include more than one. Figure 1 The number of computer devices shown is more or less, for example Figure 1 Only one server 300 is shown in the diagram. It is understood that the electronic waybill processing system may also include one or more other servers, which are not specifically limited here. In addition, the electronic waybill processing system may also include a storage device for storing data, such as logistics data, including various data from the logistics platform, such as logistics transportation information from logistics network points such as transit hubs, specifically such as express delivery information, delivery vehicle information, and logistics network point information.
[0082] It should be noted that, Figure 1The schematic diagram of the electronic waybill processing system shown is merely an example. The electronic waybill processing system and scenario described in the embodiments of the present invention are for the purpose of more clearly illustrating the technical solutions of the embodiments of the present invention, and do not constitute a limitation on the technical solutions provided by the embodiments of the present invention. As those skilled in the art will know, with the evolution of electronic waybill processing systems and the emergence of new business scenarios, the technical solutions provided by the embodiments of the present invention are also applicable to similar technical problems.
[0083] See Figure 2 This application provides an electronic waybill processing method, which is mainly applied to the above-mentioned... Figure 1 Taking server 300 as an example, the method includes steps S201 to S204, as follows:
[0084] S201, Obtain image information of the initial electronic waybill.
[0085] The initial electronic waybill can be an electronic waybill used to create a universal waybill printing image template; its image information can be found in [reference needed]. Figure 3 , Figure 3 This is a schematic image of the initial electronic waybill involved in the embodiments of this application.
[0086] Specifically, before the server 300 constructs the waybill printing image template, it needs to obtain the materials for creating the template, i.e., the initial electronic waybill. This initial electronic waybill can be a waybill UI (User Interface) design provided by a company's design department. In addition, the image information of the initial electronic waybill can be image information sent by the terminal 200 or image information sent by other servers; this application does not impose any specific limitations.
[0087] S202, obtain each target element in the image information and obtain the element type of each target element.
[0088] The target element can refer to the pre-specified element content to be analyzed in the image, such as text, images, barcodes, QR codes, etc.
[0089] Specifically, after obtaining the image information of the initial electronic waybill, the server 300 can perform image detection processing on the image information, such as detecting and recognizing target elements based on the image information to obtain each target image in the image information. The recognition results can be marked in the image in the form of rectangular boxes. It can be understood that the element type of different target elements can be marked with rectangular boxes of different colors, or marked with different labels while the rectangular boxes are the same, thus clearly identifying the element type of each target element.
[0090] In one embodiment, this step includes: obtaining each target element in the image information based on a pre-trained target element recognition model, and obtaining the element type of each target element; wherein the pre-trained target element recognition model includes at least one of the following: a preliminary convolutional layer, a classification convolutional layer, and a long short-term memory neural network.
[0091] The model structure of the target element recognition model can be found in [reference needed]. Figure 4 The model includes at least Convolutional Neural Networks (CNN), softmax, text-CNN, barcode-CNN, QR-CNN, image-CNN, and Long Short-Term Memory (LSTM). It can be understood that CNN is used for element recognition, softmax for element classification, and LSTM for mining the relationships between elements.
[0092] Specifically, the trained target element recognition model can be used to specifically detect and recognize the image content in the initial electronic waybill image information. That is, the server 300 can input the initial electronic waybill image information into the trained target element recognition model, and the trained target element recognition model outputs image information that outlines each target element. The model training steps and target element acquisition steps involved in this embodiment will be described in detail below.
[0093] In one embodiment, before the step of obtaining each target element in the image information and determining the element type of each target element based on the pre-trained target element recognition model, the method further includes: constructing an initial target element recognition model, the target element recognition model including a preliminary convolutional layer, a classification convolutional layer, and a long short-term memory neural network, the classification convolutional layer including at least one of a text convolutional layer, an image convolutional layer, a barcode convolutional layer, and a QR code convolutional layer; obtaining a sample faceplate image set and dividing the sample faceplate image set into a training set and a test set; the sample faceplate image set including multiple sample faceplate images with labeled element types; using the training set to perform preliminary training on the initial target element recognition model to obtain a pre-trained target element recognition model; using the test set to test and adjust the pre-trained target element recognition model to obtain a trained target element recognition model.
[0094] The initial target element recognition model can be a pre-trained neural network model or an untrained neural network model. The target element recognition model has a convolutional layer. The sample label image can be an image used to train the target element recognition model and labeled with label elements. The label elements have been explained in the above embodiments, including but not limited to: text, images, barcodes, and QR codes.
[0095] Specifically, before the server 300 uses the trained target element recognition model to perform element recognition on the image information of the initial electronic waybill, it first needs to construct an initial target element recognition model. If this initial target element recognition model is a neural network model pre-trained on a preset image training set, it will have certain initialization parameters, and some model training processes can be omitted in subsequent training, saving model training time. If this initial target element recognition model is an untrained neural network model, it needs to acquire and fully train it using a sample image set until it has the ability to recognize target elements. It can be understood that the aforementioned preset image training set can be a preset image set with the same properties as the sample waybill image set, that is, the selection of the image training set is not random, but rather biased towards selecting model parameters that are suitable for subsequent target element recognition.
[0096] More specifically, the sample waybill image acquired by server 300 is a waybill image including multiple labeled target elements. The target elements in each waybill image can be marked using a border box style. The annotation tool can be labellmg, written in Python, which supports cross-platform operation such as Windows and Linux, and can mark specified target elements through a visual operation interface. In addition, the target element recognition model can be trained after server 300 acquires the initial electronic waybill image information, or it can be pre-trained before acquiring the initial electronic waybill image information, or it can be performed synchronously with the image information acquisition step. The timing of model training startup is not limited in this embodiment.
[0097] In one embodiment, the pre-trained target element recognition model includes a preliminary convolutional layer. This step includes: performing edge detection on the image information of the initial electronic waybill based on a preset edge detection algorithm to obtain candidate boxes for each element in the image information; obtaining element feature values in each candidate box through the preliminary convolutional layer; and performing classification prediction on the element feature values in each candidate box based on a preset support vector machine to obtain each target element in the image information and the element type of each target element. The element type includes at least one of the following: text type, image type, barcode type, and QR code type.
[0098] The basic idea of edge detection is to first use edge enhancement operators to highlight local edges in an image, then define the "edge intensity" of a pixel, and extract the edge point set by setting a threshold. In essence, edge detection involves calculating the first or second derivative of the image. Edge detection algorithms can determine the edge positions of different pixel objects by detecting image contrast, i.e., differences in brightness.
[0099] The initial convolutional layer can refer to a composite layer structure of convolutional neural network (CNN) and softmax, which is used for initial convolution to identify different types of target elements in image information.
[0100] Among them, the Support Vector Machine (SVM) is a classifier with sparsity and robustness. It is also a generalized linear classifier that performs binary classification of data in a supervised learning manner. Its decision boundary is the maximum-margin hyperplane solved by the learning samples.
[0101] Specifically, server 300 can use a preset edge detection algorithm to perform edge detection on the image information of the initial electronic waybill, so as to initially determine the outlines of elements in the image information and obtain candidate boxes for each element in the image information. Further, the first layer of the trained target element recognition model—the preliminary convolutional layer—is used to obtain the element feature values corresponding to each candidate box after edge detection. Finally, by analyzing the element feature values corresponding to each candidate box using a support vector machine, the target elements of different element types in the image information can be determined. It can be understood that by analyzing the element feature values using a support vector machine, target and non-target elements can be identified, and the element type of the target elements can also be determined.
[0102] S203, according to the element type of each target element, perform symbol placeholder processing on each target element in the image information to obtain the label printing image template.
[0103] The label printing image template can refer to a general label printing image template, which is defined by a domain-specific language (DSL). In this application, it is actually a pseudocode template in JSON format.
[0104] Specifically, after the server 300 analyzes and determines the element type of each target element in the image information, it can perform symbol placeholder processing on each target element. That is, it uses preset placeholders to place each target element in the image information. The detailed placeholder process can be: (1) According to the position, size, element edge and other information of each target element in the image information, use preset placeholders (such as labels) to perform image placeholder processing. At this time, the attributes of each placeholder label are the position, size, element edge and other information of the corresponding target element; (2) Determine the element candidate box of each target element as the corresponding placeholder. The image information after symbol placeholder processing can be used as a waybill printing image template for each terminal / platform to obtain in real time and be efficiently used in the printing business of many electronic waybills.
[0105] In one embodiment, the pre-trained target element recognition model includes a classification convolutional layer. This step includes: determining the position information of each target element in the image information; performing symbol placeholder processing on each target element in the image information according to the position information and element type of each target element to obtain the element placeholder corresponding to each target element; determining and obtaining the element depth information of each target element through the classification convolutional layer corresponding to each target element according to the element type of each target element; and obtaining the label printing image template based on the element depth information and element placeholder of each target element.
[0106] The location information of the target element can be the pixel coordinates determined by the image coordinate system based on the image information. The image coordinate system is a Cartesian coordinate system with the top left corner of the image as the origin, the right side of the origin as the positive horizontal axis (X) and the bottom side of the origin as the positive vertical axis (Y).
[0107] Specifically, the prerequisite for server 300 to obtain the waybill printing image template is to perform placeholder processing on each target element in the image information. Before processing, it is necessary to determine the position information of each target element in its image information, that is, to determine the start position, end position, and boundary of each target element in the waybill image. The start position is the top-left corner of the candidate element box containing the target element, and the end position is the bottom-right corner of the candidate element box containing the target element. Furthermore, to improve the placeholder effect, the relationship between each target element and the candidate element box can be further determined, including: centering, left alignment, right alignment, top alignment, and bottom alignment. It is understandable that clarifying this relationship is beneficial for adjusting the target printing content to a suitable state in the subsequent printing steps of the target electronic waybill.
[0108] More specifically, after server 300 analyzes and determines the location information of each target element, it can perform symbolic placeholder processing based on this location information using placeholders corresponding to the element type, thereby obtaining the element placeholders corresponding to each target element after symbolic placeholder processing. These element placeholders include, but are not limited to, the following types: text, images, barcodes, and QR codes. For example, text element placeholders can be text1, text2, text3, etc.; image element placeholders can be img1, img2, img3, etc.; barcode element placeholders can be bar1, bar2, bar3, etc.; and QR code element placeholders can be qr1, qr2, qr3, etc. After obtaining the element placeholders corresponding to each target element, server 300 can convolve the deep information of the corresponding target element through the corresponding classification convolutional layer. Using the deep information of each target element and the element placeholders, it can obtain the label printing image template.
[0109] For example, if the element type of target element A is "text", then its corresponding classification convolutional layer could be... Figure 4 The "Text-CNN" text convolutional layer; if the element type of target element B is "QR code", then its corresponding classification convolutional layer can be... Figure 4 The "Qr-CNN" QR code convolutional layer in this embodiment. The steps for obtaining deep element information involved in this embodiment will be described in detail below.
[0110] In one embodiment, the classification convolutional layer includes at least one of a text convolutional layer, an image convolutional layer, a barcode convolutional layer, and a QR code convolutional layer. The step of determining and obtaining the element-depth information of each target element through the classification convolutional layer corresponding to each target element based on the element type of each target element includes: if the element type of the target element is text, then the font type and font size of the target element are obtained through the text convolutional layer as the element-depth information; if the element type of the target element is an image, then the core pixel value of the target element is obtained through the image convolutional layer as the element-depth information; if the element type of the target element is a barcode, then the encoding method and barcode size of the target element are obtained through the barcode convolutional layer as the element-depth information; if the element type of the target element is a QR code, then the encoding method and mask information of the target element are obtained through the QR code convolutional layer as the element-depth information.
[0111] Among them, see Figure 4The text convolutional layer can be "Text-CNN" in the figure, the image convolutional layer can be "Img-CNN" in the figure, the barcode convolutional layer can be "Bar-CNN" in the figure, and the QR code convolutional layer can be "Qr-CNN" in the figure.
[0112] Specifically, when the target element is of text type, the font type and font size of the target element can be obtained not only through the text convolutional layer as its corresponding deep element information, but also through the convolutional recurrent neural network (CRNN) layer.
[0113] Furthermore, for image-type target elements, the element depth information—core pixel value—can be the smallest pixel set of grayscale information extracted from the image through simple compression and grayscale processing; for barcode-type target elements, the element depth information can also include the magnification ratio, and the barcode size can be the narrow side width and width-to-narrow ratio of the barcode element, and the encoding method includes, but is not limited to: UPC-A, UPC-E, EAN13, EAN8, CODE39, CODE93, CODE128; for QR code-type target elements, the element depth information can also include the error correction level (H: extremely high reliability, Q: high reliability, M: standard level, L: high density level), data input format (A: automatic, M: manual), QR code content (N: numeric, A: alphanumeric), and its mask information includes None (automatic selection, 0-7: corresponding mask, 8: no mask).
[0114] In one embodiment, the pre-trained target element recognition model includes a long short-term memory neural network. The step of obtaining the label printing image template based on the deep element information and element placeholders of each target element includes: performing correlation analysis on the deep element information and element placeholders of each target element through the long short-term memory neural network to obtain the correlation information between each target element and the template language information corresponding to each target element; normalizing the correlation information and template language information to obtain processed image information; and determining the processed image information as the label printing image template.
[0115] Among them, Long Short-Term Memory (LSTM) is a type of time-recurrent neural network designed specifically to address the long-term dependency problem inherent in general Recurrent Neural Networks (RNNs). LSTM is suitable for processing and predicting important events with very long intervals and delays in time series.
[0116] Specifically, after the server 300 obtains the element depth information and corresponding replaceable element placeholders for each target element, it inputs the element depth information and element placeholders into the LSTM network layer. This allows the LSTM layer to analyze and obtain the correlation information between the target elements, determine the template language information (DSL) main category name corresponding to each target element, such as "type1", "type2", "type3", and "type4", which can represent different types of target elements in the label printing image template (DSL). After analyzing the element depth information using LSTM, a softmax layer can be used to supplement the analysis of information not identified in the previous steps. After completing the information, the label printing image template can be obtained.
[0117] S204, the waybill printing image template is sent to the terminal. The waybill printing image template is used by the terminal to generate a waybill printing instruction based on the target electronic waybill and the waybill printing image template after receiving the waybill printing request of the target electronic waybill, so as to send the waybill printing instruction to the target printer. The waybill printing instruction is used to instruct the target printer to print the target electronic waybill.
[0118] The terminal can be a barcode scanner used by the logistics service provider's couriers, or other terminal equipment.
[0119] The target electronic waybill can refer to the electronic waybill submitted by the user for the printer to print.
[0120] Specifically, server 300 analyzes and processes the data to obtain the latest waybill printing image template, which can then be sent to terminal 200 with which a pre-established communication connection has been established. The time it takes for terminal 200 to obtain the waybill printing image template can be determined by the time the waybill printing request is received. It can be understood that when terminal 200 receives a waybill printing request for a target electronic waybill and obtains the waybill printing image template pre-stored by server 300, it can replace the pre-set element placeholders in the template with the target printing content of the target electronic waybill, and then generate the corresponding waybill printing instruction. This instruction is then given to the target printer to respond to terminal 200's waybill printing instruction, printing a target electronic waybill with a layout consistent with the waybill printing image template, but with altered actual business content.
[0121] The electronic waybill processing method described in the above embodiments involves the server acquiring the image information of the initial electronic waybill, then obtaining each target element from the image information. Based on the element type of each target element, symbol placeholder processing is performed on each target element in the image information to achieve the creation and acquisition of the waybill printing image template. The universal template created using this method can be used seamlessly by various platforms, eliminating the need for each platform to separately encode and print electronic waybills. This reduces the waybill printing process and improves the accuracy of the template by element type. Therefore, it not only improves the printing efficiency of electronic waybills but also increases their printing accuracy.
[0122] See Figure 5 This application also provides an electronic waybill processing method, which is mainly applied to the above-mentioned... Figure 1 Taking terminal 200 as an example, the method includes steps S501 to S504. This application embodiment will be combined with... Figure 6 Detailed explanation is as follows:
[0123] S501, after receiving the waybill printing request of the target electronic waybill, respond to the waybill printing request and obtain a pre-stored waybill printing image template. The waybill printing request carries the target printing content of the target electronic waybill, and the waybill printing image template includes preset element placeholders.
[0124] S502, replace the element placeholders in the label printing image template with the target printing content to obtain the replaced label printing image template.
[0125] S503, generate a waybill printing instruction based on the printer type of the target printer and the replaced waybill printing image template, wherein the target printer is a printer device determined by the user.
[0126] S504, the waybill printing instruction is sent to the target printer, the waybill printing instruction is used to instruct the target printer to print the target electronic waybill according to the replaced waybill printing image template.
[0127] The target printed content can refer to the real-time changes in different electronic waybills, including but not limited to waybill numbers, order numbers, sender addresses, recipient addresses, cargo weight, cargo dimensions, and shipping costs presented in text, images, barcodes, or QR codes.
[0128] Specifically, when terminal 200 receives a request to print the target electronic waybill, it can respond to the request by obtaining a pre-stored waybill printing image template (DSL) in the database on server 300. This template is obtained through the analysis of the above embodiments.
[0129] After receiving the latest waybill printing image template from the server 300, the terminal 200 can use a parsing engine to replace the element placeholders in the waybill printing image template with the target printing content. The replacement is based on the element type correspondence. In this way, the terminal 200 obtains the replaced waybill printing image template. Then, according to the printer type of the target printer, the terminal 200 uses a translation engine to translate the replaced waybill printing image template into waybill printing instructions, such as the first waybill printing instruction -CPCL and the second waybill printing instruction -ZPL. This allows the waybill printing instructions corresponding to the printer type to be sent to the printing device 100, so that it can print the target electronic waybill according to the replaced waybill printing image template.
[0130] In one embodiment, before generating a label printing instruction based on the printer type of the target printer and the replaced label printing image template, and before the target printer is a printer selected by the user, the method further includes: obtaining printer device information; the printer device information includes a printer list, which is a list of at least one candidate printer; displaying the printer list; and when a user selects a printer device in the printer list, determining the triggered printer device as the target printer.
[0131] Specifically, the printer list includes at least one candidate printer. The candidate printers can be printers of different types, models, and locations. The printer types have been briefly listed in the above embodiments and will not be repeated here.
[0132] More specifically, the terminal 200 may have an interactive interface that can be used to display a preset list of printers. This interface can display candidate printers by showing virtual buttons, meaning different virtual buttons correspond to different candidate printers. When a user triggers one of the virtual buttons, they submit the candidate printer corresponding to that virtual button as the target printer to the terminal 200. It is understood that the virtual buttons can be triggered by clicking, double-clicking, long-pressing, etc., and this application embodiment does not limit the specific triggering method.
[0133] The electronic waybill processing method described in the above embodiments allows the terminal to replace the target electronic waybill template after receiving a waybill printing request by obtaining a pre-stored waybill printing image template from the server. Then, based on the printer type selected by the user and the replaced waybill printing image template, a waybill printing instruction is generated, enabling the target printer to quickly print the target electronic waybill according to the instruction. Since there is no need to adjust the waybill layout separately according to business needs, and a template can be directly obtained for printing, the printing efficiency of electronic waybills is effectively improved.
[0134] To better implement the electronic waybill processing method in the embodiments of this application, an electronic waybill processing device is also provided in the embodiments of this application, such as... Figure 7 As shown, the electronic waybill processing device 700 includes:
[0135] Image acquisition module 710 is used to acquire image information of the initial electronic waybill;
[0136] The element recognition module 720 is used to acquire each target element in the image information and obtain the element type of each target element;
[0137] The template acquisition module 730 is used to perform symbol placeholder processing on each target element in the image information according to the element type of each target element to obtain a label printing image template.
[0138] The template sending module 740 is used to send the waybill printing image template to the terminal. The waybill printing image template is used by the terminal to generate a waybill printing instruction based on the target electronic waybill and the waybill printing image template after receiving the waybill printing request of the target electronic waybill, and to send the waybill printing instruction to the target printer. The waybill printing instruction is used to instruct the target printer to print the target electronic waybill according to the waybill printing image template.
[0139] In some embodiments of this application, the element recognition module 720 is further configured to obtain each target element in the image information based on a pre-trained target element recognition model, and obtain the element type of each target element; wherein the pre-trained target element recognition model includes at least one of the following: a preliminary convolutional layer, a classification convolutional layer, and a long short-term memory neural network.
[0140] In some embodiments of this application, the pre-trained target element recognition model includes a preliminary convolutional layer. The element recognition module 720 is further used to perform edge detection on the image information of the initial electronic waybill based on a preset edge detection algorithm to obtain candidate boxes for each element in the image information; to obtain element feature values in each candidate box through the preliminary convolutional layer; and to perform classification prediction on the element feature values in each candidate box based on a preset support vector machine to obtain each target element in the image information and the element type of each target element. The element type includes at least one of the following: text type, image type, barcode type, and QR code type.
[0141] In some embodiments of this application, the pre-trained target element recognition model includes a classification convolutional layer. The template acquisition module 730 is further configured to determine the position information of each target element in the image information; perform symbol placeholder processing on each target element in the image information according to the position information and element type of each target element to obtain the element placeholder corresponding to each target element; determine and obtain the element depth information of each target element through the classification convolutional layer corresponding to each target element according to the element type of each target element; and obtain the label printing image template based on the element depth information and element placeholder of each target element.
[0142] In some embodiments of this application, the classification convolutional layer includes at least one of a text convolutional layer, an image convolutional layer, a barcode convolutional layer, and a QR code convolutional layer. The template acquisition module 730 is further configured to: if the element type of the target element is text, obtain the font type and font size of the target element through the text convolutional layer as the element's deep information; if the element type of the target element is an image, obtain the core pixel value of the target element through the image convolutional layer as the element's deep information; if the element type of the target element is a barcode, obtain the encoding method and barcode size of the target element through the barcode convolutional layer as the element's deep information; if the element type of the target element is a QR code, obtain the encoding method and mask information of the target element through the QR code convolutional layer as the element's deep information.
[0143] In some embodiments of this application, the pre-trained target element recognition model includes a long short-term memory neural network. The template acquisition module 730 is further configured to perform correlation analysis on the deep information of each target element and the element placeholder through the long short-term memory neural network to obtain the correlation information between each target element and the template language information corresponding to each target element; normalize the correlation information and the template language information to obtain the processed image information; and determine the processed image information as the label printing image template.
[0144] In some embodiments of this application, the electronic waybill processing device 700 further includes a model training module for constructing an initial target element recognition model. The target element recognition model includes a preliminary convolutional layer, a classification convolutional layer, and a long short-term memory neural network. The classification convolutional layer includes at least one of a text convolutional layer, an image convolutional layer, a barcode convolutional layer, and a QR code convolutional layer. The module acquires a sample waybill image set and divides the sample waybill image set into a training set and a test set. The sample waybill image set includes multiple sample waybill images with labeled element types. The initial target element recognition model is preliminarily trained using the training set to obtain a preliminarily trained target element recognition model. The preliminarily trained target element recognition model is tested and adjusted using the test set to obtain a trained target element recognition model.
[0145] In the above embodiment, the server acquires the image information of the initial electronic waybill, then obtains each target element in the image information. Based on the element type of each target element, the server performs symbolic placeholder processing on each target element in the image information, thereby achieving the creation and acquisition of the waybill printing image template. The universal template created using this solution can be used seamlessly by various platforms, eliminating the need for each platform to separately encode and print electronic waybills. This reduces the waybill printing process and improves the accuracy of the template by element type. Therefore, it not only improves the printing efficiency of electronic waybills but also increases their printing accuracy.
[0146] In addition, this application embodiment also provides an electronic waybill processing device, such as... Figure 8 As shown, the electronic waybill processing device 800 includes:
[0147] The request response module 810 is used to respond to the waybill printing request after receiving the waybill printing request of the target electronic waybill, and to obtain a pre-stored waybill printing image template. The waybill printing request carries the target printing content of the target electronic waybill, and the waybill printing image template includes preset element placeholders.
[0148] Template processing module 820 is used to replace the element placeholders in the waybill printing image template with the target printing content to obtain the replaced waybill printing image template;
[0149] The instruction generation module 830 is used to generate a waybill printing instruction based on the printer type of the target printer and the replaced waybill printing image template, wherein the target printer is a printer device determined by the user.
[0150] The instruction sending module 840 is used to send the waybill printing instruction to the target printer, the waybill printing instruction being used to instruct the target printer to print the target electronic waybill according to the replaced waybill printing image template.
[0151] In some embodiments of this application, the electronic waybill processing device 800 further includes a target printer determination module for acquiring printer device information; the printer device information includes a printer list, which is a list of at least one candidate printer; the printer list is displayed; when a user selects a printer device in the printer list, the triggered printer device is determined as the target printer.
[0152] In the above embodiments, after receiving a printing request for the target electronic waybill, the terminal can obtain a pre-stored waybill printing image template from the server to replace the template on the target electronic waybill. Then, based on the printer type selected by the user and the replaced waybill printing image template, a waybill printing instruction is generated, allowing the target printer to quickly print the target electronic waybill according to the instruction. Since there is no need to adjust the waybill layout separately according to business needs, and a template can be directly obtained for printing, the printing efficiency of electronic waybills is effectively improved.
[0153] Specific limitations regarding the electronic waybill processing device can be found in the limitations of the electronic waybill processing method described above, and will not be repeated here. Each module in the aforementioned electronic waybill processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0154] In some embodiments of this application, the electronic waybill processing device 700 can be implemented as a computer program, which can be implemented in, for example... Figure 9 The computer device shown operates on this device. The computer device's memory can store the various program modules that make up the electronic waybill processing unit 700, for example, Figure 7 The image acquisition module 710, element recognition module 720, template acquisition module 730, and template sending module 740 are shown. The computer program comprised of these modules causes the processor to execute the steps in the electronic waybill processing methods of the various embodiments of this application described in this specification.
[0155] For example, Figure 9 The computer device shown can be used as follows Figure 7The image acquisition module 710 in the illustrated electronic waybill processing device 700 executes step S201. The computer device can execute step S202 via the element recognition module 720. The computer device can execute step S203 via the template acquisition module 730. The computer device can execute step S204 via the template sending module 740. The computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communication with external computer devices via a network connection. When the computer program is executed by the processor, it implements an electronic waybill processing method.
[0156] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0157] In some embodiments of this application, a computer device is provided, including one or more processors; a memory; and one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processors as described in the electronic waybill processing method. The steps of the electronic waybill processing method here may be steps from the electronic waybill processing methods of the various embodiments described above.
[0158] In some embodiments of this application, a computer-readable storage medium is provided, storing a computer program. The computer program is loaded by a processor, causing the processor to execute the steps of the above-described electronic waybill processing method. The steps of the electronic waybill processing method here can be the steps from the electronic waybill processing methods of the various embodiments described above.
[0159] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. 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.
[0160] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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, they should be considered to be within the scope of this specification.
[0161] The above provides a detailed description of an electronic waybill processing method, apparatus, computer device, and storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for processing electronic waybills, characterized in that, The method includes: Obtain the image information of the initial electronic waybill; Obtain each target element from the image information and determine the element type of each target element; Determine the position information of each target element in the image information; Based on the position information and element type of each target element, symbol placeholder processing is performed on each target element in the image information to obtain the element placeholder corresponding to each target element; Based on the element type of each target element, the corresponding classification convolutional layer is determined and used to obtain the element depth information of each target element; the element depth information includes the encoding method or mask information of the QR code; By using a long short-term memory neural network, we can perform correlation analysis on the deep information of each target element and the element placeholders to obtain the correlation information between each target element and the template language information corresponding to each target element. The associated information and template language information are normalized to obtain the processed image information; The processed image information is determined and used as a label printing image template; the label printing image template is defined by a domain-specific language. The label printing image template is sent to the terminal. The label printing image template is used by the terminal to generate a label printing instruction based on the target electronic label and the label printing image template after receiving the label printing request of the target electronic label. The label printing instruction is used to instruct the target printer to print the target electronic label.
2. The electronic waybill processing method as described in claim 1, characterized in that, The step of obtaining each target element in the image information and determining the element type of each target element includes: Based on the pre-trained target element recognition model, each target element in the image information is obtained, and the element type of each target element is determined. The pre-trained target element recognition model includes at least one of the following: a preliminary convolutional layer, a classification convolutional layer, and a long short-term memory neural network.
3. The electronic waybill processing method as described in claim 2, characterized in that, The pre-trained target element recognition model includes a preliminary convolutional layer. The step of obtaining each target element in the image information and determining the element type of each target element based on the pre-trained target element recognition model includes: Based on a preset edge detection algorithm, edge detection is performed on the image information of the initial electronic waybill to obtain candidate boxes for each element in the image information; The initial convolutional layer is used to obtain the element feature values in each element candidate box; based on the preset support vector machine, the element feature values in each element candidate box are classified and predicted to obtain each target element in the image information and the element type of each target element. The element type includes at least one of the following: text type, image type, barcode type, and QR code type.
4. The electronic waybill processing method as described in claim 2, characterized in that, The classification convolutional layer includes at least one of text convolutional layer, image convolutional layer, barcode convolutional layer, and QR code convolutional layer. The step of determining and obtaining the element-depth information of each target element based on its element type and through the corresponding classification convolutional layer includes: If the element type of the target element is text, then the font type and font size of the target element are obtained through the text convolutional layer as the deep information of the element; If the target element is an image, then the core pixel value of the target element is obtained through the image convolutional layer and used as the deep information of the element. If the element type of the target element is a barcode, then the encoding method and barcode size of the target element are obtained through the barcode convolutional layer as the deep information of the element; If the target element is a QR code, the encoding method and mask information of the target element are obtained through the QR code convolutional layer and used as the deep information of the element.
5. The electronic waybill processing method as described in claim 2, characterized in that, Before obtaining each target element in the image information and determining the element type of each target element based on the pre-trained target element recognition model, the method further includes: Construct an initial target element recognition model, which includes a preliminary convolutional layer, a classification convolutional layer, and a long short-term memory neural network. The classification convolutional layer includes at least one of a text convolutional layer, an image convolutional layer, a barcode convolutional layer, and a QR code convolutional layer. A sample faceplate image set is obtained, and the sample faceplate image set is divided into a training set and a test set; the sample faceplate image set includes multiple sample faceplate images with labeled element types; The initial target element recognition model is pre-trained using the training set to obtain the pre-trained target element recognition model. The target element recognition model after initial training was tested and adjusted using the test set to obtain the trained target element recognition model.
6. A method for processing electronic waybills, characterized in that, The method includes: After receiving a waybill printing request from the target electronic waybill, respond to the waybill printing request and obtain a pre-stored waybill printing image template. The waybill printing request carries the target printing content of the target electronic waybill, and the waybill printing image template includes preset element placeholders. Replace the placeholder elements in the label printing image template with the target printing content to obtain the replaced label printing image template. Based on the printer type of the target printer and the replaced label printing image template, a label printing instruction is generated, wherein the target printer is a printer device determined by the user. Send the waybill printing instruction to the target printer, the waybill printing instruction being used to instruct the target printer to print the target electronic waybill according to the replaced waybill printing image template; The label printing image template is obtained by normalizing the associated information and template language information; the associated information is obtained by performing association analysis on the deep information of each target element and the element placeholder through a long short-term memory neural network. The target element corresponds to the template language information; the deep information of the element is obtained through the classification convolutional layer corresponding to the target element. The deep information of the element includes the encoding method or mask information of the QR code; the label printing image template is defined by a domain-specific language.
7. The electronic waybill processing method as described in claim 6, characterized in that, Before generating a waybill printing instruction based on the printer type of the target printer and the replaced waybill printing image template, and before the target printer is a printer selected by the user, the method further includes: Obtain printer device information; the printer device information includes a printer list, which is a list of at least one candidate printer; Display the list of printers; When a user selects a printer from the printer list, the selected printer is identified as the target printer.
8. An electronic waybill processing device, characterized in that, The device includes: The image acquisition module is used to acquire image information of the initial electronic waybill; An element recognition module is used to acquire each target element in the image information and obtain the element type of each target element; a template acquisition module is used to determine the position information of each target element in the image information; based on the position information and element type of each target element, symbol placeholder processing is performed on each target element in the image information to obtain the element placeholder corresponding to each target element; based on the element type of each target element, the deep element information of each target element is determined and obtained through the classification convolutional layer corresponding to each target element; the deep element information includes the encoding method or mask information of the QR code; through a long short-term memory neural network, the deep element information and element placeholder of each target element are analyzed for correlation to obtain the correlation information between each target element and the template language information corresponding to each target element; the correlation information and template language information are normalized to obtain the processed image information; the processed image information is determined as the label printing image template; the label printing image template is defined by a domain-specific language. The template sending module is used to send the waybill printing image template to the terminal. The waybill printing image template is used by the terminal to generate a waybill printing instruction based on the target electronic waybill and the waybill printing image template after receiving the waybill printing request of the target electronic waybill, and to send the waybill printing instruction to the target printer. The waybill printing instruction is used to instruct the target printer to print the target electronic waybill according to the waybill printing image template.
9. An electronic waybill processing device, characterized in that, The device includes: The request-response module is used to respond to the waybill printing request after receiving the waybill printing request of the target electronic waybill, and to obtain a pre-stored waybill printing image template. The waybill printing request carries the target printing content of the target electronic waybill, and the waybill printing image template includes preset element placeholders. The template processing module is used to replace the element placeholders in the waybill printing image template with the target printing content to obtain the replaced waybill printing image template. The instruction generation module is used to generate a waybill printing instruction based on the printer type of the target printer and the replaced waybill printing image template, wherein the target printer is a printer device determined by the user. The instruction sending module is used to send the waybill printing instruction to the target printer, the waybill printing instruction being used to instruct the target printer to print the target electronic waybill according to the replaced waybill printing image template; The label printing image template is obtained by normalizing the associated information and template language information; the associated information is obtained by performing association analysis on the deep information of each target element and the element placeholders through a long short-term memory neural network; the target elements correspond to the template language information; the deep information of the elements is obtained through the classification convolutional layer corresponding to the target elements; the deep information of the elements includes the encoding method or mask information of the QR code; the label printing image template is defined by a domain-specific language.
10. A computer device, characterized in that, The computer device includes: One or more processors; Memory; and One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the electronic waybill processing method of any one of claims 1 to 7.
11. A computer-readable storage medium, characterized in that, It stores a computer program, which is loaded by a processor to execute the steps of the electronic waybill processing method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Text output method and output device
CN105718428A
Automated code generation
CN110785736A
Express sheet printing method and device, computer equipment and storage medium
CN111949229A