Disclosure of Invention
The invention aims to provide an information interaction system based on a PTL electronic tag, which improves the accuracy and efficiency of object processing and improves the efficiency and accuracy of information interaction in the object processing process.
According to a first aspect of the present invention, there is provided an information interaction system based on PTL electronic tags, including a server, at least one gateway, and at least one PTL electronic tag, where the server is communicatively connected to the gateway, the gateway is connected to at least one PTL electronic tag, all PTL electronic tags connected to each gateway are connected in parallel, each PTL electronic tag is disposed in a physical object storage area corresponding to an object id, each gateway is configured with a corresponding gateway IP, each PTL electronic tag is configured with a corresponding tag Mac address, the server stores a first mapping table and a second mapping table, the first mapping table is used to configure a mapping relationship between the object id and the tag Mac address, the second mapping table is used to configure a mapping relationship between the gateway IP and the tag Mac address, the server further includes a processor and a memory storing a computer program, the computer program serially executes the processing flow of a plurality of object lists to be processed, and the processor executes the computer program to realize the following steps:
step S1, acquiring the list information of the current object to be processed and generating a corresponding object information list, wherein the fields of the object information list comprise an id of the object to be processed, a processing quantity and a processing state, and the initial value of the processing state is 0 and indicates that the id of the object to be processed does not complete the processing;
step S2, generating a message to be processed corresponding to each gateway according to a preset data message structure based on the object id to be processed, the processing quantity, the first mapping table and the second mapping table, and sending the message to be processed to the corresponding gateway;
step S3, the gateway sends a corresponding processing instruction to the PTL electronic tag corresponding to the to-be-processed tag Mac address based on the received to-be-processed message;
step S4, the PTL electronic tag displays corresponding processing quantity based on the received processing instruction, and when the PTL electronic tag detects that a processing completion switch of the PTL electronic tag is triggered, the PTL electronic tag clears the currently displayed processing quantity, generates corresponding processing completion information and sends the corresponding processing completion information to the gateway;
step S5, the gateway generates a processing completion message corresponding to the to-be-processed label Mac address according to a preset data message structure based on the gateway ip, the to-be-processed label Mac address and the processing completion information corresponding to the to-be-processed label Mac address, and sends the processing completion message to the server;
step S6, the server changes the processing state of the to-be-processed tag Mac address corresponding to the object information list to 1 based on the processing completion packet corresponding to the to-be-processed tag Mac address, where a processing state of 1 indicates that the processing is completed;
and step S7, traversing the object information list, and if the processing states corresponding to all the objects to be processed id are all 1, taking the next object to be processed list as the current object to be processed list, and returning to the step S1.
Compared with the prior art, the invention has obvious advantages and beneficial effects. By means of the technical scheme, the information interaction system based on the PTL electronic tag can achieve considerable technical progress and practicability, has industrial wide utilization value, and at least has the following advantages:
the invention can intelligently process part of processes in the object processing process of the enterprise production process, and improves the accuracy and efficiency of object processing and the efficiency and accuracy of information interaction in the object processing process.
The foregoing description is only an overview of the technical solutions of the present invention, and in order to make the technical means of the present invention more clearly understood, the present invention may be implemented in accordance with the content of the description, and in order to make the above and other objects, features, and advantages of the present invention more clearly understood, the following preferred embodiments are described in detail with reference to the accompanying drawings.
Detailed Description
To further illustrate the technical means and effects of the present invention adopted to achieve the predetermined objects, the following detailed description will be given to a specific implementation and effects of an information interaction system based on a PTL electronic tag according to the present invention with reference to the accompanying drawings and preferred embodiments.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently or simultaneously. In addition, the order of the steps may be rearranged. A process may be terminated when its operations are completed, but may have additional steps not included in the figure. A process may correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.
The embodiment of the invention provides an information interaction system based on a PTL (pick-to-light) electronic tag, as shown in fig. 1, comprises a server, at least one gateway, at least one PTL electronic tag, the server is in communication connection with the gateways, the gateways are at least connected with one PTL electronic tag, all the PTL electronic tags connected with each gateway are connected in parallel, each PTL electronic tag is arranged in a physical object storage area corresponding to one object id, each gateway is configured with a corresponding gateway IP, each PTL electronic tag is configured with a corresponding tag Mac address, the server stores a first mapping table and a second mapping table, the first mapping table is used for configuring the mapping relation between the object id and the label Mac address, and the second mapping table is used for configuring the mapping relation between the gateway IP and the label Mac address. As an embodiment, the server and the gateway perform information interaction by using an ethernet protocol, and the gateway and the PTL electronic tag perform information interaction by using a 485 industrial bus protocol. The tag Mac address device may be configured as 8-bit 16-ary data.
The server also comprises a processor and a memory for storing a computer program, wherein the computer program serially executes the processing flow of the plurality of object lists to be processed, and the processor executes the computer program to realize the following steps:
step S1, acquiring the list information of the current object to be processed and generating a corresponding object information list, wherein the fields of the object information list comprise an id of the object to be processed, a processing quantity and a processing state, and the initial value of the processing state is 0 and indicates that the id of the object to be processed does not complete the processing;
step S2, generating a message to be processed corresponding to each gateway according to a preset data message structure based on the object id to be processed, the processing quantity, the first mapping table and the second mapping table, and sending the message to be processed to the corresponding gateway;
step S3, the gateway sends a corresponding processing instruction to the PTL electronic tag corresponding to the to-be-processed tag Mac address based on the received to-be-processed message;
step S4, the PTL electronic tag displays corresponding processing quantity based on the received processing instruction, and when the PTL electronic tag detects that a processing completion switch of the PTL electronic tag is triggered, the PTL electronic tag clears the currently displayed processing quantity, generates corresponding processing completion information and sends the corresponding processing completion information to the gateway;
step S5, the gateway generates a processing completion message corresponding to the to-be-processed label Mac address according to a preset data message structure based on the gateway ip, the to-be-processed label Mac address and the processing completion information corresponding to the to-be-processed label Mac address, and sends the processing completion message to the server;
step S6, the server changes the processing state of the to-be-processed tag Mac address corresponding to the object information list to 1 based on the processing completion packet corresponding to the to-be-processed tag Mac address, where a processing state of 1 indicates that the processing is completed;
and step S7, traversing the object information list, and if the processing states corresponding to all the objects to be processed id are all 1, taking the next object to be processed list as the current object to be processed list, and returning to the step S1.
The preset data message structure comprises a gateway IP message section, a label Mac address message section and a target information message section, wherein the gateway IP message section corresponds to one gateway IP, the label Mac address message section corresponds to one or more label Mac addresses, the target information comprises target information in one-to-one correspondence with the label Mac addresses in the label Mac address message section, the target information is specifically set based on different message information, the target information corresponding to the message to be processed comprises processing quantity, and the target information of the processed message comprises processing completion information. By setting the data message structure between the server and the gateway, the server and the gateway can carry out information interaction through the set data message structure, and the information interaction efficiency is improved.
According to the embodiment of the present invention, the server may be physically implemented as one server, or may be implemented as a server group including a plurality of servers. The PTL electronic tag can be physically realized as a PTL electronic tag with the model number of PTL-PL-621, and the gateway can be physically realized as a gateway with the model numbers of PTL-GW-M00 and PTL-GW-EN01, and the technical personnel in the field know that parameters such as the model number, the specification and the like of the server, the PTL electronic tag and the gateway do not influence the protection scope of the invention.
According to the embodiment of the invention, part of processes in the object processing process in the enterprise production process can be processed intelligently, so that the accuracy and efficiency of object processing and the efficiency and accuracy of information interaction in the object processing process are improved.
Taking a sorting scene as an example, each object specifically corresponds to one material, each material has a corresponding physical object storage area, the object id corresponds to a material id, the list of the objects to be processed corresponds to the list of the materials to be sorted, and the processing quantity corresponds to the quantity of the materials to be taken. Correspondingly, in step S4, the PTL tag may be provided with a display area and a process completion button, the display area is used to display the corresponding process quantity, and still take the picking scene as an example, the PTL tag displays the corresponding quantity of the materials to be picked based on the received process instruction, the picking staff takes the corresponding quantity of the materials according to the quantity displayed by the PTL tag, and after the materials are taken, the picking staff presses the process completion button, which indicates that the picking of the materials is completed, and may also clear the currently displayed content for the next round of use. The material quantity is displayed through the PTL electronic tag, and the accuracy and the efficiency of object processing can be improved.
As an embodiment, in order to improve the efficiency of object processing, before executing the processing flow of the list of objects to be processed, all gateways and PTL tags may be detected to ensure that the gateways and all PTL tags can normally communicate, specifically, before step S1, the method further includes:
step S100, the server generates a detection message corresponding to each gateway IP based on the second mapping table according to a preset message data format, and sends the detection message to the corresponding gateway, wherein the target information of the detection message comprises detection information;
step S200, the gateway analyzes the detection message and sends a detection instruction to each PTL electronic tag connected with the gateway, if the detection passing information fed back by all the PTL electronic tags connected with the gateway is received, the gateway generates a detection response message according to a preset message data format and sends the detection response message to the server, and step S1 is executed, wherein the target information of the detection response message comprises the detection passing information.
It can be understood that if the error information or the fault information corresponding to the PTL electronic tag is received, the corresponding gateway reports the corresponding fault message to the server, at this time, the processing flow of the list of the object to be processed cannot be executed first, but the tag Mac address where the error or the fault occurs needs to be analyzed based on the fault message, the error or the fault is overcome, the detection is performed again, and when the detection passes, the processing flow of the list of the object to be processed is executed again. In order to avoid error information or fault information corresponding to the PTL electronic tag caused by factors such as signals, when the error information or fault information passes the detection again, the steps S100 to S200 may be executed again for a preset number of times, the preset number may be set to 1 or 2, and the like, if the detection passes, the processing flow of the list of the objects to be processed may be executed, otherwise, the processing flow of the list of the objects to be processed may be executed after the corresponding error or fault is overcome.
As an example, the system further comprises a barcode scanner connected to the server, and the step S1 comprises:
step S11, acquiring pre-generated two-dimensional code information of a current object list to be processed through the code scanner;
step S12, analyzing the two-dimension code information of the current object list to be processed, and acquiring the information of the current object list to be processed, including the id of the object to be processed and the corresponding processing quantity.
Through generating the two-dimensional code information of the list of the objects to be processed and directly scanning to obtain the information of the list of the objects to be processed, the whole process can be interacted only through electronic information, a paper bill of materials is not needed, and the material sorting accuracy and efficiency can be improved.
As an embodiment, the step S2 may specifically include:
step S21, acquiring a label Mac address corresponding to each object id to be processed based on the object id to be processed and the first mapping table, and taking the label Mac address as the label Mac address to be processed;
step S22, acquiring a gateway IP corresponding to each label Mac address to be processed based on each label Mac address to be processed and the second mapping table;
and step S23, generating a message to be processed corresponding to each gateway IP according to the preset data message structure according to all the object id to be processed, the label Mac address to be processed, the gateway IP corresponding to the label Mac address to be processed and the processing quantity, and sending the message to be processed to the corresponding gateway.
As an embodiment, the step S3 may specifically include:
step S31, the gateway analyzes the corresponding to-be-processed label Mac address and the processing number corresponding to the to-be-processed label Mac address from the received to-be-processed message;
and step S32, generating corresponding processing instructions based on each to-be-processed label Mac address and the processing quantity corresponding to the to-be-processed label Mac address, and sending the corresponding processing instructions to the corresponding PTL electronic label.
It can be understood that, in the process flow of executing the list of objects to be processed, a partial fault of the PTL electronic tag may occur, and therefore, a corresponding warning mechanism may be set to perform warning, specifically, as an embodiment, the step S4 may further include:
step S41, if the PTL electronic tag corresponding to the to-be-processed tag Mac address exceeds a preset time threshold value and the processing completion switch trigger of the PTL electronic tag is not detected, sending early warning information to the corresponding gateway;
wherein, PTL electronic tags surpasss that preset time threshold specifically can get material time and corresponding material quantity and set for according to PTL electronic tags history.
Step S42, the gateway generates an early warning message based on the gateway ip, the to-be-processed label Mac address and the early warning information corresponding to the to-be-processed label Mac address, and sends the early warning message to the server;
and step S43, the server analyzes the pre-warning message and generates corresponding pre-warning information.
It can be understood that the early warning information may specifically be sent to the corresponding PTL electronic tag through the gateway so that the corresponding PTL electronic tag sends an alarm, or a display screen may be provided, which is connected to the server, and the early warning information is presented on the display screen, and so on.
In addition to the above-mentioned early warning mechanism, the system may further be provided with another warning mechanism, as an embodiment, in a case where the PTL electronic tag is in a standby state, that is, when the processing flow of the list of the objects to be processed is not executed, if it is detected that the processing of the PTL electronic tag is completed and the switch trigger is detected, it is indicated that there is a false trigger, and a warning operation may be executed. As another embodiment, the gateway may detect whether the connected PTL electronic tag can normally communicate in real time, if it is detected that the PTL electronic tag cannot normally communicate, the PTL electronic tag is currently in an offline state, the gateway sends an offline alarm message corresponding to the offline PTL electronic tag to a server, and if it is detected that the PTL electronic tag can normally communicate, the gateway sends a warning release message corresponding to the PTL electronic tag to the server.
As an embodiment, the system can also dynamically adjust the corresponding relationship between the tag Mac address and the object id according to the historical processing number and the corresponding processing time of each tag Mac address, and then adjust the physical object storage area based on the corresponding relationship, so that the physical object storage distribution is more reasonable, and the object processing efficiency is further improved. Specifically, the method further comprises:
step S8, in the processing flow of each object list to be processed, the server generates processing time corresponding to each label Mac address to be processed based on the time difference between the time for sending the message to be processed and the time for receiving the processing completion message corresponding to the label Mac address to be processed, and dynamically generates a processing time distribution list corresponding to the label Mac address to be processed based on the processing time and the processing number corresponding to the label Mac address to be processed;
step S9, adjusting the first mapping table based on the processing time distribution list corresponding to the current processing tag Mac address every preset time or preset number of times of executing the processing flow of the list of the objects to be processed, and simultaneously adjusting the physical object storage area correspondingly.
Although the present invention has been described with reference to a preferred embodiment, it should be understood that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the invention as defined by the appended claims.