Label generation method, device, equipment and storage medium based on hypertext link
Through the label generation method based on hypertext links, the label design and printing process is simplified, the problems of high software threshold and low efficiency in the existing technology are solved, and efficient and unified label generation and printing effects are achieved.
Patent Information
- Application Number
- CN202410835175.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-06-26
AI Technical Summary
In the manufacturing industry, when using professional design software such as CodeSoft and Bartender to make labels, the price is expensive and the technical threshold for nesting third-party software is high, resulting in a cumbersome label production process and low conversion efficiency.
Provides a label generation method based on hypertext links. It obtains the order processing request of the order system through the label design interface, uses the preset database to extract order data, extracts and renders key elements, generates dot matrix images, and generates dot matrix images based on user input. The label attribute information and the preset typesetting algorithm are typed, and finally the printing instructions are generated and sent to the printer.
It simplifies the label design and printing process, improves label generation efficiency and consistency, reduces formatting problems caused by printer differences, and improves the success rate of cross-device printing and the accuracy of design.
Smart Images

Figure CN118394251B
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method, device, equipment and storage medium for generating tags based on hypertext links. Background Art
[0002] At present, in the manufacturing industry, it is often necessary to use mainstream professional design software such as CodeSoft and Bartender to make labels. This type of software is expensive, and the technical threshold for nesting with third-party software is high. When third-party software needs to use label printing, it is necessary to install software such as CodeSoft and Bartender on the computer, and then input the templates made by CodeSoft and Bartender into the third-party software for label printing. In the above process, it is necessary to switch between multiple software, the label production process is cumbersome, and the conversion efficiency is low. Summary of the invention
[0003] The present application provides a hypertext link-based tag generation method, apparatus, device and storage medium, which are used to improve the efficiency of tag generation.
[0004] In a first aspect, an embodiment of the present application provides a label generation method based on a hypertext link, where the hypertext link is a link of a label design interface, and the method comprises:
[0005] Based on the label design interface, an order processing request uploaded by the order system is obtained, and an order data table is obtained from a preset database according to the order processing request;
[0006] Based on a preset element extraction engine, extract key elements from the order data table to obtain identification code elements, text elements and digital elements;
[0007] generating an identification code dot matrix according to a first rendering operation performed by the user on the identification code element, generating a text dot matrix according to a second rendering operation performed by the user on the text element, and generating a digital dot matrix according to a third rendering operation performed by the user on the digital element;
[0008] Acquire the tag attribute information input by the user, generate a blank dot matrix according to the tag attribute information, and project the identification code dot matrix, the text dot matrix and the digital dot matrix onto the blank dot matrix according to a preset typesetting algorithm;
[0009] Generate a label dot matrix mapping source according to the typesetting operation performed by the user on the identification code dot matrix, the text dot matrix and the digital dot matrix on the blank dot matrix;
[0010] According to the preset printer selection instruction, the printer attribute information is obtained, a printing instruction is generated according to the printer attribute information and the label dot matrix mapping source, and the printing instruction is sent to the target printer so that the target printer generates a label.
[0011] In a second aspect, an embodiment of the present application provides a label generation device based on a hypertext link, where the hypertext link is a link of a label design interface, and the label generation device includes:
[0012] A data acquisition module, used to acquire an order processing request uploaded by an order system based on the label design interface, and acquire an order data table from a preset database according to the order processing request;
[0013] An element extraction module, used to extract key elements from the order data table based on a preset element extraction engine to obtain identification code elements, text elements and digital elements;
[0014] an element rendering module, configured to generate an identification code dot matrix according to a first rendering operation performed by a user on the identification code element, generate a text dot matrix according to a second rendering operation performed by a user on the text element, and generate a digital dot matrix according to a third rendering operation performed by a user on the digital element;
[0015] A dot matrix projection module, used to obtain the tag attribute information input by the user, generate a blank dot matrix according to the tag attribute information, and project the identification code dot matrix, the text dot matrix and the digital dot matrix to the blank dot matrix according to a preset typesetting algorithm;
[0016] A typesetting modulation module, used for generating a label dot matrix mapping source according to the typesetting operation performed by the user on the identification code dot matrix, the text dot matrix and the digital dot matrix on the blank dot matrix;
[0017] The instruction generation module is used to obtain printer attribute information according to a preset printer selection instruction, generate a printing instruction according to the printer attribute information and the label dot matrix mapping source, and send the printing instruction to a target printer so that the target printer generates a label.
[0018] In a third aspect, an embodiment of the present application provides an electronic device, the electronic device comprising a memory and a processor;
[0019] The memory is used to store computer programs;
[0020] The processor is used to execute the computer program and implement the hypertext link-based tag generation method as described in any one of the embodiments of the present application when executing the computer program.
[0021] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor enables the processor to implement a hypertext link-based label generation method as described in any one of the embodiments of the present application.
[0022] The embodiment of the present application provides a label generation method based on a hypertext link, where the hypertext link is a link of a label design interface, and the method includes: based on the label design interface, obtaining an order processing request uploaded by an order system, and obtaining an order data table from a preset database according to the order processing request; based on a preset element extraction engine, extracting key elements from the order data table to obtain identification code elements, text elements and digital elements; generating an identification code dot matrix according to a first rendering operation performed by a user on the identification code element, generating a text dot matrix according to a second rendering operation performed by the user on the text element, and generating a digital dot matrix according to a third rendering operation performed by the user on the digital element; obtaining label attribute information input by a user, generating a blank dot matrix according to the label attribute information, and projecting the identification code dot matrix, the text dot matrix and the digital dot matrix onto the blank dot matrix according to a preset typesetting algorithm; generating a label dot matrix mapping source according to the typesetting operation performed by the user on the identification code dot matrix, the text dot matrix and the digital dot matrix on the blank dot matrix; obtaining printer attribute information according to a preset printer selection instruction, generating a printing instruction according to the printer attribute information and the label dot matrix mapping source, and sending the printing instruction to a target printer so that the target printer generates a label. Through the above method, by integrating the order system and the label design interface, data automatic extraction is realized, order processing requests from the order system are obtained, and relevant order data tables are automatically captured from the database. By using the element extraction engine, key elements such as identification code elements, text elements and digital elements are accurately classified. Users can perform different rendering operations on identification code elements, text elements and digital elements according to their needs to generate corresponding dot matrices. This design greatly enhances the diversity and adaptability of visual effects of labels. Then, by using the intelligent typesetting algorithm, the extracted and rendered elements are accurately laid out on the blank dot matrix specified by the user, ensuring the rationality and aesthetics of the label structure, and generating a label dot matrix mapping source to facilitate matching with the properties of the printer. By analyzing the property information of the target printer, the label design application automatically generates the most optimized printing instructions to ensure that the output label can maintain the original design on any device, avoiding format confusion caused by printer differences. The above process simplifies the tedious debugging process in the traditional printing process and improves the consistency and success rate of cross-device printing. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.
[0024] Figure 1 A schematic flow chart of a method for generating a tag based on a hypertext link provided in an embodiment of the present application;
[0025] Figure 2 A schematic block diagram of a hypertext link-based label generation device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0027] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0028] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0029] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0030] The label design application provided in the embodiment of the present application is placed in the third-party software in the form of a hypertext link, and the label design application is called in the third-party software through the hypertext link. When the hypertext link of the label design application is clicked in the third-party software, the label design interface of the label design application will be displayed, and the user can design labels on the label design interface and call the printer to print the generated labels.
[0031] See also Figure 1, Figure 1 The following is a schematic flow chart of a method for generating a tag based on a hypertext link provided by an embodiment of the present application. Figure 1 As shown, the specific steps of the tag generation method based on hypertext links include: S101-S106.
[0032] S101. Based on the label design interface, an order processing request uploaded by the order system is obtained, and an order data table is obtained from a preset database according to the order processing request.
[0033] Exemplarily, the label design program is connected to the data interface of the order system. When a new order processing request appears in the order system, this order processing request can be captured by the label design interface immediately. After the label design interface captures the order processing request, it can display the order processing request for the user to confirm. After receiving the confirmation instruction input by the user, the label design program turns to the preset database for data retrieval. The preset database here can be the database of the order system, which stores rich order information and may be a structured data table containing various details of the order, such as product information, customer information, quantity, price, etc. The label design program can flexibly grab the corresponding data table from the database according to different order processing requests. This means that whether it is a single order or a batch order, the label design program can quickly locate and extract the required data, providing timely data support for subsequent label design and production processes. Such a design reduces manual intervention and ensures the accuracy and timeliness of data extraction.
[0034] S102. Based on a preset element extraction engine, extract key elements from the order data table to obtain identification code elements, text elements, and digital elements.
[0035] Exemplarily, the key information of the order data table is extracted by a preset element extraction engine to obtain product type information, product description information and digital information corresponding to the product description information. A type of identification code is generated according to each product type information. A variety of key text information in the product description information is extracted, and the key text information is converted into text elements, for example, according to a preset text font and text specification, the text information is converted into text elements, and the digital elements are the same.
[0036] S103, generating an identification code dot matrix according to a first rendering operation performed by the user on the identification code element, generating a text dot matrix according to a second rendering operation performed by the user on the text element, and generating a digital dot matrix according to a third rendering operation performed by the user on the digital element.
[0037] Exemplarily, the first rendering operation performed by the user on the identification code element in the label design interface includes: selecting the identification code element, dragging the identification code element to a specified position of the blank dot matrix, adjusting the size of the identification code element to meet the label design requirements, and rotating the identification code element to meet specific label layout requirements. The label design application generates a corresponding identification code dot matrix based on the user's operation and records its position, size, and rotation angle. The user selects a text element in the label design interface.
[0038] The second rendering operation of the text element performed by the user in the label design interface includes: dragging the text element to the specified position of the blank dot matrix, selecting the font, color and size of the text element to ensure that the text content is clearly visible, adjusting the size of the text element to adapt to the label design requirements, and rotating the text element to meet the specific label layout requirements. The label design application generates the corresponding text dot matrix according to the user's operation and records its font, color, size, position and rotation angle.
[0039] The third rendering operation of the digital element performed by the user in the label design interface includes: dragging the digital element to the specified position of the blank dot matrix, selecting the font, color and size of the digital element to ensure that the digital content is clearly visible, the user adjusts the size of the digital element to adapt to the label design requirements, and the user rotates the digital element to meet the specific label layout requirements. The label design application generates the corresponding digital dot matrix according to the user's operation and records its font, color, size, position and rotation angle.
[0040] S104, obtaining the tag attribute information input by the user, generating a blank dot matrix according to the tag attribute information, and projecting the identification code dot matrix, the text dot matrix and the digital dot matrix to the blank dot matrix according to a preset typesetting algorithm.
[0041] Exemplarily, the user inputs various attribute information of the label through the label design interface. Such information includes, but is not limited to, the size, shape, border style, background color, etc. of the label. The label design application calculates the specific size and shape of the label based on the label attribute information input by the user, and generates an initial blank dot matrix. The label design application projects the generated identification code dot matrix, text dot matrix, and digital dot matrix to the specified position of the blank dot matrix according to the preset typesetting algorithm, adjusts the size and position of the three dot matrices, for example, binds multiple dot matrices that need to be associated, and ensures that their display on the label meets the design requirements.
[0042] In a specific embodiment, the user inputs the size (e.g., width 100mm, height 50mm), shape (rectangle), border style (solid line border), and background color (white) of the label through the label design interface. After receiving these attribute information, the label design application generates a blank dot matrix of corresponding size and shape. Then, the label design application places the identification code dot matrix (two-dimensional code) previously generated by the user in the upper left corner of the label, the text dot matrix (product name and description) in the middle of the label, and the digital dot matrix (batch number and date) in the lower right corner of the label according to the preset typesetting algorithm. Through the method of the present invention, the user can efficiently input label attribute information and generate a label dot matrix mapping source that meets the design requirements, which simplifies the label design process and improves design efficiency and accuracy.
[0043] S105 , generating a label dot matrix mapping source according to the typesetting operation performed by the user on the identification code dot matrix, the text dot matrix and the digital dot matrix on the blank dot matrix.
[0044] For example, the user completes the selection and adjustment of the identification code dot matrix, the text dot matrix and the digital dot matrix in the label design interface. The user can place each element at a suitable position on the blank dot matrix and adjust their size and direction by dragging, scaling and rotating. Specifically, the following operations are included: dragging operation, scaling operation and rotating operation.
[0045] After the user completes the above operations, the label design application records the specific parameters of each element, including position, size and rotation angle. Based on these parameters, the label design application generates a label dot matrix map source. The label dot matrix map source is a dot matrix image that integrates all user operations and accurately reflects the final design effect of the label.
[0046] Through this step, all the user's layout operations are recorded by the label design application and converted into dot matrix images, ensuring the accuracy and aesthetics of the label design. This process makes the label layout more flexible and can meet the needs of different application scenarios.
[0047] S106, acquiring printer attribute information according to a preset printer selection instruction, generating a printing instruction according to the printer attribute information and a label dot matrix mapping source, and sending the printing instruction to a target printer so that the target printer generates a label.
[0048] Exemplarily, the user selects the target printer in the label design interface. The label design application determines the specific printer model from the preset printer list according to the user's selection. The label design application queries the printer attribute database according to the printer selection instruction to obtain detailed attribute information of the selected printer. These attribute information include but are not limited to: printing resolution, printing speed, supported label paper types, and printer interface types. The label design application generates printing instructions based on the acquired printer attribute information and the label dot mapping source. Specifically, it includes the following three steps: 1. Adjust the label dot mapping source: adjust the DPI of the label dot mapping source according to the resolution of the printer to ensure that the printed label is clear and meets the design requirements. 2. Convert dot data: convert the dot data in the label dot mapping source into a format recognizable by the printer. For example, generate ZPL instructions for Zebra printers or EPL instructions for Eltron printers. 3. Set printing parameters: including printing position, printing speed, color settings, label paper type, etc., to ensure that the printer can perform printing operations correctly. The label design application sends the generated printing instructions to the target printer through the pre-set printer interface type. After receiving the instruction, the printer executes the printing operation according to the dot matrix data and printing parameters in the instruction to generate the final designed label.
[0049] Through this step, the label design application can generate accurate printing instructions based on the user's printing needs and the specific properties of the printer to ensure printing quality and efficiency. This not only simplifies the label printing process, but also improves the accuracy and consistency of label printing.
[0050] In order to more clearly introduce the technical solution of the present application, the technical solution of the present application will be introduced through specific embodiments below. It should be noted that the specific embodiments are used to expand the technical solution of the present application, but are not intended to limit the present application.
[0051] In some embodiments, label attribute information input by a user is obtained, and a blank dot matrix is generated according to the label attribute information, including: based on a label design page, receiving label attribute information input by a user, and determining size attribute information and clarity attribute information according to the label attribute information; determining a dot matrix border according to the size attribute information, and determining a pixel array within the dot matrix border according to the clarity attribute information, wherein the pixel array includes a plurality of initial pixel points; and generating a blank dot matrix according to the dot matrix border and the pixel array.
[0052] Exemplarily, the user inputs label attribute information through the label design page, and the user's size information is parsed to obtain size attribute information and clarity attribute information. The size attribute information includes: shape, width and height, and the clarity attribute information includes DPI. The size attribute information includes the width and height of the label, which determines the outer border of the blank dot matrix. The label design application generates the outer border of the dot matrix based on the size attribute information. The dot matrix border determines the shape and size of the blank dot matrix, providing a basis for the generation of the internal pixel array. The label design application generates a pixel array within the dot matrix border based on the clarity attribute information. The pixel array includes multiple initial pixel points, and the arrangement density of these pixel points is determined by the DPI. For example, on a 300 DPI label, each inch will contain 300 pixels. The label design application evenly distributes these pixels within the dot matrix border according to the proportion.
[0053] Through the above steps, the method of the present invention can efficiently receive the label attribute information input by the user, and generate an accurate blank dot matrix based on the information. The blank dot matrix has clear size and clarity attributes, can meet different design requirements, and improve the flexibility and accuracy of label design.
[0054] In some embodiments, the identification code dot matrix, the text dot matrix and the digital dot matrix are projected onto the blank dot matrix according to a preset typesetting algorithm, including: determining the first projection range of the identification code dot matrix, the second projection range of the text dot matrix, and the third projection range of the digital dot matrix according to the preset typesetting specification, and determining the association relationship between the first projection range, the second projection range and the third projection range; based on the typesetting algorithm, according to the association relationship and the blank dot matrix, pre-layout the first projection range, the second projection range and the third projection range to obtain a first projection relationship; projecting the identification code dot matrix, the text dot matrix and the digital dot matrix onto the blank dot matrix according to the first projection relationship.
[0055] Exemplarily, in the preset typesetting specifications, identification codes, text, and numbers all have corresponding size regulations and spacing regulations. Under the restrictions of the size regulations and spacing regulations, the dot matrix of each element has a corresponding projection range, and each dot matrix can be adjusted within the limited projection range to ensure that the requirements of the typesetting specifications are met. In the typesetting specifications, the connection between elements is also specified. For example, a digital description needs to be set under the one-dimensional identification code, and a string of digital characters needs to be configured under a one-dimensional identification code. The first projection range of the one-dimensional identification code and the third projection range of the digital characters need to be bound. This type of binding relationship may exist between multiple different elements, or between multiple identical elements. The specific situation needs to be determined according to the typesetting specifications. Through the above steps, the compliance of the dot matrix typesetting is ensured.
[0056] In some embodiments, based on a layout algorithm, the first projection range, the second projection range, and the third projection range are pre-layouted according to the association relationship and the blank dot matrix to obtain a first projection relationship, including: determining a fourth projection range according to the first projection range, the second projection range, the third projection range, and the association relationship, the fourth projection range being a range determined by combining any two or three of the first projection range, the second projection range, and the third projection range; performing region segmentation on the blank dot matrix according to the widths of the first projection range, the second projection range, the third projection range, and the fourth projection range to obtain a first projection area and a second projection area; obtaining the first projection range, the second projection range, the third projection range, and the fourth projection range, respectively. and the minimum height of the fourth projection range; calculate the sum of the minimum heights, multiply the sum of the minimum heights by one-half to obtain the classification height; determine the first target range and the second target range from the first projection range, the second projection range, the third projection range and the fourth projection range according to the minimum height and the classification height, the minimum height of the first target range is less than the classification height, and the minimum height of the second target range is greater than or equal to the classification height; according to the preset priority, pre-layout the first target range in the first projection area to obtain a first layout relationship, and pre-layout the second target range in the second projection area to obtain a second layout relationship; determine the first projection relationship according to the first layout relationship and the second layout relationship.
[0057] Exemplarily, the fourth projection range is determined according to the first projection range, the second projection range, the third projection range and the relationship between them. The fourth projection range is a range formed by combining any two or three of the first projection range, the second projection range and the third projection range. Through the above steps, the interaction and overlap of each projection range are comprehensively considered to determine a new effective range.
[0058] According to the widths of the first projection range, the second projection range, the third projection range, and the fourth projection range, the blank dot matrix is divided into regions to obtain the first projection region and the second projection region. The number of projection regions can also be divided according to a preset number, or directly generated according to a label template selected by the user. Through the above steps, the blank dot matrix is divided into multiple regions for subsequent element layout and projection operations.
[0059] Get the minimum heights of the first projection range, the second projection range, the third projection range, and the fourth projection range respectively. The classification height is obtained by calculating the sum of these minimum heights and multiplying it by one half. The classification height is used for subsequent regional classification and typesetting operations. According to the minimum height and the classification height, the first target range and the second target range are determined from the first projection range, the second projection range, the third projection range, and the fourth projection range, respectively. The minimum height of the first target range is less than the classification height, while the minimum height of the second target range is greater than or equal to the classification height. Through the above steps, it can be ensured that the sum of the heights of the first target range is basically the same as the sum of the heights of the second target height range, so that the two sides can be compared as a whole after typesetting to improve the aesthetics of the label.
[0060] After the area segmentation is completed, the first target range is pre-layouted in the first projection area according to the preset priority to obtain the first layout relationship; at the same time, the second target range is pre-layouted in the second projection area to obtain the second layout relationship. The pre-layout process takes into account the priority and spatial distribution of each element to ensure the aesthetics and functionality of the label design. The first projection relationship is determined based on the first layout relationship and the second layout relationship. The first projection relationship combines the layout results of each projection range and target range to form a complete label design layout, ensuring that each element on the label is reasonably arranged and displayed.
[0061] In some embodiments, a label dot matrix mapping source is generated based on the typesetting operation performed by the user on the identification code dot matrix, text dot matrix and digital dot matrix on the blank dot matrix, including: adjusting the first projection relationship between the identification code dot matrix, text dot matrix and digital dot matrix and the blank dot matrix according to the typesetting operation to generate a second projection relationship, and the typesetting operation includes: position adjustment, size adjustment and rotation angle adjustment; according to the second projection relationship, projecting the identification code dot matrix, text dot matrix and digital dot matrix to the blank dot matrix to generate a label dot matrix mapping source.
[0062] Exemplarily, according to the second projection relationship, the identification code dot matrix, the text dot matrix and the digital dot matrix are projected onto the blank dot matrix. Specifically, the identification code dot matrix, the text dot matrix and the digital dot matrix replace the initial pixel points on the blank dot matrix according to the projection position to generate the label dot matrix mapping source. By adjusting the projection relationship between the dot matrix and the blank dot matrix, the correct position and arrangement of the identification code, text and digital dot matrix in the label can be ensured to avoid typesetting errors and information confusion.
[0063] In some embodiments, based on a preset element extraction engine, key information is extracted from the order data table to obtain product type information, product description information and product quantity information, including: based on the element extraction engine, the order data table is read, multiple product names in the order data table are obtained, and product type information is generated according to the product names; according to a preset text extraction template, associated information of the product name is extracted from the order data table, and product description information is generated according to the associated information, and the associated information includes: product origin, product specifications, shipping date, shipping mode and precautions; numerical information is determined from the associated information, and the order data table is digitally extracted according to the numerical information to obtain product quantity information corresponding to the numerical information.
[0064] In some embodiments, a print instruction is generated based on printer attribute information and a label dot mapping source, including: determining the print environment parameters and the machine operation parameters based on the printer attribute information; converting the label dot mapping source into an executable data source based on the print environment parameters; determining the precision instruction, the color modulation instruction and the position setting instruction based on the machine operation parameters and the executable data source; and generating the print instruction based on the precision instruction, the color modulation instruction and the position setting instruction.
[0065] Exemplarily, the label design application determines the printing environment parameters and machine operation parameters. The printing environment parameters include, but are not limited to, the printer's resolution (DPI), printing speed, supported paper types, and ambient temperature and humidity. The machine operation parameters include the print head's operating speed, pressure setting, ink type, and consumables usage.
[0066] The label design application converts the label dot mapping source into an executable data source according to the printing environment parameters, including the following three steps: 1. Resolution adjustment: According to the DPI setting of the printer, adjust the label dot mapping source to a matching resolution to ensure the clarity and details of the image. 2. Color management: Based on the color mode supported by the printer (such as CMYK, RGB), perform color space conversion on the label dot mapping source to ensure the accuracy of the printed color. 3. Format conversion: Convert the label dot mapping source into a format that the printer can recognize, such as ZPL (Zebra Programming Language), EPL (Eltron Programming Language) or other proprietary formats.
[0067] After determining the executable data source and the target printer, the label design application generates precision instructions according to the resolution of the target printer and the label design requirements. These instructions include the movement step of the print head, the resolution control of the dot matrix image, etc., to ensure the precise position and size of each printed dot. According to the results of color management, color modulation instructions are generated to control the ink jet intensity and sequence to ensure that the printed color is consistent with the design image. The label design application uses color correction algorithms and ICC color profiles to achieve accurate color restoration. According to the size and layout of the label, position setting instructions are generated to control the specific position of the label on the print medium to ensure the precise alignment of each element. Position setting also includes setting the start and end positions of the print head to ensure the integrity of the printing. Finally, the label design application integrates the precision instructions, color modulation instructions and position setting instructions, and generates complete printing instructions through instruction encoding and instruction encapsulation. Instruction encoding: Encode each instruction into a command sequence executable by the printer according to the language and protocol supported by the printer (such as ZPL, EPL, etc.). Instruction encapsulation: Encapsulate the encoded instructions to form a complete data packet containing all necessary printing information. This method not only improves the accuracy and quality of label printing, but also adapts to the needs of different printing environments and machines, ensuring the stability and consistency of printing results.
[0068] See also Figure 2 , Figure 2 The embodiment of the present application further provides a schematic block diagram of a hypertext link-based label generation device, wherein the hypertext link-based label generation device 300 is used to execute the aforementioned hypertext link-based label generation method. The hypertext link-based label generation device 300 can be configured in a server.
[0069] Among them, the server can be an independent server or a server cluster, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN) and big data and artificial intelligence platforms.
[0070] like Figure 2 As shown, the hypertext link-based tag generation device 300 includes: a data extraction module 301, an element extraction module 302, an element rendering module 303, a dot matrix projection module 304, a typesetting modulation module 305 and an instruction generation module 306.
[0071] The data acquisition module 301 is used to acquire the order processing request uploaded by the order system based on the label design interface, and acquire the order data table from the preset database according to the order processing request.
[0072] The element extraction module 302 is used to extract key elements from the order data table based on a preset element extraction engine to obtain identification code elements, text elements and digital elements.
[0073] In some embodiments, when the element extraction module 302 is used to implement key information extraction from an order data table based on a preset element extraction engine to obtain product type information, product description information and product quantity information, it is specifically used to implement: based on the element extraction engine, read the order data table, obtain multiple product names in the order data table, and generate product type information based on the product names; extract associated information of the product names from the order data table according to a preset text extraction template, and generate product description information based on the associated information, the associated information includes: product origin, product specifications, shipping date, shipping mode and precautions; determine numerical information from the associated information, perform digital extraction on the order data table based on the numerical information, and obtain product quantity information corresponding to the numerical information.
[0074] The element rendering module 303 is used to generate an identification code dot matrix according to a first rendering operation performed by a user on an identification code element, generate a text dot matrix according to a second rendering operation performed by a user on a text element, and generate a digital dot matrix according to a third rendering operation performed by a user on a digital element.
[0075] The dot matrix projection module 304 is used to obtain the tag attribute information input by the user, generate a blank dot matrix according to the tag attribute information, and project the identification code dot matrix, the text dot matrix and the digital dot matrix to the blank dot matrix according to a preset typesetting algorithm.
[0076] In some embodiments, when the dot matrix projection module 304 is used to obtain label attribute information input by a user and generate a blank dot matrix according to the label attribute information, it is specifically used to implement: based on a label design page, receiving label attribute information input by a user, and determining size attribute information and clarity attribute information according to the label attribute information; determining a dot matrix border according to the size attribute information, and determining a pixel array within the dot matrix border according to the clarity attribute information, wherein the pixel array includes multiple initial pixel points; and generating a blank dot matrix according to the dot matrix border and the pixel array.
[0077] In some embodiments, when the dot matrix projection module 304 is used to project the identification code dot matrix, the text dot matrix and the digital dot matrix onto the blank dot matrix according to a preset typesetting algorithm, it is specifically used to implement: determining the first projection range of the identification code dot matrix, the second projection range of the text dot matrix, and the third projection range of the digital dot matrix according to the preset typesetting specification, and determining the association relationship between the first projection range, the second projection range and the third projection range; based on the typesetting algorithm, pre-layout the first projection range, the second projection range and the third projection range according to the association relationship and the blank dot matrix to obtain a first projection relationship; and projecting the identification code dot matrix, the text dot matrix and the digital dot matrix onto the blank dot matrix according to the first projection relationship.
[0078] In some embodiments, the dot matrix projection module 304 is used to implement the pre-layout of the first projection range, the second projection range and the third projection range based on the layout algorithm according to the association relationship and the blank dot matrix to obtain the first projection relationship, and is specifically used to implement: determining the fourth projection range according to the first projection range, the second projection range, the third projection range and the association relationship, the fourth projection range being: a range determined by combining any two or three of the first projection range, the second projection range and the third projection range; performing regional segmentation on the blank dot matrix according to the width of the first projection range, the second projection range, the third projection range and the fourth projection range to obtain the first projection area and the second projection area; respectively obtaining the first projection range, the second projection range, the third projection range and the fourth projection range. The minimum heights of the first projection range, the second projection range, the third projection range and the fourth projection range are calculated; the sum of the minimum heights is calculated, and the sum of the minimum heights is multiplied by one half to obtain the classification height; according to the minimum heights and the classification heights, the first target range and the second target range are determined from the first projection range, the second projection range, the third projection range and the fourth projection range, respectively, the minimum height of the first target range is less than the classification height, and the minimum height of the second target range is greater than or equal to the classification height; according to the preset priority, the first target range is pre-layouted in the first projection area to obtain a first layout relationship, and the second target range is pre-layouted in the second projection area to obtain a second layout relationship; the first projection relationship is determined according to the first layout relationship and the second layout relationship.
[0079] The typesetting modulation module 305 is used to generate a label dot matrix mapping source according to the typesetting operation performed by the user on the identification code dot matrix, the text dot matrix and the digital dot matrix on the blank dot matrix.
[0080] In some embodiments, when the typesetting modulation module 305 is used to realize the typesetting operation performed by the user on the identification code dot matrix, text dot matrix and digital dot matrix on the blank dot matrix and generate a label dot matrix mapping source, it is specifically used to realize: according to the typesetting operation, adjusting the first projection relationship between the identification code dot matrix, text dot matrix and digital dot matrix and the blank dot matrix to generate a second projection relationship, and the typesetting operation includes: position adjustment, size adjustment and rotation angle adjustment; according to the second projection relationship, projecting the identification code dot matrix, text dot matrix and digital dot matrix to the blank dot matrix to generate a label dot matrix mapping source.
[0081] The instruction generation module 306 is used to obtain printer attribute information according to the preset printer selection instruction, generate a printing instruction according to the printer attribute information and the label dot matrix mapping source, and send the printing instruction to the target printer so that the target printer generates a label.
[0082] In some embodiments, when the instruction generation module 306 is used to generate printing instructions based on printer attribute information and a label dot mapping source, it is specifically used to implement: determining printing environment parameters and machine operation parameters based on the printer attribute information; converting the label dot mapping source into an executable data source based on the printing environment parameters; determining precision instructions, color modulation instructions, and position setting instructions based on the machine operation parameters and the executable data source; and generating printing instructions based on the precision instructions, color modulation instructions, and position setting instructions.
[0083] An embodiment of the present application provides an electronic device, which includes a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and implement any hypertext link-based label generation method as described in the embodiments of the present application when executing the computer program.
[0084] An embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor implements any of the hypertext link-based label generation methods in the embodiments of the present application.
[0085] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A label generation method based on hypertext links, characterized in that: The hypertext link is a link to a label design interface of a label design application, and the label design interface is loaded when the hypertext link is called by a user. The method includes: Based on the label design interface, an order processing request uploaded by the order system is obtained, and an order data table is obtained from a preset database according to the order processing request, wherein the label design application is connected to a data interface of the order system, and when the order system adds the order processing request, the label design interface automatically captures the order processing request through the data interface; Based on a preset element extraction engine, extract key elements from the order data table to obtain identification code elements, text elements and digital elements; generating an identification code dot matrix according to a first rendering operation performed by the user on the identification code element, generating a text dot matrix according to a second rendering operation performed by the user on the text element, and generating a digital dot matrix according to a third rendering operation performed by the user on the digital element; Acquire the tag attribute information input by the user, generate a blank dot matrix according to the tag attribute information, and project the identification code dot matrix, the text dot matrix and the digital dot matrix onto the blank dot matrix according to a preset typesetting algorithm; Generate a label dot matrix mapping source according to the typesetting operation performed by the user on the identification code dot matrix, the text dot matrix and the digital dot matrix on the blank dot matrix; According to the preset printer selection instruction, the printer attribute information is obtained, a printing instruction is generated according to the printer attribute information and the label dot matrix mapping source, and the printing instruction is sent to the target printer so that the target printer generates a label.
2. The method for generating a tag based on a hypertext link according to claim 1, characterized in that: The step of obtaining tag attribute information input by a user and generating a blank dot matrix according to the tag attribute information includes: Based on the label design page, receiving label attribute information input by a user, and determining size attribute information and definition attribute information according to the label attribute information; Determine a dot matrix border according to the size attribute information, and determine a pixel array within the dot matrix border according to the clarity attribute information, wherein the pixel array includes a plurality of initial pixel points; The blank dot matrix is generated according to the dot matrix border and the pixel array.
3. The method for generating a tag based on a hypertext link according to claim 1, characterized in that: The step of projecting the identification code dot matrix, the text dot matrix and the digital dot matrix onto the blank dot matrix according to a preset typesetting algorithm includes: Determine the first projection range of the identification code dot matrix, the second projection range of the text dot matrix, and the third projection range of the digital dot matrix according to a preset typesetting algorithm, and determine the correlation relationship between the first projection range, the second projection range, and the third projection range; Based on the layout algorithm, the first projection range, the second projection range and the third projection range are pre-layouted according to the association relationship and the blank dot matrix to obtain a first projection relationship; The identification code dot matrix, the text dot matrix and the digital dot matrix are projected onto the blank dot matrix according to the first projection relationship.
4. The method for generating a tag based on a hypertext link according to claim 3, characterized in that: The method of pre-layouting the first projection range, the second projection range, and the third projection range based on the layout algorithm and according to the association relationship and the blank dot matrix to obtain a first projection relationship includes: Determine a fourth projection range according to the first projection range, the second projection range, the third projection range and the association relationship, wherein the fourth projection range is a range determined by combining any two or three of the first projection range, the second projection range and the third projection range; Performing area segmentation on the blank dot matrix according to the widths of the first projection range, the second projection range, the third projection range, and the fourth projection range to obtain a first projection area and a second projection area; respectively obtaining minimum heights of the first projection range, the second projection range, the third projection range, and the fourth projection range; Calculate the sum of the minimum heights, and multiply the sum of the minimum heights by one half to obtain a classification height; According to the minimum height and the classification height, determining a first target range and a second target range from the first projection range, the second projection range, the third projection range, and the fourth projection range, respectively, the minimum height of the first target range being less than the classification height, and the minimum height of the second target range being greater than or equal to the classification height; According to a preset priority, pre-layout the first target range in the first projection area to obtain a first layout relationship, and pre-layout the second target range in the second projection area to obtain a second layout relationship; The first projection relationship is determined according to the first layout relationship and the second layout relationship.
5. The method for generating a tag based on a hypertext link according to claim 3, characterized in that: The generating of the label dot matrix mapping source according to the typesetting operation performed by the user on the identification code dot matrix, the text dot matrix and the digital dot matrix on the blank dot matrix comprises: According to the typesetting operation, adjusting the first projection relationship between the identification code dot matrix, the text dot matrix, the digital dot matrix and the blank dot matrix to generate a second projection relationship, wherein the typesetting operation includes: position adjustment, size adjustment and rotation angle adjustment; According to the second projection relationship, the identification code dot matrix, the text dot matrix and the digital dot matrix are projected onto the blank dot matrix to generate a label dot matrix mapping source.
6. The method for generating a tag based on a hypertext link according to claim 1, characterized in that: The preset element extraction engine extracts key information from the order data table to obtain product type information, product description information and product quantity information, including: Based on the element extraction engine, read the order data table, obtain multiple product names in the order data table, and generate the product type information according to the product names; Extracting the associated information of the product name from the order data table according to a preset text extraction template, and generating the product description information according to the associated information, wherein the associated information includes: product origin, product specifications, shipping date, shipping mode and precautions; Numerical information is determined from the associated information, and digital extraction is performed on the order data table according to the numerical information to obtain the product quantity information corresponding to the numerical information.
7. The method for generating a tag based on a hypertext link according to claim 1, characterized in that: The generating of the printing instruction according to the printer attribute information and the label dot matrix mapping source comprises: Determining printing environment parameters and machine operation parameters according to the printer attribute information; According to the printing environment parameters, converting the label dot matrix mapping source into an executable data source; Determining precision instructions, color modulation instructions, and position setting instructions according to the machine operation parameters and executable data sources; The printing instruction is generated according to the precision instruction, the color modulation instruction and the position setting instruction.
8. A label generation device based on hypertext links, characterized in that: The hypertext link is a link to a label design interface. When the hypertext link is called by a user, the label design interface is loaded. The label generation device includes: A data acquisition module, used to acquire the order processing request uploaded by the order system based on the label design interface, and acquire the order data table from a preset database according to the order processing request, wherein the label design application is connected to the data interface of the order system, and when the order system adds the order processing request, the label design interface automatically captures the order processing request through the data interface; An element extraction module, used to extract key elements from the order data table based on a preset element extraction engine to obtain identification code elements, text elements and digital elements; an element rendering module, configured to generate an identification code dot matrix according to a first rendering operation performed by a user on the identification code element, generate a text dot matrix according to a second rendering operation performed by a user on the text element, and generate a digital dot matrix according to a third rendering operation performed by a user on the digital element; A dot matrix projection module, used to obtain the tag attribute information input by the user, generate a blank dot matrix according to the tag attribute information, and project the identification code dot matrix, the text dot matrix and the digital dot matrix to the blank dot matrix according to a preset typesetting algorithm; A typesetting modulation module, used for generating a label dot matrix mapping source according to the typesetting operation performed by the user on the identification code dot matrix, the text dot matrix and the digital dot matrix on the blank dot matrix; The instruction generation module is used to obtain printer attribute information according to a preset printer selection instruction, generate a printing instruction according to the printer attribute information and the label dot matrix mapping source, and send the printing instruction to a target printer so that the target printer generates a label.
9. An electronic device, characterized in that: The electronic device comprises a memory and a processor; The memory is used to store computer programs; The processor is used to execute the computer program and implement the hypertext link-based tag generation method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the hypertext link-based tag generation method according to any one of claims 1 to 7.
