Electronic face sheet printing format generation method, device, equipment and medium
Patent Information
- Application Number
- CN202611379251.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-07
- Publication Date
- 2026-10-13
AI Technical Summary
然而,实际打印过程中由于打印机型号、分辨率、纸张规格、驱动版本、浏览器及操作系统环境存在差异,使得同一模板在不同打印环境下容易出现打印位置偏移、字段错位、字体换行异常、二维码尺寸失真等问题
调整模块,用于根据所述版式调整参数对所述标准版式模板数据中的可调整版式参数进行调整,得到适配所述当前打印环境的目标版式模板数据。
Smart Images

Figure CN122902951A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of intelligent printing control technology, and in particular relates to a method, apparatus, equipment and medium for generating electronic waybill printing formats. Background Technology
[0002] With the widespread application of electronic waybills in logistics delivery, e-commerce shipping, and warehouse management, business systems need to generate and print electronic waybills, logistics labels, and other documents according to different needs.
[0003] In related technologies, electronic waybill printing solutions typically employ fixed templates or manual adjustments. However, during actual printing, differences in printer models, resolutions, paper sizes, driver versions, browsers, and operating system environments can lead to issues such as print position misalignment, field misalignment, abnormal font line breaks, and QR code size distortion in different printing environments, even with the same template. Summary of the Invention
[0004] This application aims to address at least one of the technical problems existing in the prior art. To this end, this application proposes a method, apparatus, device, and medium for generating electronic waybill print layouts, so as to improve the printing consistency of electronic waybills in different printing environments.
[0005] Firstly, this application provides a method for generating a printed version of an electronic waybill, including: In response to the printing task of the electronic waybill, obtain the environmental characteristics corresponding to the current printing environment; Based on the environmental characteristics, at least one target historical calibration sample matching the current printing environment is determined from the historical calibration sample library; wherein, the historical calibration sample library stores multiple historical calibration samples, and each historical calibration sample includes printing calibration information of the corresponding historical printing task in the historical printing environment; Based on the environmental characteristics, the target historical calibration samples, and the preset standard layout template data, layout adjustment parameters are generated; the standard layout template data includes the layout of multiple printing elements and the adjustable layout parameters corresponding to the multiple printing elements. Adjust the adjustable layout parameters in the standard layout template data according to the layout adjustment parameters to obtain target layout template data that is adapted to the current printing environment.
[0006] The electronic waybill printing layout generation method provided in this application combines calibration experience from the current printing environment and historical printing environments to adapt the standard layout template to the environment. It can determine the direction and degree of layout adjustment based on the correlation between the current printing environment and historical calibration results, so that the generated target layout template can adapt to the current printing environment while maintaining the overall layout structure consistency of the electronic waybill. This can reduce printing differences such as layout offset, field misalignment, font wrapping, and abnormal graphic size caused by differences in equipment and software configuration in different printing environments, and improve the printing consistency of electronic waybills in different printing environments.
[0007] According to one embodiment of this application, the environmental characteristics corresponding to the current printing environment include at least one of printing device characteristics, operating environment characteristics, and printing task characteristics.
[0008] According to one embodiment of this application, determining at least one target historical calibration sample matching the current printing environment from a historical calibration sample library based on the environmental characteristics includes: Obtain the historical environmental characteristics of the historical printing environment corresponding to each historical calibration sample in the historical calibration sample library; Based on the similarity between the environmental features and the historical environmental features, at least one target historical calibration sample is obtained by matching from the historical calibration sample library.
[0009] In this embodiment, by matching the environmental characteristics of the current printing environment with the historical environmental characteristics of the historical printing environment, historical calibration samples with high environmental correlation with the current printing environment can be selected from the historical calibration sample library. This allows subsequent layout adjustments to refer to historical calibration results that are close to the current printing environment, thereby improving the environmental adaptation accuracy of the target layout template.
[0010] According to one embodiment of this application, generating layout adjustment parameters based on the environmental characteristics, the target historical calibration sample, and preset standard layout template data includes: Historical calibration analysis results are obtained based on the printed calibration information of the target historical calibration sample; The environmental characteristics, the historical calibration analysis results, and the standard layout template data are input into the layout prediction model to obtain the layout adjustment parameters.
[0011] In this embodiment, by analyzing the printing calibration information in the target historical calibration sample, historical calibration analysis results that reflect the correspondence between historical printing environment and layout adjustment are obtained. Combined with the environmental characteristics of the current printing environment and standard layout template data, the layout prediction model is input into the layout prediction model. This enables the layout prediction model to analyze and predict the layout deviations that may occur in the current printing environment by comprehensively considering the current printing environment, historical calibration experience, and standard layout structure. As a result, the layout adjustment parameters that are suitable for the current printing environment are determined, thereby improving the accuracy of the layout adjustment parameter determination.
[0012] According to one embodiment of this application, obtaining historical calibration analysis results based on the printed calibration information of the target historical calibration sample includes: In the presence of multiple target historical calibration samples, the printed calibration information of each target historical calibration sample is weighted and fused according to the weight corresponding to each target historical calibration sample to obtain the historical calibration analysis result. The weights are determined based on the similarity between the historical environmental features of the historical printing environment corresponding to the target historical calibration sample and the environmental features.
[0013] In this embodiment, the weight of each target historical calibration sample is determined based on the similarity between the historical printing environment corresponding to the target historical calibration sample and the current printing environment. This increases the reference value of historical calibration samples that are more similar to the current printing environment in the historical calibration analysis results, reduces the impact of historical calibration information that differs greatly from the current printing environment on the analysis results, and enables the obtained historical calibration analysis results to more accurately reflect the layout deviation and adjustment rules in the current printing environment, thereby improving the accuracy of the layout adjustment parameters.
[0014] According to one embodiment of this application, the method further includes: The printing task is executed based on the target layout template data to obtain the printing result; Calculate the printing deviation based on the target layout template data and the printing results; Based on the printing deviation, print calibration information for the current printing environment is generated; The current printing environment and the printing calibration information under the current printing environment are associated and stored to form a new historical calibration sample, which is then added to the historical calibration sample library.
[0015] In this embodiment, by executing a printing task in the current printing environment and determining the actual printing deviation based on the printing results, and forming printing calibration information corresponding to the current printing environment based on the printing deviation, the actual printing effect generated during the printing process can be converted into calibration data to form historical calibration samples and add them to the historical calibration sample library. This allows the historical calibration sample library to continuously accumulate actual calibration experience under different printing environments as printing tasks are executed, forming a closed-loop calibration mechanism that is continuously updated based on actual printing results, further improving the accuracy of layout adjustment and adaptability to different printing environments.
[0016] According to one embodiment of this application, the step of performing the printing task based on the target layout template data to obtain the printing result includes: Based on the target layout template data, the electronic waybill business data corresponding to the printing task is dynamically rendered to generate rendering result data. The rendered result data is converted into a data format recognizable by the printing device and output to the target printing device to obtain the printing result.
[0017] In this embodiment, by dynamically rendering the electronic waybill business data according to the target layout template data, the electronic waybill business data is converted into rendered result data according to the layout structure adapted to the current printing environment, and further output to the target printing device. This achieves adaptation from business data and layout rendering to printing device output, reduces printing effect deviation caused by data format or output method mismatch between the layout template and the printing device, and improves printing accuracy.
[0018] Secondly, this application provides a device for generating a printout of an electronic waybill, comprising: The acquisition module is used to acquire the environmental characteristics corresponding to the current printing environment in response to the printing task of the electronic waybill; The determination module is used to determine at least one target historical calibration sample that matches the current printing environment from the historical calibration sample library based on the environmental characteristics; wherein, the historical calibration sample library stores multiple historical calibration samples, and each historical calibration sample includes printing calibration information of the corresponding historical printing task in the historical printing environment; The generation module is used to generate layout adjustment parameters based on the environmental characteristics, the target historical calibration samples, and preset standard layout template data; the standard layout template data includes the layout of multiple printing elements and the adjustable layout parameters corresponding to the multiple printing elements; The adjustment module is used to adjust the adjustable layout parameters in the standard layout template data according to the layout adjustment parameters, so as to obtain target layout template data that is adapted to the current printing environment.
[0019] The electronic waybill printing layout generation device provided in this application combines calibration experience from the current printing environment and historical printing environments to adapt the standard layout template to the environment. It can determine the direction and degree of layout adjustment based on the correlation between the current printing environment and historical calibration results, so that the generated target layout template can adapt to the current printing environment while maintaining the overall layout structure consistency of the electronic waybill. This can reduce printing differences such as layout offset, field misalignment, font wrapping, and abnormal graphic size caused by differences in equipment and software configuration in different printing environments, and improve the printing consistency of electronic waybills in different printing environments.
[0020] Thirdly, this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the electronic waybill printing format generation method as described in the first aspect above.
[0021] Fourthly, this application provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method for generating the printed version of the electronic waybill as described in the first aspect above.
[0022] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the method for generating the printed format of an electronic waybill as described in the first aspect above.
[0023] The above-described one or more technical solutions in the embodiments of this application have at least one of the following technical effects: The electronic waybill printing layout generation method provided in this application combines calibration experience from the current printing environment and historical printing environments to adapt the standard layout template to the environment. It can determine the direction and degree of layout adjustment based on the correlation between the current printing environment and historical calibration results, so that the generated target layout template can adapt to the current printing environment while maintaining the overall layout structure consistency of the electronic waybill. This can reduce printing differences such as layout offset, field misalignment, font wrapping, and abnormal graphic size caused by differences in equipment and software configuration in different printing environments, and improve the printing consistency of electronic waybills in different printing environments.
[0024] In some embodiments, by matching the environmental characteristics of the current printing environment with the historical environmental characteristics of the historical printing environment, historical calibration samples with high environmental correlation with the current printing environment can be selected from the historical calibration sample library. This allows subsequent layout adjustments to refer to historical calibration results that are close to the current printing environment, thereby improving the environmental adaptation accuracy of the target layout template.
[0025] In some embodiments, by analyzing the print calibration information in the target historical calibration sample, historical calibration analysis results that reflect the correspondence between historical printing environment and layout adjustment are obtained. Combined with the environmental characteristics of the current printing environment and standard layout template data, the layout prediction model is input into the layout prediction model. This enables the layout prediction model to analyze and predict the layout deviations that may occur in the current printing environment by comprehensively considering the current printing environment, historical calibration experience, and standard layout structure. This determines the layout adjustment parameters that are suitable for the current printing environment, thereby improving the accuracy of the layout adjustment parameter determination.
[0026] In some embodiments, the weight of each target historical calibration sample is determined based on the similarity between the historical printing environment corresponding to the target historical calibration sample and the current printing environment. This can improve the reference value of historical calibration samples that are more similar to the current printing environment in the historical calibration analysis results, reduce the impact of historical calibration information that is significantly different from the current printing environment on the analysis results, and enable the obtained historical calibration analysis results to more accurately reflect the layout deviation and adjustment rules in the current printing environment, thereby improving the accuracy of the layout adjustment parameters.
[0027] In some embodiments, by performing a printing task in the current printing environment and determining the actual printing deviation based on the printing results, and forming printing calibration information corresponding to the current printing environment based on the printing deviation, the actual printing effect generated during the printing process can be converted into calibration data to form historical calibration samples and add them to the historical calibration sample library. This allows the historical calibration sample library to continuously accumulate actual calibration experience under different printing environments as printing tasks are executed, forming a closed-loop calibration mechanism that is continuously updated based on actual printing results, further improving the accuracy of layout adjustments and adaptability to different printing environments.
[0028] In some embodiments, by dynamically rendering the electronic waybill business data according to the target layout template data, the electronic waybill business data is converted into rendered result data according to the layout structure adapted to the current printing environment, and further output to the target printing device, thereby realizing the adaptation from business data, layout rendering to printing device output, reducing the printing effect deviation caused by the mismatch between the data format or output method between the layout template and the printing device, and improving the printing accuracy.
[0029] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0030] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0031] Figure 1 This is a flowchart illustrating the method for generating the printed version of an electronic waybill provided in this application embodiment; Figure 2 This is a schematic diagram of the standard layout template data provided in the embodiments of this application; Figure 3 This is a schematic diagram of the printing results provided in the embodiments of this application; Figure 4 This is a schematic diagram of the electronic waybill printing format generation device provided in the embodiments of this application; Figure 5 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0032] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0033] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0034] The following description, in conjunction with the accompanying drawings, details the method, apparatus, and storage medium for generating printed electronic waybills provided in this application through specific embodiments and application scenarios.
[0035] The electronic waybill printing format generation method provided in this application embodiment can be executed by an electronic device or a functional module or entity in an electronic device that can implement the method. The electronic devices mentioned in this application embodiment include, but are not limited to, servers, industrial control computers, edge computing gateways, personal computers, workstations, cloud computing nodes, distributed computing systems, mobile terminals, etc.
[0036] The server can be a standalone physical server, or a server cluster or distributed system consisting of multiple physical servers.
[0037] The following describes the method for generating the printed version of the electronic waybill provided in this application embodiment, taking the server as the execution subject as an example.
[0038] like Figure 1 As shown, the method for generating the printed version of the electronic waybill includes steps 110, 120, 130, and 140.
[0039] Step 110: In response to the printing task of the electronic waybill, obtain the environmental characteristics corresponding to the current printing environment.
[0040] In this embodiment, the electronic waybill printing task refers to the task request used to trigger the printing of the electronic waybill, which can be generated by a business system, a print management system, a warehouse management system, a logistics management system, etc. The electronic waybill printing task may include the electronic waybill business data to be printed, such as recipient information, sender information, product information, logistics codes, barcodes, QR codes, and images.
[0041] In response to a printing task on an electronic waybill, information about the current printing environment corresponding to the printing task can be collected to obtain the environmental characteristics of the current printing environment.
[0042] The current printing environment refers to the environmental conditions involved in the current electronic waybill printing task, including the equipment, software, and printing task itself. Because different printing environments may have different equipment parameters, software configurations, and printing content, the same standard template may exhibit varying degrees of layout deviation when printed in different environments.
[0043] In some embodiments, the environmental characteristics corresponding to the current printing environment include at least one of printing device characteristics, operating environment characteristics, and printing task characteristics.
[0044] Among them, the printing device features are used to characterize the device attributes of the printing device currently performing the printing task, which may include the device model, printing resolution, paper size, printing area, printing precision, etc.
[0045] The runtime environment characteristics characterize the software runtime environment that performs the printing task, and may include print driver information, browser type, browser version, operating system type, operating system version, and printing-related configuration parameters. For example, different print drivers may use different page scaling strategies or coordinate transformation methods, and different browsers or operating systems may also use different processing methods for page rendering, font layout, and print output, which may result in differences in the printed layout of electronic waybills.
[0046] Print task characteristics are used to characterize the business data and content features of the electronic waybill to be printed. These characteristics may include the number of print fields, field content length, number of barcodes or QR codes, number of images, text content complexity, and page content occupancy ratio. Different print tasks correspond to different levels of content complexity, which may lead to variations in field line breaks, element size changes, and page layout crowding. Therefore, print task characteristics can also serve as a reference for determining layout adjustment parameters.
[0047] In some embodiments, environmental characteristics corresponding to the current printing environment can be obtained through printing device information interfaces, operating system interfaces, browser interfaces, print driver interfaces, etc. For example, the printer model and print resolution can be obtained from the printing device, the operating system and browser information can be obtained from the terminal running the print job, and the electronic waybill business data corresponding to the current print job can be parsed to obtain the number of fields, the length of field content, and the number of print elements such as barcodes and QR codes.
[0048] After acquiring environmental information from different sources, the acquired environmental information can be formatted to convert environmental information from different sources and with different data formats into a unified data structure to form environmental feature data corresponding to the current printing environment.
[0049] Step 120: Determine at least one target historical calibration sample that matches the current printing environment from the historical calibration sample library based on environmental characteristics; wherein, the historical calibration sample library stores multiple historical calibration samples, and each historical calibration sample includes printing calibration information of the corresponding historical printing task in the historical printing environment.
[0050] In this embodiment of the application, the historical calibration sample library is a dataset of printing environment-calibration results accumulated by the system during long-term operation, which records the actual printing deviations of electronic waybills under different printing environments and the corresponding correction experience.
[0051] Historical calibration samples include printing calibration information for corresponding historical print jobs in historical printing environments. This printing calibration information can be used to characterize the layout differences between the layout template data used in the historical printing environment and the actual print results, as well as the calibration information determined based on these layout differences.
[0052] For example, print calibration information may include historical calibration parameters, as well as the corresponding historical printing environment and / or the historical environmental characteristics corresponding to the historical printing environment. Print calibration information may also include at least one of the following: corresponding standard layout template data, historical target layout template data, and actual printing deviations. Actual printing deviations may include horizontal position offset, vertical position offset, element size deviation, page scaling error, font size deviation, font line wrapping, and barcode or QR code size deviation, etc.; historical calibration parameters may include field position adjustment parameters, page scaling parameters, element size adjustment parameters, font adjustment parameters, and print offset correction parameters, etc.
[0053] In some embodiments, after obtaining the environmental characteristics corresponding to the current printing environment, multiple historical calibration samples in the historical calibration sample library can be matched according to the environmental characteristics to determine the historical calibration samples that are highly correlated with the current printing environment.
[0054] For example, feature matching can be performed between the environmental features of the current printing environment and the historical environmental features of each historical calibration sample's historical printing environment. The similarity between the current printing environment and each historical printing environment can be determined based on the degree of matching between different environmental features. For example, similarity can be determined based on the matching of features such as printing device model, printing resolution, paper size, driver version, browser type, and operating system.
[0055] In some embodiments, corresponding feature weights can be set for different environmental features, and the overall matching degree between the current printing environment and each historical printing environment can be calculated based on the matching results of each environmental feature and the corresponding feature weights. At least one historical calibration sample whose overall matching degree meets the preset conditions can be selected from multiple historical calibration samples as the target historical calibration sample.
[0056] The preset conditions may include a comprehensive matching degree greater than or equal to a preset matching threshold, or selecting a preset number of historical calibration samples in descending order of comprehensive matching degree. This application embodiment does not limit this.
[0057] After identifying the target historical calibration samples, the printing calibration information in each target historical calibration sample can be analyzed to determine the historical printing deviation patterns related to the current printing environment. For example, information such as lateral offset, vertical offset, scaling error, and element size deviation in multiple target historical calibration samples can be statistically analyzed to determine the possible layout deviations and corresponding calibration trends in the current printing environment.
[0058] Step 130: Based on environmental characteristics, target historical calibration samples, and preset standard layout template data, generate layout adjustment parameters; the standard layout template data includes the layout of multiple printing elements and the adjustable layout parameters corresponding to multiple printing elements.
[0059] In this embodiment, standard format template data is used to provide the basic format structure for generating electronic waybill formats. Standard format template data can be pre-configured and stored in a template library, and different standard format templates can be used for different business types.
[0060] The standard layout template data includes the layout of multiple printable elements and the corresponding adjustable layout parameters for each printable element. These printable elements may include recipient information areas, sender information areas, product information areas, logistics code areas, barcode areas, QR code areas, image areas, and other text or graphic elements that need to be printed.
[0061] The layout of multiple printed elements is used to characterize the positional and dimensional relationships of each printed element in the electronic waybill. For example, the layout of each printed element can be described by element coordinates, element width, element height, element spacing, and the relative positional relationships between elements.
[0062] Adjustable layout parameters refer to parameters that allow the layout of print elements to be adjusted according to the printing environment without changing the overall business structure of the standard layout template. For example, adjustable layout parameters may include field position coordinates, field width, field height, font size, element spacing, rotation angle, scaling ratio, and print offset.
[0063] In some embodiments, the standard layout template data may also include a parameter range for adjustable layout parameters to define the boundaries for adjusting the adjustable layout parameters.
[0064] In one example, the structure of the standard layout template data is as follows: Figure 2 As shown, it can include the basic layout structure of the waybill, the definition of the barcode / QR code area, the definition of the image area, the position coordinates of each printed element, the font size and style parameters, and the adjustable layout parameters and range corresponding to each printed element.
[0065] In this embodiment of the application, the adjustable layout parameters in the standard layout template data can be analyzed by combining the environmental characteristics corresponding to the current printing environment and the printing calibration information in the target historical calibration sample, so as to determine the layout adjustment direction and degree applicable to the current printing environment.
[0066] In some embodiments, the reference level of the target historical calibration sample to the current printing environment can be determined based on the matching relationship between the current printing environment and the historical printing environment corresponding to the target historical calibration sample; and the layout deviation pattern related to the current printing environment can be determined based on the actual printing deviation and historical calibration parameters in each target historical calibration sample, and the layout adjustment parameters corresponding to each printing element can be calculated by combining the current layout parameters of each printing element in the standard layout template data.
[0067] For example, when multiple target historical calibration samples indicate that the actual printing result corresponding to the current printing device has a fixed lateral rightward offset, the corresponding reverse lateral compensation parameter can be determined based on the historical offset; when target historical calibration samples indicate that the actual printing size in a certain printing environment has a certain scaling error relative to the standard size, the corresponding page scaling parameter or element scaling parameter can be determined.
[0068] In some embodiments, layout adjustment parameters include at least one of field position adjustment parameters, page scaling parameters, element size adjustment parameters, font adjustment parameters, and print offset correction parameters.
[0069] Among them, the field position adjustment parameter is used to adjust the position of the printed element in the electronic waybill; the page scaling parameter is used to adjust the scaling ratio of the overall layout of the electronic waybill; the element size adjustment parameter is used to adjust the size of barcodes, QR codes, images or other printed elements; the font adjustment parameter is used to adjust the font size, font spacing or other font-related parameters of text elements; and the print offset correction parameter is used to compensate for the positional offset that occurs during the actual output process of the printing device.
[0070] Step 140: Adjust the adjustable layout parameters in the standard layout template data according to the layout adjustment parameters to obtain the target layout template data that is adapted to the current printing environment.
[0071] In this embodiment, the adjustable layout parameters in the standard layout template data can be modified and recalculated item by item according to the layout adjustment parameters, so as to obtain the target layout template data that is adapted to the current printing environment.
[0072] In some embodiments, the position coordinates of the corresponding printed elements in the standard layout template can be adjusted according to the field position adjustment parameters, the overall page size or layout ratio can be adjusted according to the page scaling parameters, the width and height of printed elements such as barcodes, QR codes, and images can be adjusted according to the element size adjustment parameters, and the font size, font spacing, and other parameters of text elements can be adjusted according to the font adjustment parameters.
[0073] For example, when the layout adjustment parameters include horizontal print offset correction parameters, the horizontal position of printed elements such as recipient information area, product information area, logistics code area and barcode area can be compensated according to the horizontal print offset correction parameters; when the layout adjustment parameters include element size adjustment parameters, the size of QR code or barcode area can be re-determined according to the element size adjustment parameters to reduce the size deviation in the actual printing result.
[0074] In some embodiments, based on the layout constraints between the printed elements, after adjusting the layout parameters of one or more printed elements, the layout parameters of other related printed elements can be adjusted synchronously to maintain the relative layout relationship between multiple printed elements. For example, after adjusting the height of the product information area, the positions of the logistics code area, barcode area, and QR code area can be adjusted synchronously according to preset layout rules, thereby avoiding overlap or abnormal spacing between other printed elements caused by local layout adjustments.
[0075] The electronic waybill printing layout generation method provided in this application combines calibration experience from the current printing environment and historical printing environments to adapt the standard layout template to the environment. It can determine the direction and degree of layout adjustment based on the correlation between the current printing environment and historical calibration results, so that the generated target layout template can adapt to the current printing environment while maintaining the overall layout structure consistency of the electronic waybill. This can reduce printing differences such as layout offset, field misalignment, font wrapping, and abnormal graphic size caused by differences in equipment and software configuration in different printing environments, and improve the printing consistency of electronic waybills in different printing environments.
[0076] In some embodiments, determining at least one target historical calibration sample that matches the current printing environment from a historical calibration sample library based on environmental characteristics includes: Obtain the historical environmental characteristics of the historical printing environment corresponding to each historical calibration sample in the historical calibration sample library; Based on the similarity between environmental characteristics and historical environmental characteristics, at least one target historical calibration sample is obtained by matching from the historical calibration sample library.
[0077] In this embodiment, the historical printing environment refers to the printing equipment, operating software environment, and environment corresponding to the printing task used when generating the corresponding historical calibration sample. For example, if the environmental characteristics of the current printing environment include printing equipment characteristics, operating environment characteristics, and printing task characteristics, the historical environment characteristics may also include historical printing equipment characteristics, historical operating environment characteristics, and historical printing task characteristics.
[0078] Pre-stored historical environment features can be read from each historical calibration sample; alternatively, if the historical calibration sample includes corresponding historical printing environment information, the corresponding historical environment features can be extracted based on the historical printing environment information. For example, features such as historical printer model, historical printing resolution, historical paper size, historical print driver information, historical browser type, historical operating system environment, and the number of fields, content length, and number of barcodes corresponding to historical print jobs can be obtained from the historical printing environment information.
[0079] In some embodiments, feature matching can be performed on the environmental features corresponding to the current printing environment and the historical environmental features corresponding to each historical printing environment to determine the similarity between the current printing environment and each historical printing environment. For example, for discrete features such as printing device model, paper size, and browser type, the corresponding matching result can be determined based on whether the feature values are the same; for numerical features such as printing resolution and content length, the corresponding matching result can be determined based on the degree of difference between the feature values.
[0080] Based on the degree of influence of different environmental characteristics on the print layout, corresponding feature weights can be set for different environmental characteristics, and the similarity between the current printing environment and each historical printing environment can be determined according to the matching results and feature weights corresponding to each environmental characteristic.
[0081] In some embodiments, environmental features and historical environmental features can be converted into feature vectors respectively, and similarity measurement methods, such as cosine similarity, can be used to calculate the similarity between environmental features and each historical environmental feature.
[0082] In some embodiments, historical calibration samples can be sorted in descending order of similarity, and at least one historical calibration sample that meets a preset matching condition can be selected as the target historical calibration sample. For example, historical calibration samples with a similarity greater than or equal to a preset similarity threshold can be selected as the target historical calibration samples; or, a preset number of historical calibration samples with the highest similarity can be selected as the target historical calibration samples. This application embodiment does not limit this.
[0083] In this embodiment, by matching the environmental characteristics of the current printing environment with the historical environmental characteristics of the historical printing environment, historical calibration samples with high environmental correlation with the current printing environment can be selected from the historical calibration sample library. This allows subsequent layout adjustments to refer to historical calibration results that are close to the current printing environment, thereby improving the environmental adaptation accuracy of the target layout template.
[0084] In some embodiments, layout adjustment parameters are generated based on environmental characteristics, target historical calibration samples, and preset standard layout template data, including: Historical calibration analysis results are obtained based on the printed calibration information of the target historical calibration samples; Environmental characteristics, historical calibration analysis results, and standard template data are input into the template prediction model to obtain template adjustment parameters.
[0085] In this embodiment, when there is only one target historical calibration sample, the printed calibration information of the target historical calibration sample can be used as the historical calibration analysis result; when there are multiple target historical calibration samples, the printed calibration information corresponding to multiple target historical calibration samples can be statistically analyzed, correlated and analyzed to obtain the historical calibration analysis result.
[0086] In some embodiments, the actual printing deviation and historical calibration parameters corresponding to each target historical calibration sample can be statistically analyzed separately. Based on the correspondence between the actual printing deviation and historical calibration parameters of the same type in multiple target historical calibration samples, the historical calibration patterns corresponding to different types of layout deviations can be determined. For example, the horizontal offset corresponding to multiple target historical calibration samples can be statistically analyzed to determine the average value, range of variation, and direction of the horizontal offset; alternatively, the page scaling ratio, font adjustment amount, or element size adjustment amount can be statistically analyzed to determine the corresponding historical adjustment trend.
[0087] Furthermore, the correlation between different historical printing environment characteristics and corresponding printing calibration information can be combined to analyze historical calibration information. For example, when the same model of printing equipment exhibits different printing offset patterns under different operating environments, the impact of different operating environments on the printed layout can be determined based on the correspondence between historical printing environment characteristics and actual printing deviations, thereby obtaining historical calibration patterns related to the current printing environment.
[0088] In this embodiment, the historical calibration analysis results may include at least one of the following: historical printing deviation statistics, historical layout adjustment trends, the correlation between different environmental characteristics and printing deviations, and the changing patterns of historical calibration parameters. This application embodiment does not limit these aspects.
[0089] After obtaining the historical calibration analysis results, the environmental characteristics, historical calibration analysis results, and standard layout template data can be input into the layout prediction model. The layout prediction model will then predict the layout adjustment needs in the current printing environment and obtain the layout adjustment parameters.
[0090] The layout prediction model can be a pre-trained machine learning model or a deep learning model, used to determine the layout adjustment parameters corresponding to the current printing environment based on the current printing environment, historical calibration patterns, and the layout structure of the standard layout template. The layout prediction model can employ regression models, decision tree models, neural network models, etc., and this application embodiment does not limit this approach.
[0091] In some embodiments, the layout prediction model can extract features from the input environmental features, combine historical calibration analysis results to determine the layout deviations that may occur in the current printing environment, parse the standard layout template data, determine the layout information and adjustable layout parameters corresponding to each printing element, determine the adjustment amount of the adjustable layout parameters based on the predicted layout deviations, and thus output the layout adjustment parameters.
[0092] For example, when environmental characteristics indicate that the current printing device is the same model as the printing device in multiple target historical calibration samples, and historical calibration analysis results show that the printing device has a stable lateral printing offset under the current paper size, the layout prediction model can predict the lateral position compensation amount corresponding to each printing element based on the historical calibration pattern and the position of each printing element in the current standard layout template data, and use the lateral position compensation amount as the layout adjustment parameter.
[0093] In this embodiment, by analyzing the printing calibration information in the target historical calibration sample, historical calibration analysis results that reflect the correspondence between historical printing environment and layout adjustment are obtained. Combined with the environmental characteristics of the current printing environment and standard layout template data, the layout prediction model is input into the layout prediction model. This enables the layout prediction model to analyze and predict the layout deviations that may occur in the current printing environment by comprehensively considering the current printing environment, historical calibration experience, and standard layout structure. As a result, the layout adjustment parameters that are suitable for the current printing environment are determined, thereby improving the accuracy of the layout adjustment parameter determination.
[0094] In some embodiments, historical calibration analysis results are obtained based on printed calibration information of the target historical calibration sample, including: In the presence of multiple target historical calibration samples, the printed calibration information of each target historical calibration sample is weighted and fused according to the weight corresponding to each target historical calibration sample to obtain the historical calibration analysis results. The weights are determined based on the similarity between the historical environmental features and environmental features of the historical printing environment corresponding to the target historical calibration sample.
[0095] In this embodiment, similarity is used to characterize the degree of matching between the historical printing environment corresponding to the target historical calibration sample and the current printing environment. The higher the similarity, the closer the corresponding historical printing environment is to the current printing environment. The higher the reference value of the printing calibration information in the target historical calibration sample to the current printing environment, the higher it can be assigned.
[0096] The similarity between the historical environmental features corresponding to the i-th target historical calibration sample and the environmental features corresponding to the current printing environment can be determined as the weight corresponding to the i-th target historical calibration sample; or, the similarity can be normalized to obtain the normalized weights corresponding to each target historical calibration sample, so that the sum of the weights of multiple target historical calibration samples is 1 or satisfies the preset conditions.
[0097] For example, the weights corresponding to the historical calibration samples of each target can be determined based on the following relationship:
[0098] in, Indicates the number of historical calibration samples for the target. Indicates the first The weights corresponding to the historical calibration samples of each target Indicates the characteristics of the current printing environment. With the Historical environmental characteristics corresponding to each target historical calibration sample The similarity between them.
[0099] It should be noted that the above method for determining weights is only one example. In other embodiments, weights can also be determined based on the correspondence between similarity and a preset mapping function. For example, a non-linear mapping can be performed on similarity to give higher weights to historical calibration samples with higher similarity; or, the target historical calibration samples can be classified according to similarity, and corresponding weights can be set for different similarity levels. This application does not limit this approach.
[0100] In some embodiments, the printed calibration information can be converted into a vector representation and then weighted and fused:
[0101] in, This indicates the results of historical calibration analysis. Indicates the number of historical calibration samples for the target. Indicates the first The weights corresponding to the historical calibration samples of each target Indicates the first Printed calibration information for each target historical calibration sample.
[0102] In some embodiments, parameters of the same type in the printed calibration information of each target historical calibration sample can be weighted and fused separately to obtain historical calibration analysis results.
[0103] For example, print calibration information includes lateral offset correction parameters. Multiple lateral offset correction parameters can be weighted and fused according to their weights to obtain the lateral offset calibration trend corresponding to the current printing environment. For different types of print calibration information such as field position, page scaling, element size, and font, weighted fusion can be performed separately to obtain historical calibration analysis results containing multiple types of print calibration information.
[0104] In this embodiment, the weight of each target historical calibration sample is determined based on the similarity between the historical printing environment corresponding to the target historical calibration sample and the current printing environment. This increases the reference value of historical calibration samples that are more similar to the current printing environment in the historical calibration analysis results, reduces the impact of historical calibration information that differs greatly from the current printing environment on the analysis results, and enables the obtained historical calibration analysis results to more accurately reflect the layout deviation and adjustment rules in the current printing environment, thereby improving the accuracy of the layout adjustment parameters.
[0105] In some embodiments, the method further includes: The printing task is executed based on the target layout template data, and the printing result is obtained; Calculate the printing deviation based on the target layout template data and the printing results; Generate printing calibration information based on printing deviations in the current printing environment; The current printing environment and the printing calibration information under the current printing environment are associated and stored to form a new historical calibration sample and added to the historical calibration sample library.
[0106] In this embodiment, the electronic waybill business data corresponding to the printing task can be rendered according to the target layout template data to obtain the rendered print data. The rendered print data is then sent to the target printing device to execute the printing task and obtain the printing result. The printing result may include the actual printing media output by the target printing device, such as electronic waybills, logistics labels, etc. Figure 3 As shown.
[0107] In some embodiments, printing deviation can be calculated based on the target layout template data and the printed result. For each print element in the target layout template data, the theoretical layout information of the print element in the target layout template data and the actual layout information of the print element in the actual printed result can be obtained, and the corresponding printing deviation can be determined based on the difference between the theoretical layout information and the actual layout information.
[0108] For example, regarding the position of a printed element, the positional deviation can be determined based on the difference between the theoretical coordinates recorded in the target layout template data and the actual coordinates identified in the printed result. This positional deviation can include horizontal and vertical printing deviations. Assume the theoretical coordinates of a printed element in the target layout template data are... The actual coordinates of the printed element in the printed result are: The positional deviation of the printed element can then be determined based on the following relationship:
[0109]
[0110] in, Indicates horizontal printing deviation. This indicates vertical printing deviation.
[0111] Besides positional deviations, printing deviations can also include at least one of the following: size deviations, scaling deviations, font deviations, and element spacing deviations. For example, the size deviation of a printing element can be determined based on the difference between the size of the printed element in the printed result and the target size of the corresponding printed element in the target layout template data; the scaling deviation can be determined based on the ratio between the actual printed size and the target printed size.
[0112] In this embodiment, the layout adjustment parameters can be corrected based on the currently used layout adjustment parameters and the printing deviation calculated during the current printing process to obtain calibration parameters for the current printing environment. For example, the current layout parameters can be updated according to the following relationship:
[0113] in, This indicates the calibration parameters under the current printing environment. This indicates the layout adjustment parameters. Indicates printing deviation. This represents the corrected learning weight coefficient.
[0114] By setting the correction learning weight coefficient, the influence of the actual printing deviation on the calibration parameters can be controlled. For example, when the printing result has high detection reliability, a larger correction learning weight coefficient can be set to make the printing deviation have a greater impact on the calibration parameters; when the printing deviation may be affected by random factors, a smaller correction learning weight coefficient can be set to reduce the impact of a single abnormal printing result on the calibration parameters.
[0115] In this embodiment, calibration parameters, as well as the current printing environment and / or environmental characteristics, can be used as printing calibration information. Alternatively, at least one of standard template data, target template data, and printing deviations can be added to the printing calibration information. The current printing environment can be associated with and stored with printing calibration information and printing tasks within that environment to form new historical calibration samples, which are then added to the historical calibration sample library.
[0116] In this embodiment, by executing a printing task in the current printing environment and determining the actual printing deviation based on the printing results, and forming printing calibration information corresponding to the current printing environment based on the printing deviation, the actual printing effect generated during the printing process can be converted into calibration data to form historical calibration samples and add them to the historical calibration sample library. This allows the historical calibration sample library to continuously accumulate actual calibration experience under different printing environments as printing tasks are executed, forming a closed-loop calibration mechanism that is continuously updated based on actual printing results, further improving the accuracy of layout adjustment and adaptability to different printing environments.
[0117] In some embodiments, a printing task is performed based on target layout template data to obtain printing results, including: Based on the target layout template data, the electronic waybill business data corresponding to the printing task is dynamically rendered to generate the rendering result data. The rendered data is converted into a data format that the printing device can recognize and output to the target printing device to obtain the printing result.
[0118] In this embodiment, electronic waybill business data can be associated with target layout template data, and layout parsing and dynamic rendering of electronic waybill business data can be performed based on the layout information of multiple printing elements defined in the target layout template data and the corresponding layout parameters to obtain the corresponding rendering result data.
[0119] For example, the display area corresponding to each business data in the electronic waybill business data can be determined based on the print element layout in the target layout template data, and the actual display position and display size of each print element can be determined based on the adjustable layout parameters in the target layout template data. For example, the display position of text fields can be determined based on the adjusted field position parameters, the display size of barcodes and QR codes can be determined based on the element size adjustment parameters, the font size of text content can be determined based on the font adjustment parameters, and the overall proportion of the electronic waybill page can be determined based on the page scaling parameters.
[0120] During dynamic layout rendering, multiple print elements can be rearranged based on the target layout template data, allowing each print element to be displayed according to layout parameters adapted to the current printing environment. For example, the position, size, and spacing of recipient information areas, product information areas, logistics code areas, barcode areas, QR code areas, and image areas can be adjusted.
[0121] In some embodiments, an electronic waybill preview or print image data can be generated based on the rendered result data to display the layout effect corresponding to the current target layout template data before actual printing.
[0122] In some embodiments, the rendered result data can be converted into a data format recognizable by the target printing device, and the converted print data can be output to the target printing device.
[0123] The rendered data can be formatted according to the target printing device's device type, printing protocol, printing driver, and data format requirements to obtain printing data that matches the target printing device. For example, the rendered data can be converted into image printing data, PDF data, print command data, or other data formats that the printing device can recognize.
[0124] In some embodiments, the converted print data can be sent to the target printing device. After receiving the print data, the target printing device prints the electronic waybill business data according to the print data to obtain the print result.
[0125] In this embodiment, by dynamically rendering the electronic waybill business data according to the target layout template data, the electronic waybill business data is converted into rendered result data according to the layout structure adapted to the current printing environment, and further output to the target printing device. This achieves adaptation from business data and layout rendering to printing device output, reduces printing effect deviation caused by data format or output method mismatch between the layout template and the printing device, and improves printing accuracy.
[0126] The electronic waybill printing format generation method provided in this application can be executed by an electronic waybill printing format generation device. This application uses an electronic waybill printing format generation device executing the electronic waybill printing format generation method as an example to illustrate the electronic waybill printing format generation device provided in this application.
[0127] This application also provides an apparatus for generating printed versions of electronic waybills.
[0128] like Figure 4 As shown, the electronic waybill printing format generation device includes: The acquisition module 410 is used to acquire the environmental characteristics corresponding to the current printing environment in response to the printing task of the electronic waybill; The determination module 420 is used to determine at least one target historical calibration sample that matches the current printing environment from the historical calibration sample library based on environmental characteristics; wherein, the historical calibration sample library stores multiple historical calibration samples, and each historical calibration sample includes printing calibration information of the corresponding historical printing task in the historical printing environment; The generation module 430 is used to generate layout adjustment parameters based on environmental characteristics, target historical calibration samples, and preset standard layout template data; the standard layout template data includes the layout of multiple printing elements and the adjustable layout parameters corresponding to multiple printing elements; The adjustment module 440 is used to adjust the adjustable layout parameters in the standard layout template data according to the layout adjustment parameters to obtain the target layout template data that is adapted to the current printing environment.
[0129] The electronic waybill printing layout generation device provided in this application combines calibration experience from the current printing environment and historical printing environments to adapt the standard layout template to the environment. It can determine the direction and degree of layout adjustment based on the correlation between the current printing environment and historical calibration results, so that the generated target layout template can adapt to the current printing environment while maintaining the overall layout structure consistency of the electronic waybill. This can reduce printing differences such as layout offset, field misalignment, font wrapping, and abnormal graphic size caused by differences in equipment and software configuration in different printing environments, and improve the printing consistency of electronic waybills in different printing environments.
[0130] In some embodiments, the determining module 420 is further configured to: Obtain the historical environmental characteristics of the historical printing environment corresponding to each historical calibration sample in the historical calibration sample library; Based on the similarity between environmental characteristics and historical environmental characteristics, at least one target historical calibration sample is obtained by matching from the historical calibration sample library.
[0131] In some embodiments, the generation module 430 is further configured to: Historical calibration analysis results are obtained based on the printed calibration information of the target historical calibration samples; Environmental characteristics, historical calibration analysis results, and standard template data are input into the template prediction model to obtain template adjustment parameters.
[0132] In some embodiments, the generation module 430 is further configured to: In the presence of multiple target historical calibration samples, the printed calibration information of each target historical calibration sample is weighted and fused according to the weight corresponding to each target historical calibration sample to obtain the historical calibration analysis results. The weights are determined based on the similarity between the historical environmental features and environmental features of the historical printing environment corresponding to the target historical calibration sample.
[0133] In some embodiments, the adjustment module 440 is further configured to: The printing task is executed based on the target layout template data, and the printing result is obtained; Calculate the printing deviation based on the target layout template data and the printing results; Generate printing calibration information based on printing deviations in the current printing environment; The current printing environment and the printing calibration information under the current printing environment are associated and stored to form a new historical calibration sample and added to the historical calibration sample library.
[0134] In some embodiments, the adjustment module 440 is further configured to: Based on the target layout template data, the electronic waybill business data corresponding to the printing task is dynamically rendered to generate the rendering result data. The rendered data is converted into a data format that the printing device can recognize and output to the target printing device to obtain the printing result.
[0135] The electronic waybill printing format generation device in this application embodiment can be an electronic device or a component of an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, self-service machine, cloud computing node, edge computing gateway, personal computer, workstation, etc. This application embodiment does not specifically limit the device.
[0136] In some embodiments, such as Figure 5As shown, this application embodiment also provides an electronic device 500, including a processor 501, a memory 502, and a computer program stored in the memory 502 and executable on the processor 501. When the program is executed by the processor 501, it implements the various processes of the above-described embodiment of the electronic waybill printing format generation method and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0137] It should be noted that the electronic devices in the embodiments of this application include the aforementioned mobile electronic devices and non-mobile electronic devices.
[0138] This application also provides a non-transitory computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described embodiment of the electronic waybill printing format generation method and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0139] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0140] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method for generating the printed format of an electronic waybill.
[0141] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0142] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0143] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
[0144] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0145] Although embodiments of this application have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the claims and their equivalents.
Claims
1. A method for generating a print layout for an electronic waybill, characterized in that, include: In response to the printing task of the electronic waybill, obtain the environmental characteristics corresponding to the current printing environment; Based on the environmental characteristics, at least one target historical calibration sample matching the current printing environment is determined from the historical calibration sample library; wherein, the historical calibration sample library stores multiple historical calibration samples, and each historical calibration sample includes printing calibration information of the corresponding historical printing task in the historical printing environment; Based on the environmental characteristics, the target historical calibration samples, and the preset standard layout template data, layout adjustment parameters are generated; the standard layout template data includes the layout of multiple printing elements and the adjustable layout parameters corresponding to the multiple printing elements. Adjust the adjustable layout parameters in the standard layout template data according to the layout adjustment parameters to obtain target layout template data that is adapted to the current printing environment.
2. The method according to claim 1, characterized in that, The environmental characteristics corresponding to the current printing environment include at least one of the following: printing device characteristics, operating environment characteristics, and printing task characteristics.
3. The method according to claim 1, characterized in that, The step of determining at least one target historical calibration sample that matches the current printing environment from the historical calibration sample library based on the environmental characteristics includes: Obtain the historical environmental characteristics of the historical printing environment corresponding to each historical calibration sample in the historical calibration sample library; Based on the similarity between the environmental features and the historical environmental features, at least one target historical calibration sample is obtained by matching from the historical calibration sample library.
4. The method according to claim 1, characterized in that, The generation of layout adjustment parameters based on the environmental characteristics, the target historical calibration samples, and preset standard layout template data includes: Historical calibration analysis results are obtained based on the printed calibration information of the target historical calibration sample; The environmental characteristics, the historical calibration analysis results, and the standard layout template data are input into the layout prediction model to obtain the layout adjustment parameters.
5. The method according to claim 4, characterized in that, The historical calibration analysis results obtained based on the printed calibration information of the target historical calibration sample include: In the presence of multiple target historical calibration samples, the printed calibration information of each target historical calibration sample is weighted and fused according to the weight corresponding to each target historical calibration sample to obtain the historical calibration analysis result. The weights are determined based on the similarity between the historical environmental features of the historical printing environment corresponding to the target historical calibration sample and the environmental features.
6. The method according to claim 1, characterized in that, The method further includes: The printing task is executed based on the target layout template data to obtain the printing result; Calculate the printing deviation based on the target layout template data and the printing results; Based on the printing deviation, print calibration information for the current printing environment is generated; The current printing environment and the printing calibration information under the current printing environment are associated and stored to form a new historical calibration sample, which is then added to the historical calibration sample library.
7. The method according to claim 6, characterized in that, The step of performing the printing task based on the target layout template data to obtain the printing result includes: Based on the target layout template data, the electronic waybill business data corresponding to the printing task is dynamically rendered to generate rendering result data. The rendered result data is converted into a data format recognizable by the printing device and output to the target printing device to obtain the printing result.
8. A device for generating a printout of an electronic waybill, characterized in that, include: The acquisition module is used to acquire the environmental characteristics corresponding to the current printing environment in response to the printing task of the electronic waybill; The determination module is used to determine at least one target historical calibration sample that matches the current printing environment from the historical calibration sample library based on the environmental characteristics; wherein, the historical calibration sample library stores multiple historical calibration samples, and each historical calibration sample includes printing calibration information of the corresponding historical printing task in the historical printing environment; The generation module is used to generate layout adjustment parameters based on the environmental characteristics, the target historical calibration samples, and preset standard layout template data; the standard layout template data includes the layout of multiple printing elements and the adjustable layout parameters corresponding to the multiple printing elements; The adjustment module is used to adjust the adjustable layout parameters in the standard layout template data according to the layout adjustment parameters, so as to obtain target layout template data that is adapted to the current printing environment.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1-7.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-7.