Data transmission method and device, electronic equipment and storage medium

By selecting different communication connections according to the data type in the data processing unit of the optoelectronic device for transmission, the problem of excessive circuit boards and data blockage due to different communication interfaces is solved, and efficient data transmission and multi-interface distribution functions are realized.

CN120050240APending Publication Date: 2025-05-27CENT CHINA OPTOELECTRONICS TECH RES INST (CHINA STATE SHIPBUILDING CORP 717TH RES INST)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411897807.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

In optoelectronic devices, due to the integration of communication methods of multiple different interfaces on one circuit board, there are too many circuit boards, and multiple sensors transmit and receive data simultaneously may lead to data blockage.

Method used

By determining the data type in the data processing unit, data transmission is performed using different communication connections (such as optical fiber and serial ports), ensuring that different types of data are transmitted through different transmission lines.

Benefits of technology

The function of multi-sensor data is realized to be distributed downward through various interfaces, avoiding data blockage, improving data transmission efficiency, and reducing the number of circuit boards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120050240A_ABST
    Figure CN120050240A_ABST
Patent Text Reader

Abstract

The invention provides a data transmission method and device, electronic equipment and a storage medium, the data transmission method is used for a data processing unit, and the data transmission method comprises the following steps: before a first unit transmits data to a second unit, determining a data type of the data; when the data type is the first type of data, controlling the first unit to transmit the data to the second unit through the first communication connection; and when the data type is the second type of data, controlling the first unit to transmit the data to the second unit through the second communication connection. According to the invention, different types of data are transmitted through different transmission lines, the problem of data congestion possibly caused during data receiving and transmitting is solved, the function of distributing data downwards through multiple lines is realized, and the data transmission efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of embedded software development. Specifically, it relates to a data transmission method, device, electronic device, and storage medium. Background Art

[0002] In the related art, the communication of all sensors required on an optoelectronic device is concentrated on a single circuit board. When communication methods with multiple different interfaces are integrated on one circuit board, it not only leads to an excessive number of circuit boards due to different communication interfaces for multiple sensors, but also may cause data blockage when multiple sensors simultaneously transmit and receive data, which is an urgent problem to be solved currently. Summary of the Invention

[0003] The present invention aims to solve at least one of the technical problems existing in the prior art or related technologies.

[0004] In a first aspect, an embodiment of the present invention provides a data transmission method for a data processing unit. The data transmission method includes: before the first unit transmits data to the second unit, determining the data type of the data; when the data type is the first type of data, controlling the first unit to transmit the data to the second unit through a first communication connection; when the data type is the second type of data, controlling the first unit to transmit the data to the second unit through a second communication connection.

[0005] In a second aspect, an embodiment of the present invention provides a data transmission device for a data processing unit. The data transmission device includes: a determination module for determining the data type of the data before the first unit transmits data to the second unit; a first control module for controlling the first unit to transmit the data to the second unit through a first communication connection when the data type is the first type of data; a second control module for controlling the first unit to transmit the data to the second unit through a second communication connection when the data type is the second type of data.

[0006] In a third aspect, an embodiment of the present invention provides an electronic device, including: a processor and a memory, where the memory stores a program or instruction that can run on the processor, and when the program or instruction is executed by the processor, it implements the steps of the data transmission method in any one of the above embodiments.

[0007] In a fourth aspect, an embodiment of the present invention provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by the processor, it implements the steps of the data transmission method in any one of the above embodiments.

[0008] The beneficial effects brought by the present invention are as follows:

[0009] As can be seen from the above solution, the embodiment of the present invention provides a data transmission method, which realizes the transmission of different types of data through different transmission lines, solves the problem of possible data blockage during data reception and transmission, realizes the function of distributing data downward through multiple lines, and improves the efficiency of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 FIG. 1 is one of the schematic flowcharts of a data transmission method according to an embodiment of the present invention;

[0011] Figure 2 FIG. 2 is another schematic flowchart of a data transmission method according to an embodiment of the present invention;

[0012] Figure 3 FIG. 3 is yet another schematic flowchart of a data transmission method according to an embodiment of the present invention;

[0013] Figure 4 FIG. 4 is still another schematic flowchart of a data transmission method according to an embodiment of the present invention;

[0014] Figure 5 FIG. 5 is another schematic flowchart of a data transmission method according to an embodiment of the present invention;

[0015] Figure 6 FIG. 6 is yet another schematic flowchart of a data transmission method according to an embodiment of the present invention;

[0016] Figure 7 FIG. 7 is one of the schematic block diagrams of the structure of a data transmission device according to an embodiment of the present invention;

[0017] Figure 8 FIG. 8 is the schematic block diagram of the structure of an electronic device according to an embodiment of the present invention;

[0018] Figure 9 FIG. 9 is another schematic block diagram of the structure of a data transmission device according to an embodiment of the present invention;

[0019] Figure 10 FIG. 10 is still another schematic flowchart of a data transmission method according to an embodiment of the present invention;

[0020] Figure 11 FIG. 11 is yet another schematic flowchart of a data transmission method according to an embodiment of the present invention; DETAILED DESCRIPTION OF THE EMBODIMENTS

[0021] To make the objectives, technical solutions and advantages of the present invention more clear, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without making creative efforts shall fall within the protection scope of the present invention.

[0022] As Figure 1 shown, an embodiment of the present invention provides a data transmission method for a data processing unit. The method includes:

[0023] Step 102: Before the first unit transmits data to the second unit, determine the data type of the data.

[0024] Step 104: When the data type is the first type of data, control the first unit to transmit the data to the second unit through a first communication connection.

[0025] Step 106: When the data type is the second type of data, control the first unit to transmit the data to the second unit through a second communication connection.

[0026] In the data transmission method provided by the present invention, before the first unit transmits data to the second unit, the data processing unit first determines the data type of the data to be forwarded. If the data is the first type of data, control the first unit to transmit the data to the second unit through a first communication connection. If the data is the second type of data, control the first unit to transmit the data to the second unit through a second communication connection. The first communication connection and the second communication connection are different transmission lines, so the data transmission methods are different. Therefore, different types of data are transmitted through different transmission lines, solving the problem of possible data blockage during data reception and transmission, realizing the function of distributing data downward through multiple lines, and improving the data transmission efficiency.

[0027] In the related art, with the increase in the degree of device integration and the improvement of the requirement for device miniaturization, the device needs to minimize the types of circuit boards as much as possible, and each circuit board needs to implement more functions. For optoelectronic devices, various sensors are the most basic guarantee for optoelectronic devices to obtain external information and perform image recognition and processing. For example, visible light sensors transmit optical information to the image processing side, and various infrared sensors obtain infrared information and transmit it to the processing chip. These sensors together ensure the most basic image acquisition function of optoelectronic devices, and subsequent image processing can be realized. The servo control of the device also needs to obtain accurate device attitude information, such as azimuth angle, pitch angle, etc., which all need corresponding sensors to achieve. Therefore, each optoelectronic device requires a variety of sensors with different communication methods, which puts higher requirements on the circuit boards for the communication of various sensors.

[0028] According to the requirements of miniaturized devices, in order to reduce the number of circuit boards and improve the integration level, the communication of all sensors required on the optoelectronic device is centralized on the sensor data processing board. The sensor data processing board can implement optical fiber communication, serial communication, network communication, CAN (Controller Area Network) communication, and communication between the PS (Processing System) and PL (Processing Logic) terminals inside the FPGA (Field Programmable Gate Array) chip with various sensors. Integrating communication methods with multiple different interfaces on one circuit board also poses higher requirements for software design.

[0029] Specifically, the data processing unit is the sensor data processing board, the first unit is the system management board, and the second unit is composed of multiple different types of sensors. The sensor data processing board sends the received data to the corresponding sensors through different connection lines according to the corresponding types. The solution provided by the present invention realizes the data communication functions of multiple sensors, integrates the instructions and reported data of different sensors. On the one hand, it solves the problem of excessive circuit boards caused by different communication interfaces of multiple sensors, and on the other hand, it solves the problem of possible data blockage when multiple sensors send and receive data simultaneously.

[0030] Among them, the first communication connection is through optical fiber for communication, and the second communication connection is through serial port for communication. The first unit and the data processing unit communicate through optical fiber, and the data content mainly includes two types. One is the instruction data of the sensor, and the other is the status information of the sensor, power supply board, etc. Therefore, the functions of distributing multi-sensor data downward through various interfaces and reporting the status information of multiple sensors and the power supply board itself are realized.

[0031] According to the above data transmission method provided by the present invention, the following additional technical features may also be included:

[0032] In the above embodiments, further, the first type of data includes visible light sensor instruction data, the second type of data includes infrared sensor instruction data and laser sensor instruction data, the second unit includes a visible light sensor, a mid-wave infrared sensor, a long-wave infrared sensor, and a laser sensor, and the method further includes: when the data type is the first type of data, controlling the first unit to transmit the data to the second unit through the first communication connection, specifically including: when the data is visible light sensor instruction data, transmitting the data to the visible light sensor through the first communication connection; when the data type is the second type of data, controlling the first unit to transmit the data to the second unit through the second communication connection, specifically including: when the data is infrared sensor instruction data, transmitting the data to the mid-wave infrared sensor or the long-wave infrared sensor through the second communication connection; when the data is laser sensor instruction data, transmitting the data to the laser sensor through the second communication connection.

[0033] In this embodiment, the first type of data includes visible light sensor instruction data, the second type of data includes infrared sensor instruction data and laser sensor instruction data, and the infrared sensor instruction data is divided into mid-wave infrared sensor data and long-wave infrared sensor data. The second unit includes a visible light sensor, a mid-wave infrared sensor, a long-wave infrared sensor, and a laser sensor, that is, the second unit is composed of a set of a visible light sensor, a mid-wave infrared sensor, a long-wave infrared sensor, and a laser sensor.

[0034] When the data to be transmitted is visible light sensor instruction data, the data is transmitted to the visible light sensor through the first communication connection, that is, the data processing unit receives visible light sensor data through an optical fiber and then sends the data to the visible light sensor through the optical fiber, thereby solving the problem of possible data blockage when multiple sensors simultaneously transmit and receive data, and realizing the function of distributing multi-sensor data downward through various interfaces.

[0035] When the data to be transmitted is infrared sensor instruction data, the data is transmitted to the mid-wave infrared sensor or the long-wave infrared sensor through the second communication connection; when the transmitted data is laser sensor instruction data, the data is transmitted to the laser sensor through the second communication connection. That is, the data processing unit receives mid-wave infrared sensor and long-wave infrared sensor data through an optical fiber and sends the data to the mid-wave infrared sensor and the long-wave infrared sensor through a serial port. If the data is laser sensor instruction data, the data is transmitted to the laser sensor through the serial port, thereby solving the problem of possible data blockage when multiple sensors simultaneously transmit and receive data, and realizing the function of distributing multi-sensor data downward through various interfaces.

[0036] Specifically, as Figure 2 shown, the data transmission method further includes:

[0037] Step 202: When the second unit transmits feedback data to the first unit, determine the data category of the feedback data;

[0038] Step 204: When the data category is visible light sensor instruction data or infrared sensor instruction data, transmit the feedback data to the first unit through the first communication connection;

[0039] Step 206: When the data category is laser sensor instruction data, transmit the feedback data to the first unit through the second communication connection.

[0040] In this embodiment, when each sensor sends feedback data to the system management board, the data processing unit also needs to judge the data category. The visible light sensor, mid-wave infrared sensor, and long-wave infrared sensor send feedback data to the system management board through optical fibers, while the laser sensor sends feedback data to the system management board through a serial port. In addition, the feedback data of the laser sensor is received byte by byte. When receiving, it is first judged whether the feedback data contains laser status information or ranging information, and according to the judgment result, data with a length of 8 or 7 bytes is received respectively. Therefore, the function of reporting back through different interfaces by multiple sensors is realized, avoiding the problem of possible data blockage.

[0041] In the above embodiment, as Figure 3 shown, specifically, the data transmission method further includes:

[0042] Step 302: Obtain the first status information of the data processing unit and the second status information of the second unit;

[0043] Step 304: Generate the first diagnostic information and the second diagnostic information according to the first status information and the second status information;

[0044] Step 306: Transmit the first diagnostic information and the second diagnostic information to the first unit through the first communication connection.

[0045] In this embodiment, the data processing unit obtains its own status information (i.e., the first status information) and the status information of each sensor (i.e., the second unit) (i.e., the second status information), judges whether it is working properly, generates the corresponding first diagnostic information and the second diagnostic information, and reports the first diagnostic information and the second diagnostic information to the system management board (i.e., the first unit), thereby realizing the status detection of components and avoiding losses caused by failures.

[0046] Among them, the self - status information of the sensor data processing board (i.e., the first status information) is transmitted from the PL end of the SOC (system on chip) chip to the internal address of the chip, and the PS end reads the self - status information at the corresponding address, including board - card interface detection, self - detection of this board, angle measurement detection, image detection, etc. The software at the PS end calculates the read data and transmits the calculated data to the system management board.

[0047] In the above - mentioned embodiment, further, as Figure 4 shown, specifically, the data transmission method further includes:

[0048] Step 402: Obtain the third status information of the third unit through the third communication connection;

[0049] Step 404: Transmit the third status information to the first unit through the first communication connection.

[0050] In this embodiment, obtaining the third status information of the third unit through the third communication connection means that the sensor data processing board (i.e., the data processing unit) is connected to the third unit through two CAN interfaces (the third communication connection). The third unit includes multiple power supply boards and stoppers. The sensor data processing board obtains the third status information and then transmits it to the first unit through optical fiber. The function of reporting the self - status information of the power supply board is realized, which helps the system monitor its status.

[0051] Among them, the CAN communication between the sensor data processing board and the power supply boards and stoppers of the third unit adopts the protocol of extended frame. The CAN data reception adopts the interrupt mode, and the data caching and sending are performed at a certain period regularly.

[0052] In the above - mentioned embodiment, further, as Figure 5 shown, before the first unit transmits data to the second unit, determine the data type of the data, specifically including:

[0053] Step 502: Receive the optical - fiber data sent by the first unit;

[0054] Step 504: Correct the optical - fiber data to obtain the data.

[0055] Step 506: Determine that the data is one of the first - type data, the second - type data, and the third - type data according to the data sending object.

[0056] In this embodiment, the data processing unit receives the optical fiber data sent by the first unit. First, it needs to correct the zero position parameters of the data to ensure data accuracy. After the correction is completed, according to the data sending object, such as a specific sensor or a power supply board, it is determined that the data is one of the first type of data, the second type of data, and the third type of data. Thus, the accuracy of the data is improved, providing a basis for the subsequent data distribution.

[0057] Exemplarily, the optical fiber data sent by the system management board to the sensor data processing board contains instructions. The instructions have a packet header, and different packet headers represent that the instructions are to be sent to different destinations. After the sensor data processing board determines the destination of the instruction, it sends the valid part of the instruction to the corresponding sensor or power supply board, etc.

[0058] Among them, the third type of data is a servo control instruction. The servo control instruction is sent to the third unit, and the servo control instruction is transmitted through the network to the servo drive board to control the drive device. In addition to the above first type of data, second type of data, and third type of data, there may also be other instructions, which are specifically set according to the actual application.

[0059] In the above embodiment, further, as Figure 6 shown, specifically, the data transmission method further includes:

[0060] Step 602: Receive the zero position parameters of the infrared sensor instruction data sent by the first unit;

[0061] Step 604: Perform data type conversion according to the zero position parameters to obtain a code value;

[0062] Step 606: Send the code value to the mid-wave infrared sensor or long-wave infrared sensor in the second unit.

[0063] In this embodiment, the system management board (the first unit) transmits the zero position correction parameters of the infrared sensor to the sensor data processing board (the data processing unit) through the optical fiber. After the sensor data processing board receives the zero position parameters, it first caches them, converts the zero position parameters into floating-point numbers, and then determines the mid-wave, long-wave, wide field of view, and narrow field of view respectively, and converts the angle data into code values. Among them, positive numbers are directly converted into code values, and negative numbers are converted into complementary codes. Finally, the code values are transmitted to the infrared sensor to implement the zero position correction function.

[0064] As Figure 7As shown in the figure, a data transmission device 700 provided by the present invention includes: a determination module 710, configured to determine the data type of data before the first unit transmits data to the second unit; a first control module 720, configured to control the first unit to transmit the data to the second unit through a first communication connection when the data type is the first type of data; and a second control module 730, configured to control the first unit to transmit the data to the second unit through a second communication connection when the data type is the second type of data.

[0065] The data transmission device 700 provided by the present invention includes: a determination module 710, a first control module 720, and a second control module 730. Before the first unit transmits data to the second unit, the data processing unit first determines the data type of the data to be forwarded. If the data is the first type of data, it controls the first unit to transmit the data to the second unit through a first communication connection. If the data is the second type of data, it controls the first unit to transmit the data to the second unit through a second communication connection. The first communication connection and the second communication connection are different transmission lines, so the data transmission methods are different. Therefore, different types of data are transmitted through different transmission lines, solving the problem of possible data blockage during data reception and transmission, realizing the function of multi-line data distribution downward, and improving the data transmission efficiency.

[0066] As Figure 8 shown, an electronic device 800 provided in an embodiment of the present invention includes: a processor 810 and a memory 820. The memory stores a program or instruction that can run on the processor 810. When the program or instruction is executed by the processor 810, the steps of the data transmission method in any one of the above embodiments are implemented.

[0067] An electronic device 800 provided by the present application includes: a processor 810 and a memory 820. The memory stores a program or instruction that can run on the processor. When the program or instruction is executed by the processor, the steps of the data transmission method in any one of the above embodiments are implemented. Therefore, this type of electronic device has all the beneficial effects of the data transmission method in any one of the above embodiments.

[0068] A readable storage medium provided in an embodiment of the present application stores a program or instruction thereon. When the program or instruction is executed by a processor, the steps of the data transmission method in any one of the above embodiments are implemented.

[0069] A readable storage medium provided by the present application stores a program or instruction thereon. When the program or instruction is executed by a processor, the steps of the data transmission method in any one of the above embodiments are implemented. Therefore, this type of readable storage medium has all the beneficial effects of the data transmission method in any one of the above embodiments.

[0070] AsFigure 9 As shown in the figure, it shows the second structural schematic block diagram of the data transmission device of the all-programmable system-on-chip. The all-programmable system-on-chip includes a data processing unit (i.e., the sensor data processing board 910), a first unit (i.e., the system management board 930), a second unit 920, and a third unit 940. The data processing unit is the sensor data processing board 910, the first unit is the system management board 930, the second unit 920 includes a visible light sensor 921, a mid-wave infrared sensor 922, a long-wave infrared sensor 923, and a laser sensor 924, and the third unit 940 includes a power supply board 941 and a stopper 942. The third unit has servo control and zero position correction tape functions. The sensor data processing board 910 always receives the data sent by the visible light sensor 921, the mid-wave infrared sensor 922, the long-wave infrared sensor 923, and the laser sensor 924, and caches the data sent by each sensor. The sensor data is cached into different variables respectively. The communication method between each sensor and the sensor data processing board 910 adopts a combination of optical fiber communication and serial communication. The sensor data processing board mainly has two ways to process data. One is to directly forward the received data without any processing, and the other is to forward the data after resolving it according to the communication protocol.

[0071] The system instructions of the all-programmable system-on-chip are sent down through the system management board. According to the communication protocol, the sensor data processing board judges the corresponding instructions of the received data, and then sends them to different sensors or other circuit boards, and sends the feedback data of each sensor and circuit board to the system management board. The sensor data processing board is responsible for controlling multiple power supply boards and stoppers on the device, obtaining the status information of the power supply boards and stoppers through CAN communication and reporting it back to the system management board, and is responsible for sending commands such as power-on and standby to the power supply boards, and sending locking and unlocking instructions to the stoppers.

[0072] As Figure 9 shown in the figure, it shows the second structural schematic block diagram of the data transmission device, mainly showing the functional block diagram of the all-programmable system-on-chip. The functions implemented by this system include: sensor data reception and transmission; sensor data processing; system instruction reception and transmission, power supply board and stopper control; self-status reporting of the sensor data processing board; zero position parameter correction function.

[0073] The reception and transmission of system instructions are both realized through optical fiber. Different packet headers of the instructions sent by the system management board to the sensor data processing board represent that the instructions are to be sent to different destinations. After the software of the sensor data processing board judges the destination of the instruction to be sent, it sends the valid part of the instruction to the corresponding sensor or power supply board, etc.

[0074] As Figure 10As shown in the figure, a processing program flow for sensor data is shown, providing a method for multi-sensor data transmission for the Zynq series of System on Chip (SoC). The specific steps are as follows:

[0075] Step 1002: Initialize and enable the interrupt;

[0076] Step 1004: Receive fiber optic data;

[0077] Specifically, the sensor data processing board receives the fiber optic data sent by the system management board.

[0078] Step 1006: Zero parameter correction;

[0079] Specifically, the sensor data processing board performs zero parameter correction on the fiber optic data.

[0080] Step 1008: Is it a servo control instruction? If yes, go to step 1010; otherwise, go to step 1012;

[0081] Judge the data type of the corrected data. If it is a servo control instruction, go to step 1010 and send the servo control instruction.

[0082] Step 1010: Send the servo control instruction;

[0083] Step 1012: Is it a sensor control instruction? If yes, go to step 1014; otherwise, go to step 1016;

[0084] Specifically, if the data is not a servo control instruction, judge whether it is a sensor control instruction. If it is, go to step 1014 and send the sensor control instruction.

[0085] Step 1014: Send the sensor control instruction;

[0086] Step 1016: Other instructions;

[0087] If the data is neither a servo control instruction nor a sensor control instruction, the data type is other instructions.

[0088] Step 1018: Self-check function;

[0089] Specifically, the self-check function is a function that integrates various status information of this circuit board, such as temperature, whether the working status is normal, the number of times of sending and receiving various types of data, etc.

[0090] Step 1020: Send the status information;

[0091] Specifically, send the status information to the system management board.

[0092] Step 1022: Sensor data integration;

[0093] Step 1024: Sensor data feedback.

[0094] Specifically, the sensor data processing board corrects the zero - point parameters of the optical fiber data, then determines the data type. If it is a servo control instruction, it is sent; if it is a sensor control instruction or other instructions, it is sent to the corresponding third unit, second unit or other units to implement the corresponding functions.

[0095] The present invention solves at least the following technical problems:

[0096] 1. Implement the communication functions of multiple sensor data on the sensor data processing board, integrate the instructions and feedback data of different sensors, and solve the problem of excessive circuit boards caused by different communication interfaces of multiple sensors.

[0097] 2. Solve the problem of possible data blockage when multiple sensors send and receive data simultaneously.

[0098] 3. Implement the function of distributing multi - sensor data downward through various interfaces.

[0099] 4. Implement the function of feedback the status information of multiple sensors and the power supply board itself.

[0100] As Figure 11 shown, the processing flow of the zero - point parameters is shown. According to different sensors and different field - of - view angles, the corresponding zero - point parameters are transmitted to the infrared sensor. The specific steps are as follows:

[0101] Step 1102: Receive the zero - point parameters;

[0102] Step 1104: Convert the data type;

[0103] Step 1106: Is it mid - wave infrared data? If yes, go to step 1108; otherwise, go to step 1110;

[0104] Step 1108: Is it a wide field of view? If yes, go to step 1112; otherwise, go to step 1114;

[0105] Step 1110: Is it long - wave infrared data? If yes, go to step 1108; otherwise, enter the end process;

[0106] Step 1112: Is the angle value greater than or equal to zero? If yes, go to step 1116; otherwise, go to step 1118;

[0107] Step 1114: Is it a narrow field of view? If yes, go to step 1112; otherwise, end the process;

[0108] Specifically, if it is neither infrared sensor data nor narrow field of view, no correction is made, and based on the packet header in the data instruction, it is determined what kind of data this is. For example, it is determined whether it is a servo control instruction, and then this instruction is transmitted to different sensors or circuit boards.

[0109] Step 1116: Directly convert to a code value;

[0110] Step 1118: Convert to a two's complement;

[0111] Step 1120: Send to the infrared sensor.

[0112] Specifically, the system management board transmits the zero position correction parameter of the infrared sensor to the sensor data processing board through an optical fiber. After receiving the zero position parameter, the sensor data processing board first caches it, converts the data into floating-point numbers, and then determines the mid-wave, long-wave, wide field of view, and narrow field of view respectively. After that, the angle data is converted into a code value, where positive numbers are directly converted into code values, and negative numbers are converted into two's complements. Finally, the code value is transmitted to the infrared sensor to achieve the zero position correction function.

[0113] The additional aspects and advantages of the present invention will become apparent in the following description section, or be learned through the practice of the present invention.

[0114] The above are the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of the present invention, several improvements and refinements can still be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.

Claims

1. A data transmission method, used in a data processing unit, characterized in that: The data transmission method comprises: Before the first unit transmits data to the second unit, determining the data type of the data; When the data type is first type data, controlling the first unit to transmit the data to the second unit through a first communication connection; When the data type is second type data, the first unit is controlled to transmit the data to the second unit through a second communication connection.

2. The data transmission method according to claim 1, characterized in that: The first type of data includes visible light sensor instruction data, the second type of data includes infrared sensor instruction data and laser sensor instruction data, the second unit includes a visible light sensor, a medium-wave infrared sensor, a long-wave infrared sensor and a laser sensor, and the data transmission method further includes: When the data type is the first type of data, controlling the first unit to transmit the data to the second unit through the first communication connection specifically includes: When the data is the visible light sensor instruction data, transmitting the data to the visible light sensor via the first communication connection; When the data type is the second type of data, controlling the first unit to transmit the data to the second unit through the second communication connection specifically includes: When the data is the infrared sensor instruction data, transmitting the data to the medium-wave infrared sensor or the long-wave infrared sensor through the second communication connection; When the data is instruction data of the laser sensor, the data is transmitted to the laser sensor through the second communication connection.

3. The data transmission method according to claim 2, characterized in that: The data transmission method further comprises: When the second unit transmits the feedback data to the first unit, determining a data category of the feedback data; When the data category is the visible light sensor command data or the infrared sensor command data, transmitting the feedback data to the first unit through the first communication connection; When the data category is the laser sensor command data, the feedback data is transmitted to the first unit through the second communication connection.

4. The data transmission method according to any one of claims 1 to 3, characterized in that: The data transmission method further comprises: Acquire first status information of the data processing unit and second status information of the second unit; generating first diagnostic information and second diagnostic information according to the first state information and the second state information; The first diagnostic information and the second diagnostic information are transmitted to the first unit via the first communication connection.

5. The data transmission method according to any one of claims 1 to 4, characterized in that: The data transmission method further comprises: acquiring third status information of the third unit through a third communication connection; The third status information is transmitted to the first unit via the first communication connection.

6. The data transmission method according to claim 1, characterized in that: Before the first unit transmits data to the second unit, determining the data type of the data specifically includes: receiving optical fiber data sent by the first unit; Correcting the optical fiber data to obtain the data; According to a sending object of the data, it is determined that the data is one of first type data, second type data and third type data.

7. The data transmission method according to claim 2, characterized in that: The data transmission method further comprises: receiving a zero position parameter of the infrared sensor command data sent by the first unit; Perform data type conversion according to the zero bit parameter to obtain a code value; The code value is sent to the medium-wave infrared sensor or the long-wave infrared sensor.

8. A data transmission device, used in a data processing unit, characterized in that: The data transmission device comprises: A determination module, used for determining the data type of the data before the first unit transmits the data to the second unit; A first control module, configured to control the first unit to transmit the data to the second unit through a first communication connection when the data type is a first type of data; A second control module is configured to control the first unit to transmit the data to the second unit through a second communication connection when the data type is second type data.

9. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the data transmission method according to any one of claims 1 to 7 are implemented.

10. A readable storage medium having a program or instruction stored thereon, characterized in that: When the program or instruction is executed by a processor, the steps of the data transmission method according to any one of claims 1 to 7 are implemented.