CN115828875A - Label generation method, device, equipment and medium - Google Patents

Label generation method, device, equipment and medium Download PDF

Info

Publication number
CN115828875A
CN115828875A CN202111085955.8A CN202111085955A CN115828875A CN 115828875 A CN115828875 A CN 115828875A CN 202111085955 A CN202111085955 A CN 202111085955A CN 115828875 A CN115828875 A CN 115828875A
Authority
CN
China
Prior art keywords
target
function
rule
type field
identification information
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.)
Pending
Application number
CN202111085955.8A
Other languages
Chinese (zh)
Inventor
常生鹏
宁海顺
朱腾兵
臧学鹏
张祥景
刘兆锟
胥玉蕾
孔驰
陈国旗
丁觅坤
李高炜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hisense Group Holding Co Ltd
Original Assignee
Hisense Group Holding Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Hisense Group Holding Co Ltd filed Critical Hisense Group Holding Co Ltd
Priority to CN202111085955.8A priority Critical patent/CN115828875A/en
Publication of CN115828875A publication Critical patent/CN115828875A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The application discloses a label generation method, a device, equipment and a medium, because in the application, a target rule corresponding to each type field contained in a target label template can be determined, target rule function identification information corresponding to the target rule is determined, a target rule function corresponding to the target rule function identification information is finally called, the purpose that the target content of the type field is displayed by the target rule corresponding to the type field aiming at each type field corresponding to the target label template is realized, the target label is finally generated, the workload of developers is effectively reduced, and the label generation efficiency is improved.

Description

Label generation method, device, equipment and medium
Technical Field
The present application relates to the field of tag technologies, and in particular, to a tag generation method, apparatus, device, and medium.
Background
At present, thousands of label templates are used in the market, and the corresponding label styles of different label templates are different, even if the label content contained in the same label template and the composition rule of each label content contained in the label are different.
Therefore, in order to meet the requirements of the user for the tags, the developer is required to develop codes for each change of the requirements of the user for the tags, the workload of the developer is increased, the user cannot respond quickly, and the tag generation efficiency is reduced.
Disclosure of Invention
The application provides a tag generation method, a tag generation device, a tag generation apparatus and a tag generation medium, which are used for solving the problems that in the prior art, if a developer directly develops a corresponding code to generate a tag based on a changed tag requirement, the workload of the developer is increased, and the tag generation efficiency is low.
The application provides a label generation method, which comprises the following steps:
determining a target label template according to a received label template selection instruction, and determining and displaying candidate rules corresponding to each type field under the target label template according to the corresponding relation between each type field and the rule contained in the label template stored in advance;
aiming at each type field, determining a target rule corresponding to the type field according to a received rule selection instruction corresponding to the type field; determining target rule function identification information corresponding to the target rule according to a corresponding relation between a pre-stored rule and the rule function identification information;
and calling the target rule function corresponding to the target rule function identification information corresponding to each type field to generate a target label according to the target rule function identification information corresponding to each type field and the received target content of each type field.
Further, the determining, according to a correspondence between a pre-stored rule and rule function identification information, target rule function identification information corresponding to the target rule includes:
determining a target rule function parameter corresponding to the target rule according to a corresponding relation between a pre-stored rule and a function parameter;
and determining target rule function identification information corresponding to the target rule function parameters according to the corresponding relation between the pre-stored function parameters and the rule function identification information.
Further, determining the correspondence between the pre-stored function parameter and the rule function identification information includes:
identifying function parameters in the rule function according to each preset rule function, wherein the function parameters comprise function names, function descriptions, function codes and function types; and determining and storing the rule function identification information corresponding to the rule function according to the function name, the function description, the function code, the function type and a preset encryption algorithm.
Further, the invoking the target rule function corresponding to the target rule function identification information corresponding to each type field to generate the target label according to the target rule function identification information corresponding to each type field and the received target content of each type field includes:
according to the preset priority sequence of each type field, sequentially transmitting the target rule function identification information corresponding to each type field and each type field into a public interface, calling the target rule function corresponding to the target rule function identification information corresponding to each type field, and generating a target sub-label corresponding to each type field;
and generating a target label according to the target sub-label corresponding to each type field.
The present application also provides a tag generation apparatus, the apparatus including:
the determining module is used for determining a target label template according to the received label template selection instruction, determining and displaying candidate rules corresponding to each type field under the target label template according to the corresponding relation between each type field and each rule contained in the label template stored in advance; aiming at each type field, determining a target rule corresponding to the type field according to a received rule selection instruction corresponding to the type field; determining target rule function identification information corresponding to the target rule according to a corresponding relation between a pre-stored rule and the rule function identification information;
and the calling module is used for calling the target rule function corresponding to the target rule function identification information corresponding to each type field to generate a target label according to the target rule function identification information corresponding to each type field and the received target content of each type field.
Further, the determining module is specifically configured to determine, according to a correspondence between a pre-stored rule and a function parameter, a target rule function parameter corresponding to the target rule; and determining target rule function identification information corresponding to the target rule function parameters according to the corresponding relation between the pre-stored function parameters and the rule function identification information.
Further, the determining module is further configured to identify a function parameter in each rule function according to each preset rule function, where the function parameter includes a function name, a function description, a function code, and a function type; and determining and storing the rule function identification information corresponding to the rule function according to the function name, the function description, the function code, the function type and a preset encryption algorithm.
Further, the calling module is specifically configured to sequentially transmit the target rule function identification information corresponding to each type field and each type field to a common interface according to a preset priority order of each type field, call a target rule function corresponding to the target rule function identification information corresponding to each type field, and generate a target sub-tag corresponding to each type field; and generating a target label according to the target sub-label corresponding to each type field.
The present application further provides an electronic device comprising at least a processor and a memory, the processor being configured to implement the steps of the label generation method as described in any one of the above when executing a computer program stored in the memory.
The present application also provides a computer-readable storage medium, in which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the label generation method as set forth in any one of the above.
According to the method, a target label template is determined according to a received label template selection instruction, candidate rules corresponding to various types of fields under the target label template are determined and displayed according to the corresponding relation between the various types of fields and the rules contained in the label template stored in advance, the target rule corresponding to the type field is determined according to the rule selection instruction corresponding to the received type field aiming at each type field, the target rule corresponding to the target rule is determined according to the corresponding relation between the rules stored in advance and the rule function identification information, and the target rule function corresponding to the target rule function identification information is called according to the target rule function identification information corresponding to each type field and the target content of each type field received to generate the target label. According to the method and the device, the target rules corresponding to each type field contained in the target label template can be determined, the target rule function identification information corresponding to the target rules is determined, the target rule function corresponding to the target rule function identification information is finally called, the target content of each type field corresponding to the target label template is displayed according to the target rule corresponding to the type field, the target label is finally generated, the workload of developers is effectively reduced, and the label generation efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a process diagram of a tag generation method according to some embodiments of the present application;
fig. 2 is a schematic diagram of a process for generating rule function identification information according to some embodiments of the present application;
FIG. 3 is a schematic illustration of a display of a standard writing of rule functions provided by some embodiments of the present application;
FIG. 4 is a process diagram of binding a type field with a rule according to some embodiments of the present application;
FIG. 5 is a schematic illustration of a label printing process provided by some embodiments of the present application;
fig. 6a is a schematic diagram illustrating a display of candidate rules corresponding to each type field in a target tag template according to some embodiments of the present application;
fig. 6b is a schematic diagram illustrating display of target rule function identification information corresponding to a target rule according to some embodiments of the present application;
FIG. 6c is a diagram illustrating the result of binding a type field with a target rule according to some embodiments of the present application;
FIG. 6d is a schematic illustration of a display of a target tag according to some embodiments of the present application;
fig. 7 is a schematic structural diagram of a label generation apparatus according to some embodiments of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to some embodiments of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be described in further detail with reference to the accompanying drawings, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
According to the method, a target label template is determined according to a received label template selection instruction, candidate rules corresponding to various types of fields under the target label template are determined and displayed according to the corresponding relation between the various types of fields and the rules contained in the label template stored in advance, the target rule corresponding to the type field is determined according to the rule selection instruction corresponding to the received type field aiming at each type field, the target rule corresponding to the target rule is determined according to the corresponding relation between the rules stored in advance and the rule function identification information, and the target rule function corresponding to the target rule function identification information is called according to the target rule function identification information corresponding to each type field and the target content of each type field received to generate the target label. According to the method and the device, the target rules corresponding to each type field contained in the target label template can be determined, the target rule function identification information corresponding to the target rules is determined, the target rule function corresponding to the target rule function identification information is finally called, the target content of each type field corresponding to the target label template is displayed according to the target rule corresponding to the type field, the target label is finally generated, the workload of developers is effectively reduced, and the label generation efficiency is improved.
In order to reduce workload of developers and improve tag generation efficiency, embodiments of the present application provide a tag generation method, apparatus, device, and medium.
Fig. 1 is a schematic process diagram of a tag generation method according to some embodiments of the present application, where the process includes the following steps:
s101: and determining a target label template according to the received label template selection instruction, and determining and displaying candidate rules corresponding to each type field under the target label template according to the corresponding relation between each type field and the rule contained in the label template stored in advance.
The tag generation method provided by the embodiment of the application is applied to electronic equipment, and the electronic equipment can be intelligent terminals, PCs or servers and other equipment.
In order to increase the variety of template selection and improve the user experience, in the application, a plurality of tag templates are stored in the electronic device in advance, and the corresponding styles, the contained type fields, the position information of each type field on the tag templates and the like of different tag templates are different, wherein the tag templates can be generated based on bar code tag manufacturing software, such as Bartener design. Specifically, the process of generating the label template based on the barcode label making software is the prior art, and is not described herein again.
In this application, electronic equipment can show a plurality of label templates of saving on showing the page, and the required label template of a plurality of label templates selection according to this demonstration of the user of being convenient for, and specific mode of selection includes: inputting character selection operation through electronic equipment, inputting voice selection operation through electronic equipment, inputting selection operation on a label template displayed on a display interface through electronic equipment, and the like. After the user selects a required tag template, the electronic device receives a tag template selection instruction, and based on the tag template selection instruction, the electronic device may determine a selected tag template from a plurality of pre-stored tag templates, where the selected tag template is a target tag template, where the target tag template includes a plurality of type fields, and each type field included in the target tag template and a position of each type field on the target template are known when the target template is generated, where the type field may be a date field, a bill of materials field, a product attribute field, and so on. For example, the type field in the lower right corner of the label template a is a date field, and the type field in the upper left corner is a two-dimensional code field, and so on.
For example, the date field may be divided into different display rules such as one-year, two-year, and four-year, that is, each type field may correspond to one or more different rules, so that, in order to facilitate a user to select a rule corresponding to a type field included in each tag template, in the present application, a corresponding relationship between each type field included in a tag template and a rule is pre-stored in the electronic device, after a target tag template is determined, the electronic device may determine, based directly on the corresponding relationship between each type field included in the pre-stored tag template and the rule, a rule that can be selected and corresponds to each type field under the target tag template, and display the rule that can be selected, that is, a candidate rule.
S102: aiming at each type field, determining a target rule corresponding to the type field according to a received rule selection instruction corresponding to the type field; and determining target rule function identification information corresponding to the target rule according to the corresponding relation between the pre-stored rule and the rule function identification information.
After determining and displaying the candidate rules corresponding to each type field in the target label template, and after selecting from the displayed candidate rules corresponding to each type field by a user, for each type field, the electronic device may receive a rule selection instruction corresponding to the type field, where the rule selection instruction carries information of a selected rule, and determine the selected rule based on the rule selection instruction corresponding to the type field, where the selected rule is the target rule.
In order to ensure that after each type field in the target label template is matched with a corresponding target rule, each type field on a generated label can conform to the target rule, in the application, for each type field, a rule function corresponding to the target rule corresponding to the type field needs to be determined, specifically, after the target rule is determined, a rule function corresponding to the target rule needs to be determined, since in order to determine which rule function corresponds to each rule, rule function identification information corresponding to each rule function is determined in advance for each rule function, wherein the rule function identification information is a string of encrypted character strings, and a corresponding relationship between the rule and the rule function identification information is stored in the electronic device in advance, and for each type field, after the target rule corresponding to the type field is determined, the target rule function identification information corresponding to the target rule is determined.
S103: and calling the target rule function corresponding to the target rule function identification information corresponding to each type field to generate a target label according to the target rule function identification information corresponding to each type field and the received target content of each type field.
In this application, in order to generate a target tag, after determining target rule function identification information corresponding to each type field, a target rule function corresponding to the target rule function identification information corresponding to each field type may be called according to the target rule function identification information corresponding to each type field and the received target content of each type field, so as to generate the target tag. Specifically, in the present application, the target rule function identification information corresponding to each type field and the target content of each type field are transmitted to a common interface, and the target rule function corresponding to the target rule function identification information corresponding to each field is called, so as to generate the target tag.
In addition, after the target rule information corresponding to each field and the target content of each type field are determined, if there is no need to display or print a label temporarily, the target rule function identification information corresponding to each field on the target template and the target content of each type field may be stored first, and if there is a need to display or print a label, the target rule function identification information corresponding to each field on the stored target template and the target content of each type field may be directly obtained, the target rule function identification information may be called to generate the target label, and the target label may be printed if there is a need to use the target label after the target label is generated.
According to the method and the device, the target rules corresponding to the type fields contained in the target label template can be determined, the target rule function identification information corresponding to the target rules is determined, the target rule function corresponding to the target rule function identification information is finally called, the target content of the type fields is displayed according to the target rules corresponding to the type fields aiming at each type field corresponding to the target label template, the target label is finally generated, the workload of developers is effectively reduced, and the label generation efficiency is improved.
In order to determine target rule function identification information corresponding to a target rule function, on the basis of the above embodiment, in this embodiment, the determining, according to a correspondence between a rule stored in advance and the rule function identification information, the target rule function identification information corresponding to the target rule includes:
determining a target rule function parameter corresponding to the target rule according to a corresponding relation between a pre-stored rule and a function parameter;
and determining target rule function identification information corresponding to the target rule function parameters according to the corresponding relation between the pre-stored function parameters and the rule function identification information.
In the application, the corresponding relationship between the rule and the rule function identification information may be directly stored in the electronic device, and the target rule function identification information corresponding to the target rule is determined based on the corresponding relationship between the pre-stored rule and the rule function identification information, because each rule function is configured based on a standard rule function template and each function parameter, in the application, in order to facilitate a user to view the corresponding function rule in each rule function, the corresponding relationship between the rule and the function parameter and the corresponding relationship between the function parameter and the rule function identification information may be pre-stored, after the target rule is determined, the target rule function parameter corresponding to the target rule is determined according to the corresponding relationship between the pre-stored rule and the function parameter, and then the target rule function identification information corresponding to the target rule function parameter is determined according to the corresponding relationship between the pre-stored function parameter and the rule function identification information.
In order to determine the correspondence between the pre-stored function parameters and the rule function identification information, on the basis of the foregoing embodiments, in an embodiment of the present application, the determining the correspondence between the pre-stored function parameters and the rule function identification information includes:
identifying function parameters in the rule function according to each preset rule function, wherein the function parameters comprise function names, function descriptions, function codes and function types; and determining and storing the rule function identification information corresponding to the rule function according to the function name, the function description, the function code, the function type and a preset encryption algorithm.
In the application, in order to facilitate the subsequent rapid generation of the corresponding target label according to different label requirements, the electronic device may automatically identify each preset rule function, and identify function parameters included in the rule function, where the function parameters include a function name, a function description, a function code, and a function type. For each rule function, in order to determine the rule function identification information corresponding to the rule function, in the present application, the rule function identification information corresponding to the rule function is determined according to the function parameter of the rule function and a preset encryption algorithm, that is, the rule function identification information corresponding to the rule function is determined according to the function description, the function code, the function type, and the preset encryption algorithm of the rule function, and the rule function identification information is stored. If the preset rule function is compiled based on the JS script or the Python script, the function parameters recognized by the electronic equipment further comprise the JS script or the Python script, and based on the function description, the function code, the function type, the JS script or the Python script of the rule function and a preset encryption algorithm, the rule function identification information corresponding to the rule function is determined and stored.
In addition, if a new tag requirement exists, a developer can also generate a new rule function according to the new tag requirement at a server or a browser (BS end), the electronic device identifies new function parameters in the new rule function, and determines and stores new rule function identification information corresponding to the new rule function according to function description, function code, function type and a preset encryption algorithm included in the new function parameters.
Fig. 2 is a schematic diagram of a process of generating rule function identification information according to some embodiments of the present application, and is now described with reference to fig. 2.
After a program of the electronic device is started, the electronic device identifies preset rule functions, identifies function parameters corresponding to the rule functions for each preset rule function, obtains function names, function descriptions, function codes, function types and the like contained in the function parameters, generates rule function identification information corresponding to the rule functions according to the function names, the function descriptions, the function codes and the function types, and the function names, the function descriptions, the function codes and the function types corresponding to the same rule functions are the same, so that the rule function identification information corresponding to the same rule function is also the same, and stores the rule function identification information in a database of the electronic device after the rule function identification information corresponding to each preset rule function is determined.
Fig. 3 is a schematic diagram illustrating a display of a standard writing method of a rule function according to some embodiments of the present application, and is described with reference to fig. 3.
The method comprises the steps of presetting a code template corresponding to a rule function, determining a function name, a function description, a function code, a function type and the like in a corresponding label rule by a developer according to the requirement of each label, editing the function name, the function description, the function code and the function type in the code template corresponding to the preset rule function, and generating the rule function meeting the requirement of the label. In addition, if the corresponding rule function is generated based on the JS script, the JS script needs to be edited into the code template corresponding to the preset rule function, so as to generate the rule function meeting the requirement of the tag.
For generating the target label, on the basis of the foregoing embodiments, in this embodiment of the application, the invoking the target rule function corresponding to the target rule function identification information corresponding to each type field to generate the target label according to the target rule function identification information corresponding to each type field and the received target content of each type field includes:
according to the preset priority order of each type field, sequentially transmitting the target rule function identification information corresponding to each type field and the target content of each type field into a public interface, calling the target rule function corresponding to the target rule function identification information corresponding to each type field, and generating the target sub-label corresponding to each type field;
and generating a target label according to the target sub-label corresponding to each type field.
Since a plurality of type fields exist on one target label template, in order to generate a target label, target rule function identification information corresponding to each type field and target content of each type field need to be transmitted to a common interface, and a target rule function corresponding to each corresponding target rule function identification information is called. Therefore, in the application, the priority order of each type field may be set in advance for the type field on the target tag template, the target rule function identification information corresponding to each type field and the target content of each type field are sequentially transmitted to the common interface according to the priority order of each type field, the target rule function corresponding to each corresponding target rule function identification information is called, and then the target sub-tag corresponding to each type field is generated, and then the target tag is generated according to the target sub-tag corresponding to each type field. Specifically, the type field with the higher priority transmits the target rule function identification information corresponding to the type field and the target content of the type field to the public interface earlier, and calls the target rule function corresponding to the target rule function identification information corresponding to the type field.
Fig. 4 is a schematic diagram of a process for binding a type field with a rule according to some embodiments of the present application, and fig. 5 is a schematic diagram of a process for printing a label according to some embodiments of the present application, which will now be described with reference to fig. 4 and 5.
After the target label template is determined, identifying each type field on the label template, respectively determining a target rule corresponding to each type field, determining target rule function identification information corresponding to the target rule according to a corresponding relation between a pre-stored rule and the rule function identification information, further storing the target rule function identification information corresponding to each type field in a database, and realizing the binding of each type field and the rule corresponding to each type field.
The electronic equipment obtains target rule function identification information corresponding to each type field stored in a database after receiving a label generation request, calls the target rule function identification information corresponding to each type field according to the target label template to generate a target label, and can print the target label if the use requirement exists after the target label is generated.
Fig. 6a is a schematic display diagram of candidate rules corresponding to each type field in a target tag template according to some embodiments of the present application, fig. 6b is a schematic display diagram of target rule function identification information corresponding to a target rule according to some embodiments of the present application, fig. 6c is a schematic display diagram of a result of binding a type field with a target rule according to some embodiments of the present application, and fig. 6d is a schematic display diagram of a target tag according to some embodiments of the present application, which is described with reference to fig. 6a, fig. 6b, fig. 6c, and fig. 6 d.
If it is determined that the identification information corresponding to the target label template is 4409, determining a candidate rule corresponding to each field of the target label template where the identification information is 4409, where the candidate rule includes: bar code rule-product, BOM, running (accumulated according to product quarter) and bar code rule-product, BOM, running (accumulated according to product year), etc., and for the convenience of user to select candidate rules corresponding to each field, rule descriptions, rule examples, rule details, etc., corresponding to each candidate rule are also displayed on the display page.
After receiving the rule selection instruction corresponding to each type field, the electronic device determines a target rule, and displays target rule function identification information corresponding to the target rule on a display page, so as to facilitate user viewing, a function name, a function code and the like are also displayed on the display page, after determining the target rule function identification information corresponding to the target rule corresponding to each type field, the user realizes binding of each type field and the rule, generates corresponding print data, and facilitates subsequent user label printing, where the print data is shown in fig. 6 c.
And after receiving the label printing instruction, generating a target label, as shown in fig. 6d, displaying the target content corresponding to each type of field in the target label template with the identification information 4409 according to the target rule corresponding to each type of field.
Fig. 7 is a schematic structural diagram of a label generation apparatus according to some embodiments of the present application, where the apparatus includes:
a determining module 701, configured to determine a target tag template according to a received tag template selection instruction, determine, according to a correspondence between each type field included in a pre-stored tag template and a rule, and display a candidate rule corresponding to each type field of the target tag template; aiming at each type field, determining a target rule corresponding to the type field according to a received rule selection instruction corresponding to the type field; determining target rule function identification information corresponding to the target rule according to a corresponding relation between a pre-stored rule and the rule function identification information;
the invoking module 702 is configured to invoke a target rule function corresponding to the target rule function identification information corresponding to each type field to generate a target tag according to the target rule function identification information corresponding to each type field and the received target content of each type field.
In a possible implementation manner, the determining module 701 is specifically configured to determine, according to a correspondence between a rule and a function parameter that are stored in advance, a target rule function parameter corresponding to the target rule; and determining target rule function identification information corresponding to the target rule function parameters according to the corresponding relation between the pre-stored function parameters and the rule function identification information.
In a possible implementation manner, the determining module 701 is further configured to identify function parameters in each rule function according to each preset rule function, where the function parameters include a function name, a function description, a function code, and a function type; and determining and storing the rule function identification information corresponding to the rule function according to the function name, the function description, the function code, the function type and a preset encryption algorithm.
In a possible implementation manner, the invoking module 702 is specifically configured to sequentially transmit the target rule function identification information corresponding to each type field and each type field to a common interface according to a preset priority order of each type field, invoke the target rule function corresponding to the target rule function identification information corresponding to each type field, and generate the target sub-tag corresponding to each type field; and generating a target label according to the target sub-label corresponding to each type field.
On the basis of the foregoing embodiments, some embodiments of the present application further provide an electronic device, as shown in fig. 8, including: a processor 801, a communication interface 802, a memory 803 and a communication bus 804, wherein the processor 801, the communication interface 802 and the memory 803 communicate with each other through the communication bus 804.
The memory 803 has stored therein a computer program which, when executed by the processor 801, causes the processor 801 to perform the steps of:
determining a target label template according to a received label template selection instruction, and determining and displaying candidate rules corresponding to each type field under the target label template according to the corresponding relation between each type field and the rule contained in the label template stored in advance;
aiming at each type field, according to a received rule selection instruction corresponding to the type field, determining a target rule corresponding to the type field; determining target rule function identification information corresponding to the target rule according to a corresponding relation between a pre-stored rule and the rule function identification information;
and calling the target rule function corresponding to the target rule function identification information corresponding to each type field to generate a target label according to the target rule function identification information corresponding to each type field and the received target content of each type field.
Further, the processor 801 is further configured to determine a target rule function parameter corresponding to the target rule according to a correspondence between a pre-stored rule and a function parameter; and determining target rule function identification information corresponding to the target rule function parameters according to the corresponding relation between the pre-stored function parameters and the rule function identification information.
Further, the processor 801 is further configured to identify function parameters in each rule function according to each preset rule function, where the function parameters include a function name, a function description, a function code, and a function type; and determining and storing the rule function identification information corresponding to the rule function according to the function name, the function description, the function code, the function type and a preset encryption algorithm.
Further, the processor 801 is further configured to sequentially transmit the target rule function identification information corresponding to each type field and each type field to a common interface according to a preset priority order of each type field, call a target rule function corresponding to the target rule function identification information corresponding to each type field, and generate a target sub-tag corresponding to each type field; and generating a target label according to the target sub-label corresponding to each type field.
The communication bus mentioned in the above server may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface 802 is used for communication between the above-described electronic apparatus and other apparatuses.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Alternatively, the memory may be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a central processing unit, a Network Processor (NP), and the like; but may also be a Digital instruction processor (DSP), an application specific integrated circuit, a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like.
On the basis of the foregoing embodiments, some embodiments of the present application further provide a computer-readable storage medium, in which a computer program executable by an electronic device is stored, and when the program is run on the electronic device, the electronic device is caused to perform the following steps:
the memory having stored therein a computer program that, when executed by the processor, causes the processor to perform the steps of:
determining a target label template according to a received label template selection instruction, and determining and displaying candidate rules corresponding to each type field under the target label template according to the corresponding relation between each type field and the rule contained in the label template stored in advance;
aiming at each type field, determining a target rule corresponding to the type field according to a received rule selection instruction corresponding to the type field; determining target rule function identification information corresponding to the target rule according to a corresponding relation between a pre-stored rule and the rule function identification information;
and calling the target rule function corresponding to the target rule function identification information corresponding to each type field to generate a target label according to the target rule function identification information corresponding to each type field and the received target content of each type field.
Further, the determining, according to a correspondence between a pre-stored rule and rule function identification information, target rule function identification information corresponding to the target rule includes:
determining a target rule function parameter corresponding to the target rule according to a corresponding relation between a pre-stored rule and a function parameter;
and determining target rule function identification information corresponding to the target rule function parameters according to the corresponding relation between the pre-stored function parameters and the rule function identification information.
Further, determining the correspondence between the pre-stored function parameter and the rule function identification information includes:
identifying function parameters in the rule function according to each preset rule function, wherein the function parameters comprise function names, function descriptions, function codes and function types; and determining and storing the rule function identification information corresponding to the rule function according to the function name, the function description, the function code, the function type and a preset encryption algorithm.
Further, the invoking the target rule function corresponding to the target rule function identification information corresponding to each type field to generate the target label according to the target rule function identification information corresponding to each type field and the received target content of each type field includes:
according to the preset priority sequence of each type field, sequentially transmitting the target rule function identification information corresponding to each type field and each type field into a public interface, calling the target rule function corresponding to the target rule function identification information corresponding to each type field, and generating a target sub-label corresponding to each type field;
and generating a target label according to the target sub-label corresponding to each type field.
According to the method and the device, the target rules corresponding to the type fields contained in the target label template can be determined, the target rule function identification information corresponding to the target rules is determined, the target rule function corresponding to the target rule function identification information is finally called, the target content of the type fields is displayed according to the target rules corresponding to the type fields aiming at each type field corresponding to the target label template, the target label is finally generated, the workload of developers is effectively reduced, and the label generation efficiency is improved.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. A method of tag generation, the method comprising:
determining a target label template according to a received label template selection instruction, and determining and displaying candidate rules corresponding to each type field under the target label template according to the corresponding relation between each type field and the rule contained in the label template stored in advance;
aiming at each type field, determining a target rule corresponding to the type field according to a received rule selection instruction corresponding to the type field; determining target rule function identification information corresponding to the target rule according to a corresponding relation between a pre-stored rule and the rule function identification information;
and calling the target rule function corresponding to the target rule function identification information corresponding to each type field to generate a target label according to the target rule function identification information corresponding to each type field and the received target content of each type field.
2. The method according to claim 1, wherein the determining target rule function identification information corresponding to the target rule according to a pre-stored correspondence between the rule and the rule function identification information comprises:
determining a target rule function parameter corresponding to the target rule according to a corresponding relation between a pre-stored rule and a function parameter;
and determining target rule function identification information corresponding to the target rule function parameters according to the corresponding relation between the pre-stored function parameters and the rule function identification information.
3. The method according to claim 1 or 2, wherein determining the correspondence between the pre-stored function parameters and rule function identification information comprises:
identifying function parameters in the rule function according to each preset rule function, wherein the function parameters comprise function names, function descriptions, function codes and function types; and determining and storing the rule function identification information corresponding to the rule function according to the function name, the function description, the function code, the function type and a preset encryption algorithm.
4. The method according to claim 1, wherein the invoking the target rule function corresponding to the target rule function identification information corresponding to each type field to generate the target label according to the target rule function identification information corresponding to each type field and the received target content of each type field comprises:
according to a preset priority sequence of each type field, sequentially transmitting target rule function identification information corresponding to each type field and each type field to a public interface, calling a target rule function corresponding to the target rule function identification information corresponding to each type field, and generating a target sub-label corresponding to each type field;
and generating a target label according to the target sub-label corresponding to each type field.
5. A label generation apparatus, characterized in that the apparatus comprises:
the determining module is used for determining a target label template according to the received label template selection instruction, determining and displaying candidate rules corresponding to various types of fields under the target label template according to the corresponding relation between the various types of fields contained in the label template stored in advance and the rules; aiming at each type field, according to a received rule selection instruction corresponding to the type field, determining a target rule corresponding to the type field; determining target rule function identification information corresponding to the target rule according to a corresponding relation between a pre-stored rule and the rule function identification information;
and the calling module is used for calling the target rule function corresponding to the target rule function identification information corresponding to each type field to generate a target label according to the target rule function identification information corresponding to each type field and the received target content of each type field.
6. The apparatus according to claim 5, wherein the determining module is specifically configured to determine, according to a correspondence between a pre-stored rule and a function parameter, a target rule function parameter corresponding to the target rule; and determining target rule function identification information corresponding to the target rule function parameters according to the corresponding relation between the pre-stored function parameters and the rule function identification information.
7. The apparatus according to claim 5 or 6, wherein the determining module is further configured to identify function parameters in each rule function according to the preset rule function, where the function parameters include a function name, a function description, a function code, and a function type; and determining and storing the rule function identification information corresponding to the rule function according to the function name, the function description, the function code, the function type and a preset encryption algorithm.
8. The apparatus according to claim 5, wherein the invoking module is specifically configured to, according to a preset priority order of each type field, sequentially transmit the target rule function identification information corresponding to each type field and each type field to a common interface, invoke the target rule function corresponding to the target rule function identification information corresponding to each type field, and generate the target sub-tag corresponding to each type field; and generating a target label according to the target sub-label corresponding to each type field.
9. An electronic device, characterized in that the electronic device comprises a processor for implementing the steps of the method according to any of claims 1-4 when executing a computer program stored in a memory.
10. A computer-readable storage medium, characterized in that it stores a computer program which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 4.
CN202111085955.8A 2021-09-16 2021-09-16 Label generation method, device, equipment and medium Pending CN115828875A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111085955.8A CN115828875A (en) 2021-09-16 2021-09-16 Label generation method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111085955.8A CN115828875A (en) 2021-09-16 2021-09-16 Label generation method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN115828875A true CN115828875A (en) 2023-03-21

Family

ID=85515750

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111085955.8A Pending CN115828875A (en) 2021-09-16 2021-09-16 Label generation method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN115828875A (en)

Similar Documents

Publication Publication Date Title
WO2020233048A1 (en) Customized software generation method and system, and electronic device and storage medium
CN112118286B (en) Multi-thread link tracking method and device based on MDC and computer readable storage medium
CN110727431A (en) Applet generation method and apparatus
CN105378662B (en) Generate the method and associated computer system of the bundle for application
CN101193007A (en) Testing method, scenario testing method and corresponding device for URL command
US20160012551A1 (en) Apparatus and Application Server for Providing a Service to a User
CN111694565A (en) Data visualization application development method and system
CN110941614A (en) Form generation method and device, electronic equipment and computer readable storage medium
CN110837366A (en) Form generation method, electronic device and computer readable storage medium
CN116071031B (en) Visual flow verification approval method, system, equipment and storage medium
CN114416056A (en) Page generation method, system, computer equipment and readable storage medium
CN114356530A (en) Task scheduling method and device, electronic equipment and storage medium
CN113342249A (en) Content management method, device, equipment and storage medium capable of previewing in real time
CN110716775B (en) Traceable template configuration method, electronic device, storage medium and system
CN105069639A (en) Agricultural product quality tracing method and device
CN110531967B (en) Code generation method and code generation device
CN117251157A (en) User interface generation method, device, equipment and medium
CN115828875A (en) Label generation method, device, equipment and medium
CN111801696A (en) Payment page management method, payment page management device, payment system and storage medium
CN110018766B (en) Webpage form filling method and device
CN114872449B (en) Label printing method and device and electronic equipment
CN112529647A (en) Commodity transaction method and device based on block chain and computer equipment
CN114115864A (en) Interface generation method and device and electronic equipment
CN110941731A (en) Color determination method, fabric customization method and device
CN112182552B (en) Real-name authentication method and device, electronic equipment and storage medium

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