Tag identification method, device, terminal device and storage medium

The tag recognition threshold is obtained through the tag recognition learning process, and the tag recognition is automatically performed, solving the problem of inefficiency caused by manual adjustment of the recognition threshold, and achieving fast and accurate tag recognition.

CN117252224BActive Publication Date: 2025-03-25SHENZHEN GUMEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311509931.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-14
Publication Date
2025-03-25
Estimated Expiration
2043-11-14

AI Technical Summary

Technical Problem

Existing tag recognition technology requires manual adjustment of the identification threshold, resulting in low label recognition efficiency and is not suitable for scenarios with rapid detection.

Method used

The tag recognition threshold is obtained through the preset tag recognition learning process, and tag recognition is automatically performed to reduce manual intervention.

Benefits of technology

It realizes automatic label recognition, improves the efficiency of label recognition, and is suitable for various label recognition scenarios that require rapid detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117252224B_ABST
    Figure CN117252224B_ABST
Patent Text Reader

Abstract

The present invention discloses a tag identification method, device, terminal equipment and storage medium, and belongs to the technical field of automation equipment. The method includes: obtaining a tag identification threshold, wherein the tag identification threshold is obtained by tag identification learning based on a preset tag identification learning process; performing tag identification according to the tag identification threshold, and obtaining a tag identification result. The present invention performs tag identification according to the tag identification threshold obtained by tag identification learning through the tag identification learning process, obtains a tag identification result, realizes automatic tag identification, solves the problem of low tag identification efficiency caused by manual adjustment of the identification threshold, improves the efficiency of tag identification, and is suitable for various tag identification scenarios that require rapid detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automation equipment, and in particular to a tag identification method, device, terminal equipment and storage medium. Background Art

[0002] Label sensors are sensors used to identify equipment labels in automation equipment. The label recognition application scenarios of industrial label sensors vary greatly and are complex. There are also various types of labels with different thicknesses, sizes, and colors.

[0003] However, the current application scenarios of tag recognition vary greatly, and the accuracy threshold of tag recognition needs to be manually adjusted, resulting in low efficiency of tag recognition. It is not suitable for tag recognition scenarios that require rapid detection.

[0004] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention

[0005] The main purpose of the present application is to provide a tag recognition method, apparatus, terminal device and storage medium, aiming to solve the problem of low tag recognition efficiency caused by manual adjustment of recognition threshold.

[0006] To achieve the above object, the present application provides a tag recognition method, which includes:

[0007] Obtaining a tag recognition threshold, where the tag recognition threshold is obtained by performing tag recognition learning based on a preset tag recognition learning process;

[0008] Tag recognition is performed according to the tag recognition threshold to obtain a tag recognition result.

[0009] Optionally, the tag sensor includes a first button, and the step of obtaining the tag recognition threshold includes:

[0010] When it is detected that the first button is continuously pressed for a preset time and the system state is in a working state, setting the system state to a learning state;

[0011] Label recognition learning is performed based on a preset label recognition learning process to obtain a label recognition threshold.

[0012] Optionally, the step of performing tag recognition learning based on a preset tag recognition learning process to obtain a tag recognition threshold comprises:

[0013] Detecting a preset non-label bottom plate through a preset photosensitive element to obtain a non-label threshold;

[0014] Detecting a preset label paper through the photosensitive element to obtain a label threshold;

[0015] A tag recognition threshold is obtained according to the non-tag threshold and the tag threshold.

[0016] Optionally, the step of detecting a preset non-label bottom plate by a preset photosensitive element to obtain a non-label threshold value includes:

[0017] Emits a first detection light source toward the non-label bottom plate;

[0018] The reflected light source of the first detection light source is collected by the photosensitive element to obtain non-label light source intensity information;

[0019] A mean value is calculated according to the non-label light source intensity information to obtain a non-label threshold.

[0020] Optionally, the step of detecting a preset label paper by the photosensitive element to obtain a label threshold comprises:

[0021] When it is detected that the first button is pressed, the system state is set to a working state and a second detection light source is emitted to the label paper;

[0022] The reflected light source of the second detection light source is collected by the photosensitive element to obtain the label light source intensity information;

[0023] When it is detected that the first button is released, a mean value is calculated according to the tag light source intensity information to obtain a tag threshold.

[0024] Optionally, the step of performing tag recognition learning based on a preset tag recognition learning process to obtain a tag recognition threshold further includes:

[0025] When it is detected that the second button is continuously pressed for a preset time and the system state is in a working state, the system output state is switched and saved in an internal memory, wherein the system output state is switched between a normally open state and a normally closed state.

[0026] Optionally, after the step of performing tag identification according to the tag identification threshold and obtaining a tag identification result, the step further includes:

[0027] Reading the system output state in the internal memory and performing a logic operation according to the system output state and the tag identification result to obtain a logic operation result;

[0028] According to the result of the logic operation, an electrical signal is generated and sent to the synchronization indicator light for tag recognition prompt.

[0029] The present application also provides a tag identification device, the tag identification device comprising:

[0030] An identification learning module, used to obtain a tag identification threshold, wherein the tag identification threshold is obtained by performing tag identification learning based on a preset tag identification learning process;

[0031] The tag identification module is used to perform tag identification according to the tag identification threshold and obtain a tag identification result.

[0032] An embodiment of the present application also proposes a terminal device, which includes a memory, a processor, and a tag identification program stored in the memory and executable on the processor, and the tag identification program implements the steps of the tag identification method described above when executed by the processor.

[0033] The embodiment of the present application further provides a computer-readable storage medium, on which a tag identification program is stored. When the tag identification program is executed by a processor, the steps of the tag identification method described above are implemented.

[0034] The tag recognition method, apparatus, terminal device, and storage medium proposed in the embodiments of the present application obtain a tag recognition threshold value, which is obtained by learning tag recognition based on a preset tag recognition learning process; tag recognition is performed according to the tag recognition threshold value to obtain a tag recognition result. The present invention performs tag recognition according to the tag recognition threshold value obtained by learning tag recognition based on the tag recognition learning process to obtain a tag recognition result, realizes automatic tag recognition, solves the problem of low tag recognition efficiency caused by manual adjustment of the recognition threshold value, improves the efficiency of tag recognition, and is suitable for various tag recognition scenarios that require rapid detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 It is a schematic diagram of the functional modules of the terminal device to which the label identification device of the present application belongs;

[0036] Figure 2 This is a flow chart of a first exemplary embodiment of a tag identification method of the present application;

[0037] Figure 3 This is a flow chart of a second exemplary embodiment of the tag identification method of the present application;

[0038] Figure 4 A flowchart of label recognition learning for the label recognition method of this application;

[0039] Figure 5 A schematic diagram of the process of fine-tuning the tag recognition threshold by pressing a button in the tag recognition method of this application;

[0040] Figure 6 This is a flow chart of a third exemplary embodiment of the tag identification method of the present application;

[0041] Figure 7 This is a flow chart of the label recognition method system of the present application outputting synchronous indicator lights for label recognition results.

[0042] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0043] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0044] The main solution of the embodiment of the present application is: obtaining a tag recognition threshold, which is obtained by learning tag recognition based on a preset tag recognition learning process; performing tag recognition according to the tag recognition threshold to obtain a tag recognition result. The present invention performs tag recognition according to the tag recognition threshold obtained by learning tag recognition based on the tag recognition learning process to obtain a tag recognition result, realizes automatic tag recognition, solves the problem of low tag recognition efficiency caused by manual adjustment of the recognition threshold, improves the efficiency of tag recognition, and is suitable for various tag recognition scenarios that require rapid detection.

[0045] The embodiments of this application take into account that the application scenarios of the tag sensors of the related technical solutions vary greatly and are complex. The sensor needs to identify tags of different thicknesses and transmittances, and must detect quickly, with a maximum recognition frequency of 2500 per minute. At the same time, the sensor must be stable and reliable in detection, and parameters can be adjusted to adapt to different scenarios. It is especially important that the tag sensor must also be cheap to be competitive and have market application value.

[0046] Based on this, the embodiment of the present application proposes a solution, a technical invention implemented by key operation, using two keys to realize the thickness identification of the label sensor, the type switching of the switch output, the fine adjustment increase and decrease operation of the label thickness value and the identification of the matching indicator light display. It adopts a simple and easy-to-use key operation, which can easily identify the label thickness and set the parameters.

[0047] Thickness recognition can be achieved through two buttons, which can quickly and accurately identify labels of different thicknesses. The switch output type is switched, and parameters can be adjusted according to different needs to adapt to the needs of different scenarios, further improving the stability and reliability of the label sensor. At the same time, the indicator light displays the recognition results, allowing users to intuitively understand the working status and recognition results of the sensor.

[0048] Specifically, refer to Figure 1 , Figure 1This is a functional module diagram of the terminal device to which the tag identification device of this application belongs. The tag identification device can be a device that is independent of the terminal device and can perform tag identification, and it can be carried on the terminal device in the form of hardware or software. The terminal device can be a smart mobile device with tag identification function such as a mobile phone or a tablet computer, or a fixed terminal device or server with tag identification function.

[0049] In this embodiment, the terminal device to which the tag identification apparatus belongs includes at least an output module 110 , a processor 120 , a memory 130 and a communication module 140 .

[0050] The memory 130 stores an operating system and a tag recognition program, and the tag recognition device can store the received and processed data information in the memory 130; the output module 110 can be a display screen, a speaker, etc. The communication module 140 can include a WIFI module, a mobile communication module, a Bluetooth module, etc., and communicates with an external device or a server through the communication module 140.

[0051] When the tag recognition program in the memory 130 is executed by the processor, the following steps are implemented:

[0052] Obtaining a tag recognition threshold, where the tag recognition threshold is obtained by performing tag recognition learning based on a preset tag recognition learning process;

[0053] Tag recognition is performed according to the tag recognition threshold to obtain a tag recognition result.

[0054] Furthermore, when the tag recognition program in the memory 130 is executed by the processor, the following steps are also implemented:

[0055] When it is detected that the first button is continuously pressed for a preset time and the system state is in a working state, setting the system state to a learning state;

[0056] Label recognition learning is performed based on a preset label recognition learning process to obtain a label recognition threshold.

[0057] Furthermore, when the tag recognition program in the memory 130 is executed by the processor, the following steps are also implemented:

[0058] Detecting a preset non-label bottom plate through a preset photosensitive element to obtain a non-label threshold;

[0059] Detecting a preset label paper through the photosensitive element to obtain a label threshold;

[0060] A tag recognition threshold is obtained according to the non-tag threshold and the tag threshold.

[0061] Furthermore, when the tag recognition program in the memory 130 is executed by the processor, the following steps are also implemented:

[0062] Emits a first detection light source toward the non-label bottom plate;

[0063] The reflected light source of the first detection light source is collected by the photosensitive element to obtain non-label light source intensity information;

[0064] A mean value is calculated according to the non-label light source intensity information to obtain a non-label threshold.

[0065] Furthermore, when the tag recognition program in the memory 130 is executed by the processor, the following steps are also implemented:

[0066] When it is detected that the first button is pressed, the system state is set to a working state and a second detection light source is emitted to the label paper;

[0067] The reflected light source of the second detection light source is collected by the photosensitive element to obtain the label light source intensity information;

[0068] When it is detected that the first button is released, average calculation is performed according to the tag light source intensity information to obtain a tag threshold.

[0069] Furthermore, when the tag recognition program in the memory 130 is executed by the processor, the following steps are also implemented:

[0070] When it is detected that the second button is continuously pressed for a preset time and the system state is in a working state, the system output state is switched and saved in an internal memory, wherein the system output state is switched between a normally open state and a normally closed state.

[0071] Furthermore, when the tag recognition program in the memory 130 is executed by the processor, the following steps are also implemented:

[0072] Reading the system output state in the internal memory and performing a logic operation according to the system output state and the tag identification result to obtain a logic operation result;

[0073] According to the result of the logic operation, an electrical signal is generated and sent to the synchronization indicator light for tag recognition prompt.

[0074] This embodiment uses the above scheme to specifically obtain a tag recognition threshold, which is obtained by learning tag recognition based on a preset tag recognition learning process; tag recognition is performed according to the tag recognition threshold to obtain a tag recognition result. The present invention performs tag recognition according to the tag recognition threshold obtained by learning tag recognition through the tag recognition learning process to obtain a tag recognition result, thereby realizing automatic tag recognition, solving the problem of low tag recognition efficiency caused by manually adjusting the recognition threshold, improving the efficiency of tag recognition, and being suitable for various tag recognition scenarios requiring rapid detection.

[0075] Based on the above terminal device architecture but not limited to the above architecture, an embodiment of the method of the present application is proposed.

[0076] Reference Figure 2 , Figure 2 This is a flow chart of the first exemplary embodiment of the tag identification method of the present application. The tag identification method comprises:

[0077] Step S10: obtaining a tag recognition threshold, wherein the tag recognition threshold is obtained by performing tag recognition learning based on a preset tag recognition learning process;

[0078] The execution subject of the method of this embodiment can be a tag identification device, or a tag identification terminal device or server. This embodiment takes a tag identification device as an example, and the tag identification device can be integrated in a terminal device with data processing function.

[0079] A tag recognition threshold value is obtained by learning tag recognition through a preset tag recognition learning process, wherein the tag recognition learning process may include: data collection, data preprocessing, feature extraction, threshold calculation and other processes, and finally a threshold value for tag recognition is obtained.

[0080] Step S20: performing tag recognition according to the tag recognition threshold to obtain a tag recognition result.

[0081] The tag recognition threshold obtained by tag recognition learning is used to perform tag recognition and obtain tag recognition results. Specifically, tag recognition can be performed by comparing the tag features with the preset threshold to determine whether the tag is correctly recognized. If the tag feature value exceeds or meets the preset threshold, it can be determined that the tag exists or meets certain conditions, thereby obtaining the tag recognition result.

[0082] Specifically, the label recognition learning process may include the following steps:

[0083] 1. Data acquisition: Use photosensitive elements (such as photodiodes or photoresistors) to collect light intensity data in the environment, and the light intensity can be converted into voltage or current signals through conversion circuits.

[0084] 2. Data preprocessing: Preprocess the collected light source intensity data. The specific preprocessing may include denoising, filtering, and data calibration to ensure the accuracy and reliability of the data.

[0085] 3. Feature extraction: Extract features from preprocessed data. In the application of photoelectric tag sensors, you may pay attention to the changing pattern of light intensity, frequency distribution and other characteristics. You can use various signal processing and feature extraction methods, such as Fourier transform, wavelet transform, statistical analysis, etc.

[0086] 4. Threshold calculation: Using the extracted feature data and data processing algorithm, the threshold for tag recognition is calculated based on different light intensity characteristics.

[0087] Specifically, the specific implementation method of using the tag recognition threshold learned above to perform tag recognition may include the following steps:

[0088] 1. Data preparation: Obtain the label data to be identified. The label data can be an image, light source intensity data, an electrical signal containing label information, or other forms of input;

[0089] 2. Feature extraction: Similar to the learning stage, it is necessary to extract features from the label data to be identified and convert it into a numerical representation that the system can process for the next step of identification;

[0090] 3. Tag identification: By comparing the features of the tag to be identified with the preset tag identification threshold, it is determined whether the tag is correctly identified. If the feature value of the tag exceeds or meets the preset threshold, it can be determined that the tag exists or meets certain conditions;

[0091] 4. Result output: Finally, the result of tag recognition is output, which can be a Boolean value (presence / non-presence), a confidence score or other information describing the tag attributes. The final result of tag recognition can be used to display through a specific display screen or indicator light.

[0092] This embodiment uses the above scheme to specifically obtain a tag recognition threshold, which is obtained by learning tag recognition based on a preset tag recognition learning process; tag recognition is performed according to the tag recognition threshold to obtain a tag recognition result. The present invention performs tag recognition according to the tag recognition threshold obtained by learning tag recognition through the tag recognition learning process to obtain a tag recognition result, thereby realizing automatic tag recognition, solving the problem of low tag recognition efficiency caused by manually adjusting the recognition threshold, improving the efficiency of tag recognition, and being suitable for various tag recognition scenarios requiring rapid detection.

[0093] Reference Figure 3 , Figure 3 Schematic diagram of a flow chart of a second exemplary embodiment of a tag identification method according to the present invention.

[0094] Based on the first embodiment, a second embodiment of the present application is proposed. The difference between the second embodiment of the present application and the first embodiment is that:

[0095] In this embodiment, the tag sensor includes a first button, and the step of obtaining the tag recognition threshold includes:

[0096] Step S101: when it is detected that the first button is continuously pressed for a preset time and the system state is in a working state, the system state is set to a learning state;

[0097] Step S102: performing tag recognition learning based on a preset tag recognition learning process to obtain a tag recognition threshold.

[0098] Specifically, in order to switch the system state under specific conditions and perform operations under different system states, first, the system will detect the state of the first button. If it is detected that the first button is pressed continuously, it means that the user intends to switch the system state. The system needs to be in a working state to respond to the user's switching request and set the system state to a learning state to prepare for label recognition learning.

[0099] Finally, when the system is in the learning state, the tag recognition learning process is executed and the tag recognition threshold is obtained. Among them, the system needs to determine whether the current state is a learning state. The learning process can only be executed in the learning state. Once the system is confirmed to be in the learning state, the system can complete the learning process according to the preset tag recognition learning process. The learning process may include steps such as data collection, data preprocessing, feature extraction, and threshold calculation. Finally, a tag recognition threshold is obtained for subsequent tag recognition work, thereby ensuring that the system learns at the appropriate time and performs tag recognition in the working state.

[0100] Further, as an implementation mode, the step of performing tag recognition learning based on a preset tag recognition learning process to obtain a tag recognition threshold comprises:

[0101] Step S103: Detecting a preset non-label bottom plate through a preset photosensitive element to obtain a non-label threshold;

[0102] Step S104: detecting a preset label paper through the photosensitive element to obtain a label threshold;

[0103] Step S105: Acquire a tag recognition threshold according to the non-tag threshold and the tag threshold.

[0104] Specifically, first, a preset photosensitive element is used to detect the non-label bottom plate to obtain a non-label threshold value. By analyzing the output signal of the photosensitive element, the system can obtain a non-label threshold value related to the non-label bottom plate, which can help the system distinguish the non-label bottom plate in the subsequent label recognition process.

[0105] Then, the label paper is detected by using a photosensitive element to obtain a label threshold. By analyzing the output signal of the photosensitive element, the system can obtain a label threshold related to the label paper, which can help the system distinguish the label paper in the subsequent label recognition process.

[0106] Finally, a label recognition threshold is calculated using the non-label threshold and label threshold detected in step S103 and step S104. The label recognition threshold will be used in the subsequent label recognition process to help the system accurately identify labels and non-labels, that is, it can identify non-label base plates and label paper.

[0107] Further, as an implementation manner, the step of detecting a preset non-label bottom plate by a preset photosensitive element to obtain a non-label threshold value includes:

[0108] Step S1031: emitting a first detection light source to the non-label bottom plate;

[0109] Step S1032: collecting the reflected light source of the first detection light source through the photosensitive element to obtain non-label light source intensity information;

[0110] Step S1033: performing mean calculation according to the non-label light source intensity information to obtain a non-label threshold.

[0111] Specifically, first, a specific first detection light source is emitted to the non-label bottom plate, so that it can be detected and collected by the photosensitive element later.

[0112] Then, the reflected light of the first detection light source is collected by using a preset photosensitive element to obtain the intensity information of the non-label light source. The photosensitive element can convert the collected light signal into an electrical signal and output it to the system. By analyzing the output signal of the photosensitive element, the system can obtain the intensity information related to the non-label light source.

[0113] Finally, the mean is calculated based on the collected non-label light source intensity information. Through the calculated mean, the system can obtain a threshold corresponding to the average level of non-label light source intensity, which can be used as a reference in the subsequent label recognition process to help the system distinguish the non-label part.

[0114] Further, as an implementation manner, the step of detecting a preset label paper by the photosensitive element to obtain a label threshold comprises:

[0115] Step S1041: when it is detected that the first button is pressed, the system state is set to a working state and a second detection light source is emitted to the label paper;

[0116] Step S1042: collecting the reflected light source of the second detection light source through the photosensitive element to obtain the label light source intensity information;

[0117] Step S1043: when it is detected that the first button is released, average calculation is performed according to the tag light source intensity information to obtain a tag threshold.

[0118] Specifically, first, the system detects whether the first button is pressed. If it is detected that the first button is pressed, the system state is set to the working state, and a specific second detection light source is emitted to the label paper so that it can be subsequently detected and collected by the photosensitive element.

[0119] Then, the reflected light of the second detection light source is collected by the photosensitive element to obtain the label light source intensity information. The photosensitive element can convert the collected light signal into an electrical signal to obtain the label light source intensity information and output it to the system. By analyzing the label light source intensity information output by the photosensitive element, the system can obtain the intensity information related to the label light source.

[0120] Finally, detect whether the first button is released. If it is detected that the first button is released, the system will calculate the mean based on the collected label light source intensity information. Through the calculated mean, the system can obtain a threshold value corresponding to the average level of the label light source intensity, which can be used as reference data for subsequent label recognition to help the system determine whether it is label paper.

[0121] More specifically, the system sets internal flags to implement functions, including:

[0122] 1. Key + sign (first key): key “+” sign, 0—released, 1—pressed;

[0123] 2. Key-mark (second key): key “-” mark, 0—release, 1—press;

[0124] 3. System output L / D status: switch the status flag between normally open and normally closed, 0-PNP, 1-NPN

[0125] 4. Recognition output: The output status of the detected tag value, 1-represents the detection of the tag, 0-represents the non-tag;

[0126] 5. System status: 1 - indicates learning status, PB2 outputs 1, and the red light flashes; 0 - indicates working status, PB2 outputs 0, and the red light is on;

[0127] 6. Output status: The identification result is synchronized with the indicator light PA5 output (green light on / off).

[0128] More specifically, if Figure 4 As shown, Figure 4 The present invention is a flowchart of label recognition learning for a label recognition method, wherein the key operation and software technology implementation of the system include:

[0129] 1. Technical implementation of system default configuration:

[0130] When the system is powered on, the default system state = 0, that is, when the system starts, the default system state is the working state, and the PB2 output red light is on.

[0131] 2. Press the first button ("+" button) and the second button ("-" button) to learn the technical implementation of the label value threshold:

[0132] 1. Move the sensor to the non-tag bottom plate, press and hold the "+" key for more than 3 seconds, the system status is set to 1, indicating that the system enters the learning state, and the PB2 output red light flashes; release the "+" key, the system learns the non-tag threshold, the system is still in the learning state, and the PB2 output red light flashes.

[0133] 2. Move the sensor to the label paper, press the "+" key, the system status is set to 0, indicating that the system enters the working state, and the PB2 output red light is on; release the "+" key, and the system learns the label threshold.

[0134] 3. Finally, the tag recognition threshold is obtained, and the new tag recognition threshold is automatically adjusted internally and saved to a storage area that will not be lost when power is off.

[0135] 3. Press the "+" and "-" keys to fine-tune the tag recognition threshold:

[0136] like Figure 5 As shown, Figure 5 This is a flowchart of the tag recognition method for fine-tuning the tag recognition threshold by pressing buttons. When the system is in working state, the PB2 output red light is on, and the tag recognition threshold is adjusted by pressing the button. Press the "+" key once, the threshold is +1; press the "-" key once, the threshold is -1.

[0137] This embodiment adopts the above scheme, specifically, when it is detected that the first button is continuously pressed for a preset time and the system state is in a working state, the system state is set to a learning state; label recognition learning is performed based on a preset label recognition learning process to obtain a label recognition threshold. Label recognition learning through the label recognition learning process can reduce manual adjustment of the label recognition threshold by humans, and can be flexibly adjusted according to needs after learning the label recognition threshold, which can avoid errors and instability that may occur when manually adjusting the label recognition threshold, improve the accuracy and reliability of label recognition, and can also reduce the time and energy cost of manual label recognition, and improve production efficiency and product quality.

[0138] Reference Figure 6 , Figure 6 4 is a flow chart of a third exemplary embodiment of a tag identification method according to the present invention.

[0139] Based on the second embodiment, a third embodiment of the present application is proposed. The difference between the third embodiment of the present application and the second embodiment is that:

[0140] In this embodiment, the tag sensor includes a second button, and the tag recognition learning is performed based on a preset tag recognition learning process, and after the step of obtaining the tag recognition threshold, the step further includes:

[0141] Step S106: When it is detected that the second button is continuously pressed for a preset time and the system state is in a working state, the system output state is switched and saved in an internal memory, wherein the system output state is switched between a normally open state and a normally closed state.

[0142] Specifically, when the user long presses the second button, it can be considered that the user needs to switch the output state of the tag sensor, and the system will perform corresponding operations according to the current system state (i.e., whether it is in a working state):

[0143] 1. If the system is in standby mode, then switching the state of the tag sensor may not make sense, because the tag sensor will not perform any detection in this state. Therefore, in this case, the system will not make any response and directly ignore the user's operation.

[0144] 2. If the system is in working state, then it is meaningful to switch the output state of the tag sensor. For example, if the tag sensor is originally in the normally open state, then after switching to the normally closed state, it will output a signal only when a tag is detected; conversely, if it is originally in the normally closed state, after switching to the normally open state, it will continue to output a signal until a tag is detected.

[0145] In order to ensure that the system can be restored to the previous state and continue to work when it is started next time, in addition to switching the output state of the tag sensor, the current state needs to be saved in the internal memory.

[0146] Further, as an implementation manner, after the step of performing tag identification according to the tag identification threshold and obtaining the tag identification result, the step further includes:

[0147] Step S201: reading the system output state in the internal memory and performing a logic operation according to the system output state and the tag recognition result to obtain a logic operation result;

[0148] Step S202: Generate an electrical signal according to the result of the logic operation and send it to the synchronization indicator light for tag recognition prompt.

[0149] Specifically, first, the system will read the system output state previously saved in the internal memory. The system output state records the output state of the tag sensor, that is, the normally open state or the normally closed state, and perform logical operations based on the read system output state and the tag recognition result. Among them, the logical operation can be defined according to specific needs, such as using logical AND, logical OR and other operators for calculation. The purpose is to further determine whether the tag is correctly recognized based on the logical relationship between the tag sensor state and the tag recognition result.

[0150] Finally, according to the obtained logical operation results, the system will send the generated electrical signal to the synchronization indicator. Among them, the electrical signal will be used to indicate whether the tag is recognized or not. The synchronization indicator is a device used to identify the tag recognition result. It can display the corresponding prompt information according to the received electrical signal. When the synchronization indicator lights up, it means that the tag recognition is successful, otherwise it means that the tag recognition fails.

[0151] The system can perform logical operations based on the output status of the tag sensor and the tag recognition results, and use the synchronization indicator light to prompt the tag recognition results, which can help users judge the accuracy of tag recognition and take corresponding measures in a timely manner.

[0152] More specifically, when the system state = 0, that is, the current system state is in the working state, the output red light PB2 lights up. After the user presses the "-" key for 3 seconds, the system switches the L / D mode. The L / D state changes from 0 to 1 or from 1 to 0, which means that the L / D state after switching is opposite to the previous state. At the same time, the output of the system also changes synchronously. According to the L / D state after switching, the system output changes from 0 to 1 or from 1 to 0, indicating that the output state of the system is consistent with the L / D state. Indicator light PA5 is used to display the output state of the system. Since the output red light PB2 was on before, the output state of indicator light PA5 will change from on to off, or from off to on accordingly after switching. In this way, indicator light PA5 can display the latest output state of the system, and then display the result of tag recognition.

[0153] like Figure 7 As shown, Figure 7 The flowchart of the tag identification method of the present invention outputs the synchronization indicator light of the tag identification result. The tag identification result is obtained by performing a logical operation based on the system output state and the tag identification result. Specifically, the system output state and the tag identification result are calculated using the "XOR" or "LOGICAL AND" operator. The specific logical operation can be "XOR" or "LOGICAL AND". The specific logical expression can be "L / D state and identification result" or "L / D state XOR identification result":

[0154] 1. Use the logical AND operator: If the logical AND operator is used, the system will determine whether the L / D state and the recognition result are both true (1). Only when both conditions are true will the tag recognition result be judged as correct. If one of the conditions is false (0), the tag recognition result will be judged as wrong.

[0155] 2. Use XOR operator: If the XOR operator is used, the system will determine whether the L / D state and the recognition result are different. If the two conditions are different, that is, one is true and the other is false, the tag recognition result will be judged as correct. If the two conditions are the same, that is, both are true or both are false, the tag recognition result will be judged as wrong.

[0156] This embodiment adopts the above scheme, specifically by switching the system output state and saving it to the internal memory when it is detected that the second button is continuously pressed for a preset time and the system state is in the working state, wherein the system output state switches between the normally open state and the normally closed state. The user can conveniently switch the output state of the tag sensor without worrying about losing the state information, and finally further judge whether the tag is correctly identified according to the logical relationship between the L / D state and the identification result, thereby improving the user experience and stability of the tag sensor.

[0157] In addition, an embodiment of the present application further provides a tag identification device, the tag identification device comprising:

[0158] An identification learning module, used to obtain a tag identification threshold, wherein the tag identification threshold is obtained by tag identification learning based on a preset tag identification learning process;

[0159] The tag identification module is used to perform tag identification according to the tag identification threshold and obtain a tag identification result.

[0160] For the principle and implementation process of implementing tag recognition in this embodiment, please refer to the above embodiments and will not be repeated here.

[0161] In addition, an embodiment of the present application also proposes a terminal device, which includes a memory, a processor, and a tag identification program stored in the memory and executable on the processor, and the tag identification program implements the steps of the tag identification method described above when executed by the processor.

[0162] Since all the technical solutions of all the aforementioned embodiments are adopted when the tag recognition program is executed by the processor, it has at least all the beneficial effects brought by all the technical solutions of all the aforementioned embodiments, which will not be described one by one here.

[0163] In addition, an embodiment of the present application further proposes a computer-readable storage medium, on which a tag identification program is stored. When the tag identification program is executed by a processor, the steps of the tag identification method described above are implemented.

[0164] Since all the technical solutions of all the aforementioned embodiments are adopted when the tag recognition program is executed by the processor, it has at least all the beneficial effects brought by all the technical solutions of all the aforementioned embodiments, which will not be described one by one here.

[0165] Compared with the prior art, the tag recognition method, device, terminal device and storage medium proposed in the embodiments of the present application obtain a tag recognition threshold, which is obtained by tag recognition learning based on a preset tag recognition learning process; tag recognition is performed according to the tag recognition threshold to obtain a tag recognition result. The present invention performs tag recognition according to the tag recognition threshold obtained by tag recognition learning through the tag recognition learning process to obtain a tag recognition result, realizes automatic tag recognition, solves the problem of low tag recognition efficiency caused by manual adjustment of the recognition threshold, improves the efficiency of tag recognition, and is suitable for various tag recognition scenarios that require rapid detection.

[0166] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0167] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0168] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0169] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A tag recognition method, characterized in that: The tag recognition method is applied to a tag sensor and comprises the following steps: Step S10: obtaining a tag recognition threshold, wherein the tag recognition threshold is obtained by performing tag recognition learning based on a preset tag recognition learning process; wherein, a tag recognition threshold value obtained by learning tag recognition through a preset tag recognition learning process is obtained; wherein the tag recognition learning process includes: data collection, data preprocessing, feature extraction and threshold calculation process, and finally a threshold value for tag recognition is obtained; Step S20: performing tag recognition according to the tag recognition threshold to obtain a tag recognition result; Specifically, the tag recognition determines whether the tag is correctly recognized by comparing the tag's features with a preset threshold; if the tag's feature value exceeds or meets the preset threshold, it is determined that the tag meets the condition, thereby obtaining the tag recognition result; The label recognition learning process includes the following steps: (1) Data acquisition: Use photosensitive elements to collect light intensity data in the environment, and convert the light intensity into voltage or current signals through conversion circuits; (2) Data preprocessing: preprocess the collected light source intensity data. The specific preprocessing includes denoising, filtering and data calibration steps to ensure the accuracy and reliability of the data; (3) Feature extraction: Extract features from preprocessed data. In the application of photoelectric tag sensors, attention is paid to the change pattern of light intensity and frequency distribution characteristics. The signal processing and feature extraction methods used include Fourier transform, wavelet transform, and statistical analysis. (4) Threshold calculation: Using the extracted feature data and data processing algorithm, the threshold for tag recognition is calculated based on different light intensity characteristics; The specific implementation method of using the tag recognition threshold obtained by the above tag recognition learning to perform tag recognition includes the following steps: (1) Data preparation: Obtain the tag data to be identified. The tag data is an image, light source intensity data, and an electrical signal containing tag information. (2) Feature extraction: It is necessary to extract features from the label data to be identified and convert it into a numerical representation that the system can process for the next step of identification; (3) Tag recognition: By comparing the features of the tag to be recognized with the preset tag recognition threshold, it is determined whether the tag is correctly recognized; if the feature value of the tag exceeds or meets the preset threshold, it is determined that the tag meets the conditions, thereby obtaining the tag recognition result; (4) Result output: Output the result of tag recognition. The output result is a Boolean value or a confidence score information. The final tag recognition result can be used to display through a specific display screen or indicator light; The tag sensor includes a first button, and the step of obtaining the tag recognition threshold includes: Step S101: when it is detected that the first button is continuously pressed for a preset time and the system state is in a working state, the system state is set to a learning state; Step S102: performing tag recognition learning based on a preset tag recognition learning process to obtain a tag recognition threshold; In order to switch the system state under specific conditions and perform operations in different system states, first, the system will detect the state of the first button. If it is detected that the first button is continuously pressed, it means that the user intends to switch the system state. The system needs to be in a working state to respond to the user's switching request and set the system state to a learning state to prepare for tag recognition learning; Finally, when the system is in the learning state, the tag recognition learning process is executed and the tag recognition threshold is obtained; the system needs to determine whether the current state is the learning state, and the learning process can only be executed in the learning state. Once it is confirmed that the system is in the learning state, the system can complete the learning process according to the preset tag recognition learning process; The step of performing label recognition learning based on a preset label recognition learning process to obtain a label recognition threshold comprises: Step S103: Detecting a preset non-label bottom plate through a preset photosensitive element to obtain a non-label threshold; Step S104: detecting a preset label paper through the photosensitive element to obtain a label threshold; Step S105: acquiring a tag recognition threshold according to the non-tag threshold and the tag threshold; First, the non-label bottom plate is detected by using a preset photosensitive element to obtain a non-label threshold value; wherein, by analyzing the output signal of the photosensitive element, the system can obtain a non-label threshold value related to the non-label bottom plate, which can help the system distinguish the non-label bottom plate in the subsequent label recognition process; Then, the label paper is detected by using a photosensitive element to obtain a label threshold; wherein, by analyzing the output signal of the photosensitive element, the system can obtain a label threshold related to the label paper, which can help the system distinguish the label paper in the subsequent label recognition process; Finally, a label recognition threshold is calculated using the non-label threshold and label threshold detected in step S103 and step S104; wherein the label recognition threshold will be used in the subsequent label recognition process to help the system accurately identify labels and non-labels, that is, to be able to identify non-label base plates and label paper; The step of detecting the preset non-label bottom plate by using the preset photosensitive element to obtain the non-label threshold value includes: Step S1031: emitting a first detection light source to the non-label bottom plate; Step S1032: collecting the reflected light source of the first detection light source through the photosensitive element to obtain non-label light source intensity information; Step S1033: performing mean calculation according to the non-label light source intensity information to obtain a non-label threshold; First, a specific first detection light source is emitted to the non-label bottom plate so that it can be subsequently detected and collected by a photosensitive element; Then, the reflected light of the first detection light source is collected by using a preset photosensitive element to obtain the intensity information of the non-label light source; wherein the photosensitive element converts the collected light signal into an electrical signal and outputs it to the system, and by analyzing the output signal of the photosensitive element, the system obtains the intensity information related to the non-label light source; Finally, the average value is calculated based on the collected non-label light source intensity information. Through the calculated average value, the system can obtain a threshold corresponding to the average level of non-label light source intensity, which can be used as a reference in the subsequent label recognition process to help the system distinguish the non-label part; The step of detecting the preset label paper by the photosensitive element to obtain the label threshold comprises: Step S1041: when it is detected that the first button is pressed, the system state is set to a working state and a second detection light source is emitted to the label paper; Step S1042: collecting the reflected light source of the second detection light source through the photosensitive element to obtain the label light source intensity information; Step S1043: when it is detected that the first button is released, average calculation is performed according to the tag light source intensity information to obtain a tag threshold; First, the system detects whether the first button is pressed. If it is detected that the first button is pressed, the system state is set to the working state, and a specific second detection light source is emitted to the label paper so that it can be detected and collected by the photosensitive element later; Then, the reflected light of the second detection light source is collected by a photosensitive element to obtain the label light source intensity information; wherein the photosensitive element converts the collected light signal into an electrical signal, obtains the label light source intensity information and outputs it to the system, and by analyzing the label light source intensity information output by the photosensitive element, the system obtains the intensity information related to the label light source; Finally, it is detected whether the first button is released. If it is detected that the first button is released, the system will perform mean calculation based on the collected label light source intensity information. Through the calculated mean, the system can obtain a threshold value corresponding to the average level of label light source intensity, which can be used as reference data for subsequent label recognition to help the system determine whether it is label paper; The system sets internal flags to implement functions, including: (1) The first button is the "+" button, 0-release, 1-press; (2) Second button: "-" key, 0-release, 1-press; (3) System output L / D status: switch the status flag between normally open and normally closed, 0-PNP, 1-NPN; (4) Recognition output: The output status of the detected label value, 1-represents the detection of the label, 0-represents the non-label; (5) System status: 1- indicates learning status, PB2 outputs 1, and the red light flashes; 0- indicates working status, PB2 outputs 0, and the red light is on; (6) Output status: The identification result is synchronized with the indicator light PA5 output, the green light is on or off; Among them, the system's key operations and software technology implementation include: Technical implementation of system default configuration: When the system is powered on, the default system state = 0, that is, when the system starts, the default system state is the working state, and the PB2 output red light is on; Press the "+" and "-" keys to learn the technical implementation of label value thresholds: (1) Move the sensor to the non-tag bottom plate, press and hold the "+" key for more than 3 seconds, the system status is set to 1, indicating that the system enters the learning state, and the PB2 output red light flashes; release the "+" key, the system learns the non-tag threshold, the system is still in the learning state, and the PB2 output red light flashes; (2) Move the sensor to the label paper and press the "+" key. The system status is set to 0, indicating that the system has entered the working state, and the PB2 output red light is on; release the "+" key, and the system will learn the label threshold; (3) Finally, the tag recognition threshold is obtained, and the new tag recognition threshold is automatically adjusted internally and saved in a storage area that will not be lost when power is off; Press the "+" and "-" keys to fine-tune the tag recognition threshold: When the system is in working state, the PB2 output red light is on, and the tag recognition threshold is adjusted by pressing the key. Press the "+" key once, the threshold is +1; press the "-" key once, the threshold is -1; The tag sensor includes the second button, and the tag recognition learning is performed based on a preset tag recognition learning process, and after the step of obtaining the tag recognition threshold, the step further includes: Step S106: when it is detected that the second button is continuously pressed for a preset time and the system state is in a working state, the system output state is switched and saved in an internal memory, wherein the system output state is switched between a normally open state and a normally closed state; When the user long presses the second button, it is considered that the user needs to switch the output state of the tag sensor. The system will perform corresponding operations based on the current system state and whether it is in working state: (1) If the system is in standby mode: the system will not respond and will ignore the user's operation. (2) If the system is in working state: If the tag sensor is originally in the normally open state, then after switching to the normally closed state, it will output a signal only when a tag is detected; conversely, if it is originally in the normally closed state, after switching to the normally open state, it will continue to output a signal until a tag is detected; In order to ensure that the system can be restored to the previous state and continue to work when it is started next time, in addition to switching the output state of the tag sensor, the current state needs to be saved in the internal memory; After the step of performing tag identification according to the tag identification threshold and obtaining the tag identification result, the following step further comprises: Step S201: reading the system output state in the internal memory and performing a logic operation according to the system output state and the tag recognition result to obtain a logic operation result; Step S202: generating an electrical signal according to the logic operation result and sending it to the synchronization indicator light for tag recognition prompt; First, the system will read the system output status previously saved in the internal memory. The system output status records the output status of the tag sensor, that is, the normally open state or the normally closed state. The system will perform logical operations based on the read system output status and the tag recognition result. Based on the logical relationship between the tag sensor status and the tag recognition result, it will further determine whether the tag is correctly recognized. Finally, according to the obtained logical operation result, the system will send the generated electrical signal to the synchronization indicator light; wherein, the electrical signal will be used to indicate whether the tag is recognized or not. The synchronization indicator light is a device used to identify the tag recognition result. It displays the corresponding prompt information according to the received electrical signal. When the synchronization indicator light is on, it means that the tag recognition is successful, otherwise it means that the tag recognition fails. The system can perform logical operations based on the output status of the tag sensor and the tag recognition results, and display the results through the synchronous indicator light to prompt the tag recognition, which can help users judge the accuracy of tag recognition and take corresponding measures in time; When the system status = 0, that is, the current system status is working, the output red light PB2 lights up. After the user presses the "-" key for 3 seconds, the system switches the L / D mode. The L / D status changes from 0 to 1 or from 1 to 0, which means that the L / D status after switching is opposite to the previous status. At the same time, the output of the system also changes synchronously. According to the L / D status after switching, the system output changes from 0 to 1 or from 1 to 0, indicating that the output status of the system is consistent with the L / D status. The indicator light PA5 is used to display the output status of the system. Since the output red light PB2 was on before, the output status of the indicator light PA5 will change from on to off, or from off to on accordingly after the switch. In this way, the indicator light PA5 can show the latest output status of the system, and then display the result of tag recognition. The result of tag identification is obtained by performing a logical operation on the system output state and the tag identification result. Specifically, the system output state and the tag identification result are operated using "exclusive OR" or "logical AND". The specific logical expression is "L / D state and identification result" or "L / D state XOR identification result": (1) Using the logical AND operator: If the logical AND operator is used, the system will determine whether the L / D state and the recognition result are both true. Only when both conditions are true will the tag recognition result be judged as correct. If one of the conditions is false, the tag recognition result will be judged as wrong. (2) Using the XOR operator: If the XOR operator is used, the system will determine whether the L / D state and the recognition result are different; if the two conditions are different, that is, one is true and the other is false, then the tag recognition result will be judged as correct; if the two conditions are the same, that is, both are true or both are false, the tag recognition result will be judged as incorrect.

Citation Information

Patent Citations

  • Recording apparatus

    JP2003145858A

  • Recorder and method of detecting label

    JP2007050541A