CN110245341B - Identification code batch generation method and device - Google Patents
Identification code batch generation method and device Download PDFInfo
- Publication number
- CN110245341B CN110245341B CN201910541723.5A CN201910541723A CN110245341B CN 110245341 B CN110245341 B CN 110245341B CN 201910541723 A CN201910541723 A CN 201910541723A CN 110245341 B CN110245341 B CN 110245341B
- Authority
- CN
- China
- Prior art keywords
- identification code
- identification
- information
- generation information
- text
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 52
- 238000007639 printing Methods 0.000 claims abstract description 18
- 238000006243 chemical reaction Methods 0.000 claims description 9
- 230000006870 function Effects 0.000 claims description 9
- 238000004519 manufacturing process Methods 0.000 claims description 8
- 238000004590 computer program Methods 0.000 claims description 6
- 230000008569 process Effects 0.000 description 19
- 238000010586 diagram Methods 0.000 description 8
- 230000009471 action Effects 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 3
- 238000011161 development Methods 0.000 description 3
- 241000209094 Oryza Species 0.000 description 2
- 235000007164 Oryza sativa Nutrition 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 235000009566 rice Nutrition 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/12—Use of codes for handling textual entities
- G06F40/151—Transformation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
- G06F40/186—Templates
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Document Processing Apparatus (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The application provides an identification code batch generation method and device, and relates to the technical field of digital image generation and printing. The method comprises the following steps: acquiring a form file, wherein the form file comprises at least two identification code information; generating at least two corresponding identification code generation information according to the at least two identification code information in the form file; and calling a text control, and generating at least two corresponding identification codes based on the at least two identification code generation information. By splitting and reading the identification code information in the form file, the identification code batch generation based on the form is realized, and the identification code generation efficiency is improved.
Description
Technical Field
The application relates to the technical field of digital image generation and printing, in particular to an identification code batch generation method and device.
Background
With the rapid development of domestic economy and the acceleration of electronic informatization, the demand of the barcode printer in the fields of commerce/wholesale, industry/manufacturing industry, transportation/transportation, modern logistics, finance, catering, medical care and the like is rapidly increased, related products and technologies emerge from time to time, the barcode printer market is in a vigorous development period, and the market range is rapidly increased. Barcode printers in our country have rapidly expanded from initial commercial/wholesale applications to a number of categories of industrial/manufacturing, transportation/transportation, communications, finance, catering, lottery, healthcare, government agencies, etc. The improvement of the demand of the bar code printer leads the demand of the bar code printer in China to enter a continuous high-speed growth period.
The traditional printer or printing factory needs to generate the bar code before printing the bar code, and the bar code generation in the traditional mode needs to edit each bar code one by one, so that the efficiency is low.
Disclosure of Invention
In view of this, an object of the embodiments of the present application is to provide a method and an apparatus for generating identification codes in batch, so as to solve the problem of low generation efficiency of identification codes such as barcodes in the prior art.
The embodiment of the application provides an identification code generation method, which comprises the following steps: acquiring a form file, wherein the form file comprises at least two identification code information; generating at least two corresponding identification code generation information according to the at least two identification code information in the form file; and calling a text control, and generating at least two corresponding identification codes based on the at least two identification code generation information.
In the implementation process, the identification code generation information is generated based on the identification code information in the form file, and then the identification codes are generated in batch according to the identification code generation information, manual input and generation of the identification codes are not needed, the identification code generation efficiency is improved, and the error probability of the identification codes during one-by-one editing is reduced.
Optionally, the generating at least two corresponding identification code generation information according to the at least two identification code information in the form file includes: and converting the at least two identification code information in the table file into the at least two identification code generation information based on a JSON data format.
In the implementation process, the JSON data format which is high in reading and writing speed and convenient to generate and analyze is adopted to obtain the identification code generation information, the generation efficiency of the identification code generation information is improved, and the identification code generation information is more beneficial to batch generation of the identification codes.
Optionally, the table file includes a header and a table content, the table content includes at least two rows/columns, each row/column is identification code information, and the converting the at least two identification code information in the table file into the at least two identification code generation information based on the JSON data format includes: based on a Key-Value model in the JSON data format, taking the data of the header as a Key Value, and taking the content in each row/column in the table content as a Value corresponding to identification code information, so as to obtain at least two Value values corresponding to at least two rows in the table content; and converting the at least two value values into identification code generation information.
In the implementation process, the Key-Value storage can be rapidly stored and read, the table is split based on the Key-Value model to obtain the identification code generation information, and the acquisition and transmission efficiency of the identification code generation information is improved.
Optionally, each piece of identification code generation information includes a text parameter of an identification code and an identification code parameter, the invoking a text control generates a plurality of identification codes based on the identification code generation information, and the method includes: loading an identification code template; calling a text control, and generating at least two groups of corresponding texts and identification codes based on text parameters and identification code parameters in the at least two identification code generation information; and filling each group of texts and identification codes into corresponding positions of the identification code template respectively.
In the implementation process, the text and the identification code contained in the identification code generation information are respectively filled into the corresponding identification code template through the text control, so that the corresponding text and the identification code generate a complete identification code with text data, and the accuracy of the identification code is improved.
Optionally, the text control is zxing, the invoking the text control generates at least two corresponding sets of texts and identification codes based on the text parameters and the identification code parameters in the at least two identification code generation information, including: and calling a zxing control for the text parameter and the identification code parameter in each identification code generation information, generating a text based on the text parameter, and generating an identification code based on the identification code parameter.
In the implementation process, zxing can generate various types of identification codes, the flexibility of the generation types of the identification codes is improved, and zxing is independent of a third-party library, is simple to use and high in identification and generation efficiency, so that the operation steps are simplified, and the identification code generation efficiency is improved.
Optionally, the filling each group of texts and identification codes into corresponding positions of the identification code template respectively includes: adjusting at least one of the coordinates, the width, the height, the font and the font size of each group of texts and identification codes; and filling each group of adjusted texts and identification codes into the positions represented by the coordinates of the identification code template respectively.
In the implementation process, the text and the identification code are edited and then the identification code template is filled, so that the readability of the complete identification code is improved.
Optionally, after the invoking the text control and generating the corresponding at least two identification codes based on the at least two identification code generation information, the method further includes: obtaining a screenshot of each identification code; and calling a printer to print the screenshot.
In the process, the user can call the printer to print the identification code screenshot through the mobile phone and other electronic equipment, and the identification code paper label can be efficiently and conveniently acquired.
The embodiment of the application also provides an identification code batch generation device, the device includes: the table acquisition module is used for acquiring a table file, and the table file comprises at least two identification code information; the conversion module is used for generating at least two corresponding identification code generation information according to the at least two identification code information in the form file; and the identification code generation module is used for calling the text control and generating at least two corresponding identification codes based on the at least two identification code generation information.
In the implementation process, the identification code generation information is generated based on the identification code information in the form file, and then the identification codes are generated in batch according to the identification code generation information, manual input and generation of the identification codes are not needed, the identification code generation efficiency is improved, and the error probability of the identification codes during one-by-one editing is reduced.
Optionally, the conversion module is specifically configured to: and converting the at least two identification code information in the table file into the at least two identification code generation information based on a JSON data format.
In the implementation process, the identification code generation information is obtained by adopting the JSON data format which is high in reading and writing speed and more convenient to generate and analyze, the generation efficiency of the identification code generation information is improved, and the identification code generation information is more beneficial to batch generation of the identification codes.
Optionally, the conversion module comprises: a Key Value unit, configured to use the data of the header as a Key Value and use the content in each row/column in the table content as a Value corresponding to one piece of identification code information based on a Key-Value model in the JSON data format, so as to obtain at least two Value values corresponding to at least two rows in the table content; an identification code generation information acquisition unit for converting the at least two value values into identification code generation information.
In the implementation process, the Key-Value storage can be rapidly stored and read, the table is split based on the Key-Value model to obtain the identification code generation information, and the acquisition and transmission efficiency of the identification code generation information is improved.
Optionally, the identification code generation module includes: the template loading unit is used for loading the identification code template; the control calling unit is used for calling the text control and generating at least two groups of corresponding texts and identification codes based on the text parameters and the identification code parameters in the at least two identification code generation information; and the filling unit is used for filling each group of texts and identification codes into corresponding positions of the identification code template respectively.
In the implementation process, the text and the identification code contained in the identification code generation information are respectively filled into the corresponding identification code template through the text control, so that the corresponding text and the identification code generate a complete identification code with text data, and the accuracy of the identification code is improved.
Optionally, the control calling unit is specifically configured to: and calling a zxing control for the text parameter and the identification code parameter in each identification code generation information, generating a text based on the text parameter, and generating an identification code based on the identification code parameter.
In the implementation process, zxing can generate various types of identification codes, the flexibility of the generation types of the identification codes is improved, and zxing is independent of a third-party library, is simple to use and high in identification and generation efficiency, so that the operation steps are simplified, and the identification code generation efficiency is improved.
Optionally, the filling unit is specifically configured to: adjusting at least one of the coordinates, the width, the height, the font and the font size of each group of texts and identification codes; and filling each group of adjusted texts and identification codes into the positions represented by the coordinates of the identification code template respectively.
In the implementation process, the text and the identification code are edited and then filled into the identification code template, so that the readability of the complete identification code is improved.
Optionally, the identification code batch generation apparatus further includes a printing module, and the printing module is configured to: obtaining a screenshot of each identification code; and calling a printer to print the screenshot.
In the process, the user can call the printer to print the identification code screenshot through the mobile phone and other electronic equipment, and the identification code paper label can be efficiently and conveniently obtained.
An embodiment of the present application further provides an electronic device, where the electronic device includes a memory and a processor, where the memory stores program instructions, and the processor executes the steps in any one of the above methods when reading and executing the program instructions.
An embodiment of the present application further provides a readable storage medium, where computer program instructions are stored, and when the computer program instructions are read and executed by a processor, the steps in any of the methods described above are executed.
Drawings
To more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic flow chart of an identification code batch generation method according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a step of generating identification code generation information according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of an identification code generation step according to an embodiment of the present disclosure;
fig. 4 is a schematic diagram of an identification code template filled with text and an identification code according to an embodiment of the present application;
fig. 5 is a block diagram of a structure of an identification code batch generation apparatus according to an embodiment of the present disclosure.
Icon: 20-identification code batch generation means; 21-a table acquisition module; 22-a conversion module; 23-identification code generation module.
Detailed Description
The technical solution in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
The applicant researches and discovers that the traditional printer or printing factory has low printing efficiency and low printing speed, and cannot meet the requirements of users, and particularly in the mass retail industry, merchants need to conveniently carry and quickly print labels. At present, the rapid development of internet, mobile devices such as cell-phone have produced huge influence to people's life, and many label printing trades all make APP to the printing function of oneself, operate on mobile device and just can print out the label, and is high-efficient convenient, more accords with the market demand, and the identification code generating mode that nevertheless has now needs to input relevant content one by one and prints, has the problem that inefficiency, rate of accuracy are low.
In order to solve the above problem, an embodiment of the present application provides an identification code batch generation method. Referring to fig. 1, fig. 1 is a schematic flow chart of an identification code batch generation method according to an embodiment of the present application, where the identification code batch generation method includes the following specific steps:
step S12: and acquiring a form file, wherein the form file comprises at least two pieces of identification code information.
The form file can be obtained by filling and editing on a local electronic device which is held by a user, or can be a filled-in form file transmitted by other electronic devices.
The table file in this embodiment may be an Excel table, a table generated by HTML (english full name: hypertext markup language, chinese full name: hypertext markup language) simulation, or other types of tables.
The corresponding identification code in the identification code information may be a bar code, a two-dimensional code or other common identification codes. Meanwhile, each identification code information generally comprises at least one of data such as product name, production place, unit, specification, grade, retail price, identification code parameters and the like corresponding to the identification code.
Step S14: and generating at least two corresponding identification code generation information according to the at least two identification code information in the form file.
The data of product name, producing area, unit, specification, grade, retail price, identification code parameter and the like contained in each identification code information is converted into identification code generation information containing the data, so that the subsequent text control can conveniently and quickly call the identification code generation information to generate the identification code. Alternatively, the identification code generation information may be a commonly used XML (Extensible Markup Language) data format, JSON (JSON Object Notation) data format, YAML (YAML Ain't Markup Language) data format, or the like.
Step S16: and calling a text control, and generating at least two corresponding identification codes based on the at least two identification code generation information.
The text control can input and display text or labels according to specific parameter settings.
Optionally, the text control in this embodiment may be one or a combination of a Label control, a TextBox control, and a zxing control.
In the embodiment, the identification code generation information is generated in batch based on the identification code information in the form file, and then the identification codes are generated in batch according to the identification code generation information, manual input and generation of the identification codes are not needed, the identification code generation efficiency is improved, and the error probability of the identification codes during one-by-one editing is reduced.
For step S12, the table file may include a header and table contents, where the table contents include at least two rows/columns, each row/column corresponds to one identification code information, each row/column includes a plurality of cells, and each cell corresponds to one of product name, place of production, unit, specification, grade, retail price, identification code parameter, and the like.
For step S14, "generating at least two corresponding identification code generation information according to the at least two identification code information in the form file" may specifically include: and converting the at least two identification code information in the table file into the at least two identification code generation information based on a JSON data format.
Specifically, referring to fig. 2, fig. 2 is a schematic flow chart illustrating a generating step of identification code generating information according to an embodiment of the present application, where the generating step of the identification code generating information may specifically include:
and S142, based on a Key-Value model in the JSON data format, taking the data of the table header as a Key Value, and taking the content in each row/column in the table content as a Value corresponding to one piece of identification code information to obtain at least two Value values corresponding to at least two rows in the table content.
Wherein, the Key-Value model is a Key Value model.
Step S144: and converting the at least two value values into identification code generation information.
For example, the above steps are illustrated, the table header of the product includes product name, place of production, unit, specification, grade, retail price, and identification code parameters, and the table contents corresponding to the product named "one-product twist" are sequentially: the table contents corresponding to the products named as 'first-grade fried dough twist', 'A land', 'bag', '160 g', 'qualified product', '12 yuan', '690102818063' are as follows: "second grade rice", "B field", "bag", "12kg", "qualified product", "62 yuan", "690102818064". After converting the value into identification code generation information in a JSON data format, the identification code generation information may be:
{
the 'product': [
{
"product name": "Yipinhua",
the 'producing area': "at the ground of A",
"unit": a "bag",
the specification is as follows: "160g",
"qualified certification": the "qualified product",
"retail price": a "12-membered",
"identification code parameters": "690102818063",
},
{
the "product name": "second-grade rice",
"producing area": "to the ground of B",
"unit": a "bag",
the specification is as follows: "12kg",
"qualified certification": the "qualified product",
"retail price": "62 yuan",
"identification code parameter": "690102818064",
}
]
}
in the above embodiment, the Key-Value storage can perform fast storage and reading processing, the table is split based on the Key-Value model to obtain the identification code generation information, the identification code generation information can be converted in batches according to the arrays for the identification code generation information, the identification code generation information is converted into the identification code generation information represented by the whole character array, the acquisition and transmission efficiency of the identification code generation information is improved, and the identification code generation information can be fast read and written.
It should be understood that, when forming a complete label, it is usually necessary to display the identification code and the necessary information such as the corresponding trade name, so as to refer to fig. 3 for step S16, fig. 3 is a schematic flow chart of an identification code generating step provided in the embodiment of the present application, and the identification code generating step may include the following steps:
step S162: and loading an identification code template.
The identification code template in this embodiment may be provided with corresponding filling areas for product name, place of production, unit, specification, grade, retail price, and identification code, respectively.
Step S164: and calling a text control, and generating at least two groups of corresponding texts and identification codes based on text parameters and identification code parameters in the at least two identification code generation information.
Each identification code generation information contains an identification code text parameter and an identification code parameter, in the example of the embodiment, "one-product twist", "a ground", "bag", "160g", "qualified product", "12 yuan" are text parameters, a text control needs to display the text parameters as texts on a label, and "690102818063" is an identification code parameter, and the text control needs to convert the identification code parameters into an identification code and display the identification code on the label.
Optionally, the text control in this embodiment may be a zxing control, which is an open source Java class library and is used for parsing 1D/2D barcodes of multiple formats. The zxing control aims to decode QR (Quick Response) codes, data Matrix and UPC (Universal Product Code) 1D bar codes, and provides clients under various platforms, including Android and the like. Generally, the zxing control can scan and generate identification codes such as two-dimensional codes, has the advantages of open source property, high customizability, capability of identifying various types of identification codes, no dependence on a third-party library, simplicity in use and the like.
Step S166: and respectively filling each group of texts and identification codes into corresponding positions of the identification code template.
As an optional implementation manner, step S166 may specifically include: adjusting at least one of the coordinates, the width, the height, the font and the font size of each group of texts and identification codes; and filling each group of adjusted texts and identification codes into the positions represented by the coordinates of the identification code template respectively.
Specifically, please refer to fig. 4, where fig. 4 is a schematic diagram of an identification code template filled with text and an identification code according to an embodiment of the present application.
In the implementation process, the text and the identification code contained in the identification code generation information are respectively filled into the corresponding identification code template through the text control, so that the corresponding text and the identification code generate a complete identification code with text data, and the accuracy and readability of the identification code are improved. Meanwhile, various types of identification codes can be generated by adopting zxing, the flexibility of the generation type of the identification codes is improved, and zxing is independent of a third-party library, is simple to use and high in identification and generation efficiency, so that the operation steps are simplified, and the identification code generation efficiency is improved.
After the generation of the identification code is completed, the user usually has a printing requirement for the identification code, so after step S16, the embodiment of the present application may further include a printing step:
step S182: a screenshot of each identification code is obtained.
The step can be that the user calls a relevant function carried by the system to capture the identification code through the mobile device, and the capture can be a black-and-white picture.
Step S184: and calling a printer to print the screenshot.
Optionally, the printer in this embodiment may be connected to the mobile device of the user through a wireless connection manner such as bluetooth or WiFi.
In the steps, the user can call the printer to print the identification code screenshot through the mobile phone and other electronic equipment, and the identification code paper label can be efficiently and conveniently acquired.
In order to better implement the identification code batch generation method, the embodiment of the application further provides an identification code batch generation device 20, and the identification code batch generation device 20 is configured to execute the identification code batch generation method. Referring to fig. 5, fig. 5 is a block diagram illustrating a structure of an apparatus for batch generation of identification codes according to an embodiment of the present disclosure.
The identification code batch generation device 20 includes a table acquisition module 21, a conversion module 22, and an identification code generation module 23.
The table acquiring module 21 is configured to acquire a table file, where the table file includes at least two identification code information.
A conversion module 22, configured to generate at least two pieces of corresponding identification code generation information according to the at least two pieces of identification code information in the form file.
And the identification code generating module 23 is configured to invoke the text control, and generate at least two corresponding identification codes based on the at least two identification code generating information.
The conversion module 22 is specifically configured to: and converting the at least two identification code information in the table file into the at least two identification code generation information based on a JSON data format.
Alternatively, the conversion module 22 may include a key value unit and an identification code generation information acquisition unit.
And the Key Value unit is used for taking the data of the header of the table as a Key Value and taking the content in each row/column in the table content as a Value corresponding to one piece of identification code information based on a Key-Value model in the JSON data format so as to obtain at least two Value values corresponding to at least two rows in the table content.
An identification code generation information acquisition unit for converting the at least two value values into identification code generation information.
Optionally, the identification code generating module 23 includes a template loading unit, a control calling unit and a filling unit.
And the template loading unit is used for loading the identification code template.
And the control calling unit is used for calling the text control and generating at least two groups of corresponding texts and identification codes based on the text parameters and the identification code parameters in the at least two identification code generation information.
And the filling unit is used for respectively filling each group of texts and identification codes into corresponding positions of the identification code template.
The control calling unit is specifically configured to: and calling a zxing control for the text parameter and the identification code parameter in each identification code generation information, generating a text based on the text parameter, and generating an identification code based on the identification code parameter.
The filling unit is specifically configured to: adjusting at least one of the coordinates, the width, the height, the font and the font size of each group of texts and identification codes; and filling each group of adjusted texts and identification codes into the positions represented by the coordinates of the identification code template respectively.
As an optional implementation manner, the identification code batch generation apparatus 20 in this embodiment may further include a printing module, where the printing module is configured to: obtaining a screenshot of each identification code; and calling a printer to print the screenshot.
Further, this embodiment also provides an electronic device, which includes a memory and a processor, where the memory stores program instructions, and when the processor reads and executes the program instructions, the processor executes the steps in any one of the methods for batch generation of identification codes.
It should be understood that, in the embodiment of the present application, the generation and printing of the identification code may also be accomplished through interaction between the mobile device and the server which are connected through communication. The method comprises the steps that a user obtains a form file through a mobile device, the form file is uploaded to a server, the server generates at least two corresponding identification code generation information according to the at least two identification code information in the form file, the server transmits the at least two identification code generation information to the mobile device, then the mobile device calls a text control, and the at least two corresponding identification codes are generated based on the at least two identification code generation information.
Optionally, when printing is required, the mobile device may further obtain a screenshot of each identification code, and call the printer to print the screenshot.
It should be understood that the electronic device may be a Personal Computer (PC), a tablet PC, a smart phone, a Personal Digital Assistant (PDA), or other electronic device having a logical computing function.
To sum up, the embodiment of the present application provides an identification code generation method and apparatus, and the method includes: acquiring a form file, wherein the form file comprises at least two identification code information; generating at least two corresponding identification code generation information according to the at least two identification code information in the form file; and calling a text control, and generating at least two corresponding identification codes based on the at least two identification code generation information.
In the implementation process, the identification code generation information is generated based on the identification code information in the form file, and then the identification codes are generated in batch according to the identification code generation information, manual input and generation of the identification codes are not needed, the identification code generation efficiency is improved, and the error probability of the identification codes during one-by-one editing is reduced.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. The apparatus embodiments described above are merely illustrative, and for example, the block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of devices according to various embodiments of the present application. In this regard, each block in the block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams, and combinations of blocks in the block diagrams, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions may be stored in a computer-readable storage medium if they are implemented in the form of software functional modules and sold or used as separate products. Therefore, the present embodiment further provides a readable storage medium, in which computer program instructions are stored, and when the computer program instructions are read and executed by a processor, the computer program instructions perform the steps of any of the block data storage methods. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a RanDOm Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
Claims (7)
1. The identification code batch generation method is characterized by comprising the following steps:
acquiring a form file through mobile equipment, wherein the form file comprises at least two identification code information;
uploading the form file to a server, generating at least two corresponding identification code generation information by the server according to the at least two identification code information in the form file, and acquiring the at least two identification code generation information from the server;
invoking a text control on the mobile device, and generating at least two corresponding identification codes based on the at least two identification code generation information, including: loading an identification code template, wherein the identification code template comprises a corresponding filling area which is set according to at least one of a product name, a production place, a unit, a specification, a grade, a retail price and an identification code; calling a text control, and generating at least two groups of corresponding texts and identification codes based on text parameters and identification code parameters in the at least two identification code generation information; filling each group of texts and identification codes into corresponding positions of the identification code template respectively, wherein the steps comprise: a filling unit in the mobile equipment is called to adjust at least one of the coordinates, the width, the height, the font and the font size of each group of texts and identification codes, and each group of adjusted texts and identification codes are respectively filled into the positions represented by the coordinates of the identification code template;
calling a function carried by the mobile equipment on the mobile equipment to obtain a screenshot of each identification code;
and calling a printer on the mobile equipment to print the screenshot.
2. The identification code batch generation method according to claim 1, wherein the generating at least two corresponding identification code generation information according to the at least two identification code information in the form file comprises:
and converting the at least two identification code information in the table file into the at least two identification code generation information based on a JSON data format.
3. The identification code batch generation method according to claim 2, wherein the table file comprises a header and table contents, the table contents comprise at least two rows/columns, each row/column is identification code information, and the converting of the at least two identification code information in the table file into the at least two identification code generation information based on the JSON data format comprises:
based on a Key-Value model in the JSON data format, taking the data of the header as a Key Value, and taking the content in each row/column in the table content as a Value corresponding to identification code information, so as to obtain at least two Value values corresponding to at least two rows in the table content;
and converting the at least two value values into identification code generation information.
4. The identification code batch generation method according to claim 1, wherein the text control is zxing, the calling of the text control generates at least two corresponding sets of texts and identification codes based on the text parameters and the identification code parameters in the at least two identification code generation information, and the method comprises:
and calling a zxing control for the text parameter and the identification code parameter in each identification code generation information, generating a text based on the text parameter, and generating an identification code based on the identification code parameter.
5. An apparatus for generating identification codes in batch applied to mobile devices, the apparatus comprising:
the table acquisition module is used for acquiring a table file through the mobile equipment, and the table file comprises at least two identification code information;
the conversion module is used for uploading the form file to a server, the server generates at least two corresponding identification code generation information according to the at least two identification code information in the form file, and the at least two identification code generation information is acquired from the server;
the identification code generation module is used for calling a text control on the mobile equipment and generating at least two corresponding identification codes based on the at least two identification code generation information;
the identification code generation module comprises a template loading unit, a control calling unit and a filling unit; the template loading unit is used for loading an identification code template, wherein the identification code template comprises a corresponding filling area which is set according to at least one of product name, production place, unit, specification, grade, retail price and identification code; the control calling unit is used for calling a text control and generating at least two groups of corresponding texts and identification codes based on text parameters and identification code parameters in the at least two identification code generation information; the filling unit is used for filling each group of texts and identification codes into corresponding positions of the identification code template respectively; the filling unit is specifically configured to: adjusting at least one of the coordinates, the width, the height, the font and the font size of each group of texts and identification codes, and respectively filling the adjusted texts and identification codes of each group into the positions represented by the coordinates of the identification code template;
the screenshot obtaining module is used for calling a function carried by the mobile equipment on the mobile equipment to obtain a screenshot of each identification code;
and the printing calling module is used for calling a printer on the mobile equipment to print the screenshot.
6. An electronic device comprising a memory and a processor, wherein the memory has stored therein program instructions, and wherein the processor, when reading and executing the program instructions, performs the steps of the method of any of claims 1-4.
7. A readable storage medium having stored thereon computer program instructions which, when read and executed by a processor, perform the steps of the method of any of claims 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910541723.5A CN110245341B (en) | 2019-06-21 | 2019-06-21 | Identification code batch generation method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910541723.5A CN110245341B (en) | 2019-06-21 | 2019-06-21 | Identification code batch generation method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110245341A CN110245341A (en) | 2019-09-17 |
CN110245341B true CN110245341B (en) | 2023-03-10 |
Family
ID=67888543
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910541723.5A Active CN110245341B (en) | 2019-06-21 | 2019-06-21 | Identification code batch generation method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110245341B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112632916A (en) * | 2019-09-23 | 2021-04-09 | 北京国双科技有限公司 | Paperwork data backfilling method and device |
CN115577732A (en) * | 2022-12-09 | 2023-01-06 | 成都怡康科技有限公司 | Method and device for generating unique identification code pictures in batches |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106066848A (en) * | 2016-05-24 | 2016-11-02 | 辽宁蓝卡医疗投资管理有限公司 | Data processing method, apparatus and system |
US9740907B1 (en) * | 2016-06-29 | 2017-08-22 | Mueller International, Llc | Systems and methods for a self-identifying barcode |
CN108776824A (en) * | 2018-06-27 | 2018-11-09 | 中国建设银行股份有限公司 | Bar-code label generation method, device and electronic equipment |
CN109408780A (en) * | 2018-09-07 | 2019-03-01 | 山东中磁视讯股份有限公司 | A kind of method that Excel file is converted to JSON file |
-
2019
- 2019-06-21 CN CN201910541723.5A patent/CN110245341B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106066848A (en) * | 2016-05-24 | 2016-11-02 | 辽宁蓝卡医疗投资管理有限公司 | Data processing method, apparatus and system |
US9740907B1 (en) * | 2016-06-29 | 2017-08-22 | Mueller International, Llc | Systems and methods for a self-identifying barcode |
CN108776824A (en) * | 2018-06-27 | 2018-11-09 | 中国建设银行股份有限公司 | Bar-code label generation method, device and electronic equipment |
CN109408780A (en) * | 2018-09-07 | 2019-03-01 | 山东中磁视讯股份有限公司 | A kind of method that Excel file is converted to JSON file |
Non-Patent Citations (1)
Title |
---|
Excel VBA在资产管理中的运用;王宏伟;《电脑编程技巧与维护》;20160715(第13期);第61-63页,第67页 * |
Also Published As
Publication number | Publication date |
---|---|
CN110245341A (en) | 2019-09-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Sutheebanjard et al. | QR-code generator | |
CN102165393B (en) | Editing 2D structures using natural input | |
US7469833B1 (en) | Creating and using documents with machine-readable codes | |
US7240841B2 (en) | Creating and using documents with machine-readable codes | |
CN103077185A (en) | Object-based user-defined information-expanding method | |
CN110245341B (en) | Identification code batch generation method and device | |
CN110244921B (en) | Label printing method and device, electronic equipment and system | |
CN109408058B (en) | Front-end auxiliary development method and device based on machine learning | |
CN112068911B (en) | Electronic form generation method, device, system, equipment and medium | |
CN104679453B (en) | The general-purpose system and method for a kind of Data Enter, storage and Typeset and Print | |
CN110968996A (en) | Document making method, device, equipment and storage medium | |
CN108319578B (en) | Method for generating medium for data recording | |
US20170323007A1 (en) | Identifier Based Glyph Search | |
US8296326B1 (en) | Grid-based user interface techniques for interacting with nested hierarchical data structures | |
US8856044B1 (en) | Segmented access of remotely stored biographical data to a client device | |
CN105825250B (en) | A kind of statistical method and device of bad display panel | |
CN107015959A (en) | A kind of method that version is closed to pdf document | |
CN103699520A (en) | Font processing method for maintaining e-document layout | |
CN116562247A (en) | Electronic form content generation method, electronic form content generation device and computer equipment | |
CN116071769A (en) | Table identification method, apparatus, nonvolatile storage medium and computer device | |
CN116110065A (en) | Method, device, computer equipment and storage medium for generating question card data | |
Sheet | UPDATES | |
KR101079606B1 (en) | System and method for engraving quick response code in jewelry using laser | |
CN104442054A (en) | Two-dimension code printing method and device based on mainframe platform | |
CN114297994A (en) | Method, system, device and storage medium for generating parameterized report |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
PE01 | Entry into force of the registration of the contract for pledge of patent right |
Denomination of invention: Batch generation method and device for identification codes Granted publication date: 20230310 Pledgee: Bank of China Limited Wuhan Donghu New Technology Development Zone Branch Pledgor: WUHAN JINGCHEN WISDOM LOGO TECHNOLOGY Co.,Ltd. Registration number: Y2024980008335 |
|
PE01 | Entry into force of the registration of the contract for pledge of patent right |