Disclosure of Invention
In view of the above, there is a need for an industrial internet tag encoding method, apparatus and electronic device to solve the problems of industrial level unification of industrial internet tags and disclosure of confidential business information.
A first aspect of the present application provides an industrial internet tag encoding method, which is applied to a first tag resolution server, and includes:
acquiring data of a target object corresponding to an industrial internet label, wherein the data of the target object comprises a target object attribute and an attribute value of the target object attribute;
encoding the target object attribute and the attribute value of the target object attribute according to a preset encoding rule to generate an initial code of the data of the target object;
adding a first prefix to the initial code to generate a first code, wherein the first prefix comprises an industry number to which the target object belongs and an enterprise number to which the target object belongs;
sending the first code to a second label analysis server, and receiving a second code which is sent by the second label analysis server and generated after adding a second prefix to the first code, wherein the second prefix is a country-level number to which the target object belongs;
and encrypting the initial code in the second code to obtain a target code, and setting the target code as the code of the industrial internet label.
Optionally, the step of encoding the target object attribute and the attribute value of the target object attribute according to a preset encoding rule to generate an initial code of the data of the target object includes:
determining the field position and the field number of bits of the target object attribute in the preset coding rule;
and searching a first relation table according to the field position, the field digit and the attribute value of the target object attribute in the preset coding rule to determine the initial code of the data of the target object, wherein the first relation table defines the corresponding relation between the attribute of the target object with different field positions and field digits and the attribute value of the target object attribute and the preset code in the preset coding rule.
Optionally, the method further comprises:
auditing the first code to verify the uniqueness of the first code, wherein the first code is determined to be unique if the first code is not recorded in the first tag resolution server, and the first code is determined to be not unique if the first code is recorded in the first tag resolution server;
and if the first code has uniqueness, the first code is sent to a second label analysis server, wherein the second label analysis server adds a second prefix to the first code and then generates the second code.
Optionally, the method further comprises:
sending the first code to a management platform and requesting the management platform for information registration of the first code, so that the management platform verifies whether the first code is recorded in the management platform, registers the first code in the management platform after confirming that the first code is not recorded in the management platform so as to complete information registration of the first code, sends the first code to the second tag parsing server, and receives and stores a second code generated by adding the second prefix to the first code from the second tag parsing server;
and receiving the second code sent by the management platform by the first code analysis server.
Optionally, the method further comprises:
and the first label analysis server sends the codes of the industrial Internet labels to the management platform, so that the management platform establishes a corresponding relation between the second codes and the codes of the industrial Internet labels of the second codes and stores the corresponding relation.
Optionally, the object property includes at least one of a group consisting of a type property, a material property, a shape property, an application field property, a size property, and an identification property.
Optionally, the first tag resolution server is an enterprise node, and the second tag resolution server is a country node.
A second aspect of the present application provides an industrial internet tag encoding apparatus, comprising:
the data acquisition module is used for acquiring data of a target object corresponding to the industrial Internet label, wherein the data of the target object comprises a target object attribute and an attribute value of the target object attribute;
the pre-coding module is used for coding the target object attribute and the attribute value of the target object attribute according to a preset coding rule to generate an initial code of the data of the target object;
a first prefix adding module, configured to add a first prefix to the initial code and then generate a first code, where the first prefix includes an industry number to which the target object belongs and an enterprise number to which the target object belongs;
the second prefix adding module is used for sending the first code to a second label analysis server and receiving a second code which is sent by the second label analysis server and generated after a second prefix is added to the first code, wherein the second prefix is a country-level number to which the target object belongs;
and the encryption module is used for encrypting the initial code in the second code to obtain a target code and using the target code as the code of the industrial internet label.
Optionally, the pre-coding module determines a field position and a field bit number of the target object attribute in the preset coding rule, and searches a first relation table according to the field position, the field bit number and an attribute value of the target object attribute in the preset coding rule to determine an initial code of the data of the target object, wherein the first relation table defines a corresponding relation between different field positions and different field bit numbers of the target object attribute, and between the attribute value of the target object attribute and a preset code in the preset coding rule.
A third aspect of the present application provides an electronic device comprising a processor and a memory, the processor being configured to implement the industrial internet tag encoding method as described above when executing a computer program stored in the memory.
According to the method and the device, the target object attribute and the attribute value of the target object attribute are encoded according to a preset encoding rule to generate an initial code, a first prefix and a second prefix are added to the initial code to obtain a second code, the initial code in the second code is encrypted to obtain the code of the industrial internet label, and the problem of information leakage of the industrial internet label is solved.
Detailed Description
In order that the above objects, features and advantages of the present application can be more clearly understood, a detailed description of the present application will be given below with reference to the accompanying drawings and specific embodiments. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth to provide a thorough understanding of the present application, and the described embodiments are merely a subset of the embodiments of the present application and are 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.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the description of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.
Preferably, the industrial internet label coding method is applied to one or more electronic devices. The electronic device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The electronic device may be a desktop computer, a notebook computer, a tablet computer, a cloud server, or other computing device. The device can be in man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch pad or voice control equipment and the like.
Example 1
Referring to fig. 1, an application environment diagram of an industrial internet tag encoding method according to an embodiment of the present application is shown. The industrial internet tag encoding method is applied to the first tag resolution server 2. The first label analysis server 2 is in communication connection with the second label analysis server 3 and the management platform 4. Referring to fig. 2, a flowchart of an industrial internet tag encoding method according to an embodiment of the present application is shown. The order of the steps in the flow chart may be changed and some steps may be omitted according to different needs.
Referring to fig. 2, a flowchart of the industrial internet tag encoding method specifically includes the following steps.
Step S21, acquiring data of a target object corresponding to the industrial internet label, where the data of the target object includes a target object attribute and an attribute value of the target object attribute.
In this embodiment, the target may be an article to be processed, a component, or a finished product. In this embodiment, the target property includes, but is not limited to, a type property, a material property, a shape property, an application field property, a size property, and an identification property. In this embodiment, the target is a precision tool. The attribute values of the type attributes of the precision tool include, but are not limited to, a tool, a die, a jig, a grinder, an abrasive. The property values of the material properties of the precision tool include, but are not limited to, tool steel, cemented carbide, ceramic cutters. For example, the tool steel may be a carbon tool steel, an alloy tool steel, or a high speed tool steel. The hard alloy can be tungsten cobalt, tungsten titanium cobalt and tungsten titanium tantalum (niobium) cobalt. When the precision tool is a cutter, the attribute values of the shape attribute of the cutter include, but are not limited to, a nose cutter, a T-shaped cutter, a chamfering cutter, an outer circular cutter, an inner hole cutter, an inner grooving cutter, an outer grooving cutter, an inverse cutter, an end face cutter, an inner threading cutter, an outer threading cutter, a profiling cutter, an outer circular cutter, an inner hole cutter, a cutter, and a threading cutter. In this embodiment, the application domain attributes include, but are not limited to, automotive, electronics, and aerospace.
And step S22, encoding the target object attribute and the attribute value of the target object attribute according to a preset encoding rule to generate an initial code of the data of the target object.
It should be noted that the preset encoding rule may be a national standard, a rule of internet identification encoding specified in a specific industry standard, or a label encoding rule inside an enterprise, or a mixture of the above encoding rules.
In this embodiment, the encoding the target property and the property value of the target property according to a preset encoding rule to generate an initial encoding of the data of the target comprises: determining the field position and the field number of bits of the target object attribute in the preset code in the preset coding rule; and searching a first relation table according to the field position, the field digit and the attribute value of the target object attribute in the preset code to determine the initial code of the data of the target object, wherein the first relation table defines the corresponding relation between the target object attribute of different field positions and field digits, the attribute value of the target object attribute and the preset code in the preset coding rule. For example, the field position of the type attribute of the data of the target object is located in the first field of the preset code in the preset coding rule, the field bit number is one bit, the electronic device 1 searches the first relation table for the tool according to the field position located in the first field, the type attribute whose field bit number is one bit, and the attribute value of the type attribute, and determines that the attribute value is 1, and 1 is located in the first field of the preset code.
Step S23, adding a first prefix to the initial code to generate a first code.
In this embodiment, the first prefix includes an industry number to which the target object belongs and an enterprise number to which the target object belongs. In this embodiment, the number of digits of the industry number to which the target object belongs is three, and the number of digits of the enterprise number to which the target object belongs is six. It is to be understood that the number of digits of the industry number to which the target object belongs and the number of digits of the enterprise number to which the target object belongs may be set to other numbers of digits as necessary.
In this embodiment, the method further comprises the steps of: the first tag resolution server 2 checks the first code to verify the uniqueness of the first code, wherein if the first code is not recorded in the first tag resolution server 2, the first code is determined to have uniqueness, and if the first code is recorded in the first tag resolution server 2, the first code is determined to have no uniqueness; and if the first code has uniqueness, sending the first code to a second label analysis server 3, wherein the second label analysis server 3 adds a second prefix to the first code and then generates the second code. In this embodiment, the first label analysis server 2 is an enterprise node, and the second label analysis server 3 is a country node.
Step S24, sending the first code to a second label analysis server 3, and receiving a second code sent by the second label analysis server 3 and generated after adding a second prefix to the first code.
In this embodiment, the second tag analysis server 3 receives the first code sent by the first tag analysis server 2, adds a second prefix to the first code to generate a second code, and sends the second code to the first tag analysis server 2. In this embodiment, the second prefix is a country-level number to which the target object belongs. In this embodiment, the number of digits of the country-level number to which the target object belongs is two.
In this embodiment, the method further comprises the steps of: the first code is sent to the management platform 4 and the information registration of the first code is requested from the management platform 4. The management platform 3 verifies whether the first code is recorded in the management platform 4, and registers the first code in confirming that the first code is not recorded in the management platform 4 to complete the information registration of the first code. After the information registration of the first code is completed, the management platform 4 sends the first code to the second tag resolution server 3. The second tag resolution server 3 adds the second prefix to the first code to generate the second code, and sends the second code to the management platform 4. The management platform 4 stores the second code and sends the second code to the first tag resolution server 2. In this embodiment, the management platform 4 is an industry node.
For example, the first tag resolution server 2 sends the first code to the management platform 4 to request the information registration of the first code; the management platform 4 audits the first code to verify whether the first code is recorded in the management platform 4; when the first code is recorded in the management platform 4, registering the first code to complete information registration of the first code, and sending the first code for which information registration is completed to the second tag resolution server 3; the second label analysis server 3 adds the country-level code to the first code to generate a second code and sends the second code to the management platform 4; the management platform 4 stores the second code and sends the second code to the first tag resolution server 2.
And step S25, encrypting the initial code in the second code to obtain a target code, and setting the target code as the code of the industrial Internet label.
In this embodiment, the code of the industrial internet tag may be a radio frequency identification tag, a two-dimensional code, or a barcode.
In this embodiment, the method further includes: the first label analysis server 2 sends the codes of the industrial internet labels to the management platform 4; and the management platform 4 establishes a corresponding relation between the second code and the code of the industrial internet label of the second code, and stores the corresponding relation.
Example 2
Fig. 3 is a block diagram of an industrial internet tag encoding apparatus 30 according to an embodiment of the present invention.
In some embodiments, the industrial internet tag encoding apparatus 30 may include a plurality of functional modules composed of program code segments. The program code of each program segment in the industrial internet tag encoding apparatus 30 may be stored in a memory and executed by at least one processor to perform the functions of industrial internet tag encoding.
In this embodiment, the industrial internet tag encoding apparatus 30 may be divided into a plurality of functional modules according to the functions performed by the apparatus. Referring to fig. 3, the industrial internet tag encoding apparatus 30 may include a data obtaining module 301, a pre-encoding module 302, a first prefix adding module 303, a second prefix adding module 304, and an encrypting module 305. A module as referred to herein is a series of computer program segments capable of being executed by at least one processor and capable of performing a fixed function and is stored in a memory. In some embodiments, the functionality of the modules will be described in greater detail in subsequent embodiments.
The data acquisition module 301 acquires data of a target object corresponding to an industrial internet tag, where the data of the target object includes a target object attribute and an attribute value of the target object attribute.
In this embodiment, the target may be an article to be processed, a component, or a finished product. In this embodiment, the target property includes, but is not limited to, a type property, a material property, a shape property, an application field property, a size property, and an identification property. In this embodiment, the target is a precision tool. The attribute values of the type attributes of the precision tool include, but are not limited to, a tool, a die, a jig, a grinder, an abrasive. The property values of the material properties of the precision tool include, but are not limited to, tool steel, cemented carbide, ceramic cutters. For example, the tool steel may be a carbon tool steel, an alloy tool steel, or a high speed tool steel. The hard alloy can be tungsten cobalt, tungsten titanium cobalt and tungsten titanium tantalum (niobium) cobalt. When the precision tool is a cutter, the attribute values of the shape attribute of the cutter include, but are not limited to, a nose cutter, a T-shaped cutter, a chamfering cutter, an outer circular cutter, an inner hole cutter, an inner grooving cutter, an outer grooving cutter, an inverse cutter, an end face cutter, an inner threading cutter, an outer threading cutter, a profiling cutter, an outer circular cutter, an inner hole cutter, a cutter, and a threading cutter. In this embodiment, the application domain attributes include, but are not limited to, automotive, electronics, and aerospace.
The pre-coding module 302 codes the target property and the property value of the target property according to a preset coding rule to generate an initial code of the data of the target.
In this embodiment, the pre-coding module 302 determines a field position and a field number of bits of the target attribute in a preset code in the preset coding rule; and searching a first relation table according to the field position, the field digit and the attribute value of the target object attribute in the preset code to determine the initial code of the data of the target object, wherein the first relation table defines the corresponding relation between the target object attribute of different field positions and field digits, the attribute value of the target object attribute and the preset code in the preset coding rule. For example, the field position of the type attribute of the data of the target object is located in the first field, the field bit number is one bit, the pre-coding module 302 searches the first relation table for the tool according to the field position located in the first field, the type attribute whose field bit number is one bit, and the attribute value of the type attribute, and determines that the attribute value is 1 of the code of the type attribute of the tool, and 1 is located in the first field of the preset code.
The first prefix adding module 303 adds a first prefix to the initial code to generate a first code.
In this embodiment, the first prefix includes an industry number to which the target object belongs and an enterprise number to which the target object belongs. In this embodiment, the number of digits of the industry number to which the target object belongs is three, and the number of digits of the enterprise number to which the target object belongs is six. It is to be understood that the number of digits of the industry number to which the target object belongs and the number of digits of the enterprise number to which the target object belongs may be set to other numbers of digits as necessary.
In this embodiment, the first prefix adding module 303 checks the first code to verify the uniqueness of the first code, wherein if the first code is not recorded in the first tag resolution server 2, it is determined that the first code has uniqueness, and if the first code is recorded in the first tag resolution server 2, it is determined that the first code does not have uniqueness; if the first code has uniqueness, the first code is sent to a second tag resolution server 3, where the second tag resolution server 3 adds a second prefix to the first code to generate the second code, the second prefix adding module 304 sends the first code to the second tag resolution server 3, and receives the second code sent by the second tag resolution server 3 and generated after adding the second prefix to the first code.
In this embodiment, the second tag analysis server 3 receives the first code sent by the first tag analysis server 2, adds a second prefix to the first code to generate a second code, and sends the second code to the first tag analysis server 2.
In this embodiment, the second prefix is a country-level number to which the target object belongs. In this embodiment, the number of digits of the country-level number to which the target object belongs is two.
In this embodiment, the second prefix adding module 304 sends the first code to the management platform 4 and requests the management platform 4 to register the information of the first code. The management platform 3 verifies whether the first code is recorded in the management platform 4, and registers the first code in confirming that the first code is not recorded in the management platform 4 to complete the information registration of the first code. After the information registration of the first code is completed, the management platform 4 sends the first code to the second tag resolution server 3. The second tag resolution server 3 adds the second prefix to the first code to generate the second code, and sends the second code to the management platform 4. The management platform 4 stores the second code and sends the second code to the first tag resolution server 2. In this embodiment, the management platform 4 is an industry node.
For example, the second prefix adding module 304 sends the first code to the management platform 4 to request the information registration of the first code; the management platform 4 audits the first code to verify whether the first code is recorded in the management platform 4; when the first code is recorded in the management platform 4, registering the first code to complete information registration of the first code, and sending the first code for which information registration is completed to the second tag resolution server 3; the second label analysis server 3 adds the country-level code to the first code to generate a second code and sends the second code to the management platform 4; the management platform 4 stores the second code and sends the second code to the first tag resolution server 2.
The encryption module 305 encrypts the initial code in the second code to obtain a target code, and sets the target code as the code of the industrial internet tag.
In this embodiment, the code of the industrial internet tag may be a radio frequency identification tag, a two-dimensional code, or a barcode.
In this embodiment, the encryption module 305 further sends the code of the industrial internet tag to the management platform 4; and the management platform 4 establishes a corresponding relation between the second code and the code of the industrial internet label of the second code, and stores the corresponding relation. .
According to the method and the device, the target object attribute and the attribute value of the target object attribute are encoded according to a preset encoding rule to generate an initial code, a first prefix and a second prefix are added to the initial code to obtain a second code, the initial code in the second code is encrypted to obtain the code of the industrial internet label, and the problems that the industrial internet label is low in encoding efficiency and prone to errors and information of the industrial internet label is prone to leakage are solved.
Example 3
Fig. 4 is a schematic diagram of an electronic device 1 according to an embodiment of the present application.
The electronic device 1 comprises a memory 14, a processor 15 and a computer program 16 stored in the memory 14 and executable on the processor 15. The processor 15, when executing the computer program 16, implements the steps of the above-mentioned embodiment of the industrial internet tag encoding method, such as the steps S21-S25 shown in fig. 2. Alternatively, the processor 15, when executing the computer program 16, implements the functions of the modules/units in the above-mentioned embodiment of the industrial internet tag encoding apparatus, such as the modules 301 to 305 in fig. 3.
Illustratively, the computer program 16 may be partitioned into one or more modules/units that are stored in the memory 14 and executed by the processor 15 to accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 16 in the electronic device 1. For example, the computer program 16 may be divided into a data acquisition module 301, a pre-coding module 302, a first prefix adding module 303, a second prefix adding module 304 and an encryption module 305 in fig. 3, and the specific functions of the modules are described in embodiment 2.
It will be appreciated by a person skilled in the art that the schematic diagram is only an example of the electronic device 1 and does not constitute a limitation of the electronic device 1, and that it may comprise more or less components than shown, or some components may be combined, or different components, e.g. the electronic device 1 may further comprise an input output device, a network access device, a bus, etc.
The Processor 15 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, or the like. The general purpose processor may be a microprocessor or the processor 15 may be any conventional processor or the like, the processor 15 being the control center of the electronic device 1, and various interfaces and lines connecting the various parts of the whole electronic device 1.
The memory 14 may be used for storing the computer program 16 and/or the module/unit, and the processor 15 may implement various functions of the electronic device 1 by running or executing the computer program and/or the module/unit stored in the memory 14 and calling data stored in the memory 14. The memory 14 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the electronic apparatus 1, and the like. In addition, the memory 14 may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
The integrated modules/units of the electronic device 1 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. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the embodiments of the methods described above can be realized. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
In the several embodiments provided in the present application, it should be understood that the disclosed electronic device and method may be implemented in other ways. For example, the above-described embodiments of the electronic device are merely illustrative, and for example, the division of the modules is only one logical functional division, and there may be other divisions when the actual implementation is performed.
In addition, functional modules in the embodiments of the present application may be integrated into the same processing module, or each of the modules may exist alone physically, or two or more modules are integrated into the same module. The integrated module can be realized in a hardware form, and can also be realized in a form of hardware and a software functional module.
It will be evident to those skilled in the art that the present application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is to be understood that the word "comprising" does not exclude other modules or steps, and the singular does not exclude the plural. Several modules or electronic devices recited in the electronic device claims may also be implemented by one and the same module or electronic device by means of software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only used for illustrating the technical solutions of the present application and not for limiting, and although the present application is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions can be made on the technical solutions of the present application without departing from the spirit and scope of the technical solutions of the present application.