Label printing processing device, system and method
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a label printing processing apparatus, system, and method.
Background
With the development of electronic goods platforms, the logistics industry is also quietly rising. Wherein different logistics companies all have different versions of tags for identifying goods for shipment. Generally, each logistics company will have label templates of their own style, such as background color, background pattern, appearance style, information layout, etc. From these attributes, logistics companies can be distinguished.
When printing a label, the following scheme is generally adopted:
and installing client printing software on a computer with a Net frame work FrameWork, wherein a label template is integrated in a software package of the software. When printing a label, the printing software reads a local template folder, analyzes the local template file, then adds service data such as addressee address, name and the like, and finally prints the label.
From the above solution, it can be known that:
1. the client printing software needs the support of the NetFrameWork frame, and the client printing software cannot run on a computer without the NetFrameWork frame.
2. Because the program and the label template of the printing software are coupled in a software package, the decoupling of the program and the label template is not facilitated, and once the software package has a problem, the software program and the label template cannot be used together.
3. When the service changes and the label template needs to be changed, the printing software needs to be modified and upgraded together, and the user needs to reinstall the upgraded printing software.
Disclosure of Invention
The invention provides a label printing processing device, a label printing processing system and a label printing processing method aiming at the defects of the prior art, and aims to solve the problems that in the prior art, printing software is locally adopted, special hardware environment support is required, the coupling degree of a template and printing is high, the software needs to be reinstalled after the software is upgraded, and the like.
In order to solve the above-described technical problem, according to an aspect of the present invention, there is provided a label print processing apparatus comprising:
the interface is used for receiving a label printing request and sending a label in a picture format to a label printing requester;
the template reading module is used for acquiring corresponding template information from the cloud storage according to the printing request;
the assembly module is used for generating a template label according to corresponding template information and adding service data in the template label so as to generate a label; and
and the drawing module is used for making the label into a label in a picture format and providing the label for the interface.
Preferably, the assembly module comprises:
the template label assembling unit is used for generating a template label according to the corresponding template information; and
and the label assembling unit is used for adding service data in the template label so as to generate the label.
Preferably, the label printing processing apparatus further includes a compressing module, configured to compress the label in the picture format and provide the compressed label to the interface.
In order to solve the above technical problem, according to another aspect of the present invention, there is provided a label print processing system, comprising:
the cloud storage is used for storing the label template;
the label printing processing device as described above, configured to obtain a label in a picture format;
the browser is used for sending a label printing request, receiving the label in the picture format and sending the label to the printer; and
and the printer is used for printing the label sent by the browser.
In order to solve the above technical problem, according to an aspect of the present invention, there is provided a label printing processing method, including performing, at a server side, the following processing steps:
receiving a label printing request;
acquiring corresponding template information from a cloud storage according to the label printing request;
generating a label by using the template information and corresponding service data; and
and sending the label in the picture format to a label printing requester.
Preferably, the step of generating a label by using the template information and the corresponding service data specifically includes:
generating a template label according to the corresponding template information;
adding service data in the template label to generate a label;
and making the label into a label in a picture format.
Preferably, before sending the label in the picture format to the label printing requester, the server further includes:
outputting the label of the picture format to a corresponding canvas; and
compressing the picture type label and the canvas;
the tab sent to the requestor also includes a canvas therein.
In order to solve the above technical problem, according to one aspect of the present invention, there is provided a label printing processing apparatus comprising a memory for storing data, information and instructions, and a processor for executing the instructions to realize the steps of:
receiving a label printing request;
acquiring corresponding template information from a cloud storage according to the label printing request;
generating a label by using the template information and corresponding service data; and
and sending the label to a requester in a picture stream mode.
Preferably, when the processor executes the step of generating the tag by using the template information and the corresponding service data, the method specifically includes:
generating a template label according to the corresponding template information;
adding service data in the template label to generate a label;
and making the label into a label in a picture format.
Preferably, the processor further comprises, before performing the step of sending the picture-format label to a label printing requester:
outputting the label of the picture format to a corresponding canvas; and
compressing the picture type label and the canvas;
the tab sent to the requestor also includes a canvas therein.
The template in the invention is stored in the cloud, so that the template does not need to be issued to a user side and does not need to be updated at the user side. When the template is needed, the user side can actively acquire the template from the cloud storage, and the reliability is high. Moreover, when the template needs to be updated due to business change, the template at the cloud end only needs to be updated, and the user side is not involved. The label printing processing device is deployed at the server side, the user side does not need to install any program, a browser of the user side obtains the label in a picture flow mode, and the structure is easy to maintain and high in system stability.
Drawings
The above and other objects, features and advantages of the present invention will become more apparent by describing embodiments of the present invention with reference to the following drawings, in which:
FIG. 1 is a block diagram of a schematic structure of an embodiment of a label printing apparatus according to the present invention;
FIG. 2 is a block diagram of the assembly module according to an embodiment of the present invention;
FIG. 3 is a block diagram of a schematic structure of an embodiment of a label printing processing system according to the present invention;
FIG. 4 is a block diagram of a hardware schematic structure of an embodiment of the label printing apparatus according to the invention;
FIG. 5 is a schematic flow chart of a label printing processing method according to the invention; and
fig. 6 is a schematic flow chart of an embodiment of a label printing processing method according to the invention.
Detailed Description
The present invention will be described below based on examples, but the present invention is not limited to only these examples. In the following detailed description of the present invention, certain specific details are set forth. It will be apparent to one skilled in the art that the present invention may be practiced without these specific details. Well-known methods, procedures, and procedures have not been described in detail so as not to obscure the present invention. The figures are not necessarily drawn to scale.
Fig. 1 is a block diagram illustrating a schematic structure of an embodiment of a label printing apparatus according to the present invention. The label print processing apparatus 2 includes an interface 21, a template reading module 22, an assembling module 23, and a drawing module 24. The interface 21 is configured to receive a print request and send a label in a picture format to a requester. The template reading module 22 acquires corresponding template information from the cloud storage 1 according to the print request. The assembling module 23 generates a template tag according to the corresponding template information, and adds service data to the template tag, thereby generating a tag. The drawing module 24 makes the labels into labels in picture format and outputs the labels to corresponding canvas. Preferably, to reduce data transmission, the apparatus further comprises a compression module 25 for compressing the tags and canvas and providing it to the interface 21 for transmission to a requester. The cloud storage 1 is used for storing tag templates.
The template in the invention is stored in the cloud end, so that the template does not need to be issued to the user end, the user end does not need to update the template locally, and when the template is needed, the user end can actively acquire the template in the cloud storage, thus the reliability is high. Moreover, when the template needs to be updated due to business change, the template at the cloud end only needs to be updated, and the user side is not involved. The label printing processing device is deployed at the server side, the user side does not need to install any program, and a browser of the user side obtains the labels through the picture stream.
Specifically, the assembly module 23 includes a template label assembly unit 231 and a label assembly unit 232, as shown in fig. 2. The template tag assembling unit 231 generates a template tag according to corresponding template information. Specifically, the template tag assembling unit 231 reads corresponding tag attribute data B from the template information step by step according to the tag assembling rule a, thereby generating the template tag C1. Different tags require different attribute data. In order to assemble a tag, certain assembly rules are required, including assembly sequence and assembly elements, for example, in the first step, a tag background is output to a canvas, and a required element is a background picture; then, an appearance style needs to be configured, and needed elements are coordinate, height, width and shape data of all graphs; and finally, the content attribute, and the required elements such as bar code type, bar code sample, font and the like. The template tag assembly unit 231 assembles all the elements in steps according to the assembly rule, and finally forms a complete template tag C1.
After the complete template tag C1 is formed, the tag assembling unit 232 adds the service data D to the template tag, thereby generating a tag C2. The service data D may be obtained from another system, or may be sent to the print processing apparatus together with the service data D when the user sends a print request, and at this time, the interface 21 stores the service data D after receiving the service data D, so as to provide the service data D when needed by the label assembling unit 232.
Fig. 3 is a block diagram illustrating a schematic structure of an embodiment of a label printing system according to the present invention. The label printing processing system comprises a cloud storage 100, a label printing processing device 200, a browser and a printer on a user computer, wherein the browser and the printer can be multiple, as shown in the figure, the browser 301, 302, 303 and 304 and the printer 401, 402, 403 and 404 are respectively. The cloud storage 100 is located at the cloud end and used for storing the tag templates. The label printing processing device 200 is located at the server side, and is configured to process and generate a corresponding label according to the label printing request, and send the corresponding label back to the requester. The browsers 301, 302, 303, and 304 are located on a computer at a user end, and are configured to send a label printing request, receive a label sent by the label printing processing apparatus 200, send the label to printers 401, 402, 403, and 404 connected to the corresponding browser, and print the label.
The net frame work and the printing software are not needed to be installed by a user, a printing request can be sent only by using a browser, label data which is processed and can be directly printed is received, and the label is printed by controlling a printer. Because the data stream and the template stream are not local, when the service changes and the template needs to be changed, the template is irrelevant to the client, the client does not use the bloated client codes any more, and the trouble of updating the client is avoided.
Fig. 4 is a block diagram of a hardware schematic structure of an embodiment of the label printing apparatus according to the invention. The label printing processing device comprises an interface, a memory and a processor, wherein the interface, the memory and the processor are used for transmitting data and instructions through a bus. Wherein the memory is used for storing data and instructions, and the processor executes the instructions to implement the label printing processing method of the present invention, for example, receiving a label printing request; acquiring corresponding template information from cloud storage according to the label printing request; generating a label by using the template information and corresponding service data; and sending the tag to the requestor.
Fig. 5 is a flow chart of a label printing processing method according to the present invention. The method comprises the following steps executed at a server side:
step S1, receiving a label printing request; in particular implementation, the label printing request may be received via an interface 21 as shown in FIG. 1.
And step S2, acquiring corresponding template information from the cloud storage according to the label printing request. The print request includes related identifiers, such as a company identifier, an order identifier, and the like. A large amount of template information is stored in the cloud storage 1, and for convenience of searching, classification storage is usually performed, and corresponding query items are set, as if templates of a company are of a large class, a company identifier is set as a query identifier. In some more detailed modes, different businesses of the same company are provided with different subclasses, and the business identifier is used as the query identifier. When the template information is read into the cloud storage 1, the corresponding template information can be obtained by inquiring the company identifier in the print request. Business data such as addressee name, address, telephone and the like can be obtained from other systems through the order identification.
And step S3, generating a label by using the template information and the corresponding service data.
Step S4, sending the label to the requester.
Fig. 6 is a flowchart of a label printing processing method according to an embodiment of the present invention. The label printing processing method will be described in detail with reference to the configurations of fig. 1 and 2 as follows:
in step S10, a label printing request is received through the interface 21, from which a company identification, an order identification, or business data can be obtained. The order identification is used for acquiring business data from the business system, such as information of addressee names, addresses and the like, and when the business data is needed, the business data can be inquired and obtained from the business system through the order identification. However, the business data may be directly transmitted by the user together with the print request.
In step S11, the template reading module 22 accesses the cloud storage according to the company identifier in the request, queries the cloud storage to obtain the template information of the corresponding company, and reads the template information and the template information into the memory for use in the following steps.
In step S12, the template tag assembly unit 231 acquires an assembly rule. According to the assembly rule, the following steps are executed:
step S13, determine whether the background needs to be printed, if so, step S14 read the background picture from the memory and output it to the label canvas, and then step S15 is executed. If the background is not printed, step S15 is performed.
Step S15, obtaining appearance style template configuration data, for example: x, y coordinates, height, width, shape, etc. of all figures.
Step S16, acquiring specific content template configuration data, for example: the type, style, font, etc. of the bar code are read.
When the specific content is assembled, template label C1 has been formed at this point.
In step S17, the tag assembling unit 232 adds the service data D to the template tag, thereby generating a tag C2.
In step S18, the charting module 24 processes the tab C2 into a picture and outputs it to the tab canvas.
In step S19, the compression module 25 compresses and encrypts the tag C2 in the picture format and the canvas thereof, and then sends the result to the user through the interface 21.
And the user receives the sent back picture data through the browser and directly sends the picture data to the printer to print out the label. For users, the hardware requirement is low, any software does not need to be installed, and the trouble and inconvenience of software upgrading are eliminated.
The above description is only a preferred embodiment and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.