Configurable electronic express sheet printing implementation method and device, equipment and storage medium

By dynamically configuring and caching the face sheet template, the problems of long update cycle and low flexibility of face sheet templates in the existing technology are solved, and the effect of quickly responding to new printing demands and improving user experience is achieved.

CN119917035APending Publication Date: 2025-05-02SHANGHAI YUNDA HIGH TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411940646.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

The prior art has low flexibility when printing electronic page sheets and cannot quickly respond to new business printing demands. The page sheet template update cycle is long, which affects user experience and satisfaction.

Method used

By dynamically configuring the faceplate template, the template is stored in the template library and imported into the cache, the pre-update of the faceplate template is realized, quickly respond to new printing requests, and directly generate new printing instructions based on the new faceplate template at the data generation end.

Benefits of technology

It improves printing efficiency, improves user experience and satisfaction, and realizes timely updates of page order templates and synchronization across the entire network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119917035A_ABST
    Figure CN119917035A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of information processing, in particular to a configurable electronic express sheet printing implementation method, device and equipment and a storage medium, by dynamically configuring an express sheet template, storing the express sheet template in a template library and importing the express sheet template into a cache, and preposing updating of the express sheet template, the flexibility is high, global controllability is achieved, the express sheet template can be updated to the whole network in time, and the efficiency is high. The method comprises the following steps of: shortening a processing period, receiving an order printing request instruction sent by a mobile APP, when the order printing request instruction needs to configure an express sheet, identifying a template format required in the order printing request instruction, calling a target template corresponding to the template format from a cache, extracting order information in the order printing request instruction, and filling the order information in the target template. According to the method, the filled template is obtained, the configuration printing instruction is generated according to the filled template, the new printing instruction is directly generated at the data generation end according to the newly added express sheet template, a new printing demand is quickly responded, the printing efficiency is improved, the user experience degree is improved, and the user satisfaction degree is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information processing technology, and in particular to a configurable electronic waybill printing implementation method, device, equipment and storage medium. Background Art

[0002] In the current express delivery industry, when printing electronic waybills, the traditional implementation method is to assemble the printing instructions on the mobile device terminal and send them to a portable printer for printing, that is, the waybill printing template is directly implemented on the mobile APP client. This method has low flexibility. When the waybill printing information needs to be adjusted, the mobile APP needs to update the version of the printing template and publish it before executing the printing instruction, which reduces printing efficiency and cannot quickly respond to new business printing demands. In addition, the new printing template needs to be updated to all mobile terminals, which takes a long time and cannot be updated to the entire network in time, affecting the experience of mobile device printing users and reducing user satisfaction. Summary of the invention

[0003] In order to overcome the shortcomings of the prior art, the purpose of the present invention is to provide a configurable electronic waybill printing implementation method, device, equipment and storage medium that can pre-update the update of the waybill template, has high flexibility, is globally controllable, can be updated to the entire network in a timely manner, shortens the processing cycle, and directly generates new printing instructions based on the newly added waybill template at the data generation end, quickly responds to new printing requests, improves printing efficiency, improves user experience and improves user satisfaction.

[0004] The first aspect of the present invention provides a method for implementing configurable electronic waybill printing, including: dynamically configuring a waybill template, storing the waybill template in a template library and importing it into a cache; receiving a waybill request instruction sent by a mobile APP, and determining whether the waybill request instruction requires a configured waybill; if so, identifying the template format required in the waybill request instruction, and calling a target template corresponding to the template format from the cache; extracting order information from the waybill request instruction, filling the order information in the target template, and obtaining a filled template; generating a configuration printing instruction based on the filled template, and returning the configuration printing instruction to the mobile APP, so that the mobile APP sends the configuration printing instruction to a portable printer.

[0005] Optionally, in a first implementation method of the first aspect of the present invention, the dynamically configured face sheet template stores the face sheet template in a template library and imports the cache, including: obtaining configuration feedback information of a mobile APP; obtaining a template list from the template library, and dynamically updating template elements according to the template list and the configuration feedback information; editing the face sheet template according to the template elements; and storing the face sheet template in the template library and importing the cache.

[0006] Optionally, in a second implementation method of the first aspect of the present invention, the receiving of the order request instruction sent by the mobile APP and determining whether the order request instruction needs to be configured with a face sheet include: receiving the order request instruction sent by the mobile APP, and parsing the order request instruction using a message parsing rule to obtain request instruction parsing information, wherein the request instruction parsing information includes order information and printing parameter information; inspecting the printing parameter information to obtain a inspection result; determining whether the order request instruction needs to be configured with a face sheet based on the inspection result; if the order request instruction does not need to be configured with a face sheet, generating a local general printing instruction according to the order request instruction, and returning the local general printing instruction to the mobile APP, so that the mobile APP sends the local general printing instruction to the portable printer.

[0007] Optionally, in a third implementation method of the first aspect of the present invention, if so, the template format required in the order request instruction is identified, and a target template corresponding to the template format is called from the cache, including: if the order request instruction requires a configured face sheet, the format requirement field in the order request instruction is identified; the format requirement semantics of the format requirement field is analyzed, and the template format is determined according to the format requirement semantics; matching is performed in the cache based on the template format to obtain a matching result; and the corresponding target template is extracted according to the matching result.

[0008] Optionally, in a fourth implementation method of the first aspect of the present invention, extracting the order information in the order request instruction, filling the order information in the target template to obtain a filled template, includes: extracting the order information in the order request instruction; cleaning the order information to obtain cleaned information, and converting the cleaned information into structured data; filling the structured data in the target template to obtain a filled template.

[0009] Optionally, in a fifth implementation of the first aspect of the present invention, generating a configuration printing instruction according to the filled template, and returning the configuration printing instruction to the mobile APP so that the mobile APP sends the configuration printing instruction to the portable printer, includes: generating a configuration printing instruction according to the filled template; performing an information integrity check on the configuration printing instruction based on the order request instruction to obtain a check result; determining whether the check result is passed; if so, encapsulating the configuration printing instruction in a preset data format to obtain printing instruction information; and sending the printing instruction information to the mobile APP so that the mobile APP sends the printing instruction information to the portable printer.

[0010] Optionally, in a sixth implementation method of the first aspect of the present invention, the step of generating a configuration printing instruction according to the filled template, returning the configuration printing instruction to the mobile APP, so that the mobile APP sends the configuration printing instruction to the portable printer, further includes: creating a print listener, and using the print listener to listen to the printed information fed back by the portable printer; when the print listener listens to the printed information, receiving the current printed information; generating a print record according to the printed information, and obtaining a timestamp from a timestamp service platform based on the generation time of the print record; associating the timestamp with the print record, and using the public key in a preset key pair to encrypt the print record and the timestamp to obtain encrypted record information; uploading the encrypted record information to the blockchain, and identifying a management terminal with query authority; sending the private key in the key pair to the management terminal, so that the management terminal uses the private key to decrypt the encrypted record information.

[0011] The second aspect of the present invention provides a configurable electronic waybill printing implementation device, including: a configuration storage module, used to dynamically configure the waybill template, store the waybill template in a template library and import it into a cache; a receiving and judging module, used to receive a waybill request instruction sent by a mobile APP, and judge whether the waybill request instruction needs to be configured; an identification and calling module, used to, if so, identify the template format required in the waybill request instruction, and call the target template corresponding to the template format from the cache; an extraction and filling module, used to extract the order information in the waybill request instruction, fill the order information in the target template, and obtain a filled template; a generation and sending module, used to generate a configuration printing instruction based on the filled template, and return the configuration printing instruction to the mobile APP, so that the mobile APP sends the configuration printing instruction to the portable printer.

[0012] Optionally, in a first implementation method of the second aspect of the present invention, the configuration storage module includes: an acquisition unit, used to obtain configuration feedback information of the mobile APP; an acquisition and update unit, used to obtain a template list from a template library, and dynamically update template elements according to the template list and the configuration feedback information; an editing unit, used to edit the face sheet template according to the template elements; and a storage and import unit, used to store the face sheet template in the template library and import it into the cache.

[0013] Optionally, in a second implementation method of the second aspect of the present invention, the receiving and judging module includes: a receiving and parsing unit, used to receive a bill-issuing request instruction sent by a mobile APP, and to parse the bill-issuing request instruction using a message parsing rule to obtain request instruction parsing information, wherein the request instruction parsing information includes order information and printing parameter information; a verification unit, used to verify the printing parameter information to obtain a verification result; a first judgment unit, used to determine whether the bill-issuing request instruction needs to be configured as a face sheet based on the verification result; and a generating and sending unit, used to generate a local general printing instruction according to the bill-issuing request instruction if the bill-issuing request instruction does not need to be configured as a face sheet, and to return the local general printing instruction to the mobile APP, so that the mobile APP sends the local general printing instruction to the portable printer.

[0014] Optionally, in a third implementation method of the second aspect of the present invention, the identification and calling module includes: an identification unit, used to identify the format requirement field in the order request instruction if the order request instruction requires a configured face sheet; an analysis and determination unit, used to analyze the format requirement semantics of the format requirement field, and determine the template format according to the format requirement semantics; a matching unit, used to match in the cache based on the template format to obtain a matching result; and a first extraction unit, used to extract the corresponding target template according to the matching result.

[0015] Optionally, in a fourth implementation of the second aspect of the present invention, the extraction and filling module includes: a second extraction unit, used to extract order information in the order request instruction; a cleaning and conversion unit, used to clean the order information to obtain cleaned information, and convert the cleaned information into structured data; and a filling unit, used to fill the structured data in the target template to obtain a filled template.

[0016] Optionally, in a fifth implementation of the second aspect of the present invention, the generation and sending module includes: a generation unit, used to generate a configuration printing instruction according to the filled template; a verification unit, used to perform information integrity verification on the configuration printing instruction based on the order request instruction to obtain a verification result; a second judgment unit, used to judge whether the verification result is passed; an encapsulation unit, used to encapsulate the configuration printing instruction in a preset data format to obtain printing instruction information if so; and a sending unit, used to send the printing instruction information to the mobile APP, so that the mobile APP sends the printing instruction information to the portable printer.

[0017] Optionally, in a sixth implementation method of the second aspect of the present invention, it also includes: creating a monitoring module, used to create a print listener, and using the print listener to monitor the printed information fed back by the portable printer; a receiving module, used to receive the current printed information when the print listener monitors the printed information; a generating and obtaining module, used to generate a print record according to the printed information, and obtain a timestamp from a timestamp service platform based on the generation time of the print record; an associating encryption module, used to associate the timestamp with the print record, and use the public key in a preset key pair to encrypt the print record and the timestamp to obtain encrypted record information; an uploading and identifying module, used to upload the encrypted record information to the blockchain, and identify the management terminal with query authority; a sending module, used to send the private key in the key pair to the management terminal, so that the management terminal uses the private key to decrypt the encrypted record information.

[0018] The third aspect of the present invention provides a configurable electronic waybill printing implementation device, which 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 configurable electronic waybill printing implementation device to perform each step of the configurable electronic waybill printing implementation 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 configurable electronic waybill printing implementation methods.

[0020] In the technical solution of the present invention, by dynamically configuring the face bill template, the face bill template is stored in the template library and imported into the cache, and the update of the face bill template is pre-placed, which has high flexibility and global controllability, can be updated to the entire network in a timely manner, shortens the processing cycle, and receives the bill request instruction sent by the mobile APP. When the bill request instruction needs to configure the face bill, the template format required in the bill request instruction is identified, and the target template corresponding to the template format is called from the cache, and the order information in the bill request instruction is extracted. The order information is filled in the target template to obtain the filled template, and the configuration printing instruction is generated according to the filled template. At the data generation end, a new printing instruction is directly generated according to the newly added face bill template, so as to quickly respond to new printing demands, improve printing efficiency, improve user experience and improve user satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A first flow chart of a method for implementing configurable electronic bill printing provided in an embodiment of the present invention;

[0022] Figure 2 A second flow chart of a method for implementing configurable electronic bill printing provided in an embodiment of the present invention;

[0023] Figure 3 A third flow chart of a method for implementing configurable electronic bill printing provided in an embodiment of the present invention;

[0024] Figure 4 A fourth flow chart of a method for implementing configurable electronic bill printing provided in an embodiment of the present invention;

[0025] Figure 5 A schematic diagram of a structure of a configurable electronic waybill printing implementation device provided in an embodiment of the present invention;

[0026] Figure 6 Another structural schematic diagram of a configurable electronic bill printing implementation device provided in an embodiment of the present invention;

[0027] Figure 7 A schematic diagram of the structure of a configurable electronic waybill printing implementation device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0028] The present invention provides a configurable electronic waybill printing implementation method, device, equipment and storage medium, which pre-updates the update of the waybill template, has high flexibility, is globally controllable, can be updated to the entire network in a timely manner, shortens the processing cycle, and directly generates new printing instructions based on the newly added waybill template at the data generation end, quickly responds to new printing demands, improves printing efficiency, and improves user experience and user satisfaction.

[0029] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged 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 device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 An embodiment of a method for implementing configurable electronic bill printing in an embodiment of the present invention includes:

[0031] 101. Dynamically configure the bill template, store the bill template in the template library and import it into the cache;

[0032] In this embodiment, the specific requirements and format of the face sheet, including fields, layout and style, are understood, and a face sheet template is designed according to the requirements. It may be necessary to support different variables and conditional formats, and dynamically configure the parameters of the template, such as font size, field position, etc., to adapt to different printing requirements. A record is created in the template library for each face sheet template, including information such as the template ID, description, configuration parameters, etc., and a suitable storage method (such as a database or file system) is selected to save the template file and related configurations. The template is version managed to track and restore different versions of templates, and the cache strategy is determined, such as the cache refresh cycle, cache size, etc. The template is loaded from the template library into the cache to improve the access speed, and a cache management mechanism is implemented, including update, invalidation and cleanup strategies to maintain the validity and accuracy of the cache.

[0033] 102. Receive the order request instruction sent by the mobile APP, and determine whether the order request instruction needs to be configured as a shipping label;

[0034] In this embodiment, an API interface or a message receiving endpoint is created to receive an order request instruction from a mobile APP. After receiving the request, the integrity and validity of the request data are verified, including the fields, format, and required parameters of the request. Key information such as order number, user information, print content, etc. are extracted from the request. The request data is converted into a format that the system can process based on data mapping or conversion logic, and a rule engine or conditional judgment logic is used to determine whether a configured delivery note is required.

[0035] 103. If yes, identify the template format required in the order request instruction, and call the target template corresponding to the template format from the cache;

[0036] In this embodiment, if a configured face sheet is required, the specified template format information is extracted from the face sheet request instruction. This is a field or parameter that contains a template ID, a format identifier or other relevant information. Based on the extracted information, the required template format is determined, and it is ensured that the cache system has been designed to store and retrieve the target template corresponding to the template format. The identified template format information is used to retrieve the corresponding target template from the cache, and the template retrieved from the cache is loaded into the processing system in preparation for further operations.

[0037] 104. Extract the order information in the order request instruction, fill the order information in the target template, and obtain the filled template;

[0038] In this embodiment, order information is extracted from the order request instruction, the target template previously obtained from the cache is loaded into the processing system, the extracted order information is mapped to the placeholder of the target template, the filling logic is applied, the order data is inserted into the template, the filled data is synthesized with the target template, and a complete filled template is generated. It is ensured that the filled template conforms to the expected format and layout, and necessary formatting processing is performed, such as alignment and font adjustment, to ensure the clarity and readability of the template. The generated filled template is checked to ensure that the order information is correctly and completely displayed in the template, and a preview function is provided for manual inspection and confirmation to ensure that the final template meets printing or display requirements.

[0039] 105. Generate a configuration printing instruction according to the filled template, and send the configuration printing instruction back to the mobile APP, so that the mobile APP sends the configuration printing instruction to the portable printer;

[0040] In this embodiment, a configuration printing instruction that meets the requirements of the portable printer is created based on the template content and the printing configuration. The configuration printing instruction includes the filled order information and detailed layout data. After the configuration printing instruction is returned to the mobile APP, the mobile APP sends the configuration printing instruction to the portable printer through the Bluetooth channel, so that the portable printer prints the order according to the configuration printing instruction.

[0041] In an embodiment of the present invention, by dynamically configuring the face bill template, the face bill template is stored in a template library and imported into a cache, and the update of the face bill template is pre-placed, which has high flexibility and is globally controllable. It can be updated to the entire network in a timely manner, shortening the processing cycle, and receiving a bill request instruction sent by a mobile APP. When the bill request instruction needs to configure the face bill, the template format required in the bill request instruction is identified, and the target template corresponding to the template format is called from the cache. The order information in the bill request instruction is extracted, and the order information is filled in the target template to obtain a filled template. A configuration printing instruction is generated according to the filled template, and a new printing instruction is directly generated at the data generation end according to the newly added face bill template, so as to quickly respond to new printing requests, improve printing efficiency, improve user experience, and improve user satisfaction.

[0042] See also Figure 2 The second embodiment of the method for implementing the configurable electronic bill printing in the embodiment of the present invention includes:

[0043] 201. Obtain configuration feedback information of the mobile APP;

[0044] In this embodiment, the user provides configuration information through the feedback mechanism within the APP. The APP provides a setting or feedback interface in which the user can modify the settings, enter feedback or submit questions. The user's settings and feedback are collected through forms, sliders, switches or text boxes within the application. The user's configuration feedback information is converted into an appropriate data format, such as JSON or XML, for transmission and storage. A network request (such as HTTP or HTTPS) is used to send data from the user device to the server. The server receives the configuration feedback information from the user device, parses the data format, and stores the configuration feedback information in a database for subsequent processing.

[0045] 202. Obtain a template list from the template library, and dynamically update the template elements according to the template list and configuration feedback information;

[0046] In this embodiment, a connection is made to a database or file system storing templates to obtain a list of available templates, and configuration feedback information is received and parsed, which includes data entered by the user, changes to print settings, requirements for adjustment of template content, etc. According to the requirements in the configuration feedback information, the missing template elements in the template list are dynamically updated, that is, specific elements in the template are modified, such as text, images, layouts, etc.

[0047] 203. Edit the template element to obtain the delivery bill template;

[0048] In this embodiment, the face sheet template is obtained by editing the template elements, for example, adjusting the layout position, adjusting the border, replacing the image, etc. The template settings, such as font size, color, style, etc., are adjusted according to the configuration feedback information to meet user needs or printing requirements, and the updated template is saved in the template library.

[0049] 204. Store the bill template in the template library and import it into the cache;

[0050] In this embodiment, the edited face sheet template is saved in a suitable file format to ensure that the file is complete and correct, the template file is uploaded to the template library, the template is classified into appropriate categories, and tags are added to facilitate quick retrieval and organization, the template's access permissions are configured to ensure that only authorized users can view or edit the template, the cache mechanism is used to improve the template loading speed, and the newly saved template is imported into the cache.

[0051] 205. Receive the order request instruction sent by the mobile APP, and parse the order request instruction using the message parsing rule to obtain request instruction parsing information, where the request instruction parsing information includes order information and printing parameter information;

[0052] In this embodiment, the mobile APP sends an order request instruction to the server through a network protocol (such as HTTP, HTTPS, etc.), converts the received request instruction into an operable data structure using message parsing rules, extracts order-related data from the message, such as order number, product details, quantity, recipient information, etc., and extracts printing-related settings from the message, such as border parameter values, layout position, etc.

[0053] 206. Check the printing parameter information and obtain a check result;

[0054] In this embodiment, each field is extracted from the parsed printing parameter information, the valid range and format of each printing parameter are determined, and it is checked whether the format of the printing parameters meets expectations, for example, whether the layout position is within the preset options, and whether the border parameter value is within the allowable range, for example, whether the width and height of the border are within the preset size range.

[0055] 207. Determine whether the bill request instruction needs to be configured as a bill based on the inspection result;

[0056] In this embodiment, the inspection results of the printing parameters in the previous step are checked to determine whether all the parameters meet the expected standards and ranges. If the inspection results show that the parameters are invalid or erroneous, it is necessary to configure the face sheet to ensure that the generated face sheet meets the requirements. If the parameters are valid and meet the standards, it is not necessary to configure the face sheet.

[0057] 208. If the bill printing request instruction does not require a configured face sheet, a local general printing instruction is generated according to the bill printing request instruction, and the local general printing instruction is returned and sent to the mobile APP, so that the mobile APP sends the local general printing instruction to the portable printer;

[0058] In this embodiment, after confirming that the previous inspection results indicate that no face sheet configuration is required, the information in the order request instruction (such as order data and print content) is embedded in the general printing instruction, and the generated local general printing instruction is formatted as a response into a data format suitable for sending to the mobile APP. The printing instruction is sent to the mobile APP through an appropriate interface to ensure that the data transmission is complete and correct. After receiving the local general printing instruction, the mobile APP parses and processes it, and transmits the processed instruction to the portable printer to trigger the actual printing operation.

[0059] In an embodiment of the present invention, the system can dynamically update the template according to the configuration feedback information of the mobile APP, which enables the template to flexibly adapt to different needs and environmental changes. By obtaining the template list from the template library and adjusting it, the system can ensure that the generated face bill template meets the actual needs. The template generation and management process improves efficiency through centralized storage and caching mechanisms. The face bill templates are stored in the template library and imported into the cache, which reduces the delay in template loading and enables the printing task to be started quickly. The system standardizes the parsing of the bill request instructions through message parsing rules and verifies the printing parameter information to ensure the accuracy of the printing instructions. The use of the inspection results further improves the reliability of request processing and reduces the possibility of errors. The system can decide whether the face bill needs to be configured based on the inspection results, thereby avoiding unnecessary resource consumption. For requests that do not require configuration, local general printing instructions are generated to simplify the processing flow and improve resource utilization efficiency.

[0060] See also Figure 3 The third embodiment of the method for implementing the configurable electronic bill printing in the embodiment of the present invention includes:

[0061] 301. If the billing request instruction requires a configured bill, identify the format requirement field in the billing request instruction;

[0062] In this embodiment, if it is confirmed that the previous inspection result indicates that the waybill configuration is required, the format requirement field is extracted from the waybill request instruction.

[0063] 302. Analyze the format requirement semantics of the format requirement field, and determine the template format according to the format requirement semantics;

[0064] In this embodiment, the extracted fields are analyzed to determine their specific requirements and formats. Specifically, the field describes the meaning of each field in detail, and the specific semantics of each field is analyzed. For example, "margin setting" refers to the distance between the document content and the edge of the paper. The semantics of each field is mapped to the actual template setting, and the specific parameters of the template are determined according to the semantics of the field. For example, the margin parameters of the template are adjusted according to the margin setting, the font style and size in the template are set according to the font style and size, and the color scheme used in the template is set according to the color. The appropriate template format is selected according to the analyzed field semantics.

[0065] 303. Matching is performed in the cache based on the template format to obtain a matching result;

[0066] In this embodiment, the template format information that needs to be matched is extracted from the request, a template matching the request format is searched in the cache, a matching algorithm is applied to compare the request format with the template format stored in the cache, and a check is made to see whether the request format is completely consistent with a template format in the cache. The degree of matching is determined based on certain predefined patterns or rules. For example, certain fields are optional or have a certain tolerance. If a template that fully or partially matches the request format is found, the matching template information is returned to obtain a matching result.

[0067] 304. Extracting a corresponding target template according to the matching result;

[0068] In this embodiment, the matching result includes a template identifier (such as a template ID) or specific template data (such as a template object). If the matching result provides a template ID, this ID can be used in the template library or cache to find the corresponding template, and the data of the target template can be extracted based on the search result, including the layout, style, content, etc. of the template. If the template data has been cached, the template is directly extracted from the cache to increase access speed.

[0069] 305. Extract the order information in the order request instruction;

[0070] In this embodiment, the data format of the order request instruction is determined, and the instruction content is parsed to identify the fields contained in the instruction, such as order ID, product information, quantity, customer information, etc., and extract the unique identifier of the order for subsequent data retrieval and processing. The product details in the order are extracted, and customer-related information such as name, contact information, delivery address, etc. is obtained. The extracted data is converted into a format suitable for subsequent processing as needed, such as converting a date string into a date object.

[0071] 306. Clean the order information to obtain cleaned information, and convert the cleaned information into structured data;

[0072] In this embodiment, missing necessary fields are identified and processed, null values ​​in fields are processed, default values, average values, or records are selected to be filled according to actual conditions, all data fields are ensured to follow a consistent format, data is converted to the correct type, such as converting price strings to floating point numbers and date strings to date objects, duplicate data is identified and removed, unnecessary characters or data are removed, such as useless characters or extra spaces in order notes, outliers are detected and processed, such as negative numbers or invalid characters in price fields, erroneous data is corrected according to business rules, such as correcting invalid postal codes, data models are designed according to business requirements, such as organizing order information into structured data such as order ID, product list, and customer information, the cleaned information is mapped to a structured data model, for example, "product name" and "product quantity" are mapped to fields in the "product list", and the cleaned data is converted into a structured format according to the defined data model.

[0073] 307. Fill the target template with structured data to obtain a filled template;

[0074] In this embodiment, the target template format to be used is confirmed, the fields in the template and their positions are understood, it is ensured that the fields in the structured data match the placeholders or fields in the template, necessary data fields such as customer name, order number, order date, etc. are extracted from the structured data source, and the placeholders in the template are replaced with the extracted data, for example, "customer name" is replaced with the actual customer name, and the data is inserted into the corresponding position in the template according to the field mapping, ensuring that the format of the filled data is consistent with the template requirements, and the filled template is saved in the specified format as needed, and the file is saved using the appropriate naming convention.

[0075] 308. Generate configuration printing instructions based on the filled template;

[0076] In this embodiment, a specific printing instruction is written based on the filled template to obtain a configuration printing instruction.

[0077] 309. Performing information integrity check on the configuration printing instruction based on the order request instruction to obtain a check result;

[0078] In this embodiment, check whether the information contained in the order request instruction is complete, ensure that all necessary fields are filled in and conform to the expected format, ensure that all required settings are included in the configuration printing instruction, check whether there are any missing or inconsistent parts in the configuration instruction, compare the contents of the order request instruction and the configuration printing instruction, ensure that all settings in the request are reflected in the configuration, check whether there are any mismatches or omissions, use a verification tool or program to automatically detect the integrity of the configuration printing instruction, and obtain the verification result.

[0079] 310. Determine whether the verification result is passed;

[0080] In this embodiment, it is determined whether the verification result shows that there is no mismatch or omission.

[0081] 311. If yes, encapsulate the configuration printing instruction according to a preset data format to obtain printing instruction information;

[0082] In this embodiment, if there is no mismatch or omission in the verification result, the preset data format requirements are found, all relevant data are extracted from the configuration printing instructions that have passed the verification, the extracted data is organized and formatted according to the preset data format, and the corresponding tools or libraries are used to generate a data structure that meets the format requirements, and the formatted data is written into a file to ensure that the file meets the preset data format, and the printing instruction information is obtained.

[0083] 312. Send the printing instruction information to the mobile APP, so that the mobile APP sends the printing instruction information to the portable printer;

[0084] In this embodiment, an API or SDK is used to send data to a mobile APP. After receiving the printing instruction information, the mobile APP performs parsing and verification. After successful parsing and verification, the printing instruction information is sent to a portable printer through a Bluetooth channel. The portable printer successfully receives and starts the printing task.

[0085] In an embodiment of the present invention, by identifying and analyzing the format requirement fields in the order request instruction, the system can accurately determine the required template format and perform efficient matching in the cache to ensure that the generated template meets the specific needs, clean the order information and convert it into structured data, so that data processing is more standardized and consistent, thereby improving the accuracy of information filling, reducing the time of repeated calculations through cache matching and target template extraction, improving the overall processing efficiency, verifying the information integrity of the printing instruction, ensuring the accuracy of the printing task, and avoiding errors caused by incomplete information. Finally, the printing instruction information is sent to the mobile APP, so that the system can automatically issue instructions to the portable printer, simplifying the operating process and improving the degree of automation of the system.

[0086] See also Figure 4 The fourth embodiment of the method for implementing the configurable electronic bill printing in the embodiment of the present invention includes:

[0087] 401. Create a print listener, and use the print listener to monitor the printed information fed back by the portable printer;

[0088] In this embodiment, a suitable library or framework is selected to implement the print listener function, the corresponding interface is inherited or implemented to implement the specific monitoring logic, the message fed back from the printer is processed, and the protocol layer is implemented in the code to exchange data with the printer.

[0089] 402. When the print listener listens to the printed information, it receives the current printed information;

[0090] In this embodiment, the print listener is registered with the event system or callback mechanism of the portable printer so that it can receive a signal indicating that printing is completed. When the portable printer completes printing, the event system will call the callback method of the print listener and receive the printed information in the callback method.

[0091] 403. Generate a printing record according to the printed information, and obtain a timestamp from a timestamp service platform based on the generation time of the printing record;

[0092] In this embodiment, the information that the print record needs to include is determined, a print record is generated based on the printed information, a suitable timestamp service platform is selected, such as a network time protocol (NTP) server, a timestamp API, etc., and according to the API documentation of the service platform, the request parameters are configured and the request is sent to obtain the timestamp generated by the record through the timestamp service.

[0093] 404. Associating the timestamp with the printing record, and encrypting the printing record and the timestamp using the public key in the preset key pair to obtain encrypted record information;

[0094] In this embodiment, the timestamp generated by the record is obtained through the timestamp service, the timestamp is attached to the print record, and a suitable public key encryption algorithm is selected, such as RSA or ECC, to ensure that a pair of public and private keys are generated, and the public key is used for encryption and the private key is used for decryption. The content of the print record and the timestamp are merged into a string, and the merged string is encrypted using the public key to obtain encrypted record information.

[0095] 405. Upload the encrypted record information to the blockchain and identify the management terminal with query authority;

[0096] In this embodiment, a suitable blockchain platform is selected, a smart contract is written to handle the storage and retrieval of encrypted records, the smart contract is deployed to the blockchain, the functions in the smart contract are called using the blockchain client library, the encrypted records are uploaded to the blockchain, a permission management strategy is designed to determine which addresses or terminals have the right to query the records, and the management functions in the contract are used to add or revoke the terminal's query permissions. When the terminal queries the record, the smart contract checks whether the inquirer is authorized.

[0097] 406. Send the private key in the key pair to the management terminal, so that the management terminal uses the private key to decrypt the encrypted record information;

[0098] In this embodiment, a secure algorithm is used to generate a key pair. The private key should be kept confidential, and the public key can be made public. The private key is stored in a secure environment, such as a hardware security module or security software. A strong encryption protocol (such as TLS / SSL) is used to securely transmit the private key to the management terminal. After receiving the private key, the management terminal can use it to decrypt the encrypted records.

[0099] In the embodiment of the present invention, the feedback of the portable printer is monitored in real time by a print monitor to ensure that the printed information can be recorded and processed immediately, thereby improving the timeliness and accuracy of monitoring, generating print records and obtaining timestamps to ensure that each record has an accurate time stamp, thereby increasing the reliability and traceability of the records, and encrypting the print records and timestamps with public keys to ensure the security of the record information before uploading to the blockchain, thereby preventing data tampering and unauthorized access, and uploading the encrypted record information to the blockchain, utilizing the immutability of the blockchain to ensure the integrity and long-term validity of the data, and sending the private key to a management terminal with query authority to ensure that only authorized users can decrypt and access sensitive data, thereby enhancing the security and authority control of the system.

[0100] The above describes the method for implementing the configurable electronic waybill printing in the embodiment of the present invention. The following describes the device for implementing the configurable electronic waybill printing in the embodiment of the present invention. Figure 5 In one embodiment of the present invention, an electronic bill printing implementation device can be configured to include:

[0101] Configuration storage module 501, used to dynamically configure the bill template, store the bill template in the template library and import it into the cache;

[0102] The receiving and judging module 502 is used to receive the order request instruction sent by the mobile APP, and judge whether the order request instruction needs to be configured as a shipping label;

[0103] The identification and calling module 503 is used to identify the template format required in the order request instruction and call the target template corresponding to the template format from the cache;

[0104] The extraction and filling module 504 is used to extract the order information in the order request instruction, fill the order information in the target template, and obtain a filled template;

[0105] The generating and sending module 505 is used to generate a configuration printing instruction according to the filled template, and return the configuration printing instruction to the mobile APP, so that the mobile APP sends the configuration printing instruction to the portable printer.

[0106] In this embodiment, by dynamically configuring the face bill template, the face bill template is stored in the template library and imported into the cache, and the update of the face bill template is pre-placed, which has high flexibility and global controllability, can be updated to the entire network in a timely manner, shortens the processing cycle, and receives the face bill request instruction sent by the mobile APP. When the face bill request instruction needs to configure the face bill, the template format required in the face bill request instruction is identified, and the target template corresponding to the template format is called from the cache. The order information in the face bill request instruction is extracted, and the order information is filled in the target template to obtain the filled template. The configuration printing instruction is generated according to the filled template, and a new printing instruction is directly generated at the data generation end according to the newly added face bill template, so as to quickly respond to new printing requests, improve printing efficiency, improve user experience and improve user satisfaction.

[0107] See also Figure 6 Another embodiment of the device for implementing electronic bill printing in the embodiment of the present invention includes:

[0108] Configuration storage module 501, used to dynamically configure the bill template, store the bill template in the template library and import it into the cache;

[0109] The receiving and judging module 502 is used to receive the order request instruction sent by the mobile APP, and judge whether the order request instruction needs to be configured as a shipping label;

[0110] The identification and calling module 503 is used to identify the template format required in the order request instruction and call the target template corresponding to the template format from the cache;

[0111] The extraction and filling module 504 is used to extract the order information in the order request instruction, fill the order information in the target template, and obtain a filled template;

[0112] A generating and sending module 505 is used to generate a configuration printing instruction according to the filled template, and send the configuration printing instruction back to the mobile APP, so that the mobile APP sends the configuration printing instruction to the portable printer;

[0113] In this embodiment, the configuration storage module 501 includes: an acquisition unit 5011, used to obtain configuration feedback information of the mobile APP; an acquisition update unit 5012, used to obtain a template list from the template library, and dynamically update the template elements according to the template list and the configuration feedback information; an editing unit 5013, used to edit the face sheet template according to the template elements; and a storage import unit 5014, used to store the face sheet template in the template library and import it into the cache.

[0114] In this embodiment, the receiving and judging module 502 includes: a receiving and parsing unit 5021, which is used to receive a bill-issuing request instruction sent by a mobile APP, and parse the bill-issuing request instruction using a message parsing rule to obtain request instruction parsing information, wherein the request instruction parsing information includes order information and printing parameter information; a checking unit 5022, which is used to check the printing parameter information to obtain a checking result; a first judging unit 5023, which is used to judge whether the bill-issuing request instruction needs to be configured as a face sheet based on the checking result; and a generating and sending unit 5024, which is used to generate a local general printing instruction according to the bill-issuing request instruction if the bill-issuing request instruction does not need to be configured as a face sheet, and return the local general printing instruction to the mobile APP, so that the mobile APP sends the local general printing instruction to the portable printer.

[0115] In this embodiment, the identification and calling module 503 includes: an identification unit 5031, which is used to identify the format requirement field in the order request instruction if the order request instruction needs to configure the face sheet; an analysis and determination unit 5032, which is used to analyze the format requirement semantics of the format requirement field, and determine the template format according to the format requirement semantics; a matching unit 5033, which is used to match in the cache based on the template format to obtain a matching result; and a first extraction unit 5034, which is used to extract the corresponding target template according to the matching result.

[0116] In this embodiment, the extraction and filling module 504 includes: a second extraction unit 5041, used to extract order information in the order request instruction; a cleaning and conversion unit 5042, used to clean the order information, obtain cleaned information, and convert the cleaned information into structured data; a filling unit 5043, used to fill the structured data in the target template to obtain a filled template.

[0117] In this embodiment, the generation and sending module 505 includes: a generation unit 5051, which is used to generate a configuration printing instruction according to a filled template; a verification unit 5052, which is used to perform information integrity verification on the configuration printing instruction based on the order request instruction to obtain a verification result; a second judgment unit 5053, which is used to judge whether the verification result is passed; an encapsulation unit 5054, which is used to encapsulate the configuration printing instruction according to a preset data format to obtain printing instruction information if so; a sending unit 5055, which is used to send the printing instruction information to the mobile APP, so that the mobile APP sends the printing instruction information to the portable printer.

[0118] In this embodiment, it also includes: creating a monitoring module 506, which is used to create a print listener and use the print listener to monitor the printed information fed back by the portable printer; a receiving module 507, which is used to receive the current printed information when the print listener monitors the printed information; generating an acquisition module 508, which is used to generate a print record according to the printed information, and obtain a timestamp from the timestamp service platform based on the generation time of the print record; an associated encryption module 509, which is used to associate the timestamp with the print record, and use the public key in the preset key pair to encrypt the print record and the timestamp to obtain the encrypted record information; an upload identification module 510, which is used to upload the encrypted record information to the blockchain and identify the management terminal with query authority; a sending module 511, which is used to send the private key in the key pair to the management terminal, so that the management terminal uses the private key to decrypt the encrypted record information.

[0119] above Figure 5 and Figure 6 The configurable electronic waybill printing implementation device in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The configurable electronic waybill printing implementation device in the embodiment of the present invention is described in detail from the perspective of hardware processing.

[0120] Figure 7 : is a schematic diagram of the structure of a configurable electronic bill printing implementation device provided by an embodiment of the present invention. The configurable electronic bill printing implementation device 600 may have relatively large differences due to different configurations or performances, 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. Among them, the memory 620 and the storage medium 630 can 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), and each module may include a series of instruction operations in the configurable electronic bill printing implementation device 600. Furthermore, the processor 610 can be configured to communicate with the storage medium 630, and execute a series of instruction operations in the storage medium 630 on the configurable electronic bill printing implementation device 600 to implement the steps of the configurable electronic bill printing implementation method provided in the above-mentioned method embodiments.

[0121] The configurable electronic bill printing implementation 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 Serve, Mac OS X, Unix, Linux, FreeBSD, etc. It will be appreciated by those skilled in the art that Figure 7 The structure of the configurable electronic waybill printing implementation device shown does not constitute a limitation on the configurable electronic waybill printing implementation 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.

[0122] 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 a method for implementing configurable electronic face sheet printing.

[0123] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system, device, or unit can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.

[0124] 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, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a 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), disk or optical disk and other media that can store program codes.

[0125] Finally, it should be noted that the above description is only a preferred example 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 can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for implementing configurable electronic bill printing, characterized in that: include: Dynamically configure a bill of lading template, store the bill of lading template in a template library and import the template into a cache; Receive the order request instruction sent by the mobile APP, and determine whether the order request instruction needs to be configured as a shipping label; If yes, then identifying the template format required in the order request instruction, and calling the target template corresponding to the template format from the cache; Extracting order information from the order request instruction, filling the order information in the target template to obtain a filled template; Generate a configuration printing instruction according to the filled template, and send the configuration printing instruction back to the mobile APP, so that the mobile APP sends the configuration printing instruction to the portable printer.

2. The method for implementing configurable electronic bill printing according to claim 1, characterized in that: The dynamically configuring the bill template, storing the bill template in a template library and importing the template into a cache, includes: Get configuration feedback information of mobile APP; Acquire a template list from a template library, and dynamically update template elements according to the template list and the configuration feedback information; Edit the template element to obtain a delivery note template; The delivery note template is stored in the template library and imported into the cache.

3. The method for implementing configurable electronic bill printing according to claim 1, characterized in that: The receiving of the billing request instruction sent by the mobile APP and determining whether the billing request instruction needs to be configured as a bill of lading includes: Receive the order request instruction sent by the mobile APP, and parse the order request instruction using the message parsing rule to obtain request instruction parsing information, wherein the request instruction parsing information includes order information and printing parameter information; Testing the printing parameter information to obtain a test result; Determine whether the billing request instruction needs to be configured as a bill based on the inspection result; If the printing request instruction does not require a configured face sheet, a local general printing instruction is generated according to the printing request instruction, and the local general printing instruction is returned to the mobile APP, so that the mobile APP sends the local general printing instruction to the portable printer.

4. The method for implementing configurable electronic bill printing according to claim 1, characterized in that: If yes, identifying the template format required in the order request instruction, and calling the target template corresponding to the template format from the cache, including: If the billing request instruction requires a configured bill, identifying the format requirement field in the billing request instruction; Analyzing the format requirement semantics of the format requirement field, and determining the template format according to the format requirement semantics; Perform matching in the cache based on the template format to obtain a matching result; The corresponding target template is extracted according to the matching result.

5. The method for implementing configurable electronic bill printing according to claim 1, characterized in that: The step of extracting the order information from the order request instruction and filling the order information in the target template to obtain a filled template includes: Extracting order information from the order request instruction; Cleaning the order information to obtain cleaned information, and converting the cleaned information into structured data; The structured data is filled in the target template to obtain a filled template.

6. The method for implementing configurable electronic bill printing according to claim 1, characterized in that: The step of generating a configuration printing instruction according to the filled template, and returning the configuration printing instruction to the mobile APP so that the mobile APP sends the configuration printing instruction to the portable printer includes: generating configuration printing instructions according to the filled template; Performing information integrity check on the configuration printing instruction based on the order request instruction to obtain a check result; Determine whether the verification result is passed; If yes, encapsulate the configuration printing instruction according to a preset data format to obtain printing instruction information; The printing instruction information is sent to the mobile APP, so that the mobile APP sends the printing instruction information to the portable printer.

7. The method for implementing configurable electronic bill printing according to claim 1, characterized in that: After generating a configuration printing instruction according to the filled template and sending the configuration printing instruction back to the mobile APP so that the mobile APP sends the configuration printing instruction to the portable printer, the method further includes: Creating a print listener, and using the print listener to monitor the printed information fed back by the portable printer; When the print listener listens to the printed information, it receives the current printed information; Generate a printing record according to the printed information, and obtain a timestamp from a timestamp service platform based on the generation time of the printing record; Associating the timestamp with the printing record, and encrypting the printing record and the timestamp using a public key in a preset key pair to obtain encrypted record information; Upload the encrypted record information to the blockchain and identify the management terminal with query authority; The private key in the key pair is sent to the management terminal, so that the management terminal uses the private key to decrypt the encrypted record information.

8. A configurable electronic bill printing device, characterized in that: include: A configuration storage module is used to dynamically configure a bill template, store the bill template in a template library and import it into a cache; A receiving and judging module is used to receive a billing request instruction sent by a mobile APP, and to judge whether the billing request instruction needs to be configured as a face sheet; an identification calling module, for, if yes, identifying the template format required in the order request instruction, and calling a target template corresponding to the template format from the cache; An extraction and filling module, used for extracting the order information in the order request instruction, filling the order information in the target template, and obtaining a filled template; A generating and sending module is used to generate a configuration printing instruction according to the filled template, and return the configuration printing instruction to the mobile APP, so that the mobile APP sends the configuration printing instruction to the portable printer.

9. A configurable electronic bill printing device, characterized in that: The configurable electronic bill printing implementation device comprises: 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 configurable electronic waybill printing implementation device to perform each step of the configurable electronic waybill printing implementation 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 instruction is executed by the processor, each step of the configurable electronic waybill printing implementation method as described in any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Electronic file processing method and system based on virtual printing

    CN120950018A