Data transmission method and device based on infrared transmission technology and storage medium
By monitoring the bit error rate and number of consecutive frame drops of the CAN bus in the automotive electronic system, and switching to infrared transmission mode when the threshold is exceeded, the communication quality problem of the CAN bus in the high-intensity electromagnetic radiation environment is solved, and the stability and reliability of data transmission are achieved.
Patent Information
- Application Number
- CN202511782159.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-29
- Publication Date
- 2026-02-13
AI Technical Summary
In automotive electronic systems, the communication quality of the CAN bus is affected by electromagnetic interference in high-intensity electromagnetic radiation environments, leading to data distortion and packet loss, which affects the accuracy and reliability of testing, and may even cause equipment failure or data communication interruption.
Infrared transmission technology is used to monitor the bit error rate and number of consecutive frame drops in the bus cable transmission mode under a preset test environment. When the bit error rate or the number of consecutive frame drops exceeds the threshold, the system switches to infrared transmission mode for data transmission to improve communication quality.
In high-intensity electromagnetic radiation environments, the infrared transmission mode maintains the stability and reliability of data communication, improving the vehicle's anti-interference capability in electromagnetic compatibility testing and avoiding communication interruptions and data errors.
Smart Images

Figure CN121530784A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of vehicle testing and communication technology, in particular to a data transmission method and device based on infrared transmission technology and a storage medium. BACKGROUND
[0002] In automotive electronic systems, Controller Area Network (CAN) bus is widely used for communication between different electronic control units in vehicles as the main communication protocol. However, the communication quality of CAN bus is often challenged in Electromagnetic Compatibility (EMC) tests, especially in high-intensity electromagnetic radiation environments. Due to the existence of electromagnetic interference, CAN signals may experience serious data distortion and packet loss, which not only affects the accuracy and reliability of the test, but also may cause device failure or data communication interruption in extreme cases.
[0003] There is no effective solution to the above problems. SUMMARY
[0004] The embodiments of the present application provide a data transmission method and device based on infrared transmission technology and a storage medium to at least solve the technical problem of poor communication quality when using bus cable for data transmission in a strong electromagnetic interference environment in related technologies.
[0005] According to one of the embodiments of the present application, a data transmission method based on infrared transmission technology is provided, including: controlling a vehicle to perform data transmission in a bus cable transmission mode in a preset test environment, wherein the preset test environment is used to simulate the running environment of the vehicle under electromagnetic radiation; monitoring the data transmission quality in the bus cable transmission mode to obtain a bit error rate and a continuous frame loss number, wherein the bit error rate is used to represent the frequency of data recognition error when data transmission is performed in the bus cable transmission mode, and the continuous frame loss number is used to represent the continuous number of data loss when data transmission is performed in the bus cable transmission mode; in response to the bit error rate being greater than a first threshold value or the continuous frame loss number being greater than a second threshold value, controlling the vehicle to switch to an infrared transmission mode for data transmission, wherein the data transmission quality in the infrared transmission mode is higher than that in the bus cable transmission mode.
[0006] Optionally, the data transmission method based on infrared transmission technology further includes: in the infrared transmission mode, monitoring the signal quality of the bus cable transmission mode based on a preset period to obtain a bit error rate; in response to the bit error rate being less than a third threshold value and the duration of the bit error rate being less than the third threshold value being greater than a fourth threshold value, controlling the vehicle to switch to the bus cable transmission mode for data transmission, wherein the third threshold value is less than the first threshold value.
[0007] Optionally, the data transmission method based on infrared transmission technology further comprises: determining a preset intensity and a preset frequency range of electromagnetic radiation based on test requirements; generating an electromagnetic field with the preset intensity and the preset frequency range in a shielding room by using at least one electromagnetic radiation source to obtain a preset test environment, wherein the shielding room is used to isolate external electromagnetic interference.
[0008] According to one of the embodiments of the present application, a data transmission system based on infrared transmission technology is also provided for executing the above-mentioned data transmission method based on infrared transmission technology. The system comprises: a shielding room, an electromagnetic radiation source, a bus cable, a control center, an infrared emission module, an infrared receiving module, a multiplexer, and a switch. The electromagnetic radiation source is used to generate an electromagnetic field with a preset intensity and a frequency range in the shielding room to obtain a preset test environment, so as to simulate the running environment of a vehicle under electromagnetic radiation. The bus cable is connected with the vehicle and the control center, and is used to transmit data under the preset test environment. The control center is connected with the bus cable, and comprises at least one microcontroller, which is used to monitor the data transmission quality of the bus cable transmission mode under the preset test environment. The multiplexer is connected with the control center, and is used to control the switching between the bus cable transmission mode and the infrared transmission mode. The infrared emission module is integrated in the electronic control unit of the vehicle, and is used to convert digital signals into infrared light signals under the infrared transmission mode. The infrared receiving module is integrated in the control center, and is used to receive infrared light signals and convert the infrared light signals back to digital signals under the infrared transmission mode. The switch is arranged on the bus cable, and is connected with the vehicle and the control center, respectively, and is used to connect the bus cable transmission mode when the data transmission quality reaches a preset standard, or disconnect the bus cable transmission mode when the data transmission quality does not reach the preset standard.
[0009] Optionally, the electromagnetic radiation source comprises: a signal generator, a power amplifier, and an antenna. The signal generator is used to generate signals with a preset frequency range. The power amplifier is connected with the signal generator, and is used to amplify the signals generated by the signal generator to a preset intensity. The antenna is connected with the power amplifier, and is used to convert the signals amplified by the power amplifier into electromagnetic waves.
[0010] Optionally, the infrared emission module comprises: an infrared emission tube and a micro-structured diffuser. The emission angle of the infrared emission tube is greater than a preset angle. The micro-structured diffuser is arranged outside the lens at the emission end, and is used to convert a point light source into a uniform area light source, so that the receiving end receives sufficient photon energy.
[0011] Optionally, the infrared receiving module comprises: a condenser lens and a photodetector. The size of the condenser lens is greater than a preset size, and the detection field of view angle of the photodetector is greater than a preset field of view angle.
[0012] According to one of the embodiments of the present application, a data transmission device based on infrared transmission technology is provided, comprising: a first control module configured to control a vehicle to perform data transmission in a bus cable transmission mode in a preset test environment, wherein the preset test environment is used to simulate an operating environment of the vehicle under electromagnetic radiation; a monitoring module configured to monitor data transmission quality in the bus cable transmission mode to obtain a bit error rate and a continuous frame loss number, wherein the bit error rate is used to represent a frequency of data recognition error when data transmission is performed in the bus cable transmission mode, and the continuous frame loss number is used to represent a continuous number of data loss when data transmission is performed in the bus cable transmission mode; and a second control module configured to control the vehicle to switch to an infrared transmission mode to perform data transmission in response to the bit error rate being greater than a first threshold value or the continuous frame loss number being greater than a second threshold value, wherein data transmission quality in the infrared transmission mode is higher than data transmission quality in the bus cable transmission mode.
[0013] According to one of the embodiments of the present application, a vehicle is provided, comprising: a memory storing an executable program; and a processor configured to run the program, wherein the program performs the data transmission method based on infrared transmission technology in any one of the above embodiments when running.
[0014] According to one of the embodiments of the present application, a computer readable storage medium is provided, and the storage medium stores a computer program, wherein the computer program is configured to perform the data transmission method based on infrared transmission technology in any one of the above embodiments when running on a computer or a processor.
[0015] According to one of the embodiments of the present application, an electronic device is provided, comprising a memory and a processor, the memory stores a computer program, and the processor is configured to run the computer program to perform the data transmission method based on infrared transmission technology in any one of the above embodiments.
[0016] According to one of the embodiments of the present application, a computer program product is provided, comprising a computer program, and the computer program implements the data transmission method based on infrared transmission technology in any one of the above embodiments when executed by a processor.
[0017] In the embodiment of the present application, first, the vehicle is controlled to perform data transmission in the bus cable transmission mode in a preset test environment, wherein the preset test environment is used to simulate the running environment of the vehicle under electromagnetic radiation. Then the data transmission quality in the bus cable transmission mode is monitored to obtain the bit error rate and the number of consecutive frame loss, wherein the bit error rate is used to represent the frequency of data recognition error when data transmission is performed by using the bus cable transmission mode, and the number of consecutive frame loss is used to represent the consecutive number of data loss when data transmission is performed by using the bus cable transmission mode. Finally, in response to the bit error rate being greater than a first threshold or the number of consecutive frame loss being greater than a second threshold, the vehicle is controlled to switch to the infrared transmission mode for data transmission, wherein the data transmission quality in the infrared transmission mode is higher than that in the bus cable transmission mode, thereby achieving the purpose of maintaining the stability and reliability of data communication in a high-intensity electromagnetic radiation environment, and realizing the technical effect of significantly improving the data transmission anti-interference performance of the vehicle in the electromagnetic compatibility test, and further solving the technical problem of poor communication quality when data transmission is performed by using the bus cable in a strong electromagnetic interference environment in the related art. BRIEF DESCRIPTION OF DRAWINGS
[0018] The accompanying drawings, which are included to provide a further understanding of the present application and are incorporated in and constitute a part of this application, illustrate embodiments of the present application and together with the description serve to explain the present application. In the drawings:
[0019] Figure 1 is a flowchart of a data transmission method based on infrared transmission technology according to an embodiment of the present application;
[0020] Figure 2 is a structural diagram of a data transmission system based on infrared transmission technology according to an embodiment of the present application;
[0021] Figure 3 is a schematic diagram of a data transmission device based on infrared transmission technology according to an embodiment of the present application. DETAILED DESCRIPTION
[0022] For the convenience of understanding, exemplary descriptions of some concepts related to the embodiments of the present application are given for reference. As shown below:
[0023] Infrared data transmission is a wireless communication technology that transmits and receives information through infrared rays. Infrared data transmission is usually used for short-distance communication, and because of its long wavelength, it can effectively resist electromagnetic interference and is suitable for communication scenarios that require enhanced anti-electromagnetic interference capability. In the present application, infrared data transmission is designed as an alternative to the CAN bus physical layer to provide a stable data transmission channel in EMC testing.
[0024] The electromagnetic compatibility test is a test for evaluating whether the electronic device can work normally in the electromagnetic environment. The automobile EMC test includes radiation immunity, conducted immunity, electromagnetic radiation detection, etc., to ensure that the automobile electronic device can stably operate under various electromagnetic conditions inside and outside the vehicle.
[0025] In order for those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should belong to the scope of protection of the present application.
[0026] It should be noted that the terms "first", "second" and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the application described herein can be implemented in an order other than that illustrated or described herein. In the description of the embodiments, the meaning of "a plurality of" is two or more, unless otherwise specified. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0027] According to one of the embodiments of the present application, an embodiment of a data transmission method based on infrared transmission technology is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in an order different from that shown herein.
[0028] The method embodiment can be executed in an electronic device including a memory and a processor, a similar control device or system. Taking the electronic device as an example, the electronic device can include one or more processors and a memory for storing data. Optionally, the above-mentioned electronic device can further include a communication device for communication function and a display device. Those skilled in the art can understand that the above-mentioned structural description is only illustrative, which does not limit the structure of the above-mentioned electronic device. For example, the electronic device can further include more or less components than the above-mentioned structural description, or have a different configuration from the above-mentioned structural description.
[0029] A processor may include one or more processing units. For example, a processor may include a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP) chip, a microcontroller unit (MCU), a field-programmable gate array (FPGA), a neural network processing unit (NPU), a tensor processing unit (TPU), or an artificial intelligence (AI) processor. Different processing units may be independent components or integrated into one or more processors. In some instances, electronic devices may also include one or more processors.
[0030] The memory can be used to store computer programs, such as the computer program corresponding to the data transmission method based on infrared transmission technology in this embodiment of the invention. The processor implements the aforementioned data transmission method based on infrared transmission technology by running the computer program stored in the memory. The memory may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to electronic devices via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0031] Communication devices are used to receive or send data via a network. Specific examples of such networks may include wireless networks provided by the mobile terminal's communication provider. In one example, the communication device includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the communication device may be a radio frequency (RF) module used for wireless communication with the Internet.
[0032] Display devices can be, for example, touchscreen liquid crystal displays (LCDs) and touch displays (also referred to as "touchscreens" or "touch displays"). The LCD allows users to interact with the user interface of the mobile terminal. In some embodiments, the mobile terminal has a graphical user interface (GUI), which allows users to interact with the GUI through finger contact and / or gestures on a touch-sensitive surface. Optional human-computer interaction functions include: creating web pages, drawing, word processing, creating electronic documents, playing games, video conferencing, instant messaging, sending and receiving emails, call interfaces, playing digital video, playing digital music, and / or web browsing, etc. Executable instructions for performing the above human-computer interaction functions are configured / stored in one or more processor-executable computer program products or readable storage media.
[0033] This embodiment provides a data transmission method based on infrared transmission technology for use in electronic devices. Figure 1 This is a flowchart of a data transmission method based on infrared transmission technology according to one embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps:
[0034] Step S10: Under a preset test environment, control the vehicle to transmit data in the bus cable transmission mode. The preset test environment is used to simulate the vehicle's operating environment under electromagnetic radiation.
[0035] In this embodiment of the invention, the preset test environment refers to the test scenario constructed in this embodiment of the invention, which is used to simulate the actual operating conditions of a vehicle when subjected to electromagnetic radiation.
[0036] Bus cable transmission mode refers to a data transmission method in which the vehicle's internal communication network uses physical cables as the medium. In this embodiment of the invention, it specifically refers to the mode of information transmission using CAN bus technology.
[0037] In the preset test environment, controlling the vehicle to transmit data in the bus cable transmission mode can be understood as the vehicle's communication system being placed in its normal operating state in the preset EMC test environment, that is, using physical cables (such as CAN bus cables) to transmit data.
[0038] It can be seen that by applying electromagnetic radiation in a preset test environment, various electromagnetic interferences that vehicles may encounter on actual roads can be simulated, including interference from external sources such as other vehicles, road infrastructure, cell phone towers, and radar systems. This allows us to determine the electromagnetic compatibility of vehicles and the anti-interference capability of communication systems in the real world.
[0039] Step S12: Monitor the data transmission quality in the bus cable transmission mode to obtain the bit error rate and the number of consecutive frame drops. The bit error rate is used to represent the frequency of data identification errors when transmitting data using the bus cable transmission mode, and the number of consecutive frame drops is used to represent the number of consecutive data losses when transmitting data using the bus cable transmission mode.
[0040] In this embodiment of the invention, the bit error rate (BER) refers to the proportion of erroneous bits in the transmitted data during data transmission. Specifically, in this embodiment, the BER is used to quantify the degree of electromagnetic interference to the signal when transmitting data using a bus cable (such as a CAN bus). Specifically, when a vehicle communicates under a preset electromagnetic radiation test environment, the ratio of erroneous bits in the transmitted data is calculated by monitoring and analyzing the data stream on the CAN bus. A high BER indicates severe interference to the communication link, compromised data integrity, and potential errors in the execution of control commands or inaccurate sensor readings.
[0041] The number of consecutive frame drops refers to the number of times a complete or correct data frame is not received consecutively during data transmission. In embodiments of this invention, the number of consecutive frame drops is another indicator for evaluating the stability of a communication system under electromagnetic interference conditions. When a vehicle transmits data using a bus cable in an electromagnetic radiation test environment, the monitoring system checks each frame of data on the CAN bus. If one or more frames of data cannot be correctly received or parsed, a frame drop event is recorded. An increase in the number of consecutive frame drops indicates that the impact of electromagnetic interference on communication is intensified, which may lead to data stream interruptions and thus affect the normal functioning and safe operation of the vehicle.
[0042] Monitoring the data transmission quality in the bus cable transmission mode to obtain the bit error rate and the number of consecutive frame drops can be understood as follows: under a preset test environment, the system continuously monitors the communication quality when the vehicle uses the bus cable for data transmission, and obtains the bit error rate and the number of consecutive frame drops in real time to ensure the stability and reliability of data transmission.
[0043] It can be seen that by monitoring the communication quality in the bus cable transmission mode in real time, the system can promptly detect the negative impact of electromagnetic interference on data transmission and respond quickly, ensuring that communication interruption or data errors are avoided in harsh electromagnetic environments, thereby maintaining the normal operation of the vehicle's electronic systems.
[0044] Step S14: In response to the bit error rate being greater than the first threshold or the number of consecutive frame drops being greater than the second threshold, the vehicle is controlled to switch to infrared transmission mode for data transmission. The data transmission quality in infrared transmission mode is higher than that in bus cable transmission mode.
[0045] In this embodiment of the invention, the first threshold refers to the critical value reached by the bit error rate during data transmission. If the bit error rate exceeds the first threshold, it indicates a serious degradation in communication quality. For example, the first threshold can be 1. No restrictions are imposed here.
[0046] The second threshold focuses on the number of consecutive frame drops. When the number of consecutive frame drops exceeds the second threshold, it indicates a problem with the continuity of data transmission, which may lead to malfunctions in the vehicle's electronic systems. For example, the first threshold can be 3, but this is not a limitation.
[0047] Infrared transmission mode is a communication scheme proposed in this invention to replace the traditional bus cable transmission mode, especially when electromagnetic radiation in a preset test environment can lead to a decrease in communication quality. In infrared transmission mode, data that would normally be transmitted via cable is converted into infrared light signals, transmitted through the air to the receiving end, and then converted back into electrical signals. Infrared transmission mode is less affected by electromagnetic radiation and can maintain a stable communication connection even in environments with vehicle vibration or bumps.
[0048] The response of switching the vehicle to infrared transmission mode for data transmission when the bit error rate exceeds the first threshold or the number of consecutive frame drops exceeds the second threshold can be understood as follows: if the system detects that the bit error rate of the vehicle using bus cable transmission mode for data transmission exceeds the first threshold or the number of consecutive frame drops exceeds the second threshold, the system will switch the vehicle's data transmission mode to infrared transmission mode.
[0049] It can be seen that when the monitored communication parameters, namely the bit error rate or the number of consecutive frame drops, exceed the preset threshold, the system automatically switches from bus cable transmission mode to infrared transmission mode to improve data transmission quality and ensure the normal operation of the vehicle's electronic system.
[0050] Through the above steps, firstly, under a preset test environment, the vehicle is controlled to transmit data in bus cable transmission mode. This preset test environment simulates the vehicle's operating environment under electromagnetic radiation. Then, the data transmission quality in bus cable transmission mode is monitored, obtaining the bit error rate (BER) and the number of consecutive frame drops. The BER represents the frequency of data identification errors when transmitting data using bus cable transmission mode, and the number of consecutive frame drops represents the number of consecutive data losses when transmitting data using bus cable transmission mode. Finally, in response to the BER exceeding a first threshold or the number of consecutive frame drops exceeding a second threshold, the vehicle is controlled to switch to infrared transmission mode for data transmission. The data transmission quality in infrared transmission mode is higher than that in bus cable transmission mode, achieving the goal of maintaining data communication stability and reliability under high-intensity electromagnetic radiation environments. This significantly improves the anti-interference capability of vehicle data transmission in electromagnetic compatibility testing, thereby solving the technical problem of poor communication quality when transmitting data using bus cables in strong electromagnetic interference environments.
[0051] Optionally, the data transmission method based on infrared transmission technology further includes the following execution steps:
[0052] Step S16: In infrared transmission mode, the signal quality of the bus cable transmission mode is monitored based on a preset period to obtain the bit error rate.
[0053] Step S18: In response to the bit error rate being less than a third threshold and the duration of the bit error rate being less than the third threshold being greater than a fourth threshold, control the vehicle to switch to bus cable transmission mode for data transmission, wherein the third threshold is less than the first threshold.
[0054] In this embodiment of the invention, the preset period refers to the time interval at which the system periodically checks the signal quality of the bus cable channel in infrared transmission mode. For example, the preset period can be set to one second, but this is not limited here.
[0055] The third threshold is a signal quality standard used to determine whether the bus cable channel has returned to a usable state in infrared transmission mode. For example, the third threshold is set to 10. -6 No restrictions are imposed here.
[0056] The fourth threshold focuses on the length of time the bit error rate (BER) remains stably below the third threshold. Even if the BER is temporarily below the third threshold, if this state is unstable or short-lived, directly switching back to bus cable transmission mode may still lead to communication interruptions or data errors. Therefore, the fourth threshold represents the shortest time the system needs to continuously monitor the bus cable channel BER to be below the third threshold. For example, the fourth threshold could be 10 seconds, meaning the bus cable channel BER must remain below the third threshold for at least 10 seconds to determine that the cable channel is stable and reliable, thus allowing switching back to cable channel transmission mode. No specific limit is imposed here.
[0057] In infrared transmission mode, the bit error rate is obtained by monitoring the signal quality of the bus cable transmission mode based on a preset period. This can be understood as the fact that even when the system has switched to infrared transmission mode, the communication quality of the bus cable (such as CAN bus) will still be checked periodically based on a preset period to obtain the bit error rate in the bus cable transmission mode.
[0058] The response that the bit error rate is less than the third threshold and the duration of the bit error rate being less than the third threshold is greater than the fourth threshold, controlling the vehicle to switch to bus cable transmission mode for data transmission can be understood as follows: if the bit error rate in the bus cable mode is less than the third threshold and the duration of the bit error rate being less than the third threshold is greater than the fourth threshold in the infrared transmission mode, then the system automatically controls the vehicle to switch from the infrared transmission mode to the bus cable transmission mode.
[0059] It can be seen that in infrared transmission mode, when the system detects that the bit error rate of the bus cable not only drops below the third threshold, but also maintains this state for more than the time set by the fourth threshold, the system controls the vehicle to switch back to bus cable transmission mode. This ensures that when the electromagnetic environment improves, the vehicle can be restored to the more economical and conventional cable transmission method in a timely manner, so as to achieve dynamic optimization of communication mode and maximize cost-effectiveness.
[0060] Optionally, the data transmission method based on infrared transmission technology further includes the following execution steps:
[0061] Step S101: Determine the preset intensity and preset frequency range of electromagnetic radiation based on the test requirements;
[0062] Step S102: An electromagnetic field of preset strength and preset frequency range is generated in a shielded room using at least one electromagnetic radiation source to obtain a preset test environment, wherein the shielded room is used to isolate external electromagnetic interference.
[0063] In this embodiment of the invention, the preset intensity refers to the predetermined intensity level of the electromagnetic field generated by the electromagnetic radiation source in the shielded room during the test. This intensity is designed to simulate various electromagnetic interference intensities that vehicles may encounter in the real world, such as interference from high-voltage power lines near roads or other wireless devices. The preset intensity can be set according to the specific needs of the test, for example, set to 100V / m, 200V / m, or higher, to test the performance of the vehicle's communication system in extreme electromagnetic environments.
[0064] A preset frequency range refers to a specific frequency interval of electromagnetic waves generated by the electromagnetic radiation source used in the test. Different types of electromagnetic interference may be concentrated in different frequency ranges, such as broadcasting, mobile communications, and radar systems. Setting a preset frequency range is to comprehensively cover the interference frequencies that a vehicle may encounter, ensuring the adequacy and effectiveness of the test. Common preset frequency ranges may include several important frequency bands, such as 10kHz to 1GHz, or more specific target frequency bands, such as 400MHz to 600MHz, depending on the type of electromagnetic interference to be simulated and the test target.
[0065] Determining the preset intensity and frequency range of electromagnetic radiation based on testing requirements can be understood as determining the intensity and frequency range of electromagnetic radiation during testing based on standards such as the purpose of the test, the type of vehicle, and the sensitivity of the vehicle's electronic systems.
[0066] Using at least one electromagnetic radiation source to generate an electromagnetic field of preset intensity and preset frequency range in a shielded room to obtain a preset test environment can be understood as adjusting and configuring at least one electromagnetic radiation source according to the determined preset intensity and preset frequency range to generate an electromagnetic field that meets the test requirements, so as to simulate the operation of a vehicle in a complex electromagnetic environment.
[0067] As can be seen, firstly, the preset intensity and preset frequency range of electromagnetic radiation are determined based on the test requirements. Then, an electromagnetic field with the preset intensity and frequency range is created in a shielded room using at least one electromagnetic radiation source. The function of the shielded room is to block external electromagnetic interference, so that the test environment can be precisely controlled, thereby accurately evaluating the performance of the vehicle communication system under simulated electromagnetic interference.
[0068] Figure 2 This is a structural diagram of a data transmission system based on infrared transmission technology according to one embodiment of the present invention, such as... Figure 2As shown, the system is used to execute the aforementioned data transmission method based on infrared transmission technology. The system includes: a shielded room, an electromagnetic radiation source, a bus cable, a control center, an infrared transmitting module, an infrared receiving module, a multiplexer, and a switch. The electromagnetic radiation source generates an electromagnetic field of preset intensity and frequency range within the shielded room to obtain a preset test environment, simulating the vehicle's operating environment under electromagnetic radiation. The bus cable connects the vehicle and the control center and is used to transmit data under the preset test environment. The control center, connected to the bus cable, includes at least one microcontroller and is used to monitor the data transmission quality in the bus cable transmission mode under the preset test environment. The multiplexer, connected to the control center, controls the switching between the bus cable transmission mode and the infrared transmission mode. The infrared transmitting module, integrated into the vehicle's electronic control unit, converts digital signals into infrared light signals in infrared transmission mode. The infrared receiving module, integrated into the control center, receives infrared light signals and converts them back to digital signals in infrared transmission mode. The switch, located on the bus cable and connected to both the vehicle and the control center, connects the bus cable transmission mode when the data transmission quality meets the preset standard, or disconnects the bus cable transmission mode when the data transmission quality does not meet the preset standard.
[0069] In this embodiment of the invention, the shielded room is a specially designed test environment. Its four walls and top are made of electromagnetic shielding material, which can isolate external electromagnetic interference and ensure that the electromagnetic field of the test is generated by the internal electromagnetic radiation source. It provides a closed and well-controlled environment for simulating the operating state of a vehicle under electromagnetic radiation.
[0070] Electromagnetic radiation sources can generate electromagnetic waves of specific intensity and frequency ranges, used to create preset test environments within shielded rooms. They are primarily used to simulate various electromagnetic interference scenarios that vehicles may encounter in reality, such as radiation from mobile communication base stations, lightning strikes, and radar signals.
[0071] A bus cable refers to a cable used for data transmission within a vehicle, typically a physical link to a CAN bus or other in-vehicle data networks. In this invention, the bus cable connects the vehicle's electronic control unit to an external control center, serving as the physical path for conventional data transmission.
[0072] The control center typically contains at least one microcontroller, which is responsible for monitoring the signal quality of the bus cable and the data transmission quality.
[0073] The infrared transmitting module is integrated into the vehicle's electronic control unit. When the infrared transmission mode is activated, it encodes the digital signals on the vehicle side into infrared light signals and then transmits them to the infrared receiving module in the control center via wireless communication.
[0074] The infrared receiver module is integrated into the control center and is used to receive infrared light signals from the vehicle's infrared transmitter module in infrared transmission mode and decode them back into digital signals.
[0075] The multiplexer connects to the control center and is used to switch between bus cable transmission mode and infrared transmission mode. The multiplexer selects the appropriate data transmission channel based on commands from the control center or the detected signal quality.
[0076] A switch is a device installed on a bus cable to disconnect or connect the physical link of the bus cable. The switch can automatically control the connection and disconnection of the bus cable based on commands from the control center or signal quality indicators such as bit error rate and frame loss, to avoid data transmission errors caused by strong electromagnetic interference. The switch can be a solid-state switch, a relay, or other type of electronic switching device; there are no restrictions here.
[0077] Exemplarily, this invention does not simply switch between the bus cable and the infrared channel, but rather constructs a dual-channel parallel architecture. The original transceiver path of the CAN controller and the newly added infrared transceiver path are simultaneously connected to the CAN_RX pin of the microcontroller, and selected via a multiplexer controlled by a solid-state switch. The monitoring algorithm continuously performs real-time analysis of the following key indicators for the currently active channel (defaulting to the CAN cable channel): Bit error rate: The number of erroneous frames is counted by verifying the Cyclic Redundancy Check (CRC) field of the CAN frames. Frame loss rate: At the protocol stack level, lost data frames are counted by monitoring sequence numbers or response timeouts. Signal quality: The analog-to-digital converter (ADC) samples the CAN_RX pin level and analyzes the signal amplitude attenuation and distortion. The microcontroller has a built-in state machine whose core decision threshold is set to a bit error rate > 1. If the number of consecutive frame drops exceeds 3, the current cable channel quality is determined to be unreliable if any of the above conditions are triggered.
[0078] When the monitoring algorithm determines that a data transmission channel switch is needed, the microcontroller sends a switching control signal to the multiplexer. The multiplexer will switch the microcontroller's CAN_RX input from the original CAN transceiver to the output of the infrared receiver module within one bit time. This switching speed ensures that the transmitted CAN data bits are not corrupted. To ensure the validity of the infrared channel data, the infrared encoding / decoding scheme is strictly synchronized with the CAN bit rate. The electrical signal recovered by the infrared receiver is completely consistent with the original CAN signal in terms of level format and timing, achieving "plug and play," and the microcontroller's CAN controller cannot detect changes in the physical layer medium. The system periodically (e.g., every second) attempts to switch back to the CAN cable channel and listens briefly. If the cable channel quality is detected to have recovered (bit error rate < 1%), the system will switch back. 6 If the signal remains switched off for a period of time, it will automatically switch back to save power consumption of the infrared device and keep the cable as the main channel.
[0079] Through the above embodiments, this invention does not passively respond only after a complete communication interruption, but intervenes proactively as soon as quality begins to deteriorate, thereby avoiding the complete loss of critical data and ensuring high availability of the communication link in EMC environments. Furthermore, the CRC and frame loss detection method of this invention fundamentally judges communication quality at the data link layer, which is more accurate than simply detecting physical signal strength, and the microsecond-level switching speed ensures that the switching action itself does not cause new data errors or loss. More importantly, the dual-channel parallel architecture in this invention is essentially a hot backup; the infrared channel is always on standby, and the system has an automatic switchback function, thus forming a highly reliable redundant communication system that meets the functional safety requirements of the automotive, industrial, and other fields.
[0080] Optionally, the electromagnetic radiation source includes: a signal generator, a power amplifier, and an antenna; the signal generator is used to generate a signal within a preset frequency range; the power amplifier is connected to the signal generator and is used to amplify the signal generated by the signal generator to a preset intensity; the antenna is connected to the power amplifier and is used to convert the signal amplified by the power amplifier into electromagnetic waves.
[0081] In this embodiment of the invention, the signal generator is used in automotive EMC testing scenarios to simulate various potential electromagnetic interference sources and generate signals with frequencies covering a preset range. For example, to comprehensively test the vehicle's anti-interference capability, the signal generator may generate a wideband signal covering from several hundred kHz to several GHz, which may include, but is not limited to, common electromagnetic interference frequency bands such as broadcasting, mobile phone signals, radar systems, and Wi-Fi signals.
[0082] A power amplifier is used to receive signals from a signal generator and amplify the signal power to a preset intensity to ensure that the electromagnetic field created in the shielded room meets the required testing standards. The selection and configuration of the power amplifier must take into account factors such as amplification factor, bandwidth, efficiency, and linearity to ensure that the amplified signal can accurately simulate real-world electromagnetic interference without introducing additional distortion due to the amplifier's own nonlinear effects.
[0083] An antenna is a device used to transmit and receive electromagnetic waves. In this embodiment of the invention, the antenna is used to convert the signal output from the power amplifier into electromagnetic waves and disperse them throughout the shielded room, forming an electromagnetic field under a preset test environment. The antenna design must consider factors such as its operating frequency, directivity, gain, and polarization to ensure uniform distribution and effective coverage of the electromagnetic field, while minimizing signal loss and directional distortion during transmission. Commonly used antenna types in automotive EMC testing include dipole antennas, helical antennas, and horn antennas, which are not limited here.
[0084] Optionally, the infrared emitting module includes an infrared emitting tube and a microstructure diffuser, wherein the emission angle of the infrared emitting tube is greater than a preset angle, and the microstructure diffuser is disposed outside the lens at the emitting end to convert the point light source into a uniform surface light source so that the receiving end receives sufficient photon energy.
[0085] In this embodiment of the invention, the infrared emitting module is selected from infrared emitting tubes with a wide emission angle (e.g., ±30° or wider).
[0086] Furthermore, adding a microstructure diffuser to the outside of the transmitting lens can convert a point light source into a uniform surface light source, expanding the effective illumination area. Even with significant angular deviations, the receiving end can still capture sufficient photon energy.
[0087] Optionally, the infrared receiving module includes: a condenser lens and a photodetector, wherein the size of the condenser lens is larger than a preset size, and the detection field of view of the photodetector is larger than the preset field of view.
[0088] In this embodiment of the invention, the infrared receiving module uses a large-size focusing lens and a photodetector with a wide field of view. Furthermore, for scenarios with extremely high reliability requirements, the infrared receiving module can also employ multiple photodetectors arranged in a specific spatial layout to form a simple "optical antenna array." Through a logical "OR" operation, as long as any one photodetector receives a valid signal, it is considered valid, thereby greatly improving alignment tolerance.
[0089] For example, in this embodiment of the invention, the infrared emitting tube, receiving tube, and encoding / decoding circuit are integrated into a rigid, internally potted module. The potting compound (such as epoxy resin) effectively fixes the positions of the optical and electronic components, preventing optical path misalignment or solder joint breakage due to internal loosening under vibration. Furthermore, the mounting points between the module and the device housing employ vibration-damping structures such as rubber gaskets and silicone dampers, which absorb and attenuate high-frequency vibration energy transmitted from the device housing, preventing high-frequency vibration energy from being transmitted to sensitive optical components. Further, the receiving chip incorporates an automatic gain control circuit. When vibration causes signal strength fluctuations, the automatic gain control circuit can quickly adjust the amplifier gain, stabilizing the output signal amplitude within the standard logic level range, avoiding misinterpretation as a low logic level due to instantaneous signal weakening.
[0090] Through the above embodiments, the infrared receiving module and infrared transmitting module adopt an off-axis tolerant optical design, allowing for installation deviations of ±25°. Therefore, high-precision tooling fixtures are not required for strict alignment during installation, significantly reducing the time and labor costs in the production and assembly process, and avoiding batch problems caused by insufficient installation accuracy. Furthermore, the housings of the infrared receiving and transmitting modules are made of non-metallic materials (such as engineering plastics) to avoid forming electromagnetic coupling paths, and the integrated packaging and damping design physically isolate the effects of vibration. In addition, the automatic gain control circuit compensates for vibration fluctuations at the electrical signal level, ensuring that the optical link maintains a stable connection without flickering or errors under continuous vibration (such as engine operation) or instantaneous impact (such as a car door closing). Through this design, the reliability of infrared communication no longer depends on an idealized static environment, but can adapt to complex mechanical stresses and installation errors in the real world, thereby broadening application scenarios.
[0091] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.
[0092] This embodiment also provides a data transmission device based on infrared transmission technology, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0093] Figure 3 This is a structural block diagram of a data transmission device based on infrared transmission technology according to one embodiment of the present invention, such as... Figure 3 As shown, a data transmission device 300 based on infrared transmission technology is used as an example. This device includes: a first control module 301, used to control a vehicle to transmit data in a bus cable transmission mode under a preset test environment, wherein the preset test environment simulates the vehicle's operating environment under electromagnetic radiation; a monitoring module 302, used to monitor the data transmission quality in the bus cable transmission mode, obtaining the bit error rate and the number of consecutive frame drops, wherein the bit error rate represents the frequency of data identification errors when transmitting data using the bus cable transmission mode, and the number of consecutive frame drops represents the number of consecutive data losses when transmitting data using the bus cable transmission mode; and a second control module 303, used to control the vehicle to switch to infrared transmission mode for data transmission in response to the bit error rate exceeding a first threshold or the number of consecutive frame drops exceeding a second threshold, wherein the data transmission quality in infrared transmission mode is higher than that in bus cable transmission mode.
[0094] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0095] Embodiments of the present invention also provide a vehicle, including: a memory storing an executable program; and a processor for running the program, wherein the program executes the data transmission method based on infrared transmission technology described above during runtime.
[0096] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to perform the steps in any of the above method embodiments when run on a computer or processor.
[0097] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0098] Step S10: Under a preset test environment, control the vehicle to transmit data in the bus cable transmission mode. The preset test environment is used to simulate the vehicle's operating environment under electromagnetic radiation.
[0099] Step S12: Monitor the data transmission quality in the bus cable transmission mode to obtain the bit error rate and the number of consecutive frame drops. The bit error rate is used to represent the frequency of data identification errors when transmitting data using the bus cable transmission mode, and the number of consecutive frame drops is used to represent the number of consecutive data losses when transmitting data using the bus cable transmission mode.
[0100] Step S14: In response to the bit error rate being greater than the first threshold or the number of consecutive frame drops being greater than the second threshold, the vehicle is controlled to switch to infrared transmission mode for data transmission. The data transmission quality in infrared transmission mode is higher than that in bus cable transmission mode.
[0101] Optionally, in this embodiment, the computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0102] Embodiments of the present invention also provide an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0103] Optionally, in this embodiment, the processor in the above-described electronic device may be configured to run a computer program to perform the following steps:
[0104] Step S10: Under a preset test environment, control the vehicle to transmit data in the bus cable transmission mode. The preset test environment is used to simulate the vehicle's operating environment under electromagnetic radiation.
[0105] Step S12: Monitor the data transmission quality in the bus cable transmission mode to obtain the bit error rate and the number of consecutive frame drops. The bit error rate is used to represent the frequency of data identification errors when transmitting data using the bus cable transmission mode, and the number of consecutive frame drops is used to represent the number of consecutive data losses when transmitting data using the bus cable transmission mode.
[0106] Step S14: In response to the bit error rate being greater than the first threshold or the number of consecutive frame drops being greater than the second threshold, the vehicle is controlled to switch to infrared transmission mode for data transmission. The data transmission quality in infrared transmission mode is higher than that in bus cable transmission mode.
[0107] Embodiments of the present invention also provide a computer program product, including a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.
[0108] Optionally, in this embodiment, the computer program in the above-described computer program product can be configured to perform the following steps when executed by a processor:
[0109] Step S10: Under a preset test environment, control the vehicle to transmit data in the bus cable transmission mode. The preset test environment is used to simulate the vehicle's operating environment under electromagnetic radiation.
[0110] Step S12: Monitor the data transmission quality in the bus cable transmission mode to obtain the bit error rate and the number of consecutive frame drops. The bit error rate is used to represent the frequency of data identification errors when transmitting data using the bus cable transmission mode, and the number of consecutive frame drops is used to represent the number of consecutive data losses when transmitting data using the bus cable transmission mode.
[0111] Step S14: In response to the bit error rate being greater than the first threshold or the number of consecutive frame drops being greater than the second threshold, the vehicle is controlled to switch to infrared transmission mode for data transmission. The data transmission quality in infrared transmission mode is higher than that in bus cable transmission mode.
[0112] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.
[0113] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0114] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0115] In the several embodiments provided by this invention, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed can be through some interfaces; the indirect coupling or communication connection of units or modules can be electrical or other forms.
[0116] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0117] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0118] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0119] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A data transmission method based on infrared transmission technology, characterized in that, include: In a preset test environment, the vehicle is controlled to transmit data in a bus cable transmission mode, wherein the preset test environment is used to simulate the vehicle's operating environment under electromagnetic radiation. Monitor the data transmission quality under the bus cable transmission mode to obtain the bit error rate and the number of consecutive frame drops. The bit error rate is used to represent the frequency of data identification errors when transmitting data using the bus cable transmission mode, and the number of consecutive frame drops is used to represent the number of consecutive data losses when transmitting data using the bus cable transmission mode. In response to the bit error rate being greater than a first threshold or the number of consecutive frame drops being greater than a second threshold, the vehicle is controlled to switch to infrared transmission mode for data transmission, wherein the data transmission quality in infrared transmission mode is higher than that in bus cable transmission mode.
2. The method according to claim 1, characterized in that, The method further includes: In the infrared transmission mode, the signal quality of the bus cable transmission mode is monitored based on a preset period to obtain the bit error rate; In response to the bit error rate being less than a third threshold and the duration of the bit error rate being less than the third threshold being greater than a fourth threshold, the vehicle is controlled to switch to the bus cable transmission mode for data transmission, wherein the third threshold is less than the first threshold.
3. The method according to claim 1, characterized in that, The method further includes: The preset intensity and preset frequency range of electromagnetic radiation are determined based on the testing requirements. An electromagnetic field of the preset intensity and the preset frequency range is generated in a shielded room using at least one electromagnetic radiation source to obtain the preset test environment, wherein the shielded room is used to isolate external electromagnetic interference.
4. A data transmission system based on infrared transmission technology, used to perform the method described in any one of claims 1 to 3, characterized in that, The system includes: a shielded room, an electromagnetic radiation source, a bus cable, a control center, an infrared transmitting module, an infrared receiving module, a multiplexer, and switches; The electromagnetic radiation source is used to generate an electromagnetic field of preset intensity and frequency range in the shielded room to obtain a preset test environment to simulate the operating environment of a vehicle under electromagnetic radiation. The bus cable connects the vehicle and the control center and is used to transmit data under the preset test environment. The control center, connected to the bus cable, includes at least one microcontroller for monitoring the data transmission quality under the bus cable transmission mode in the preset test environment; the multiplexer, connected to the control center, is used to control the switching between the bus cable transmission mode and the infrared transmission mode. The infrared emitting module is integrated into the vehicle's electronic control unit and is used to convert digital signals into infrared light signals in the infrared transmission mode. The infrared receiving module, integrated in the control center, is used to receive the infrared light signal and convert the infrared light signal back into the digital signal in the infrared transmission mode. The switch is mounted on the bus cable and connected to both the vehicle and the control center. It is used to connect the bus cable transmission mode when the data transmission quality reaches a preset standard, or to disconnect the bus cable transmission mode when the data transmission quality does not reach the preset standard.
5. The system according to claim 4, characterized in that, The electromagnetic radiation source includes: a signal generator, a power amplifier, and an antenna; The signal generator is used to generate a signal within the preset frequency range; The power amplifier is connected to the signal generator and is used to amplify the signal generated by the signal generator to the preset intensity. The antenna is connected to the power amplifier and is used to convert the signal amplified by the power amplifier into electromagnetic waves.
6. The system according to claim 4, characterized in that, The infrared emitting module includes an infrared emitting tube and a microstructure diffuser. The infrared emitting tube emits at an angle greater than a preset angle. The microstructure diffuser is disposed outside the lens at the emitting end and is used to convert the point light source into a uniform surface light source so that the receiving end receives sufficient photon energy.
7. The system according to claim 4, characterized in that, The infrared receiving module includes a condenser lens and a photodetector, wherein the size of the condenser lens is larger than a preset size, and the detection field of view of the photodetector is larger than the preset field of view.
8. A data transmission device based on infrared transmission technology, characterized in that, include: The first control module is used to control the vehicle to transmit data in a bus cable transmission mode under a preset test environment, wherein the preset test environment is used to simulate the vehicle's operating environment under electromagnetic radiation. The monitoring module is used to monitor the data transmission quality under the bus cable transmission mode and obtain the bit error rate and the number of consecutive frame drops. The bit error rate is used to represent the frequency of data identification errors when transmitting data using the bus cable transmission mode, and the number of consecutive frame drops is used to represent the number of consecutive data losses when transmitting data using the bus cable transmission mode. The second control module is used to control the vehicle to switch to infrared transmission mode for data transmission in response to the bit error rate being greater than a first threshold or the number of consecutive frame drops being greater than a second threshold, wherein the data transmission quality in the infrared transmission mode is higher than the data transmission quality in the bus cable transmission mode.
9. A vehicle, characterized in that, include: Memory, which stores executable programs; A processor for running the program, wherein the program executes the data transmission method based on infrared transmission technology as described in any one of claims 1 to 3.
10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to execute the data transmission method based on infrared transmission technology as described in any one of claims 1 to 3 when running on a computer or processor.