Rivet pipe detection method, device and equipment and medium
By acquiring the photoelectric signal of the infrared-to-tube and combining the level state and position information, the false alarm problem in the existing riveting tube detection methods is solved, and a more accurate riveting tube length detection is achieved.
Patent Information
- Application Number
- CN202411047192.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2024-11-19
AI Technical Summary
The existing riveting tube detection methods are prone to false alarms during the inspection process, especially due to infrared quality problems to the tube or damage caused by excessive solder temperature, which leads to the inability to accurately detect the length of the riveting tube, which increases the risk of false alarms.
By acquiring the photoelectric signals of multiple sets of infrared pairs of tubes, and determining the size of the rivet tubes according to the level state and arrangement position, the signal acquisition module and the size determination module are used to improve the accuracy of detection.
It greatly reduces the risk of false alarms for riveting pipe detection, improves detection accuracy, and ensures accurate measurement of riveting pipe length.
Smart Images

Figure CN118980311A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of binding machines, and in particular to a riveting tube detection method, device, equipment and medium. Background Art
[0002] A binding machine is a binding device that mechanically fixes paper, plastic, leather, etc. with staples, hot melt adhesive, nylon tubes, and other materials.
[0003] When the binding machine is used, the heat riveting tube of relative length needs to be cut according to the thickness of the binding material. When the length of the heat riveting tube in the binding machine is less than the length of the heat riveting tube required for the binding material, the heat riveting tube needs to be replaced. Therefore, it is necessary to detect the heat riveting tube in the binding machine and the length of the riveting tube.
[0004] In the process of riveting tube inspection, multiple sets of infrared tube devices are needed, but it is inevitable that the infrared emitting and receiving diodes will be damaged due to quality problems or excessive soldering temperature. According to the traditional detection method, when riveting tubes are inspected, as long as one set of tubes in the middle does not detect the riveted tube, even if the riveted tubes are detected on the upper and lower sides, it is still judged that there is no riveted tube. This detection method has a great risk of false alarms. Summary of the invention
[0005] The present invention provides a riveted pipe detection method, device, equipment and medium, which can detect the size of the riveted pipe through the position and number of the level state of the infrared pair pipe, improve the accuracy of riveted pipe size detection, and greatly reduce the risk of false alarm.
[0006] According to one aspect of the present invention, a riveted pipe detection method is provided, comprising:
[0007] Acquire photoelectric signals of multiple groups of infrared tubes; wherein the photoelectric signals are arranged in the order of low to high according to the infrared tubes;
[0008] The size of the riveted tube is determined according to the level state and arrangement position of the photoelectric signal.
[0009] Optionally, determining the size of the riveted tube according to the level state and arrangement position of the photoelectric signal includes:
[0010] Acquire the level state of the photoelectric signal in the first position of the arrangement order; wherein the first position is the lowest position infrared pair tube;
[0011] If the level state of the infrared pair tube at the first position is a high level, the first size of the riveted tube is determined, and the second size of the riveted tube is determined according to the number of high levels and low levels starting from the level state of the photoelectric signal at the second position to the infrared pair tube at the third position; wherein the second position is the next position of the first position, and the third position is the highest position infrared pair tube;
[0012] The first size and the second size are combined to obtain the size of the riveted tube.
[0013] Optionally, starting from the level state of the photoelectric signal at the second position to the infrared pair tube at the third position, determining the second size of the riveted tube according to the number of high levels and low levels includes:
[0014] Starting from the level state of the photoelectric signal at the second position, determining whether a low level appears;
[0015] If no low level appears from the level state of the photoelectric signal at the second position, determining the first number of the high levels, and determining the second size of the riveted tube according to the first number and the set parameters;
[0016] If a low level appears from the level state of the photoelectric signal at the second position, the second number of the high level and the third number of the low level are determined respectively, and the second size of the riveted tube is determined according to the second number, the third number and the set parameters.
[0017] Optionally, determining the second size of the rivet tube according to the second quantity, the third quantity and set parameters includes:
[0018] comparing the magnitude relationship between the second quantity and the third quantity;
[0019] If the second number is greater than the third number, the second size of the riveted tube is determined by adding the sum of the second number and the third number to a set parameter.
[0020] Optionally, if no low level appears from the level state of the photoelectric signal at the second position, after determining the first number of high levels, the method further includes:
[0021] If the low level appears again after the high level, the second size of the riveted tube is determined according to the first quantity and the set parameters, and the fourth quantity of the high level and the fifth quantity of the low level are determined respectively;
[0022] Determining a third size of the riveted tube according to the fourth quantity, the fifth quantity and the set parameters;
[0023] The first size, the second size and the third size are combined to obtain the size of the rivet tube.
[0024] Optionally, determining the third size of the rivet tube according to the fourth quantity, the fifth quantity and set parameters includes:
[0025] comparing the magnitude relationship between the fourth quantity and the fifth quantity;
[0026] If the fourth number is less than or equal to the fifth number, the set value is used as the third size of the rivet tube.
[0027] Optionally, the level state of the photoelectric signal is used to characterize the shielding state of the riveted tube; a high level characterizes the state in which the riveted tube shields the infrared pair tube; a low level characterizes the state in which the riveted tube does not shield the infrared pair tube.
[0028] According to another aspect of the present invention, a riveted pipe detection device is provided, comprising:
[0029] A signal acquisition module is used to acquire photoelectric signals of multiple groups of infrared tubes; wherein the photoelectric signals are arranged in the order of the infrared tubes from low to high;
[0030] The size determination module is used to determine the size of the riveted tube according to the level state and arrangement position of the photoelectric signal.
[0031] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0032] at least one processor; and
[0033] a memory communicatively connected to the at least one processor; wherein,
[0034] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the riveted tube detection method described in any embodiment of the present invention.
[0035] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the riveted tube detection method described in any embodiment of the present invention when executed.
[0036] The technical solution of the embodiment of the present invention obtains the photoelectric signals of multiple groups of infrared tubes; wherein the photoelectric signals are arranged in order from low to high according to the infrared tubes; and the size of the riveted tube is determined according to the level state and arrangement position of the photoelectric signals. This technical solution can determine the size of the riveted tube by the level state and position of the infrared tubes, thereby improving the accuracy of the riveted tube size detection and greatly reducing the risk of false alarms.
[0037] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0039] Figure 1 is a flow chart of a riveted tube detection method provided according to Embodiment 1 of the present invention;
[0040] Figure 2 is a flow chart of a riveted tube detection method provided according to Embodiment 2 of the present invention;
[0041] Figure 3 is a flow chart of a riveted tube detection method provided according to Embodiment 3 of the present invention;
[0042] Figure 4 is a structural schematic diagram of a riveted tube detection device provided according to a fourth embodiment of the present invention;
[0043] Figure 5 It is a schematic diagram of the structure of an electronic device provided according to Embodiment 5 of the present invention. DETAILED DESCRIPTION
[0044] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0045] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0046] Embodiment 1
[0047] Figure 1This is a flow chart of a rivet tube detection method provided according to the first embodiment of the present invention. This embodiment can be applied to the detection of rivet tubes in an automatic binding machine. The method can be executed by a rivet tube detection device. The rivet tube detection device can be implemented in the form of hardware and / or software. The rivet tube detection device can be configured in an electronic device with data processing capabilities. Figure 1 As shown, the method includes:
[0048] In this embodiment, the riveting of tubes can be performed by multiple sets of infrared tube devices. Specifically, the multiple sets of infrared tube devices may include multiple infrared emitting diodes, multiple infrared receiving diodes, a left tube inspection board PCB, a right tube inspection board PCB, a left tube inspection board assembly, a right tube inspection board assembly, multiple sets of infrared tube devices, tube inspection board connection lines, main board connection lines, a main control board, and a riveting tube inspection seat, etc. Among them, multiple infrared emitting diodes are welded on the left tube inspection board PCB to form a left tube inspection board assembly; multiple infrared receiving diodes are welded on the right tube inspection board PCB to form a right tube inspection board assembly; the left tube inspection board assembly is fixed to the left end of the riveting tube inspection seat by screws; the right tube inspection board assembly is fixed to the right end of the riveting tube inspection seat by screws; the left and right tube inspection board assemblies fixed to the riveting tube inspection seat form multiple sets of infrared tube devices; the left tube inspection board assembly is connected to the right tube inspection board assembly by tube inspection board connection lines; the left tube inspection board assembly is connected to the main control board by main board connection lines; and the riveting tube inspection seat is fixed to the upper workbench by screws. This embodiment can use multiple groups of infrared pairs of tubes to feedback photoelectric signals in different states and the main control board to judge each group of photoelectric signals in sequence, and finally realize the detection of whether there is a rivet tube in the automatic binding machine and the calculation of the length of the rivet tube.
[0049] S110, obtaining photoelectric signals of multiple groups of infrared tubes.
[0050] Among them, the photoelectric signal is arranged in order from low to high according to the infrared tubes. The photoelectric signal of the infrared tube is mainly an electrical signal generated by the emission and reception process of infrared rays. The multiple groups of infrared tubes can be a set number of infrared tubes. For example, the multiple groups of infrared tubes in this embodiment can be 12 groups of infrared tubes. In this embodiment, a group of infrared tubes can be deployed every 5 mm, and a total of 12 groups of infrared tubes can be deployed; the specific number of multiple groups of infrared tubes can also be set according to actual needs. In this embodiment, the photoelectric signals of 12 groups of infrared tubes arranged in sequence can be obtained. In addition, the infrared tubes in this embodiment can also be detected using micro switches.
[0051] S120, determining the size of the riveted tube according to the level state and arrangement position of the photoelectric signal.
[0052] The level state of the photoelectric signal may include a high level and a low level. In this embodiment, different shielding conditions of the riveted tube to the infrared tube can be represented based on different level states of the photoelectric signal. In this embodiment, optionally, the level state of the photoelectric signal is used to represent the shielding state of the riveted tube; a high level represents the state where the riveted tube shields the infrared tube; and a low level represents the state where the riveted tube does not shield the infrared tube.
[0053] Specifically, in this embodiment, it can be defined that when the riveted tube blocks a group of infrared tubes or the infrared tubes are damaged, the state is high level, that is, the level state of the photoelectric signal is displayed as "1", and when the riveted tube does not block the infrared tubes and the infrared tubes are not damaged, the state is low level, that is, the level state of the photoelectric signal is displayed as "0". In this embodiment, different level states can be defined to characterize the situation of the riveted tube blocking the infrared tubes, so as to detect whether there is a riveted tube through the level state.
[0054] Among them, the arrangement position can be the position of each infrared pair of tubes in the arrangement order of multiple groups of infrared pair of tubes from low to high. In this embodiment, the multiple groups of infrared pair of tubes detection device in the automatic binding machine can be a top and bottom structure, and the multiple groups of infrared pair of tubes can be arranged in order from low to high, and the shielding state of the rivet tube can be detected according to the position of the level state of each infrared pair of tubes. The size can be understood as the length information of the rivet tube. In this embodiment, the multiple groups of infrared pair of tubes can be judged according to the set rules according to the level state of each infrared pair of tubes in the arrangement order and the arrangement position they are in, so as to determine the shielding state of the rivet tube and the length information of the rivet tube.
[0055] The technical solution of the embodiment of the present invention obtains the photoelectric signals of multiple groups of infrared tubes; wherein the photoelectric signals are arranged in order from low to high according to the infrared tubes; and the size of the riveted tube is determined according to the level state and arrangement position of the photoelectric signals. This technical solution can determine the size of the riveted tube according to the level state and arrangement position of the infrared tubes, thereby improving the accuracy of the riveted tube size detection and greatly reducing the risk of false alarms.
[0056] Embodiment 2
[0057] Figure 2This is a flow chart of a riveted tube detection method provided according to the second embodiment of the present invention, and this embodiment is optimized based on the above embodiment. The specific optimization is: determining the size of the riveted tube according to the level state and arrangement position of the photoelectric signal, including: obtaining the level state of the photoelectric signal in the first position in the arrangement order; wherein the first position is the lowest infrared pair tube; if the level state of the infrared pair tube in the first position is a high level, then determine the first size of the riveted tube, and continue from the level state of the photoelectric signal in the second position to the infrared pair tube in the third position, and determine the second size of the riveted tube according to the number of high levels and low levels; wherein the second position is the next position of the first position, and the third position is the highest infrared pair tube; merge the first size and the second size to obtain the size of the riveted tube. As Figure 2 As shown, the method includes:
[0058] S210, obtaining photoelectric signals of multiple groups of infrared tubes.
[0059] S220, obtaining the level state of the photoelectric signal in the first position in the arrangement order.
[0060] Among them, the first position is the lowest-order infrared pair tube; the level state of the photoelectric signal in this embodiment can be arranged in order from low to high according to the infrared pair tubes. In this embodiment, the level state of the photoelectric signal of the lowest-order infrared pair tube is first obtained, and the level state of the photoelectric signal of the lowest-order infrared pair tube is judged according to the set judgment rule, and then the level state of the infrared pair tubes is judged in order from low to high.
[0061] S230, if the level state of the infrared pair tube at the first position is a high level, determine the first size of the riveted tube, and continue from the level state of the photoelectric signal at the second position to the infrared pair tube at the third position, and determine the second size of the riveted tube according to the number of high levels and low levels.
[0062] Among them, the first size can be the size of the riveted tube determined according to the lowest infrared pair tube. The first size can be a pre-set size and can be set according to actual needs. Exemplarily, in this embodiment, the first size can be set to 32mm. In this embodiment, the level state of the photoelectric signal of the infrared pair tube with the lowest arrangement order can be obtained. If the level state of the infrared pair tube in the first position is a high level, that is, the state corresponding to the lowest infrared pair tube is displayed as "1", it means that the riveted tube is detected at this time and the infrared pair tube with the lowest arrangement is blocked, and the first size of the riveted tube is determined to be 32mm; if the level state of the infrared pair tube in the first position is a low level, that is, the state corresponding to the lowest infrared pair tube is displayed as "0", it means that the riveted tube is not detected at this time, and the infrared pair tube with the lowest arrangement is not blocked, and there is no need to determine the size of the riveted tube.
[0063] Among them, the second position is the next position of the first position, that is, the next position of the lowest infrared pair tube; the third position can be the highest infrared pair tube. The number of high levels and low levels can be understood as the number of high levels and the number of low levels. The second size can be determined based on the number of high levels and low levels that appear from the next position of the lowest infrared pair tube to the highest infrared pair tube, as well as the set parameters. In this embodiment, the lowest infrared pair tube can be detected first to determine the first size of the infrared pair tube, and then continue to judge along the next position after the lowest position until the infrared pair tube arranged in the highest position, that is, the judgment of multiple groups of infrared pair tubes is completed, and from the next position of the lowest position to the highest infrared pair tube, the second size of the riveted tube can be determined according to the number of high levels and low levels that appear.
[0064] In this embodiment, optionally, starting from the level state of the photoelectric signal at the second position to the infrared pair tube at the third position, determining the second size of the riveted tube according to the number of high levels and low levels includes: judging whether a low level appears starting from the level state of the photoelectric signal at the second position; if no low level appears starting from the level state of the photoelectric signal at the second position, determining a first number of high levels, and determining the second size of the riveted tube according to the first number and set parameters; if a low level appears starting from the level state of the photoelectric signal at the second position, respectively determining a second number of high levels and a third number of low levels, and determining the second size of the riveted tube according to the second number, the third number and the set parameters.
[0065] Among them, the first number can be understood as the number of high levels that appear before the low level appears starting from the next bit of the lowest infrared pair tube. The setting parameter can be determined based on the distance between each group of infrared pair tubes. Exemplarily, in this embodiment, a group of infrared pair tubes is deployed every 5mm, and the setting parameter can be 5mm. The setting parameter in this embodiment can be determined according to the actual number of groups of infrared pair tubes. The second number can be understood as the number of high levels that appear after the low level appears starting from the next bit of the lowest infrared pair tube. The third number can be understood as the number of low levels that appear after the low level appears starting from the next bit of the lowest infrared pair tube.
[0066] In this embodiment, it is possible to judge whether a low level occurs from the level state of the photoelectric signal at the position of the next bit of the lowest-bit infrared pair tube, and to judge until the highest-bit infrared pair tube, and determine the second size of the riveted tube in different ways according to the two situations of the occurrence of a low level and the absence of a low level. Specifically, if it is judged before the occurrence of a low level, the second size of the riveted tube can be determined according to the number of high levels and the set parameters; if it is judged after the occurrence of a low level, the second size of the riveted tube can be determined according to the number of high levels, the number of low levels and the set parameters.
[0067] In this embodiment, the specific method of determining the second size of the riveted tube according to the first number and the set parameter can be to determine the second size of the riveted tube by multiplying the number of high levels before the low level appears from the level state of the second position by the set parameter. Exemplarily, in this embodiment, the judgment starts from the next bit of the lowest bit infrared pair tube in sequence. If the infrared pair tube does not appear in the low level state, that is, before the low level "0" appears, each high level "1" appears, which means that the length of the riveted tube is increased by 5mm; if it is determined that the first number of high level "1" is A, then the second size of the riveted tube is A*5mm.
[0068] In this embodiment, a specific method for determining the second size of the riveted tube according to the second quantity, the third quantity and the set parameters is to compare the second quantity with a high level and the third data with a low level, and determine the second size of the riveted tube according to the comparison result and the set parameters.
[0069] In this embodiment, by such an arrangement, the second size of the riveted tube can be determined respectively according to the two situations before and after the infrared pair tube appears a low level, so that the size determination method can be flexibly adjusted, thereby improving the accuracy of the riveted tube size.
[0070] In this embodiment, optionally, determining the second size of the riveted tube according to the second quantity, the third quantity and the set parameters includes: comparing the size relationship between the second quantity and the third quantity; if the second quantity is greater than the third quantity, determining the second size of the riveted tube by adding the sum of the second quantity and the third quantity and the set parameters.
[0071] In this embodiment, by comparing the size relationship between the second number and the third number, if the second number is greater than the third number, the second size of the riveted tube can be obtained by multiplying the sum of the second number and the third number by the set parameter. If the second number is less than or equal to the third number, the second number with a high level can be ignored, that is, the infrared tube may be faulty at this time and can be ignored.
[0072] Specifically, in this embodiment, after judging the occurrence of a low level from the level state of the photoelectric signal at the next position of the lowest-level infrared pair tube, the infrared pair tubes are continuously detected upward in sequence, and the number of high-level "1"s and the number of low-level "0"s are accumulated respectively, and the number of high-level "1"s and the number of low-level "0"s are compared. If the number of high-level "1"s is greater than the number of low-level "0", the number of high-level "1"s and the number of low-level "0"s are added, and the sum obtained by the addition can be expressed as B, and it can be determined that the second size of the riveted tube can be B*5mm.
[0073] In this embodiment, by such an arrangement, the number of high levels and the number of low levels can be compared, and the second size of the riveted tube can be determined according to the comparison result, so as to prevent the infrared tube from malfunctioning.
[0074] S240, combining the first size and the second size to obtain the size of the riveted tube.
[0075] The fusion can be understood as a process of cumulative fusion. In this embodiment, the determined first size and the second size can be accumulated to obtain the length data of the riveted tube.
[0076] The technical solution of the embodiment of the present invention is to obtain the photoelectric signals of multiple groups of infrared tubes; wherein the photoelectric signals are arranged in order from low to high according to the infrared tubes; obtain the level state of the photoelectric signal in the first position in the order of arrangement; wherein the first position is the lowest infrared tube; if the level state of the infrared tube in the first position is a high level, then determine the first size of the riveted tube, and continue from the level state of the photoelectric signal in the second position to the infrared tube in the third position, and determine the second size of the riveted tube according to the number of high and low levels; wherein the second position is the next position of the first position, and the third position is the highest infrared tube; merge the first size and the second size to obtain the size of the riveted tube. The technical solution can detect the size of the riveted tube by the position and number of the level state of the infrared tube, thereby improving the accuracy of the riveted tube size detection and greatly reducing the risk of false alarms.
[0077] Embodiment 3
[0078] Figure 3 This is a flow chart of a rivet tube detection method provided according to the third embodiment of the present invention. This embodiment is optimized based on the above embodiment. The specific optimization is: if no low level appears from the level state of the photoelectric signal at the second position, after determining the first number of high levels, it also includes: if a low level appears after the high level, the second size of the rivet tube is determined according to the first number and the set parameters, and the fourth number of high levels and the fifth number of low levels are determined respectively; the third size of the rivet tube is determined according to the fourth number, the fifth number and the set parameters; the first size, the second size and the third size are merged to obtain the size of the rivet tube. Figure 3 As shown, the method includes:
[0079] S310, obtaining photoelectric signals of multiple groups of infrared tubes.
[0080] S320, obtaining the level state of the photoelectric signal in the first position in the arrangement order.
[0081] Among them, the first position is the lowest position infrared pair tube.
[0082] S330: If the level of the infrared pair tube at the first position is high, determine the first size of the riveted tube.
[0083] S340, judging whether a low level appears based on the level state of the photoelectric signal at the second position.
[0084] S350: If no low level appears from the level state of the photoelectric signal at the second position, determine a first number of high levels.
[0085] The first number may be understood as the number of high levels that appear before a low level appears starting from the next bit of the lowest bit of the infrared pair tube.
[0086] S360: If a low level appears after the high level, determine the second size of the riveted tube according to the first quantity and the set parameters, and determine a fourth quantity of the high level and a fifth quantity of the low level respectively.
[0087] The setting parameter may be determined based on the distance between each group of infrared tube pairs. The fourth number may be the number of high levels detected after the first number of high levels is determined and the low level appears again. The fifth number may be the number of low levels detected after the first number of high levels is determined.
[0088] In this embodiment, the specific method of determining the second size of the riveted tube according to the first number and the set parameter can be to determine the second size of the riveted tube by multiplying the number of high levels before the low level appears from the level state of the second position by the set parameter. Exemplarily, in this embodiment, the judgment starts from the next bit of the lowest bit infrared pair tube in sequence. If the infrared pair tube does not appear in the low level state, that is, before the low level "0" appears, each high level "1" appears, which means that the length of the riveted tube is increased by 5mm; if it is determined that the first number of high level "1" is A, then the second size of the riveted tube is A*5mm.
[0089] In this embodiment, before judging from the level state of the second position that no low level has appeared, the second size of the riveted tube is obtained by multiplying the number of high levels and the set parameter, and then determining the number of high levels that appear after the first number of high levels appear and the number of low levels that appear after the first number of high levels appear respectively.
[0090] S370, determining a third size of the riveted tube according to the fourth quantity, the fifth quantity and the set parameters.
[0091] The third size may be the size of the riveted tube determined based on the comparison result of the fourth number and the fifth number and the set parameter. In this embodiment, the third size of the riveted tube may be determined based on the fourth number, the fifth number and the set parameter by comparing the size relationship between the fourth number and the fifth number; if the fourth number is greater than the fifth number, the sum of the fourth number and the fifth number is multiplied by the set parameter to obtain the third size of the riveted tube; if the fourth number is less than or equal to the fifth number, the level states of the fourth number and the fifth number may be ignored and not calculated.
[0092] In this embodiment, optionally, determining the third size of the rivet tube according to the fourth number, the fifth number and the set parameters includes: comparing the size relationship between the fourth number and the fifth number; if the fourth number is less than or equal to the fifth number, using the set value as the third size of the rivet tube.
[0093] The set value may be set according to actual needs. In this embodiment, the set value may be 0. In this embodiment, by comparing the size relationship between the fourth number and the fifth number, if the fourth number is less than or equal to the fifth number, the infrared tube may have a fault, and the fourth number and the fifth number may be ignored and not calculated, that is, the set value 0 is used as the third size of the riveted tube. In this embodiment, such a setting can prevent the infrared tube from having a fault, which may cause an error in the determined riveted tube size.
[0094] S380, the first size, the second size, and the third size are combined to obtain the size of the riveted tube.
[0095] In this embodiment, the first size, the second size and the third size are combined to obtain the size of the rivet tube in the following manner: the result obtained by superimposing the first size, the second size and the third size is used as the length data of the rivet tube.
[0096] Specifically, in this embodiment, detection is performed from the next bit of the lowest bit infrared pair tube from low to high. If the infrared pair tube does not appear in a low level state, that is, before the infrared pair tube does not appear in a low level "0", each high level "1" appears, it means that the length of the riveted tube is increased by the set parameter 5mm; if it is determined that the first number of high level "1" is A, then the second size of the riveted tube is A*5mm at this time; after the low level appears, the infrared pair tubes are continuously detected in sequence upwards until the detection of multiple groups of infrared pair tubes is completed, and the number of high level "1"s that appear is accumulated respectively. The number of high level "1"s and the number of low level "0"s are compared. If the number of high level "1"s is greater than the number of low level "0", the number of high level "1"s and the number of low level "0"s are added. The sum obtained can be expressed as B, and it can be determined that the third size of the rivet tube can be B*5mm; then the first size, the second size and the third size are added to obtain the size of the rivet tube, that is, the length of the rivet tube L=32+A*5mm+B*5mm.
[0097] Exemplarily, in this embodiment, the level state data of the photoelectric signals of 12 groups of red pairs of tubes are obtained as "110011100110", which correspond to the infrared pairs from low to high from left to right. According to the above judgment principle, when 11 is encountered from the left, the length of the current riveted tube is the first size 32mm plus the sum of the number of high levels and the second size determined by the setting parameters, that is, the current length of the riveted tube is L=32+1*5mm; continue to detect when "0" is encountered in the third bit until the seventh bit, there are 3 high levels "1" and 2 low levels "0" from the third bit to the seventh bit, that is, the number of high levels "1" is greater than the low level "0", then, the current length of the riveted tube can be L=32+1*5mm+(3+2)*5mm. Continuing to detect upwards, "0" is encountered again in the 8th position, and until the 12th position, the number of "1" is not greater than the number of "0", so the "1" appearing in the 10th and 11th positions is ignored, and the "1" appearing in these two positions is judged as a possible failure of the infrared tube, and is not calculated. The final determined riveted tube length is still L=32+1*5mm+(3+2)*5mm.
[0098] Through such a setting in this embodiment, judgment can be made based on the number of different level states detected by multiple groups of infrared tubes to realize the calculation of the length of the riveted tube, and detection errors will not occur due to the failure of a group of infrared tubes, thereby improving the efficiency and reliability of riveted tube detection.
[0099] The technical solution of the embodiment of the present invention is to obtain the photoelectric signals of multiple groups of infrared tubes; wherein the photoelectric signals are arranged in order from low to high according to the infrared tubes; obtain the level state of the photoelectric signal at the first position in the order of arrangement; wherein the first position is the lowest infrared tube; if the level state of the infrared tube at the first position is a high level, determine the first size of the riveted tube; judge whether a low level appears from the level state of the photoelectric signal at the second position; if no low level appears from the level state of the photoelectric signal at the second position, determine the first number of high levels; if a low level appears after the high level, determine the second size of the riveted tube according to the first number and the set parameters, and determine the fourth number of high levels and the fifth number of low levels respectively; determine the third size of the riveted tube according to the fourth number, the fifth number and the set parameters; and merge the first size, the second size and the third size to obtain the size of the riveted tube. The technical solution can detect different sizes of the riveted tube by the position of the level state of the infrared tube and the number of high and low levels, merge different sizes to determine the final size of the riveted tube, further improve the accuracy of the riveted tube size detection, and greatly reduce the risk of false alarms.
[0100] Embodiment 4
[0101] Figure 4 It is a structural schematic diagram of a riveted tube detection device provided according to Embodiment 4 of the present invention.
[0102] like Figure 4 As shown, the device comprises:
[0103] The signal acquisition module 410 is used to acquire the photoelectric signals of multiple groups of infrared tubes; wherein the photoelectric signals are arranged in the order from low to high according to the infrared tubes;
[0104] The size determination module 420 is used to determine the size of the riveted tube according to the level state and arrangement position of the photoelectric signal.
[0105] Optionally, the size determination module 420 includes:
[0106] A level state acquisition unit, used to acquire the level state of the photoelectric signal of the first position in the arrangement order; wherein the first position is the lowest position infrared pair tube;
[0107] The second size determination unit is used to determine the first size of the riveted tube if the level state of the infrared pair tube at the first position is a high level, and continue to determine the second size of the riveted tube according to the number of high levels and low levels starting from the level state of the photoelectric signal at the second position to the infrared pair tube at the third position; wherein the second position is the next position of the first position, and the third position is the highest position infrared pair tube;
[0108] The size fusion unit is used to fuse the first size and the second size to obtain the size of the riveted tube.
[0109] Optionally, the second size determining unit includes:
[0110] A state judgment subunit, used to judge whether a low level appears based on the level state of the photoelectric signal at the second position;
[0111] A first determining subunit is used to determine a first number of high levels if no low level appears from the level state of the photoelectric signal at the second position, and determine a second size of the riveted tube according to the first number and a set parameter;
[0112] The second determining subunit is used to determine the second number of high levels and the third number of low levels respectively if a low level appears from the level state of the photoelectric signal at the second position, and determine the second size of the riveting tube according to the second number, the third number and the set parameters.
[0113] Optionally, the second determining subunit is specifically used to compare the size relationship between the second quantity and the third quantity; if the second quantity is greater than the third quantity, the second size of the riveted tube is determined by adding the sum of the second quantity and the third quantity and the set parameter.
[0114] Optionally, the device further includes: a size acquisition module, which is used to determine the first number of high levels if no low level appears from the level state of the photoelectric signal at the second position, and further includes: if a low level appears after the high level, determine the second size of the rivet tube according to the first number and the set parameters, and determine the fourth number of high levels and the fifth number of low levels respectively; determine the third size of the rivet tube according to the fourth number, the fifth number and the set parameters; and merge the first size, the second size and the third size to obtain the size of the rivet tube.
[0115] Optionally, the size obtaining module is specifically used to compare the size relationship between the fourth quantity and the fifth quantity; if the fourth quantity is less than or equal to the fifth quantity, the set value is used as the third size of the riveted tube.
[0116] Optionally, the level state of the photoelectric signal is used to represent the shielding state of the riveted tube; a high level represents the state that the riveted tube shields the infrared pair tube; a low level represents the state that the riveted tube does not shield the infrared pair tube.
[0117] A riveted tube detection device provided in an embodiment of the present invention can execute a riveted tube detection method provided in any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method.
[0118] Embodiment 5
[0119] Figure 51 is a schematic diagram of the structure of an electronic device provided according to Embodiment 5 of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0120] like Figure 5 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, ROM 12 and RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0121] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0122] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the riveted pipe detection method.
[0123] In some embodiments, the riveted tube detection method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the riveted tube detection method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the riveted tube detection method in any other appropriate manner (e.g., by means of firmware).
[0124] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0125] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0126] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0127] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0128] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0129] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0130] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0131] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A riveted tube detection method, It is characterized in that include: Acquire photoelectric signals of multiple groups of infrared tubes; wherein the photoelectric signals are arranged in the order of low to high according to the infrared tubes; The size of the riveted tube is determined according to the level state and arrangement position of the photoelectric signal.
2. The method according to claim 1, It is characterized in that Determining the size of the riveted tube according to the level state and arrangement position of the photoelectric signal includes: Acquire the level state of the photoelectric signal in the first position of the arrangement order; wherein the first position is the lowest position infrared pair tube; If the level state of the infrared pair tube at the first position is a high level, the first size of the riveted tube is determined, and the second size of the riveted tube is determined according to the number of high levels and low levels starting from the level state of the photoelectric signal at the second position to the infrared pair tube at the third position; wherein the second position is the next position of the first position, and the third position is the highest position infrared pair tube; The first size and the second size are combined to obtain the size of the riveted tube.
3. The method according to claim 2, It is characterized in that Starting from the level state of the photoelectric signal at the second position to the infrared pair tube at the third position, the second size of the riveted tube is determined according to the number of high levels and low levels, including: Starting from the level state of the photoelectric signal at the second position, determining whether a low level appears; If no low level appears from the level state of the photoelectric signal at the second position, determining the first number of the high levels, and determining the second size of the riveted tube according to the first number and the set parameters; If a low level appears from the level state of the photoelectric signal at the second position, the second number of the high level and the third number of the low level are determined respectively, and the second size of the riveted tube is determined according to the second number, the third number and the set parameters.
4. The method according to claim 3, It is characterized in that Determining a second size of the rivet tube according to the second quantity, the third quantity and a set parameter includes: comparing the magnitude relationship between the second quantity and the third quantity; If the second number is greater than the third number, the second size of the riveted tube is determined by adding the sum of the second number and the third number to a set parameter.
5. The method according to claim 3, It is characterized in that If no low level appears from the level state of the photoelectric signal at the second position, after determining the first number of high levels, the method further includes: If the low level appears again after the high level, the second size of the riveted tube is determined according to the first quantity and the set parameters, and the fourth quantity of the high level and the fifth quantity of the low level are determined respectively; Determining a third size of the riveted tube according to the fourth quantity, the fifth quantity and the set parameters; The first size, the second size and the third size are combined to obtain the size of the rivet tube.
6. The method according to claim 5, It is characterized in that Determining a third size of the rivet tube according to the fourth quantity, the fifth quantity and the set parameters includes: comparing the magnitude relationship between the fourth quantity and the fifth quantity; If the fourth number is less than or equal to the fifth number, the set value is used as the third size of the rivet tube.
7. The method according to claim 1, It is characterized in that The level state of the photoelectric signal is used to represent the shielding state of the riveted tube; a high level represents the state that the riveted tube shields the infrared pair tube; a low level represents the state that the riveted tube does not shield the infrared pair tube.
8. A riveted tube detection device, It is characterized in that include: A signal acquisition module is used to acquire photoelectric signals of multiple groups of infrared tubes; wherein the photoelectric signals are arranged in the order of the infrared tubes from low to high; The size determination module is used to determine the size of the riveted tube according to the level state and arrangement position of the photoelectric signal.
9. An electronic device, It is characterized in that The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the riveted tube detection method according to any one of claims 1 to 7.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the riveted tube detection method according to any one of claims 1 to 7 when executed.
