A method, system, device and medium for controlling the running state of a locomotive
By setting the target QR code in the rail locomotive positioning system and combining it with satellite positioning information, the problem of rail locomotives being unable to accurately position in blocked areas is solved, achieving high-precision positioning and improving production efficiency in complex scenes.
Patent Information
- Application Number
- CN202211440395.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-17
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2042-11-17
AI Technical Summary
The existing rail locomotive positioning system cannot accurately position the locomotive in areas blocked by steel bridges, pipelines, factories, high walls, etc., resulting in the inability to accurately control the operating status of the locomotive.
By setting a target QR code on one side of the reference track, the camera is used to obtain and identify the QR code information, and the satellite positioning information is combined to fuse it to generate the real-time position of the locomotive relative to the track, thereby controlling the locomotive's operating status.
It improves the accuracy and reliability of locomotive positioning in complex scenarios, ensures the accurate position display and unmanned control of the locomotive, and improves production efficiency.
Smart Images

Figure CN115675581B
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of automatic control, and specifically to a method, system, device and medium for controlling the operating state of a locomotive. Background Art
[0002] In the related technology, the positioning of rail locomotives mainly relies on satellite positioning systems with inertial navigation. Satellite positioning systems with inertial navigation are greatly affected by the building environment around the track. For example, the locomotive cannot be accurately positioned in areas blocked by steel frame bridges, pipelines, factory buildings, high walls, etc., and is completely blocked under blast furnaces. Satellite positioning is completely unusable or inaccurate, resulting in the inability to accurately locate the locomotive, and thus the inability to accurately control the locomotive's operating status.
[0003] Therefore, how to accurately control the operating status of the locomotive becomes a problem that needs to be solved. Summary of the invention
[0004] Embodiments of the present application provide a method, system, device and medium for controlling the running state of a locomotive. Through some embodiments of the present application, the position of the locomotive can be accurately located in scenarios where satellite positioning cannot be used, thereby accurately controlling the running state of the locomotive.
[0005] In a first aspect, the present application provides a method for controlling the running state of a locomotive, which is applied to a processor, and the method comprises: acquiring an image to be identified, wherein the image to be identified is obtained by photographing a target QR code on one side of a track set in a reference object, and the locomotive can move on the track in the reference object; obtaining the position of the locomotive relative to the track by identifying information stored in the target QR code on the image to be identified; and generating instructions for controlling the running state of the locomotive based on the position.
[0006] Therefore, the embodiment of the present application sets a target QR code on one side of the reference track, which can stably and reliably provide the locomotive's positioning data in a scenario where the locomotive is located within the reference object, thereby improving the locomotive's positioning accuracy in complex scenarios, and then accurately controlling the locomotive's operating status and improving production efficiency.
[0007] In combination with the first aspect, in one embodiment of the present application, the image to be identified includes a first two-dimensional code and a second two-dimensional code; the position of the locomotive relative to the track is obtained by identifying the information stored in the target two-dimensional code on the image to be identified, including: respectively identifying the first two-dimensional code and the second two-dimensional code on the image to be identified to obtain the first position and the second position; searching for the third position corresponding to the target two-dimensional code in the previous image of the image to be identified; based on the third position and the driving direction of the locomotive, selecting the target position from the first position and the second position, and using the target position as the position of the locomotive relative to the track.
[0008] Therefore, the embodiment of the present application can prevent positioning and recognition errors by selecting a target QR code based on the driving direction of the locomotive when there are two QR codes on the image to be recognized, thereby improving positioning accuracy.
[0009] In combination with the first aspect, in one embodiment of the present application, the target position is selected from the first position and the second position based on the third position and the traveling direction of the locomotive, including: in the traveling direction of the locomotive, selecting from the first position and the second position the one closest to the third position as the target position.
[0010] Therefore, the embodiment of the present application can prevent positioning and recognition errors by selecting the target position from two positions based on the information of the previous two-dimensional code.
[0011] In combination with the first aspect, in one embodiment of the present application, the position of the locomotive relative to the track is a real-time position; the position of the locomotive relative to the track is obtained by identifying the information stored in the target QR code on the image to be identified, including: identifying the information stored in the target QR code on the image to be identified; fusing the information stored in the target QR code with the position information of satellite positioning to obtain the real-time position of the locomotive relative to the track.
[0012] Therefore, the embodiments of the present application fuse the information stored in the QR code with the location information of satellite positioning, and can use the location information of satellite positioning to supplement the locations that the information stored in the QR code cannot cover, thereby obtaining more comprehensive and richer positioning data.
[0013] In combination with the first aspect, in one embodiment of the present application, the target QR code is selected by an identification display device from multiple candidate QR codes through environmental indicator values, and the environmental indicator values are obtained by monitoring environmental data within the reference object through environmental monitoring equipment, wherein the type of environmental data includes at least air dust.
[0014] Therefore, the embodiment of the present application selects different types of QR codes based on environmental data, which can make the target QR code more consistent with the environmental conditions within the reference object, thereby improving the efficiency of identifying the QR code, thereby shortening the time for locomotive positioning and improving production efficiency.
[0015] In combination with the first aspect, in one embodiment of the present application, the multiple candidate two-dimensional codes include at least a first candidate two-dimensional code and a second candidate two-dimensional code, and the first candidate two-dimensional code has a greater anti-fouling ability than the second candidate two-dimensional code; the identification display device selects the target two-dimensional code through the following steps: if the environmental indicator value is greater than a threshold, the first candidate two-dimensional code is selected as the target two-dimensional code; if the environmental indicator value is less than or equal to the threshold, the second candidate two-dimensional code is selected as the target two-dimensional code.
[0016] Therefore, the embodiment of the present application selects a target QR code that is consistent with the environment inside the reference object based on the anti-fouling ability of the candidate QR code, and can select a target QR code that is beneficial to improving production efficiency in scenarios with poor environmental data.
[0017] In a second aspect, the present application provides a system for controlling the operating status of a locomotive, the system comprising: a camera configured to photograph a target QR code on one side of a track in a reference object to obtain an image to be identified; a processor configured to acquire the image to be identified, and execute a method as described in any embodiment of the first aspect according to the image to be identified to obtain an instruction for controlling the operating status of the locomotive; and a task execution unit configured to acquire and execute the instruction.
[0018] In a third aspect, the present application provides a device for controlling the running state of a locomotive, the device comprising: an image acquisition module, configured to acquire an image to be identified, wherein the image to be identified is obtained by photographing a target QR code on one side of a track set in a reference object, and the locomotive can move on the track in the reference object; a position identification module, configured to obtain the position of the locomotive relative to the track by identifying information stored in the target QR code on the image to be identified; and an instruction generation module, configured to generate instructions for controlling the running state of the locomotive based on the position.
[0019] In combination with the third aspect, in one embodiment of the present application, the image to be identified includes a first two-dimensional code and a second two-dimensional code; the position identification module is also configured to: respectively identify the first two-dimensional code and the second two-dimensional code on the image to be identified to obtain a first position and a second position; search for a third position corresponding to the target two-dimensional code in the previous image of the image to be identified; based on the third position and the driving direction of the locomotive, select a target position from the first position and the second position, and use the target position as the position of the locomotive relative to the track.
[0020] In combination with the third aspect, in one embodiment of the present application, the position identification module is further configured to: select, in the travel direction of the locomotive, from the first position and the second position, the one closest to the third position as the target position.
[0021] In combination with the third aspect, in one embodiment of the present application, the position of the locomotive relative to the track is a real-time position; the position identification module is also configured to: identify the information stored in the target QR code on the image to be identified; merge the information stored in the target QR code with the position information of satellite positioning to obtain the real-time position of the locomotive relative to the track.
[0022] In combination with the third aspect, in one embodiment of the present application, the target QR code is selected by an identification display device from multiple candidate QR codes through environmental indicator values, and the environmental indicator values are obtained by monitoring the environmental data within the reference object through environmental monitoring equipment, wherein the type of environmental data includes at least air dust.
[0023] In combination with the third aspect, in one embodiment of the present application, the multiple candidate two-dimensional codes include at least a first candidate two-dimensional code and a second candidate two-dimensional code, and the first candidate two-dimensional code has a greater anti-fouling ability than the second candidate two-dimensional code; the identification display device selects the target two-dimensional code through the following steps: if the environmental indicator value is greater than a threshold, the first candidate two-dimensional code is selected as the target two-dimensional code; if the environmental indicator value is less than or equal to the threshold, the second candidate two-dimensional code is selected as the target two-dimensional code.
[0024] In a fourth aspect, the present application provides an electronic device comprising: a processor, a memory and a bus; the processor is connected to the memory via the bus, the memory stores a computer program, and when the computer program is executed by the processor, it can implement the method described in any embodiment of the first aspect.
[0025] In a fifth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed, can implement the method described in any embodiment of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 A schematic diagram of the system composition for controlling the running status of a locomotive shown in an embodiment of the present application;
[0027] Figure 2 One of the flow charts of the method for controlling the running state of a locomotive shown in the embodiment of the present application;
[0028] Figure 3 The second flowchart of the method for controlling the running state of a locomotive shown in the embodiment of the present application;
[0029] Figure 4 The third flowchart of the method for controlling the running state of a locomotive shown in the embodiment of the present application;
[0030] Figure 5 This is a schematic diagram of the composition of a device for controlling the running state of a locomotive shown in an embodiment of the present application;
[0031] Figure 6 A schematic diagram of the composition of an electronic device shown in an embodiment of the present application. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0033] The embodiments of the present application can be applied to the scenario of positioning a locomotive located within a reference object. In order to improve the problems in the background technology, in some embodiments of the present application, the locomotive is positioned by identifying a target QR code set on one side of the reference track. For example, in some embodiments of the present application, an image to be identified showing a target QR code is obtained, and the information of the target QR code on the image to be identified is identified to obtain the positioning data of the locomotive, and then the running state of the locomotive is controlled according to the positioning data of the locomotive, so that the locomotive can start or stop at a preset position.
[0034] The method steps in the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0035] Figure 1 A schematic diagram of the system composition for controlling the running state of a locomotive in some embodiments of the present application is provided, and the system includes a camera 110, a processor 120, and a task execution unit 130. Specifically, the camera 110 photographs the target two-dimensional code on one side of the track in the reference object to obtain an image to be identified, and sends the image to be identified to the processor 120. After receiving the image to be identified, the processor 120 identifies the target two-dimensional code displayed in the image to be identified, obtains the position of the locomotive relative to the track, and generates an instruction to control the running state of the locomotive based on the relative position, and then sends the instruction to the task execution unit 130. After receiving the instruction, the task execution unit 130 controls the running state of the locomotive according to the content of the instruction.
[0036] What is different from the embodiments of the present application is that in the related art, the positioning of the rail locomotive mainly relies on a satellite positioning system with inertial navigation. The satellite positioning system with inertial navigation is greatly affected by the building environment around the track, resulting in the inability to accurately locate the locomotive, and thus the inability to accurately control the running status of the locomotive. The embodiments of the present application locate the position of the locomotive by identifying the target QR code set in the reference object. Therefore, the embodiments of the present application do not need to rely entirely on satellite positioning like the related art to obtain the position of the locomotive relative to the reference object.
[0037] At present, the mainstream solution for positioning rail locomotives in steel plants relies on satellite positioning systems with inertial navigation. The satellite positioning system with inertial navigation can meet the positioning accuracy requirements in unobstructed and relatively open scenes, but it cannot accurately locate in scenes with steel structures (steel frame bridges, pipelines, blast furnaces, etc.) or buildings (factory buildings, high walls, etc.) around the track. The positioning coordinates of the rail locomotive are randomly distributed around the track due to the errors of the satellite positioning system; the positioning data of the rail locomotive has a single source, and it is difficult for the rail locomotive to determine its current actual position based on the positioning coordinates of the satellite positioning system. Relying solely on this method will cause many difficulties for the position display, task scheduling and unmanned control of the rail locomotive.
[0038] Therefore, the existing rail locomotive positioning system has the following problems: the rail locomotive positioning data source is single and has poor reliability; the rail locomotive cannot be accurately positioned in areas blocked by steel frame bridges, pipelines, factory buildings, high walls, etc. by simply relying on the satellite positioning system with inertial navigation; the position coordinates output by the satellite positioning system with inertial navigation are randomly distributed around the track due to errors; near the switch, it is difficult for the rail locomotive to determine the current actual track position based on the positioning coordinates, resulting in the inability to determine the exact position of the locomotive.
[0039] In order to solve the above problems, the present application can obtain the locomotive positioning by identifying the QR code on one side of the track in the industrial scene of a steel plant when the locomotive is traveling on steel frame bridges, pipelines, factory buildings, blast furnaces and other areas. The positioning data of the locomotive can be accurately obtained, thereby greatly improving the positioning accuracy in complex scenes, and achieving the output of high-precision positioning data at through-type workstations and workstations with severe occlusion, providing necessary data support for the position display, task scheduling and unmanned control of the locomotive.
[0040] That is to say, the system for controlling the operating status of the locomotive provided in the present application adopts the QR code generation algorithm, QR code recognition algorithm and other technologies provided by OpenCV (it can be understood that OpenCV is a cross-platform computer vision library), so that the rail locomotive can be accurately positioned when passing through areas that are severely obscured and cannot use the Global Navigation Satellite System (GNSS) and through-type work stations that require high-precision positioning information, thereby improving the reliability of rail locomotive positioning and providing strong support for subsequent position display and unmanned control.
[0041] A solution for controlling the running state of a locomotive provided by some embodiments of the present application is described below using a processor as an example.
[0042] At least to solve the problems in the background technology, such as Figure 2 As shown, some embodiments of the present application provide a method for controlling the running state of a locomotive, the method comprising:
[0043] S210, obtaining an image to be recognized.
[0044] It should be noted that the image to be identified is obtained by shooting with a high-speed camera installed on the locomotive. The installation rule of the high-speed camera is to install the high-speed camera on the side of the locomotive in the forward direction.
[0045] It should be noted that the image to be identified is obtained by photographing the target QR code set on one side of the track in the reference object, and the locomotive can move on the track in the reference object. That is to say, a track is set on the ground of the reference object, and multiple target QR codes for locomotive positioning are installed at intervals on one side of the track. When the locomotive stops or moves in the reference object, the high-speed camera installed on the locomotive photographs the target QR code at fixed time intervals to obtain the image to be identified.
[0046] As a specific embodiment of the present application, the reference object can be a steel frame bridge, a pipeline, a factory building, a high wall, a blast furnace, etc., and the locomotive needs to enter the reference object to operate. For example, the reference object is a blast furnace, and the locomotive enters the reference object to operate. The locomotive stops and loads the goods in the designated position of the reference object, and then starts to drive out of the blast furnace. The staff arranges the target QR code next to the track of the blast furnace, and the position of the locomotive relative to the track can be obtained through the image to be identified, and the locomotive can be accurately controlled to stop or start at a fixed position. It can be understood that this embodiment is only an example, and the embodiments of the present application are not limited to this.
[0047] It is understandable that the target two-dimensional code set on one side of the track can also be replaced by a barcode, an electronic tag for radio frequency identification (RFID), etc.
[0048] In one implementation of the present application, before obtaining the image to be recognized, it is necessary to pre-generate a plurality of candidate QR codes.
[0049] Specifically, since the locomotive needs to start, stop, load, unload, and other operations at a preset position within the reference object, the management personnel need to place the target QR code at least at the preset position. It is understandable that in addition to placing the target QR code at the preset position, the target QR code can also be placed at other locations that need to be located. The process of establishing a QR code includes: determining the track corresponding to each preset position, and then numbering each QR code on the track according to the direction of track laying and the direction of locomotive travel. For example, first determine the track corresponding to each installation position, and then number the QR code set on each track in ascending order from south (or west) to north (east) (for example: 01 to 99), and the generated QR code ID is named using the track name and QR code number.
[0050] The generated QR code will use the style of a matrix QR code (Quick Response Code, QR code). QR code has strong adaptability to dirt and damage and can be read from any direction, which is very suitable for track positioning scenarios. Since the use environment of the steel plant is easily contaminated with dirt or damage, this application uses a hollow QR code, using a black steel plate as the back plate, and a white steel plate to hollow out the black code element position according to the QR code style, and then install the two steel plates together, so that the identification and positioning QR code has better anti-fouling performance.
[0051] In one embodiment of the present application, in order to improve production efficiency, in the process of establishing a QR code, multiple candidate QR codes are established at the same preset position. It can be understood that the multiple candidate QR codes at the same preset position store the same information, and the anti-fouling capabilities of each candidate QR code are different.
[0052] Specifically, the target QR code is selected by the identification display device from multiple candidate QR codes through environmental indicator values, and the environmental indicator values are obtained by monitoring environmental data in a reference object through environmental monitoring equipment, wherein the type of environmental data at least includes air dust.
[0053] That is to say, the present application displays the target QR code through a sign display device, and the sign display device is connected to the environmental monitoring device installed in the reference object. Since the reference object of the present application is a blast furnace in a steel plant, the internal environment of the reference object is poor, and pollutants such as dust or coal slag will usually contaminate the target QR code. Therefore, in order to accurately identify it, the anti-fouling ability of the target QR code is particularly important. Since the recognition speed of a QR code with strong anti-fouling ability is slow, and the recognition speed of a QR code with weak anti-fouling ability is fast, in order to ensure both accurate recognition and recognition efficiency, the present application monitors environmental index values such as air dust in the reference object and coal slag accumulation on the ground through environmental monitoring equipment, clarifies the environmental conditions in the reference object through environmental index values, and replaces the target QR code that is adapted to the environmental conditions through the sign display device.
[0054] It can be understood that the anti-fouling ability of a QR code can be interpreted as: a QR code with an anti-fouling ability of level one (level L) can be accurately identified when it is blocked by foreign objects by less than 7%; a QR code with an anti-fouling ability of level two (level M) can be accurately identified when it is blocked by foreign objects by less than 15%; a QR code with an anti-fouling ability of level three (level Q) can be accurately identified when it is blocked by foreign objects by less than 25%; and a QR code with an anti-fouling ability of level four (level H) can be accurately identified when it is blocked by foreign objects by less than 30%.
[0055] It should be noted that the sign display device is an automatic control device, including an environmental monitoring module, a QR code replacement module and a QR code cleaning module. The environmental monitoring module obtains the environmental index value within the time period from the environmental monitoring device at regular intervals, and averages the environmental index value within the time period to obtain the average index value. The QR code replacement module then compares the average index value with the threshold value, obtains the QR code replacement instruction, and displays the corresponding target QR code. The QR code cleaning module then puts the replaced QR code back into the sign display device, and uses the cleaning device inside the sign display device to clean the replaced QR code.
[0056] For example, the plurality of candidate two-dimensional codes include at least a first candidate two-dimensional code and a second candidate two-dimensional code, and the first candidate two-dimensional code has a greater anti-fouling capability than the second candidate two-dimensional code. If the environmental index value is greater than a threshold, the first candidate two-dimensional code is selected as the target two-dimensional code, and if the environmental index value is less than or equal to the threshold, the second candidate two-dimensional code is selected as the target two-dimensional code.
[0057] As a specific embodiment of the present application, the first candidate QR code is a Q-level QR code, the second candidate QR code is an M-level QR code, and the monitored environmental index value is air dust 10mg / m 3 The threshold is greater than or equal to 15 mg / m 3 , then the Q-level Q-level code is selected, then, according to the threshold, the target Q-level code is judged to be the second candidate QR code.
[0058] As a specific embodiment of the present application, the QR code of the present application needs to store two double-type coordinate system data and the corresponding string-type QR code ID. After determining the data format, the QR QR code is generated through the qrcode library in OpenCV. Finally, the size of the QR QR code is adjusted according to the position of the vehicle-mounted high-definition camera and the position where the QR code is installed, and the QR code is installed in the corresponding position. It can be understood that data encoding is to convert data characters into a bit stream, with one code word for every 8 bits, which constitutes a data code word sequence as a whole.
[0059] Therefore, the embodiment of the present application fuses the information stored in the QR code with the location information of satellite positioning, and can use the location information of satellite positioning to supplement the location that the information stored in the QR code cannot cover, so as to obtain more comprehensive and richer positioning data. According to the anti-fouling ability of the candidate QR code, a target QR code that is consistent with the environment inside the reference object is selected, and for scenes with poor environmental data, a target QR code that is conducive to improving production efficiency can be selected.
[0060] S220, obtaining the position of the locomotive relative to the track by identifying the information stored in the target two-dimensional code on the image to be identified.
[0061] In one embodiment of the present application, before obtaining the position of the locomotive relative to the track, it is necessary to establish a map of the entire plant including reference objects.
[0062] Specifically, the high-precision track map needs to be preprocessed to process the high-precision track map data into a track line of geospatial polylines, forming a unique description file of the track line and a turnout status file. The track line is divided by track turnouts, and the line between turnouts is a track line and is named in a fixed way to ensure uniqueness.
[0063] For example, if there are switches at both ends of the track line, they are named by a larger switch number, an underscore, a track number ('00' or '01' to '99'), a dash, a smaller switch number, an underscore, and '00'.
[0064] If one end of the track line is a terminal, it is named by the turnout number at the turnout end, an underscore, '00', a dash, the turnout number prefixed with 'd' (dangerous), an underscore, and the track number ('00' or '01' to '99').
[0065] It should be noted that when there is more than one line between the turnouts, track numbers are designed to distinguish the tracks. '00', '01', etc. represent track numbers, and the track positions increase in sequence from south (or due west) to north (due east).
[0066] Specifically, the track switch status rules are as follows: according to the switch status, the track line determined by the next track switch or the track end to which the track switch leads is regarded as the forward path of the rail locomotive. After preprocessing, the track map module first needs to determine the QR code installation position, install the identification QR code next to each track line that needs QR code identification and positioning, and each QR code installation position needs to be measured on the spot to make the interval distance between adjacent QR codes appropriate. Finally, the percentage of each QR code location in the current track line is calculated, and the plane coordinate point of each QR code on the high-precision map can be calculated.
[0067] In one embodiment of the present application, the image to be identified includes a first two-dimensional code and a second two-dimensional code. S220 includes:
[0068] First, a first two-dimensional code and a second two-dimensional code on an image to be identified are identified respectively to obtain a first position and a second position.
[0069] That is to say, when the camera shoots the target QR code next to the track, two QR codes are usually captured. When there are two QR codes in an image to be identified, the information stored in the two QR codes needs to be identified separately first, that is, the first position obtained after identifying the first QR code is 30% of the position from south to north on the first track, and the second position obtained after identifying the second QR code is 35% of the position from south to north on the first track.
[0070] Then, the third position corresponding to the target two-dimensional code in the previous image of the image to be recognized is searched.
[0071] That is, in the process of determining the target position, it is necessary to refer to the position corresponding to the target QR code in the previous image to be identified. For example, the third position corresponding to the target QR code in the previous image is located at 25% of the position from south to north on the first track.
[0072] Finally, based on the third position and the travel direction of the locomotive, a target position is selected from the first position and the second position, and the target position is used as the position of the locomotive relative to the track.
[0073] Specifically, in the traveling direction of the locomotive, the one closest to the third position is selected from the first position and the second position as the target position.
[0074] For example, assuming that the locomotive is traveling from south to north, the first position obtained after recognizing the first QR code is 30% of the position from south to north on the first track, and the second position obtained after recognizing the second QR code is 35% of the position from south to north on the first track. The third position corresponding to the target QR code in the previous image is 25% of the position from south to north on the first track. The first position is the closest to the third position, so the first position is used as the target position.
[0075] As a specific embodiment of the present application, the data collected by the vehicle-mounted high-definition camera is sent to the QR code recognition module through the network module. The deviation of the installation position of the on-site QR code or the large bend of the track may cause the vehicle-mounted high-definition camera to collect two QR codes at the same time. For such special cases, the QR code recognition module uses the built-in QR code detector of OpenCV to decode both sets of QR codes. The program will compare the QR code ID decoded last time, and obtain the direction given by the GNSS inertial navigation system at the same time. By comparing and integrating the inertial navigation direction, the current locomotive's movement direction can be obtained. According to the locomotive's movement direction, only the QR code information closest to the movement direction will be retained and the data will be decoded.
[0076] For the two processes of QR code recognition, OpenCV4 provides multiple functions to implement each process, including the detect function for locating the QR code, the decode function for decoding the QR code according to the positioning result, and the detectAndDecode function for locating and decoding at the same time. Among the three information returned, rets is the QR code information, points is the four position points of the QR code, and code is the QR code code. In this way, the current accurate positioning information of the rail locomotive can be identified.
[0077] It is understandable that, as a specific embodiment of the present application, the target QR code may only store the identifier of the target QR code, and after the processor recognizes the identifier, the position of the locomotive relative to the track corresponding to the identifier is searched in the background database according to the identifier. As another specific embodiment of the present application, the position of the locomotive relative to the track may be directly stored in the target QR code, and the position may be obtained after directly recognizing the target QR code.
[0078] Therefore, the embodiment of the present application can prevent positioning and recognition errors by selecting the target QR code based on the driving direction of the locomotive when there are two QR codes on the image to be recognized, thereby improving positioning accuracy. Positioning and recognition errors can be prevented by selecting the target position from two positions based on the information of the previous QR code.
[0079] For example, Figure 3 As shown, the process of identifying the target QR code includes:
[0080] S301, start. S302, image recognition, i.e., identifying the target QR code in the image to be identified captured by the camera. S303, information decoding, i.e., identifying the information stored in the target QR code. S304, determining the version and removing the mask, i.e., determining the anti-fouling level of the target QR code, and decrypting the target QR code. S305, restoring data and error correction codewords, i.e., restoring the data stored in the target QR code, and correcting the damaged parts of the target QR code. S306, whether there is an error in the error correction codeword, if there is an error, execute S307 error correction and then execute S308 data codeword decoding, if there is no error, execute S308 digital codeword decoding, then execute S309 to output the recognition result, and finally execute S310 to end, i.e., end the recognition of this image to be identified.
[0081] In one embodiment of the present application, the position of the locomotive relative to the track is a real-time position. S220 includes: identifying information stored in a target QR code on the image to be identified, fusing the information stored in the target QR code with the position information of satellite positioning, and obtaining the real-time position of the locomotive relative to the track.
[0082] That is to say, since the target QR code is only placed at the specified preset position, if the real-time position of the locomotive on the track needs to be obtained, it needs to be integrated with the position information of satellite positioning, that is, the position recognized by the target QR code and the position information of satellite positioning are used to jointly determine the real-time position of the locomotive relative to the track.
[0083] Specifically, the processor includes a data fusion and verification module. The processor obtains the locomotive position obtained by the GNSS system and the locomotive position obtained by identifying the target QR code in real time. When the data of the satellite positioning system (GNSS) with inertial navigation is stable and available, its latitude and longitude data is projected onto the high-precision track map. After receiving the locomotive position obtained by the GNSS system, the current positioning data can be corrected. When passing through the track covered by the target QR code information, the QR code recognition module pushes the locomotive position obtained by identifying the target QR code to the data fusion and verification module, which is also used to correct the current positioning data. If the GNSS data of the track passed is not available and there is no QR code information coverage, the data fusion and verification module will use the last collected target QR code as the base point and combine mathematical induction to perform data verification. Mathematical induction is a different way to prove that any given situation is a correct mathematical theorem. Although the name of mathematical induction contains "induction", mathematical induction is not an imprecise inductive reasoning method, it belongs to a completely rigorous deductive reasoning method. Assuming that the base point coordinate position is accurate, the position information can be deduced based on the speed and direction given by the inertial navigation device (IMU inertial measurement unit) in the GNSS until the next target QR code recognition data or available GNSS data arrives, eliminating possible errors.
[0084] That is to say, when the locomotive is operating normally on a road section with good satellite signals, the locomotive position can be updated in real time using the GNSS fixed solution data. If the locomotive is traveling on a road section with poor satellite signals, the inertial navigation data inside the GNSS can provide the direction and speed of travel. The data fusion and verification module can deduce the current locomotive position based on the position of the last GNSS fixed solution of these data sets. When the locomotive travels to a road section that requires precise geographic coordinate information and has poor satellite signal interference, the locomotive can obtain the current accurate geographic location information as long as it passes the pre-installed target QR code. Before passing the next target QR code installation location or the arrival of a GNSS fixed solution, the locomotive can also use the GNSS inertial navigation data to accurately calculate the locomotive position.
[0085] As a specific embodiment of the present application, the satellite positioning device executes S401 to use GNSS for positioning, the processor executes S406 to obtain GNSS positioning data and S405 to obtain the positioning speed and direction, and after executing S406, executes S407 to obtain a high-precision orbit map and S408 to project the positioning data onto the orbit map. At the same time, the processor also executes S402 to read the QR code, S403 to identify the QR code, and S404 to obtain the QR code positioning data. Afterwards, according to the orbit map marked with positioning data obtained in S408, the positioning speed and direction obtained in S405, and the QR code positioning data obtained in S404, S409 is executed for data fusion and verification, and then S410 is executed for correction, and S411 is executed for output, and finally S412 is executed to end.
[0086] Therefore, the embodiments of the present application fuse the information stored in the QR code with the location information of satellite positioning, and can use the location information of satellite positioning to supplement the locations that the information stored in the QR code cannot cover, thereby obtaining more comprehensive and richer positioning data.
[0087] S230, generating an instruction for controlling the running state of the locomotive based on the position.
[0088] That is to say, the locomotive has a fixed position in the reference object and corresponds to fixed instructions. After confirming the position of the locomotive relative to the track, the locomotive is determined to determine which instructions it should execute based on the position, and corresponding instructions are generated to control the operating status of the locomotive. The instructions are then output to the task execution unit so that the task execution unit can obtain and execute the instructions.
[0089] Therefore, the rail locomotive QR code recognition and positioning system provided by the present application is based on a high-precision rail map. Positioning QR codes are installed at intervals beside the track where GNSS cannot accurately provide positioning data. The OpenCV image recognition algorithm is used to process the data collected by the on-board high-definition camera, and the location information contained in the QR code of the passing locomotive is extracted in real time, thereby correcting the GNSS data and realizing reliable and high-precision positioning of the locomotive in the entire track area.
[0090] Therefore, the key technical points of this application are to identify the QR code at a fixed position on the track to locate the locomotive; to process the possible situation of identifying two QR codes to obtain the accurate positioning position; and to fuse data from multiple sources to obtain the accurate and real-time locomotive position.
[0091] Therefore, the rail locomotive QR code recognition and positioning system proposes a method of applying QR code recognition to the positioning of rail locomotives in ironworks with complex operating environments. It uses the data mapped to high-precision maps by GNSS and the QR code recognition data to continuously correct the position and eliminate errors, thereby improving the reliability and accuracy of the positioning of rail locomotives in various environments. When two QR codes are recognized at the same time, the rail locomotive QR code recognition and positioning system can use more accurate QR code information to make positioning more precise by preprocessing the track map and QR code.
[0092] An implementation method of controlling the running state of a locomotive is described above, and a device for controlling the running state of a locomotive will be described below.
[0093] like Figure 5 As shown, some embodiments of the present application provide a device 500 for controlling the running state of a locomotive, the device comprising: an image acquisition module 510 , a position recognition module 520 and an instruction generation module 530 .
[0094] The image acquisition module 510 is configured to acquire an image to be identified, wherein the image to be identified is obtained by photographing a target two-dimensional code on one side of a track set in a reference object, and the locomotive can move on the track in the reference object.
[0095] The position recognition module 520 is configured to obtain the position of the locomotive relative to the track by recognizing the information stored in the target two-dimensional code on the image to be recognized.
[0096] The instruction generation module 530 is configured to generate an instruction for controlling the operating state of the locomotive based on the position.
[0097] In one embodiment of the present application, the image to be identified includes a first two-dimensional code and a second two-dimensional code; the position identification module 520 is also configured to: respectively identify the first two-dimensional code and the second two-dimensional code on the image to be identified to obtain a first position and a second position; search for a third position corresponding to the target two-dimensional code in the previous image of the image to be identified; based on the third position and the driving direction of the locomotive, select a target position from the first position and the second position, and use the target position as the position of the locomotive relative to the track.
[0098] In one embodiment of the present application, the position identification module 520 is further configured to: select, in the driving direction of the locomotive, from the first position and the second position, the one closest to the third position as the target position.
[0099] In one embodiment of the present application, the position of the locomotive relative to the track is a real-time position; the position identification module 520 is also configured to: identify the information stored in the target QR code on the image to be identified; merge the information stored in the target QR code with the position information of satellite positioning to obtain the real-time position of the locomotive relative to the track.
[0100] In one embodiment of the present application, the target QR code is selected by an identification display device from multiple candidate QR codes through environmental indicator values, and the environmental indicator values are obtained by monitoring environmental data within the reference object through environmental monitoring equipment, wherein the type of environmental data includes at least air dust.
[0101] In one embodiment of the present application, the multiple candidate two-dimensional codes include at least a first candidate two-dimensional code and a second candidate two-dimensional code, and the first candidate two-dimensional code has a greater anti-fouling ability than the second candidate two-dimensional code; the identification display device selects the target two-dimensional code through the following steps: if the environmental indicator value is greater than a threshold, the first candidate two-dimensional code is selected as the target two-dimensional code; if the environmental indicator value is less than or equal to the threshold, the second candidate two-dimensional code is selected as the target two-dimensional code.
[0102] In the embodiments of the present application, Figure 5 The modules shown can achieve Figures 1 to 4 Each process in the method embodiment. Figure 5 The operations and / or functions of each module in Figures 1 to 4 For details, please refer to the description in the above method embodiment. To avoid repetition, detailed description is appropriately omitted here.
[0103] like Figure 6 As shown, an embodiment of the present application provides an electronic device 600, including: a processor 610, a memory 620 and a bus 630, wherein the processor is connected to the memory via the bus, and the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, they are used to implement a method as described in any one of the above embodiments. For details, please refer to the description in the above method embodiments. To avoid repetition, the detailed description is appropriately omitted here.
[0104] Among them, the bus is used to realize the direct connection and communication of these components. Among them, the processor in the embodiment of the present application can be an integrated circuit chip with signal processing capabilities. The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0105] The memory may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), etc. The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the method described in the above embodiment may be executed.
[0106] Understandably, Figure 6 The structure shown is for illustration only and may also include Figure 6 More or fewer components as shown, or with Figure 6 Different configurations are shown. Figure 6 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0107] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a server, any of the methods described in all the above-mentioned implementation modes is implemented. For details, please refer to the description in the above-mentioned method embodiments. To avoid repetition, the detailed description is appropriately omitted here.
[0108] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application. It should be noted that similar numbers and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0109] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for controlling the running state of a locomotive, characterized in that: Applied to a processor, the method comprises: Acquire an image to be identified, wherein the image to be identified is obtained by photographing a target two-dimensional code set on one side of a track in a reference object, and the locomotive can move on the track in the reference object; Obtaining the position of the locomotive relative to the track by identifying information stored in the target two-dimensional code on the image to be identified; generating instructions for controlling an operating state of the locomotive based on the position; The target two-dimensional code is selected by the identification display device from a plurality of candidate two-dimensional codes through an environmental index value, and the environmental index value is obtained by monitoring the environmental data in the reference object through an environmental monitoring device, wherein the type of the environmental data at least includes air dust; The multiple candidate two-dimensional codes include at least a first candidate two-dimensional code and a second candidate two-dimensional code, and the first candidate two-dimensional code has a greater anti-fouling capability than the second candidate two-dimensional code; The identification display device selects the target QR code through the following steps: If the environmental indicator value is greater than a threshold, selecting the first candidate two-dimensional code as the target two-dimensional code; If the environmental indicator value is less than or equal to a threshold, the second candidate two-dimensional code is selected as the target two-dimensional code.
2. The method according to claim 1, characterized in that: The image to be identified includes a first two-dimensional code and a second two-dimensional code; The obtaining the position of the locomotive relative to the track by identifying the information stored in the target two-dimensional code on the image to be identified includes: Respectively identifying the first two-dimensional code and the second two-dimensional code on the image to be identified to obtain a first position and a second position; Finding a third position corresponding to the target two-dimensional code in the previous image of the image to be identified; Based on the third position and the traveling direction of the locomotive, a target position is selected from the first position and the second position, and the target position is used as the position of the locomotive relative to the track.
3. The method according to claim 2, characterized in that The selecting a target position from the first position and the second position based on the third position and the driving direction of the locomotive comprises: In the traveling direction of the locomotive, the one closest to the third position is selected from the first position and the second position as the target position.
4. The method according to any one of claims 1 to 3, characterized in that: The position of the locomotive relative to the track is a real-time position; The obtaining the position of the locomotive relative to the track by identifying the information stored in the target two-dimensional code on the image to be identified includes: Identify the information stored in the target two-dimensional code on the image to be identified; The information stored in the target two-dimensional code is integrated with the position information of satellite positioning to obtain the real-time position of the locomotive relative to the track.
5. A system for controlling the running state of a locomotive, characterized in that: The system comprises: A camera is configured to capture a target QR code on one side of the track in the reference object to obtain an image to be identified; A processor, configured to obtain the image to be recognized, and execute the method according to any one of claims 1 to 4 according to the image to be recognized to obtain an instruction for controlling the running state of the locomotive; The task execution unit is configured to obtain and execute the instruction.
6. A device for controlling the running state of a locomotive, characterized in that: The device comprises: An image acquisition module is configured to acquire an image to be identified, wherein the image to be identified is obtained by photographing a target two-dimensional code set on one side of a track in a reference object, and the locomotive can move on the track in the reference object; A position recognition module, configured to obtain the position of the locomotive relative to the track by recognizing the information stored in the target two-dimensional code on the image to be recognized; an instruction generation module configured to generate an instruction for controlling the operating state of the locomotive based on the position; The target two-dimensional code is selected by the identification display device from a plurality of candidate two-dimensional codes through an environmental index value, and the environmental index value is obtained by monitoring the environmental data in the reference object through an environmental monitoring device, wherein the type of the environmental data at least includes air dust; The multiple candidate two-dimensional codes include at least a first candidate two-dimensional code and a second candidate two-dimensional code, and the first candidate two-dimensional code has a greater anti-fouling capability than the second candidate two-dimensional code; The identification display device selects the target QR code through the following steps: If the environmental indicator value is greater than a threshold, selecting the first candidate two-dimensional code as the target two-dimensional code; If the environmental indicator value is less than or equal to a threshold, the second candidate two-dimensional code is selected as the target two-dimensional code.
7. An electronic device, characterized in that: include: processor, memory, and bus; The processor is connected to the memory via the bus, the memory stores a computer program, and the computer program, when executed by the processor, can implement the method as claimed in any one of claims 1 to 4.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed, can implement the method as claimed in any one of claims 1 to 4.
