Barcode label designing and printing method and system based on ARM architecture and storage medium
By providing a barcode label design and printing system compatible with the printing languages of different barcode printer manufacturers on ARM architecture devices, the compatibility problem of barcode label software on ARM architecture devices is solved, and independent operation and efficient printing are achieved.
Patent Information
- Application Number
- CN202411586115.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-03-07
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art lacks a barcode labeling software system that can run independently on ARM architecture devices, and is unable to be compatible with the printing languages of different barcode printer manufacturers.
It provides a barcode label design and printing method and system based on ARM architecture, by receiving label template instructions, setting basic properties, generating a label design effect preview, parsing and converting label templates, generating a printing instruction set, and outputting it to the printer. This system supports printing languages of different barcode printer manufacturers, and automatically obtains the printing language and parsing instruction set through the preset exhaustive table.
It realizes a barcode label design and printing system that runs independently on ARM architecture equipment, is compatible with the printing languages of different barcode printer manufacturers, supports barcode printer printing label and label design, and improves printing flexibility and efficiency.
Smart Images

Figure CN119576255A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of barcode labels, and in particular to a barcode label design and printing method, system and storage medium based on ARM architecture. Background Art
[0002] Barcode labels, as the "identity card" of items in circulation, play a key role in many fields such as manufacturing, warehousing and logistics, and e-commerce trade. With the development of Internet of Things technology and the popularization of intelligent manufacturing, embedded industrial terminals have been widely used to run software, collect data, and transmit and analyze. These industrial terminals need to run barcode label software, design label templates, and print barcode labels to achieve item identification.
[0003] With the development of ARM microprocessor technology supporting reduced instruction set RISC (Reduced Instruction Set Computer), especially ARM64 and multi-core technology, ARM architecture-based devices have been widely used in mobile computing, server and desktop computing. However, most barcode label software systems on the market are designed based on the Windows operating system of x86 architecture, especially barcode printer drivers. Many printer manufacturers have not yet provided ARM architecture compatible versions, thus limiting the independent operation of barcode label systems on ARM architecture devices.
[0004] In printing technology, there is an important feature: printing language, which instructs the printer how to output the document. Printing languages are mainly divided into two categories:
[0005] 1. Page Description Language (PDL): Such as HP's PCL (Printer Command Language), which is mainly used for laser and inkjet printers. It is necessary to convert the bitmap format into PCL code in the Windows environment for the printer CPU to interpret and execute.
[0006] 2. Embedded language (ECL, ESCape Code Language): prefixed with feature codes such as ESC, used for dot matrix printers, and directly embedded in the print data.
[0007] Barcode label printers require special functions (such as printing one-dimensional and two-dimensional barcodes and accurately positioning roll paper labels), so the general PCL and ECL languages used by laser or inkjet printers cannot support them. Instead, they use special printing languages. For example, the Zebra printer series uses ZPL (Zebra Programming Language) and CPCL (Camero Printer Command Language), while the TSC series printers use TSPL.
[0008] In the prior art, Chinese patent document CN117991999A discloses a cloud printing method based on ARM architecture, including: monitoring USB plug-in and unplug events through a USB enumerator, obtaining USB printer information, and matching the virtual printer installed on the cloud server according to the USB printer information; obtaining network printer information through WSDiscovery and mDNS protocols, and matching the virtual printer installed on the cloud server according to the network printer information; receiving a print task, parsing the print settings in the print task; converting the received print task through a cloud server according to the parsed print settings; and sending the converted print task to the USB printer or network printer corresponding to the virtual printer matched by the cloud server. However, this patent relies on the device management API provided by the cloud server and the Windows system, and cannot run independently on ARM architecture devices. In addition, since the Windows device management API cannot directly parse the barcode label language, this method cannot support barcode printers printing labels and label design.
[0009] Therefore, the prior art lacks a barcode label design and printing method and system that is compatible with the printing languages of different barcode printer manufacturers and can independently and completely run on ARM architecture computers and industrial terminals. Summary of the invention
[0010] The main purpose of the present invention is to provide a barcode label design and printing system that is compatible with the printing languages of different barcode printer manufacturers and can run independently and completely on ARM architecture computers and industrial terminals.
[0011] To achieve the above object, the present invention provides a barcode label design and printing method based on ARM architecture, which comprises the following steps:
[0012] S10, receiving a new label template instruction, and prompting the user to set basic attributes of the label template, the basic attributes at least including label printing language, printing resolution and label size;
[0013] S20, storing basic properties set by the user, and initializing a label design page, in which at least one label control object is preset;
[0014] S30, responding to the user's selection instruction for the label control object, adding the selected label control object to the label template, adjusting the properties of the label control object according to the user's operation, and generating a label design effect preview;
[0015] S40, receiving a save instruction, and prompting the user to confirm the saved information;
[0016] S50, receiving a save confirmation instruction, parsing the label template and converting it into a template definition file;
[0017] S60, compressing the template definition file to generate a label template compression package;
[0018] S70, receiving a label printing instruction, decompressing and parsing the template compression package, and obtaining the label printing language;
[0019] S80, generating a corresponding printing instruction set according to the label printing language;
[0020] S90, performing printing scheduling based on a preset scheduling method, and outputting a printing instruction set to a printer.
[0021] Optionally, S50 includes at least the following steps:
[0022] S51, receiving a save confirmation instruction, obtaining a label control object, properties of the label control object, a specified data source, and basic properties of a label template;
[0023] S52, traversing the label control objects contained in the label template one by one, and obtaining the properties and data source information of each label control object;
[0024] S53, parsing the properties of each label control object according to the JSON format requirements, and converting the data source specified by the label control object into a variable or identifier that can be recognized in the template definition file;
[0025] S54. The parsed and converted data is stored in JSON format to obtain a template definition file.
[0026] Optionally, the label template compression package includes a template data source definition file and a template object definition file;
[0027] The template data source definition file stores the data source definition of the label template in JSON format;
[0028] The template object definition file stores the label size, print resolution, types of all label control objects, properties of all label control objects, characteristics of all label control objects, and static content of the label template in JSON format.
[0029] Optionally, in S70, the label printing instruction includes at least the number of copies to be printed and the selected mounted barcode printer;
[0030] In S70, the template compression package is decompressed and parsed to obtain the label printing language, which specifically includes: decompressing and parsing the template compression package to obtain the label size, printing resolution and label printing language, and dynamically loading data to the label template according to the template data source definition file; if the data source is not defined on the label template, the template object definition file is read to obtain the static content.
[0031] Optionally, the label printing language is set by prompting the user to select a printer model, and automatically obtaining the printing language and parsing instruction set corresponding to the label according to the printer model selected by the user and a preset exhaustive table;
[0032] The exhaustive table stores the index relationship between printer models, printing language names, and label parsing instruction sets, and stores the printing languages of various barcode printer manufacturers in the key-value pair format of {"printing language name": "label parsing instruction set"}.
[0033] Optionally, S80 includes at least the following steps:
[0034] S81, searching for a corresponding label parsing instruction set in a preset exhaustive table according to the label printing language;
[0035] S82, traversing the label control objects contained in the label template one by one, and obtaining the type and attributes of each label control object;
[0036] S83, based on the type and property of each label control object, use the corresponding label parsing instruction set to parse and generate the instruction script corresponding to each label control object;
[0037] S84. After all label control objects are parsed, all instruction scripts are combined to generate a printing instruction set.
[0038] Optionally, the label control object includes at least one of single-line text, multi-line text, graphics, one-dimensional barcode, two-dimensional barcode, line, shape, and picture;
[0039] The properties of the label control object include at least one of the control size, position, color, font, alignment, and inversion.
[0040] Optionally, S90 includes at least the following steps:
[0041] S91, stacking and outputting the printing instruction set to the printing scheduling pool;
[0042] S92, detecting the status of the print scheduling pool, and returning an error prompt if the print scheduling pool is full or the network is disconnected; performing sub-packaging processing on the print instruction set successfully sent to the print scheduling pool to split the continuous print tasks into independent single label printing contents;
[0043] S93. Arrange all single label printing contents into a printing queue in the order of receiving, and take out the single label printing contents from the printing queue in sequence in the form of instructions based on a first-in-first-out mechanism, and send them to the printer.
[0044] Corresponding to the barcode label design and printing method based on the ARM architecture, the present invention provides a barcode label design and printing system based on the ARM architecture, which includes:
[0045] The label design module is used to receive a new label template instruction and prompt the user to set the basic attributes of the label template, which at least include the label printing language, printing resolution and label size;
[0046] The label storage component is used to store the basic attributes set by the user; receive the save instruction and prompt the user to confirm the saved information; receive the save confirmation instruction, parse the label template and convert it into a template definition file; compress the template definition file to generate a label template compression package;
[0047] The label design component is used to initialize the label design page, in which at least one label control object is preset; respond to the user's selection instruction for the label control object, and add the selected label control object to the label template; adjust the properties of the label control object according to the user's operation, and generate a preview of the label design effect;
[0048] A label printing module, used for receiving label printing instructions;
[0049] The printing parsing component is used to decompress and parse the template compression package to obtain the label printing language; according to the label printing language, the corresponding printing instruction set is generated;
[0050] The print scheduling component is used to perform print scheduling based on a preset scheduling method and output a print instruction set to the printer.
[0051] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which is stored a barcode label design and printing program based on the ARM architecture. When the barcode label design and printing program based on the ARM architecture is executed by a processor, the steps of the barcode label design and printing method based on the ARM architecture as described above are implemented.
[0052] The beneficial effects of the present invention are:
[0053] (1) Compared with the prior art, the present invention supports users to set label printing languages according to their needs when designing label templates, and is compatible with printing languages of different barcode printer manufacturers, thus solving the compatibility problem of barcode label software on ARM architecture devices; at the same time, it is able to parse barcode label languages and support barcode printers to print labels and design labels; the present invention is also able to convert printing languages into instruction sets, and directly send them to printers for response through wired or wireless transmission connections, thus achieving full compatibility between printing instructions and barcode printers, and also supporting various types of barcode printers such as desktop and mobile printers, and is particularly suitable for ARM architecture platforms, and can run independently on ARM architecture devices without relying on the device management API provided by cloud servers and Windows systems.
[0054] (2) Compared with the prior art, the present invention obtains the label control object, attributes, data source and basic attributes, parses the label control object attributes and data source information, and stores the data in JSON format as a template definition file, so that the template definition file has good flexibility and scalability.
[0055] (3) Compared with the prior art, the present invention achieves flexibility and scalability of the label template by storing the template data source definition file and the template object definition file in the label template compression package in JSON format.
[0056] (4) Compared with the prior art, the present invention achieves accurate printing of barcode labels by receiving printing instructions and decompressing and parsing template compression packages to obtain information such as label printing language, label size, printing resolution and data source. At the same time, it supports the printing of dynamic loading data and static content, improving the printing flexibility and efficiency of barcode labels.
[0057] (5) Compared with the prior art, the present invention simplifies user operations and improves setting efficiency by providing a preset exhaustive table for users to select label printing languages. At the same time, the exhaustive table stores the printing languages of various barcode printer manufacturers in a key-value pair format, ensuring the accuracy and compatibility of the printing languages.
[0058] (6) Compared with the prior art, the present invention generates a corresponding printing instruction set according to the label printing language, thereby ensuring that the type and attributes of the label control object can be accurately parsed and converted into printing instructions, thereby improving the accuracy of the printing instruction set and the printing quality.
[0059] (7) Compared with the prior art, the present invention achieves efficient barcode label printing scheduling by stacking the printing instruction set and outputting it to the printing scheduling pool, detecting the status of the printing scheduling pool, processing the printing instruction set in packages, and arranging it into the printing queue. At the same time, it supports error prompts and first-in-first-out mechanism printing queue management, further improving the printing efficiency and accuracy of barcode labels. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0061] Figure 1 A simplified flow chart of an embodiment of a barcode label design and printing method based on ARM architecture of the present invention;
[0062] Figure 2 It is a framework diagram of an embodiment of a barcode label design and printing system based on ARM architecture of the present invention. DETAILED DESCRIPTION
[0063] In order to make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0064] like Figure 1 As shown, a barcode label design and printing method based on ARM architecture of the present invention comprises the following steps:
[0065] S10, receiving a new label template instruction, and prompting the user to set basic attributes of the label template, the basic attributes at least including label printing language, printing resolution and label size;
[0066] S20, storing basic properties set by the user, and initializing a label design page, in which at least one label control object is preset;
[0067] S30, responding to the user's selection instruction for the label control object, adding the selected label control object to the label template, adjusting the properties of the label control object according to the user's operation, and generating a label design effect preview;
[0068] S40, receiving a save instruction, and prompting the user to confirm the saved information;
[0069] S50, receiving a save confirmation instruction, parsing the label template and converting it into a template definition file;
[0070] S60, compressing the template definition file to generate a label template compression package;
[0071] S70, receiving a label printing instruction, decompressing and parsing the template compression package, and obtaining the label printing language;
[0072] S80, generating a corresponding printing instruction set according to the label printing language;
[0073] S90, performing printing scheduling based on a preset scheduling method, and outputting a printing instruction set to a printer.
[0074] The present invention supports users to set label printing languages according to their needs when designing label templates, and is compatible with printing languages of different barcode printer manufacturers, thus solving the compatibility problem of barcode label software on ARM architecture devices; at the same time, it is able to parse barcode label languages, and support barcode printers to print labels and design labels; the present invention can also convert printing languages into instruction sets, and directly send them to printers for response through wired or wireless transmission connections, thus achieving full compatibility between printing instructions and barcode printers, and also supporting various types of barcode printers such as desktop and mobile ones, and is particularly suitable for ARM architecture platforms, and can run independently on ARM architecture devices, without relying on the device management API provided by cloud servers and Windows systems.
[0075] In this embodiment, S20 temporarily stores the basic attributes set by the user in the browser and initializes the label design page, which has at least one label control object preset in it, waiting for the user to design. In the label design page, the user can select the preset label control object to interactively design the label template.
[0076] For example: the user selects a preset barcode control and drags it to the open design area of the label design page (in a preferred embodiment of the present invention, the label design page can be divided into two areas, one is the label control object selection area, which is used to display the label control object for user selection, and the other is the label design area, which is used to design the label template and instantly generate a preview of the label design effect), and sets its properties. For example, if the content is: 123456 and the code system is: Code39, the label design area will instantly generate and present a preview of the barcode label design effect.
[0077] For example, when a user drags a label control object to a new location, the system will capture and feedback its coordinate points in real time, and then instantly generate and display the effect of the label control object after it is moved in the label design area.
[0078] In this embodiment, S40, receiving a save instruction, prompting the user to confirm the save information. Specifically, the system will pop up a prompt box, requiring the user to enter the name of the label template to be saved, and confirm the save.
[0079] In this embodiment, S50 at least includes the following steps:
[0080] S51, receiving a save confirmation instruction, obtaining a label control object, properties of the label control object, a specified data source, and basic properties of a label template;
[0081] S52, traversing the label control objects contained in the label template one by one, and obtaining the properties and data source information of each label control object;
[0082] S53, parsing the properties of each label control object according to the JSON format requirements, and converting the data source specified by the label control object into a variable or identifier that can be recognized in the template definition file;
[0083] S54. The parsed and converted data is stored in JSON format to obtain a template definition file.
[0084] The present invention obtains label control objects, properties, data sources and basic properties, parses label control object properties and data source information, and stores the data in JSON format as a template definition file, so that the template definition file has good flexibility and scalability.
[0085] In this embodiment, the label template compression package is saved in a zip file format, and the zip format is compatible with different devices (such as ARM architecture and x86 architecture) and different operating system platforms (such as Windows and Linux).
[0086] Preferably, the label template compression package includes a template data source definition file and a template object definition file;
[0087] The template data source definition file stores the data source definition of the label template in JSON (JavaScript Object Notation) format;
[0088] The template object definition file stores the label size, print resolution, types of all label control objects, properties of all label control objects, characteristics of all label control objects, and static content of the label template in JSON format.
[0089] The present invention achieves flexibility and extensibility of the label template by storing the template data source definition file and the template object definition file in the label template compression package in JSON format.
[0090] In this embodiment, the user selects a saved label template in the system and selects the printing operation (which can be achieved by clicking the print button, which is only an example and does not constitute an improper limitation on the present invention). After the selection, the system prompts the user to select the number of copies to be printed and the selected barcode printer, and then issues the printing instruction after the user completes the selection.
[0091] In this embodiment, in S70, the label printing instruction includes at least the number of copies to be printed and the selected barcode printer;
[0092] In S70, the template compression package is decompressed and parsed to obtain the label printing language, which specifically includes: decompressing and parsing the template compression package to obtain the label size, printing resolution and label printing language, and dynamically loading data to the label template according to the template data source definition file; if the data source is not defined on the label template, the template object definition file is read to obtain the static content.
[0093] The present invention realizes accurate printing of barcode labels by receiving printing instructions and decompressing and parsing template compression packages to obtain label printing language, label size, printing resolution, data source and other information. At the same time, it supports the printing of dynamic loading data and static content, improving the printing flexibility and efficiency of barcode labels.
[0094] In this embodiment, the setting of the label printing language is to prompt the user to select a printer brand, and automatically obtain the printing language and parsing instruction set corresponding to the label according to the printer brand selected by the user and the preset exhaustive table;
[0095] The exhaustive table stores the index relationship between printer models, printing language names, and label parsing instruction sets, and stores the printing languages of various barcode printer manufacturers in the key-value pair format of {"printing language name": "label parsing instruction set"}.
[0096] The present invention simplifies user operation and improves setting efficiency by providing a preset exhaustive table for users to select label printing languages. At the same time, the exhaustive table stores the printing languages of various barcode printer manufacturers in a key-value pair format, ensuring the accuracy and compatibility of the printing languages.
[0097] It is understandable that in specific application scenarios, the printing language names and corresponding label parsing instruction sets of newly launched barcode printer manufacturers can be continuously updated and added so that the system can be continuously compatible with more barcode printers. In fact, for compatibility reasons, barcode printer manufacturers usually directly adopt general instruction sets such as ZPLII, CPCL, TSPL, or only make detailed adjustments on this basis. Therefore, there are only dozens of mainstream printing languages popular in the market, and all of them can be collected and defined in an exhaustive table.
[0098] In this embodiment, S80 at least includes the following steps:
[0099] S81, searching for a corresponding label parsing instruction set in a preset exhaustive table according to the label printing language;
[0100] S82, traversing the label control objects contained in the label template one by one, and obtaining the type and attributes of each label control object;
[0101] S83, based on the type and property of each label control object, use the corresponding label parsing instruction set to parse and generate the instruction script corresponding to each label control object;
[0102] S84. After all label control objects are parsed, all instruction scripts are combined to generate a printing instruction set.
[0103] Preferably, if the corresponding label parsing instruction set is not retrieved in the preset exhaustive table, the default is to select the universal ZPLII (Zebra Programming Language II) printing language for conversion. If the printing instruction set generation fails, an error prompt is returned.
[0104] The present invention generates a corresponding printing instruction set according to the label printing language, thereby ensuring that the type and attributes of the label control object can be accurately parsed and converted into printing instructions, thereby improving the accuracy of the printing instruction set and the printing quality.
[0105] In this embodiment, the label control object includes at least one of single-line text, multi-line text, graphics, one-dimensional barcode, two-dimensional barcode, line, shape, and picture;
[0106] The properties of the label control object include at least one of the control size, position, color, font, alignment, and inversion.
[0107] In this embodiment, S90 at least includes the following steps:
[0108] S91, stacking and outputting the printing instruction set to the printing scheduling pool;
[0109] S92, detecting the status of the print scheduling pool, and returning an error prompt if the print scheduling pool is full or the network is disconnected; performing sub-packaging processing on the print instruction set successfully sent to the print scheduling pool to split the continuous print tasks into independent single label printing contents;
[0110] S93. Arrange all single label printing contents into a printing queue in the order of receiving, and take out the single label printing contents from the printing queue in sequence in the form of instructions based on a first-in-first-out mechanism, and send them to the printer.
[0111] It should be noted that in S93, if a single label print content is taken out of the print queue and successfully sent to the printer, the print queue where the single label print content is located will be cleared regardless of whether the printer is out of paper or has a malfunction until all queues have completed printing output. When all queues have completed printing output, the user will be notified of the printing completion in the form of a system message.
[0112] The present invention realizes efficient printing scheduling of barcode labels by stacking and outputting the printing instruction set to the printing scheduling pool, detecting the status of the printing scheduling pool, processing the printing instruction set in packages and arranging it into the printing queue. At the same time, it supports the printing queue management of error prompts and first-in-first-out mechanism, further improving the printing efficiency and accuracy of barcode labels.
[0113] like Figure 2 As shown, the present invention also provides a barcode label design and printing system 100 based on ARM architecture, which includes:
[0114] The label design module 110 is used to receive a new label template instruction and prompt the user to set basic attributes of the label template, where the basic attributes include at least label printing language, printing resolution and label size;
[0115] The label storage component 111 is used to store basic attributes set by the user; receive a save instruction, prompt the user to confirm the saved information; receive a save confirmation instruction, parse the label template and convert it into a template definition file; compress the template definition file to generate a label template compression package;
[0116] The label design component 112 is used to initialize the label design page, in which at least one label control object is preset; respond to the user's selection instruction of the label control object, add the selected label control object to the label template; adjust the properties of the label control object according to the user's operation, and generate a preview of the label design effect;
[0117] The label printing module 120 is used to receive a label printing instruction;
[0118] The printing parsing component 121 is used to decompress and parse the template compression package to obtain the label printing language; and generate a corresponding printing instruction set according to the label printing language;
[0119] The print scheduling component 122 is used to perform print scheduling based on a preset scheduling method and to output a print instruction set to a printer.
[0120] In the system embodiment of the present invention, in order to realize the cross-platform, low-coupling, layered design of the barcode label design and printing system based on the ARM architecture, the bottom layer includes the design engine and the printing engine (the engine is a set of fine-grained calling functions), as well as the OpenAPI (Open Application Programming Interface) interface layer, which is open to the upper-layer business or functional module calls. Specifically, the design engine and the printing engine are developed in the C++ language with cross-platform characteristics based on the RISC instruction set characteristics under the ARM architecture, so as to achieve consistent behavior on different devices (such as ARM architecture and x86 architecture) and different operating system platforms (such as Windows and Linux).
[0121] In this embodiment, the OpenAPI interface layer provides I / O access to the back-end supporting database and interface calls between third-party heterogeneous systems.
[0122] In this embodiment, the design engine is based on the RISC instruction set to implement the setting of barcode label control objects, the properties of barcode label control objects, the characteristics of barcode label control objects (including at least one of the barcode symbol system, check digit, and data source assignment), and basic operations (including at least one of dragging, scaling, format string definition, LUA script definition, and saving), and is defined in the form of a function set.
[0123] In this embodiment, the printing engine is based on the RISC instruction set and relies on the OpenAPI interface layer and the design engine to realize the printing parsing of label templates (such as identifying template size, printing resolution and label printing language), the generation of printing instruction sets and printing scheduling (including data source interface reading, package assembly and parameter transmission, printing instruction issuance, data segmentation and printing queue stacking management, etc.), and these functions are defined in the form of functions.
[0124] In this embodiment, the label design component 112 and the label storage component 111 are encapsulated based on the design engine and the OpenAPI interface layer. Among them, the label design component 112, for the ARM architecture, can be implemented using the WebAssembly (wasm for short, a new type of code running in modern web browsers) technology with cross-platform characteristics. The barcode label design and printing system 100 based on the ARM architecture is then encapsulated as a set of label design modules 110 with interface expression through all component sets of the label design component 112 and the label storage component 111. Through the browser, at least one label control object and the properties and operation actions of the label control object are preset and open to the user to realize interactive designs such as label control object selection, dragging, scaling, format string definition, LUA script definition, etc., and can also be open to other third-party system call integration based on the ARM architecture or x86 architecture.
[0125] In this embodiment, the barcode label design and printing system 100 based on the ARM architecture encapsulates the print parsing component 121 and the print scheduling component 122 to form a label printing module 120, and as a resident service program, it starts automatically at startup and runs in the background to monitor the user's printing operation. The print parsing component 121 and the print scheduling component 122 both implement the component set encapsulation of print parsing and scheduling by calling the print engine and the OpenAPI interface layer. Among them, the print parsing component 121 is the pre-operation of the print scheduling component 122, that is, the label template is first parsed by the print parsing component 121, and then the print output is completed by the print scheduling component 122.
[0126] It is understandable that the label printing module 120 can be used as a standard module, open to other third-party software printing calls based on ARM architecture or X86 architecture.
[0127] Preferably, the label design module 110 can also provide multi-user shared login operations and provide public label templates for users to copy and reference with one click; provide file physical storage resource configuration definition for the label storage component 111; provide printing language exhaustive table updates and upgrades for the printing engine; provide printing service configuration for the printing scheduling component 122, etc.
[0128] In this embodiment, the design engine and the print engine are implemented differently from the x86 architecture Windows operating system in terms of file storage, variable type and length, timestamp, etc.
[0129] In addition, since the print scheduling component 122 needs to run silently for a long time, the thread protection, power-on self-start, memory pool management and other mechanisms are all developed specifically for the RISC instruction characteristics of the ARM architecture using the cross-platform language C++.
[0130] The embodiment of the present invention further provides a computer-readable storage medium, which may be a computer-readable storage medium included in the memory in the above embodiment; or a computer-readable storage medium that exists independently and is not installed in a device. The computer-readable storage medium stores at least one instruction, which is loaded and executed by a processor to implement Figure 1 The barcode label design and printing method based on ARM architecture is shown. The computer readable storage medium can be a read-only memory, a disk or an optical disk, etc.
[0131] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the system embodiment and the storage medium embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0132] Furthermore, in this document, the terms "comprises," "comprising," or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device that includes the element.
[0133] The above description shows and describes the preferred embodiments of the present invention. It should be understood that the present invention is not limited to the form disclosed herein, and should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications and environments, and can be modified within the scope of the invention, through the above teachings or the technology or knowledge of the relevant field. The changes and modifications made by those skilled in the art shall not depart from the spirit and scope of the present invention, and shall be within the scope of protection of the claims attached to the present invention.
Claims
1. A barcode label design and printing method based on ARM architecture, characterized in that: The following steps are involved: S10, receiving a new label template instruction, and prompting the user to set basic attributes of the label template, the basic attributes at least including label printing language, printing resolution and label size; S20, storing basic properties set by the user, and initializing a label design page, in which at least one label control object is preset; S30, responding to the user's selection instruction for the label control object, adding the selected label control object to the label template, adjusting the properties of the label control object according to the user's operation, and generating a label design effect preview; S40, receiving a save instruction, and prompting the user to confirm the saved information; S50, receiving a save confirmation instruction, parsing the label template and converting it into a template definition file; S60, compressing the template definition file to generate a label template compression package; S70, receiving a label printing instruction, decompressing and parsing the template compression package, and obtaining the label printing language; S80, generating a corresponding printing instruction set according to the label printing language; S90, performing printing scheduling based on a preset scheduling method, and outputting a printing instruction set to a printer.
2. The barcode label design and printing method based on ARM architecture according to claim 1, characterized in that: S50 at least includes the following steps: S51, receiving a save confirmation instruction, obtaining a label control object, properties of the label control object, a specified data source, and basic properties of a label template; S52, traversing the label control objects contained in the label template one by one, and obtaining the properties and data source information of each label control object; S53, parsing the properties of each label control object according to the JSON format requirements, and converting the data source specified by the label control object into a variable or identifier that can be recognized in the template definition file; S54. The parsed and converted data is stored in JSON format to obtain a template definition file.
3. The barcode label design and printing method based on ARM architecture according to claim 2, characterized in that: The label template compression package includes a template data source definition file and a template object definition file; The template data source definition file stores the data source definition of the label template in JSON format; The template object definition file stores the label size, print resolution, types of all label control objects, properties of all label control objects, characteristics of all label control objects, and static content of the label template in JSON format.
4. The barcode label design and printing method based on ARM architecture according to claim 3, characterized in that: In S70, the label printing instruction includes at least the number of copies to be printed and the selected mounted barcode printer; In S70, the template compression package is decompressed and parsed to obtain the label printing language, specifically including: decompressing and parsing the template compression package to obtain the label size, printing resolution and label printing language, and dynamically loading data to the label template according to the template data source definition file; If no data source is defined on the label template, the template object definition file is read to obtain the static content.
5. The barcode label design and printing method based on ARM architecture according to claim 1, characterized in that: The label printing language is set by prompting the user to select the printer model, and automatically obtaining the printing language and parsing instruction set corresponding to the label according to the printer model selected by the user and the preset exhaustive table; The exhaustive table stores the index relationship between printer models, printing language names, and label parsing instruction sets, and stores the printing languages of various barcode printer manufacturers in the key-value pair format of {"printing language name":"label parsing instruction set"}.
6. The barcode label design and printing method based on ARM architecture according to claim 5, characterized in that: S80 includes at least the following steps: S81, searching for a corresponding label parsing instruction set in a preset exhaustive table according to the label printing language; S82, traversing the label control objects contained in the label template one by one, and obtaining the type and attributes of each label control object; S83, based on the type and property of each label control object, use the corresponding label parsing instruction set to parse and generate the instruction script corresponding to each label control object; S84. After all label control objects are parsed, all instruction scripts are combined to generate a printing instruction set.
7. The barcode label design and printing method based on ARM architecture according to claim 1, characterized in that: The label control object includes at least one of single-line text, multi-line text, graphics, one-dimensional barcode, two-dimensional barcode, line, shape, and picture; The properties of the label control object include at least one of the control size, position, color, font, alignment, and inversion.
8. The barcode label design and printing method based on ARM architecture according to claim 1, characterized in that: S90 includes at least the following steps: S91, stacking and outputting the printing instruction set to the printing scheduling pool; S92, detecting the status of the print scheduling pool, and returning an error prompt if the print scheduling pool is full or the network is disconnected; performing sub-packaging processing on the print instruction set successfully sent to the print scheduling pool to split the continuous print tasks into independent single label printing contents; S93. Arrange all single label printing contents into a printing queue in the order of receiving, and take out the single label printing contents from the printing queue in sequence in the form of instructions based on a first-in-first-out mechanism, and send them to the printer.
9. The barcode label design and printing system based on ARM architecture is characterized by: include: The label design module is used to receive a new label template instruction and prompt the user to set the basic attributes of the label template, which at least include the label printing language, printing resolution and label size; The label storage component is used to store the basic attributes set by the user; receive the save instruction and prompt the user to confirm the saved information; receive the save confirmation instruction, parse the label template and convert it into a template definition file; Compress the template definition file to generate a label template compression package; The label design component is used to initialize the label design page, in which at least one label control object is preset; in response to the user's selection instruction for the label control object, the selected label control object is added to the label template; Adjust the properties of the label control object according to user operations and generate a preview of the label design effect; A label printing module, used for receiving label printing instructions; The printing parsing component is used to decompress and parse the template compression package to obtain the label printing language; according to the label printing language, the corresponding printing instruction set is generated; The print scheduling component is used to perform print scheduling based on a preset scheduling method and output a print instruction set to the printer.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a barcode label design and printing program based on the ARM architecture, and when the barcode label design and printing program based on the ARM architecture is executed by the processor, the steps of the barcode label design and printing method based on the ARM architecture as described in any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Cloud printing method based on ARM architecture
CN117991999A
Universal bar code label design system
CN106355378A
Bar code label printing method and system
CN114193940A
Label generating and printing method and device and storage medium
CN115660012A
Express sheet label manufacturing method and device and electronic equipment
CN118276797A
Cited By
Heterogeneous instruction dynamic adaptation remote label printing method and system, terminal and medium
CN120215853A
Label printing method and device
CN120491913A