CN118101554A - Backup method and device for on-board dual-system communication link and electronic equipment - Google Patents
Backup method and device for on-board dual-system communication link and electronic equipment Download PDFInfo
- Publication number
- CN118101554A CN118101554A CN202410501400.4A CN202410501400A CN118101554A CN 118101554 A CN118101554 A CN 118101554A CN 202410501400 A CN202410501400 A CN 202410501400A CN 118101554 A CN118101554 A CN 118101554A
- Authority
- CN
- China
- Prior art keywords
- communication link
- data
- data transmission
- link
- information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000004891 communication Methods 0.000 title claims abstract description 438
- 238000000034 method Methods 0.000 title claims abstract description 48
- 230000005540 biological transmission Effects 0.000 claims abstract description 135
- 230000002159 abnormal effect Effects 0.000 claims description 38
- 230000009977 dual effect Effects 0.000 claims description 17
- 230000006870 function Effects 0.000 claims description 12
- 230000005856 abnormality Effects 0.000 claims description 6
- 238000004590 computer program Methods 0.000 claims description 6
- 230000003993 interaction Effects 0.000 abstract description 8
- 238000010586 diagram Methods 0.000 description 8
- 230000007246 mechanism Effects 0.000 description 8
- 230000008569 process Effects 0.000 description 7
- 238000011084 recovery Methods 0.000 description 5
- 238000012937 correction Methods 0.000 description 4
- 230000008901 benefit Effects 0.000 description 3
- 238000012544 monitoring process Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000008439 repair process Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000010485 coping Effects 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Landscapes
- Hardware Redundancy (AREA)
Abstract
The application discloses an on-board dual-system communication link backup method, an on-board dual-system communication link backup device, electronic equipment, a storage medium and a vehicle, wherein the method comprises the steps of obtaining on-board dual-system communication link information; the on-board dual-system communication link information comprises information of a hardware link and information of software control corresponding to the hardware link; wherein the hardware link comprises a main communication link and a standby communication link; the software control information of the corresponding hardware link comprises that data of the same data source is synchronously stored in a data transmission buffer zone of the main communication link and a data transmission buffer zone of the standby communication link at the same starting point, and the data is transmitted according to the running state of the on-board dual-system communication link. By the scheme, the reliability and stability of data interaction between the two systems are improved, and the scheme of software development is enriched, wherein redundancy for guaranteeing normal communication of the two systems can be increased by starting a standby communication link.
Description
Technical Field
The present application relates to the field of communication links, and in particular, to an on-board dual-system communication link backup method, an on-board dual-system communication link backup device, an electronic device, a storage medium, and a vehicle.
Background
In the field of electric automobiles, the cabin area is divided into two systems, one is a vehicle-mounted entertainment system and the other is an electric control system, and the two systems are mutually cooperated to finish safe running of the vehicle and realization of various functions. The hardware of the two systems is usually positioned on the same main board, each main control chip is arranged, and the stability and the reliability of a communication link between the main control chips determine the driving experience of the vehicle and the normal use of each function.
Because the hardware of the two systems is on the same main board, only one SPI communication link is generally used as a main communication link to construct a master-slave machine, transfer data and the like for the two systems, and the reliability and stability of the data are ensured by matching with software means, for example, the communication state of the communication link is monitored in real time, the communication data when the link is abnormal needs to be protected, then the communication link is reset, the reset operation of the link generally comprises one or a combination of several operations such as soft reset, power-off, reinitialization and the like, and if the link reset operation is unsuccessful, the communication between the two systems is interrupted. It can be seen that there are limitations to improving stability and reliability from the software layer only from the link failure at the physical layer by the software means described above. The recovery process of the communication link requires waiting time to interrupt communication, and during the interruption of communication, data cannot be interacted between the two systems, so that the vehicle running safety is greatly influenced, and the risk of the vehicle running safety is caused.
Therefore, an on-board dual-system communication link backup scheme is needed, redundancy is provided for dual systems by consuming hardware resources of communication links, working states of the two communication links are coordinated with software, difficulty in software development is reduced, and stability and reliability of communication data interaction between the dual systems are improved.
Disclosure of Invention
The invention aims to provide an on-board dual-system communication link backup method, an on-board dual-system communication link backup device, electronic equipment, a storage medium and a vehicle, which at least solve one technical problem.
The invention provides the following scheme:
according to one aspect of the present invention, there is provided an on-board dual-system communication link backup method, including:
acquiring on-board dual-system communication link information;
the on-board dual-system communication link information comprises information of a hardware link and information of software control corresponding to the hardware link;
Wherein the hardware link comprises a main communication link and a standby communication link;
The software control information of the corresponding hardware link comprises that data of the same data source is synchronously stored in a data transmission buffer zone of the main communication link and a data transmission buffer zone of the standby communication link at the same starting point, and the data is transmitted according to the running state of the on-board dual-system communication link.
Further, the sending according to the on-board dual-system communication link operation state includes:
The information of the hardware link comprises the monitored sending state of the data of the corresponding main communication link data sending buffer area;
Judging whether the main communication link is normal or not according to the monitored transmission state of the data of the corresponding main communication link data transmission buffer area;
If the main communication link is normal, synchronously refreshing the data transmission buffer zone data of the main communication link and the data transmission buffer zone data of the standby communication link;
If the main communication link is abnormal, generating an instruction corresponding to data transmission of a data transmission buffer area of the standby communication link and generating indication information corresponding to the abnormal running state of the main communication link;
And according to the instruction for sending the data of the corresponding standby communication link data sending buffer, sending the data of the standby communication link data sending buffer.
Further, the sending according to the on-board dual-system communication link operation state further includes:
The information of the hardware link is obtained, wherein the information comprises the monitored sending state of the data sending buffer area of the corresponding standby communication link;
judging whether the standby communication link is normal or not according to the monitored transmission state of the data of the corresponding standby communication link data transmission buffer area;
If the standby communication link is normal, synchronously refreshing the data transmission buffer zone data of the main communication link and the data transmission buffer zone data of the standby communication link;
and if the standby communication link is abnormal, generating indication information corresponding to the abnormal running state of the on-board dual-system communication link.
Further, the determining whether the primary communication link is normal includes:
Acquiring information of a check data transmission state according to the communication clock period of the main communication link, and judging whether the main communication link is normal or not;
if the information of checking that the data transmission state is normal is obtained in the first preset clock period threshold, the main communication link is normal;
If the information of the normal sending state of the check data is not obtained in the first preset clock period threshold, the main communication link is abnormal.
Further, the determining whether the backup communication link is normal includes:
if the main communication link is abnormal, acquiring information of a check data transmission state according to a communication clock period of the standby communication link, and judging whether the standby communication link is normal or not;
if the information of checking that the data transmission state is normal is obtained in the second preset clock period threshold, the standby communication link is normal;
If the information of the normal sending state of the check data is not obtained in the second preset clock period threshold, the standby communication link is abnormal.
Further, the synchronously refreshing the data transmission buffer data of the primary communication link and the data transmission buffer data of the backup communication link includes:
According to the current abnormality of the main communication link and the normal of the standby communication link, synchronously refreshing data transmission buffer zone data of the main communication link and data transmission buffer zone data of the standby communication link, and judging whether the main communication link is normal or not according to the period of each refreshing data transmission buffer zone data;
if the main communication link is normal, generating an instruction for stopping transmitting data of a data transmission buffer zone of the corresponding standby communication link, and generating instruction information corresponding to the normal running state of the main communication link;
And according to the instruction for stopping sending the data of the data sending buffer zone of the corresponding standby communication link, stopping sending the data of the data sending buffer zone of the standby communication link, and sending the data of the data sending buffer zone of the main communication link.
According to two aspects of the present invention, there is provided an on-board dual-system communication link backup apparatus, comprising:
The system link information module is used for acquiring on-board dual-system communication link information, wherein the on-board dual-system communication link information comprises information of a hardware link and information of software control corresponding to the hardware link;
The hardware link classification module is used for the hardware links comprising a main communication link and a standby communication link;
the software control function module is used for synchronously storing the data of the same data source into the data transmission buffer area of the main communication link and the data transmission buffer area of the standby communication link at the same starting point and transmitting the data according to the running state of the on-board dual-system communication link.
According to three aspects of the present invention, there is provided an electronic apparatus including: the device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
the memory stores a computer program that, when executed by the processor, causes the processor to perform the steps of the on-board dual-system communication link backup method.
According to four aspects of the present invention, there is provided a computer-readable storage medium comprising: which stores a computer program executable by an electronic device, which when run on the electronic device causes the electronic device to perform the steps of the on-board dual system communication link backup method.
According to five aspects of the present invention, there is provided a vehicle including:
the electronic equipment is used for realizing the step of the on-board dual-system communication link backup method;
the processor runs a program, and when the program runs, data output from the electronic equipment executes the step of the on-board dual-system communication link backup method;
and a storage medium for storing a program that, when executed, performs the steps of the on-board dual-system communication link backup method on data output from the electronic device.
Through the scheme, the following beneficial technical effects are obtained:
The application improves the reliability and stability of data interaction between the two systems by adding the hardware communication link as the backup of the original double-system communication link, enriches the software development scheme, and can increase and ensure the redundancy of the normal double-system communication by starting the backup communication link besides one or more of the operations of soft reset, power off, reinitialization and the like.
The application eliminates the influence caused by communication interruption in the recovery process of the main communication link by switching the standby communication link, and ensures that the dual system is always in a low-delay data interaction state.
The application adopts the standby communication link which is different from the communication mechanism of the main communication link, expands the anti-interference range of the interference source, namely, reduces the variety of the interference source which can interfere with the main communication link and the standby communication link.
The application can timely return to the state taking the main communication link as a data interaction channel by continuously monitoring the state of the main communication link recovery, and maintain the high priority of the main communication link as much as possible.
The application can make the outside world locate the fault type and position in time by displaying the abnormal state of the communication link, and provides convenience for the repair of workers and the improvement of schemes.
Drawings
Fig. 1 is a flowchart of a method for backup of on-board dual-system communication links according to one or more embodiments of the present invention.
Fig. 2 is a block diagram of an on-board dual-system communication link backup device according to one or more embodiments of the present invention.
Fig. 3 is a schematic diagram of a dual system vehicle-to-machine communication link backup system architecture according to an embodiment of the present invention.
Fig. 4 is a schematic diagram of a dual system vehicle-to-machine communication link switching backup procedure according to an embodiment of the present invention.
Fig. 5 is a block diagram of an electronic device configured to implement a backup method for on-board dual-system communication links according to one or more embodiments of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made apparent and fully in view of the accompanying drawings, in which some, but not all embodiments of the invention are shown. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Fig. 1 is a flowchart of a method for backup of on-board dual-system communication links according to one or more embodiments of the present invention.
The backup method of the on-board dual-system communication link as shown in fig. 1 comprises the following steps:
Step S1, acquiring on-board dual-system communication link information, wherein the on-board dual-system communication link information comprises information of a hardware link and information of software control corresponding to the hardware link;
step S2, the hardware link comprises a main communication link and a standby communication link;
and step S3, the software control information corresponding to the hardware link comprises that the data of the same data source is synchronously stored in a data transmission buffer area of a main communication link and a data transmission buffer area of a standby communication link at the same starting point, and the data is transmitted according to the running state of the on-board dual-system communication link.
Specifically, taking a CSC car machine system board of a certain car type as an example, the board has a car machine entertainment system and a car control system which are respectively corresponding to two main chips. The two main chips are provided with SPI interfaces and UART interfaces, wherein the SPI interfaces are connected in a hard wire manner, and the SPI interfaces comprise a master-slave input (MOSI), a master-slave output (MISO), a Clock Line (CLK) and a Chip Select (CS), so that an SPI communication link is generated and used as a main communication link; hard-wired UART interfaces include Transmit (TX), receive (RX), and generate UART communication links as backup communication links. And respectively configuring data transmission buffer areas for the SPI communication link and the UART communication link, wherein the data transmission buffer areas corresponding to the SPI communication link are used as main data transmission buffer areas, the data transmission buffer areas corresponding to the UART communication link are used as standby data transmission buffer areas, and the data of the two data transmission buffer areas can be synchronously refreshed along with the transmission completion of each frame of data. When the SPI communication link is normal, the UART communication link is not started, the data is only transmitted from the SPI communication link by the main data transmission buffer area, and after each frame of data is transmitted, the standby data transmission buffer area and the main data transmission buffer area synchronously refresh the data. When the SPI communication link is abnormal, the UART communication link is started, data is transmitted from the UART communication link by the standby data transmission buffer area, and after each frame of data is transmitted, the standby data transmission buffer area and the main data transmission buffer area synchronously refresh the data. Therefore, the continuity of data transmission between the vehicle entertainment system and the vehicle control system is guaranteed, the data delay aggravation caused by SPI communication link abnormality is reduced, and the complete disconnection of communication data is avoided. During the starting of the UART communication link, the operation of resetting the SPI communication link can be performed in a software mode, and if the resetting is successful, the SPI communication link is re-started for data transmission, and the UART communication link is closed. At the data receiving end, whether the SPI communication link or the UART communication link receives the data, the data is unified to refresh the data of each frame, so that the received data can keep consistency.
In this embodiment, the sending according to the on-board dual-system communication link operation state includes:
the method comprises the steps of acquiring information of a hardware link, wherein the information comprises the monitored sending state of data of a data sending buffer area of a corresponding main communication link;
judging whether the main communication link is normal or not according to the monitored transmission state of the data of the corresponding main communication link data transmission buffer area;
If the main communication link is normal, synchronously refreshing the data transmission buffer zone data of the main communication link and the data transmission buffer zone data of the standby communication link;
If the main communication link is abnormal, generating an instruction corresponding to data transmission of the data transmission buffer area of the standby communication link and generating indication information corresponding to abnormal running state of the main communication link;
and according to the instruction of data transmission of the corresponding standby communication link data transmission buffer, the standby communication link data transmission buffer transmits data.
Specifically, after the CSC vehicle system board is powered on, firstly initializing an SPI communication link (a main communication link) until the main communication link is successfully initialized; after the primary communication link is successfully initialized, the UART communication link (standby communication link) is initialized until the standby communication link is successfully initialized.
After the initialization of the two links is successful, waiting for data, the program queries whether the data buffer area has data to be transmitted or not, if not, the program periodically queries the data buffer area, if so, the program reads the data from the buffer area, synchronously puts the data into the main data transmission buffer area and the backup data transmission buffer area, then transmits the data of the main data transmission buffer area, and starts SPI communication link transmission.
And monitoring whether the transmission of the data transmission buffer of the main communication link is normally completed, thereby judging whether the main communication link is normal. If the transmission of the data transmission buffer area of the main communication link is normally completed, indicating that the main communication link is normal, synchronously refreshing the data of the data transmission buffer area of the main communication link and the data transmitted by the next frame of the data transmission buffer area of the standby communication link; if the transmission of the data in the data transmission buffer of the main communication link is not completed, the data is tried again for a plurality of times (for example, the maximum number of times of trying is set to be 5), and if the data is still unsuccessful after the maximum number of times of trying, the data transmission buffer of the main communication link is abnormal.
If the main communication link is abnormal, an instruction is generated to instruct the backup communication link (UART communication link) to be started, and the backup data transmission buffer data is transmitted from the backup communication link. Meanwhile, indication information of abnormal operation state of the main communication link can be displayed on the man-machine terminal.
And after the data of the standby data transmission buffer area is transmitted from the standby communication link, synchronously refreshing the data of the data transmission buffer area of the main communication link and the data transmitted by the next frame of the data transmission buffer area of the standby communication link.
In this embodiment, the sending according to the on-board dual-system communication link operation state further includes:
The method comprises the steps of obtaining information of a hardware link, wherein the information comprises the monitored sending state of data of a data sending buffer area of a corresponding standby communication link;
judging whether the standby communication link is normal or not according to the monitored transmission state of the data of the corresponding standby communication link data transmission buffer area;
if the standby communication link is normal, synchronously refreshing the data transmission buffer zone data of the main communication link and the data transmission buffer zone data of the standby communication link;
If the standby communication link is abnormal, generating indication information corresponding to the abnormal running state of the on-board dual-system communication link.
Specifically, whether the transmission of the backup communication link data transmission buffer data is completed normally is monitored, thereby judging whether the backup communication link is normal. If the transmission of the data transmission buffer area of the standby communication link is normally completed, which indicates that the standby communication link is normal, synchronously refreshing the data of the data transmission buffer area of the main communication link and the data transmitted by the next frame of the data transmission buffer area of the standby communication link; if the transmission of the backup communication link data transmission buffer is not completed, the backup communication link data transmission buffer is tried again a plurality of times (for example, the maximum number of times of trying is set to be 5), and if the backup communication link data transmission buffer is still unsuccessful after the maximum number of times of trying, the backup communication link is abnormal. And under the condition that the main communication link and the standby communication link are abnormal, generating indication information corresponding to the abnormal running state of the on-board dual-system communication link.
In this embodiment, determining whether the primary communication link is normal includes:
acquiring information of the check data transmission state according to the communication clock period of the main communication link, and judging whether the main communication link is normal or not;
if the information of the check data transmission state is normal is obtained in the first preset clock period threshold, the main communication link is normal;
If the information of the normal sending state of the check data is not obtained in the first preset clock period threshold, the main communication link is abnormal.
Specifically, one communication clock cycle is a data transmission check cycle, the first preset clock cycle threshold may be set to 5, and in the first preset clock cycle threshold, information for checking that the data transmission state is normal is obtained, so that the main communication link is normal, and if all 5 times fail, the main communication link is abnormal. The first preset clock period threshold is used to verify that the primary communication link is abnormal.
In this embodiment, determining whether the backup communication link is normal includes:
If the main communication link is abnormal, acquiring information for checking the data transmission state according to the communication clock period of the standby communication link, and judging whether the standby communication link is normal or not;
If the information of the normal check data sending state is obtained in the second preset clock period threshold, the standby communication link is normal;
if the information of the normal sending state of the check data is not obtained in the second preset clock period threshold, the standby communication link is abnormal.
Specifically, the second preset clock period threshold may be set to 5, and in the second preset clock period threshold, information for verifying that the data transmission state is normal is obtained, so that the standby communication link is normal, and if all of the 5 times fail, the standby communication link is abnormal. The second preset clock cycle threshold is used to verify that the backup communication link is abnormal. Setting a second preset clock period threshold and a first preset clock period threshold, which correspond to the states of the standby communication link and the main communication link respectively, facilitates the adjustment of transmission data delay redundancy by software to focus on which predetermined interference environment should be handled.
In this embodiment, synchronously refreshing the data transmission buffer data of the primary communication link and the data transmission buffer data of the backup communication link includes:
according to the abnormal condition of the current main communication link and the normal condition of the standby communication link, synchronously refreshing the data transmission buffer area data of the main communication link and the data transmission buffer area data of the standby communication link, and judging whether the main communication link is normal or not according to the period of each refreshing data transmission buffer area data;
If the main communication link is normal, generating an instruction for stopping transmitting data of a data transmission buffer zone of the corresponding standby communication link, and generating indication information for normal operation state of the corresponding main communication link;
and according to the instruction of stopping sending the data of the data sending buffer zone of the corresponding standby communication link, stopping sending the data of the data sending buffer zone of the standby communication link, and sending the data of the data sending buffer zone of the main communication link.
Specifically, in the embodiment taking a CSC vehicle machine system board of a certain vehicle type as an example, the SPI communication link is used as a main communication link, so that the speed advantage and full duplex advantage of the SPI communication in the board-card dual system can be exerted, but the maximum transmission distance of the SPI communication is shorter, and the SPI communication is more susceptible to electromagnetic interference. The UART communication link is used as a standby communication link, the advantage that the UART communication anti-interference capability is stronger than that of SPI communication is exerted, but the UART communication rate is lower, and the performance of a CSC vehicle machine system board is easily inhibited by adopting a half duplex mode.
The chips used on the system board of the CSC car machine are provided with a UART communication module and an SPI communication module which are commonly used in the market, the UART communication module is provided with error detection and correction mechanisms, such as odd check, even check and the like, and the SPI communication module is not provided with any error detection and correction mechanism; the UART communication module can cope with more complex electromagnetic environment than the SPI communication module due to the characteristics of the UART communication module. The SPI communication mechanism is synchronous communication, the transceiver must be completely synchronous, the UART communication mechanism is asynchronous communication, the transceiver of the asynchronous communication is not interfered with each other, when a problem occurs on the receiving or transmitting party, the SPI cannot communicate at all, and the UART can still maintain half of communication.
In a certain currently known vehicle type, an SPI communication module and a UART communication module are used for carrying out communication link backup by the SOC and the MCU, in a certain edition of hardware electromagnetic compatibility test, SPI communication is interfered, a large number of errors occur, software cannot process the errors in time, and SPI communication state abnormality is reported; at the moment, the UART is switched to a UART communication link, and the error correction mechanism of the UART and the error correction of software can be used for very easily coping with the interference of an electromagnetic compatibility laboratory.
Therefore, in this embodiment, according to the current abnormality of the primary communication link and the normal abnormality of the backup communication link, the data transmission buffer data of the primary communication link and the data transmission buffer data of the backup communication link are synchronously refreshed, and in each period of refreshing the data transmission buffer data, it is determined whether the primary communication link is normal or not, that is, after each successful transmission of one frame of data, the next frame of data still preferentially starts the primary communication link, and the primary communication link is checked for the data transmission state, and if the check result indicates that the primary communication link is abnormal, the backup communication link is still started for data transmission.
If the reset is successful, under the process of periodically judging whether the main communication link is normal, the working state of the dual system connected by the main communication link can be switched back again, meanwhile, an instruction for stopping sending the data of the data sending buffer zone of the corresponding standby communication link is generated, and indication information corresponding to the normal operation state of the main communication link is generated, so that the data of the data sending buffer zone of the standby communication link is stopped to be sent, and the data is sent by the data sending buffer zone of the main communication link.
In the period, the data transmission delay caused by the process of periodically judging whether the main communication link is normal can be reduced by reducing the threshold value of the first preset clock period.
Fig. 2 is a block diagram of an on-board dual-system communication link backup device according to one or more embodiments of the present invention.
The on-board dual-system communication link backup device shown in fig. 2 includes: the system comprises a system link information module, a hardware link classification module and a software control function module;
The system link information module is used for acquiring on-board dual-system communication link information which comprises information of a hardware link and information of software control corresponding to the hardware link;
the hardware link classification module is used for the hardware links comprising a main communication link and a standby communication link;
The software control function module is used for synchronously storing the data of the same data source into the data transmission buffer area of the main communication link and the data transmission buffer area of the standby communication link at the same starting point according to the software control information of the corresponding hardware link, and transmitting the data according to the running state of the on-board dual-system communication link.
It should be noted that, although the system only discloses a system link information module, a hardware link classification module and a software control function module, the present invention is to be expressed in terms of meaning that, based on the above basic function modules, one skilled in the art may add one or more function modules arbitrarily in combination with the prior art to form an infinite number of embodiments or technical solutions, that is, the system is open rather than closed, and the protection scope of the claims of the present invention should not be limited to the above disclosed basic function modules because the present embodiment only discloses individual basic function modules.
Through the scheme, the following beneficial technical effects are obtained:
The application improves the reliability and stability of data interaction between the two systems by adding the hardware communication link as the backup of the original double-system communication link, enriches the software development scheme, and can increase and ensure the redundancy of the normal double-system communication by starting the backup communication link besides one or more of the operations of soft reset, power off, reinitialization and the like.
The application eliminates the influence caused by communication interruption in the recovery process of the main communication link by switching the standby communication link, and ensures that the dual system is always in a low-delay data interaction state.
The application adopts the standby communication link which is different from the communication mechanism of the main communication link, expands the anti-interference range of the interference source, namely, reduces the variety of the interference source which can interfere with the main communication link and the standby communication link.
The application can timely return to the state taking the main communication link as a data interaction channel by continuously monitoring the state of the main communication link recovery, and maintain the high priority of the main communication link as much as possible.
The application can make the outside world locate the fault type and position in time by displaying the abnormal state of the communication link, and provides convenience for the repair of workers and the improvement of schemes.
Fig. 3 is a schematic diagram of a dual system vehicle-to-machine communication link backup system architecture according to an embodiment of the present invention.
Fig. 4 is a schematic diagram of a dual system vehicle-to-machine communication link switching backup procedure according to an embodiment of the present invention.
In a specific embodiment, as shown in fig. 3, the dual-system vehicle-computer communication link backup system architecture is that the whole vehicle-computer system is on a system board and is divided into two subsystems of a vehicle-computer entertainment system and a vehicle control system, each subsystem comprises an independent main control CPU, and the two CPUs are connected and communicated through an SPI communication link and a UART communication link, wherein the SPI communication link is used as a main communication link, and the UART communication link is used as a standby communication link. The dual system is divided into a host machine and a slave machine under the SPI communication mechanism, and the master and slave of the entertainment system and the SPI of the car control system can be distributed according to actual conditions, for example, the entertainment system is configured as the SPI host machine, and the car control system is configured as the SPI slave machine. The master-slave machine is connected by four wires, namely a master-slave input (MOSI), a master-slave output (MISO), a clock wire (CLK) and a chip select wire (CS). UART hardware connection does not distinguish between master and slave devices, but in terms of communication rate, UART interface communication rate is slower than SPI communication interface, so it acts as a backup interface. UART interfaces are connected by two wires, namely, transmission (TX), reception (RX), and an entertainment system and a vehicle control system are respectively provided with one TX and one RX, and are in cross connection when in use.
In another embodiment, under the dual-system vehicle-to-machine communication link backup system architecture shown in fig. 3, the dual-system vehicle-to-machine communication link as shown in fig. 4 switches the backup flow.
Step 1, initializing a main communication link (SPI communication link) after a vehicle-mounted system is powered on until the main communication link is successfully initialized; after the primary communication link is successfully initialized, initializing a standby (UART communication link) communication link until the standby communication link is successfully initialized.
Step 2, after the initialization of the main/standby link is successful, the program is in a waiting state, the program inquires whether data to be transmitted exist in the data buffer area, if not, the program periodically inquires the data buffer area, if so, the program reads the data from the buffer area and puts the data into the standby area for retransmission, then the read data is put into the SPI communication link transmission buffer area, and the SPI communication link is started for data transmission.
Step 3, if the SPI data transmission is successful, the software returns to the step2, whether the data buffer area has data to be transmitted or not is queried again, and then the step2 is repeated; if the communication fails, the software control attempts to resend 5 times, and each resend, the last sent data is read from the data backup area.
Step 4, if the SPI is repeatedly sent for five times and is unsuccessful, reporting the SPI main chain error by the software; and then reading the data backup area again, storing the data to be transmitted into the UART transmitting buffer area, and starting UART data transmission.
And step 5, if the UART transmits successfully, returning to the transmitting buffer area to check whether data to be transmitted exist, if not, periodically inquiring the transmitting buffer area to wait for the data to be transmitted, if so, checking whether the SPI main communication link is recovered to be normal, if so, transmitting the data by using the SPI main communication link, otherwise, continuously transmitting the data by using the UART standby communication link.
And step 6, if the UART standby communication link fails to send data, reading the data backup area to retransmit, wherein the number of retransmissions is 5 at most, and if the 5 times of retransmissions fail to send data, reporting the abnormal state of the UART standby communication link.
Fig. 5 is a block diagram of an electronic device configured to implement a backup method for on-board dual-system communication links according to one or more embodiments of the present invention.
As shown in fig. 5, the present application provides an electronic device including: the device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
the memory stores a computer program which, when executed by the processor, causes the processor to perform the steps of a dual system on board communication link backup method.
The present application also provides a computer readable storage medium storing a computer program executable by an electronic device, which when run on the electronic device causes the electronic device to perform the steps of a dual system on board communication link backup method.
The present application also provides a vehicle including:
The electronic equipment is used for realizing the step of the backup method of the on-board dual-system communication link;
A processor that runs a program, and performs a step of an on-board dual-system communication link backup method on data output from the electronic device when the program runs;
a storage medium storing a program that, when executed, performs steps of an on-board dual-system communication link backup method on data output from an electronic device.
The communication bus mentioned above for the electronic device may be a peripheral component interconnect standard (PERIPHERAL COMPONENT INTERCONNECT, PCI) bus or an extended industry standard architecture (ExtendedIndustry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The electronic device includes a hardware layer, an operating system layer running on top of the hardware layer, and an application layer running on top of the operating system. The hardware layer includes hardware such as a central processing unit (CPU, central Processing Unit), a memory management unit (MMU, memory Management Unit), and a memory. The operating system may be any one or more computer operating systems that implement electronic device control via processes (processes), such as a Linux operating system, a Unix operating system, an Android operating system, an IOS operating system, or a Windows operating system. In addition, in the embodiment of the present invention, the electronic device may be a handheld device such as a smart phone, a tablet computer, or an electronic device such as a desktop computer, a portable computer, which is not particularly limited in the embodiment of the present invention.
The execution body controlled by the electronic device in the embodiment of the invention can be the electronic device or a functional module in the electronic device, which can call a program and execute the program. The electronic device may obtain firmware corresponding to the storage medium, where the firmware corresponding to the storage medium is provided by the vendor, and the firmware corresponding to different storage media may be the same or different, which is not limited herein. After the electronic device obtains the firmware corresponding to the storage medium, the firmware corresponding to the storage medium can be written into the storage medium, specifically, the firmware corresponding to the storage medium is burned into the storage medium. The process of burning the firmware into the storage medium may be implemented by using the prior art, and will not be described in detail in the embodiment of the present invention.
The electronic device may further obtain a reset command corresponding to the storage medium, where the reset command corresponding to the storage medium is provided by the provider, and the reset commands corresponding to different storage media may be the same or different, which is not limited herein.
At this time, the storage medium of the electronic device is a storage medium in which the corresponding firmware is written, and the electronic device may respond to a reset command corresponding to the storage medium in which the corresponding firmware is written, so that the electronic device resets the storage medium in which the corresponding firmware is written according to the reset command corresponding to the storage medium. The process of resetting the storage medium according to the reset command may be implemented in the prior art, and will not be described in detail in the embodiments of the present invention.
For convenience of description, the above devices are described as being functionally divided into various units and modules. Of course, the functions of the units, modules may be implemented in one or more pieces of software and/or hardware when implementing the application.
It will be understood by those skilled in the art that all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs unless defined otherwise. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
For the purposes of simplicity of explanation, the methodologies are shown and described as a series of acts, it is to be understood and appreciated by one of ordinary skill in the art that the methodologies are not limited by the order of acts, as some acts may, in accordance with the methodologies, take place in other order or concurrently. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred embodiments, and that the acts are not necessarily required by the embodiments of the invention.
From the above description of embodiments, it will be apparent to those skilled in the art that the present application may be implemented in software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server or a network device, etc.) to perform the method according to the embodiments or some parts of the embodiments of the present application.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.
Claims (10)
1. The backup method for the on-board dual-system communication link is characterized by comprising the following steps of:
acquiring on-board dual-system communication link information;
the on-board dual-system communication link information comprises information of a hardware link and information of software control corresponding to the hardware link;
Wherein the hardware link comprises a main communication link and a standby communication link;
The software control information of the corresponding hardware link comprises that data of the same data source is synchronously stored in a data transmission buffer zone of the main communication link and a data transmission buffer zone of the standby communication link at the same starting point, and the data is transmitted according to the running state of the on-board dual-system communication link.
2. The on-board dual-system communication link backup method according to claim 1, wherein the transmitting according to the on-board dual-system communication link operation state comprises:
The information of the hardware link comprises the monitored sending state of the data of the corresponding main communication link data sending buffer area;
Judging whether the main communication link is normal or not according to the monitored transmission state of the data of the corresponding main communication link data transmission buffer area;
If the main communication link is normal, synchronously refreshing the data transmission buffer zone data of the main communication link and the data transmission buffer zone data of the standby communication link;
If the main communication link is abnormal, generating an instruction corresponding to data transmission of a data transmission buffer area of the standby communication link and generating indication information corresponding to the abnormal running state of the main communication link;
And according to the instruction for sending the data of the corresponding standby communication link data sending buffer, sending the data of the standby communication link data sending buffer.
3. The on-board dual-system communication link backup method according to claim 2, wherein the transmitting according to the on-board dual-system communication link operation state further comprises:
The information of the hardware link is obtained, wherein the information comprises the monitored sending state of the data sending buffer area of the corresponding standby communication link;
judging whether the standby communication link is normal or not according to the monitored transmission state of the data of the corresponding standby communication link data transmission buffer area;
If the standby communication link is normal, synchronously refreshing the data transmission buffer zone data of the main communication link and the data transmission buffer zone data of the standby communication link;
and if the standby communication link is abnormal, generating indication information corresponding to the abnormal running state of the on-board dual-system communication link.
4. The method for backup of on-board dual-system communication links according to claim 3, wherein said determining whether said primary communication link is normal comprises:
Acquiring information of a check data transmission state according to the communication clock period of the main communication link, and judging whether the main communication link is normal or not;
if the information of checking that the data transmission state is normal is obtained in the first preset clock period threshold, the main communication link is normal;
If the information of the normal sending state of the check data is not obtained in the first preset clock period threshold, the main communication link is abnormal.
5. The method for backup of an on-board dual-system communication link according to any one of claims 3 or 4, wherein said determining whether the backup communication link is normal comprises:
if the main communication link is abnormal, acquiring information of a check data transmission state according to a communication clock period of the standby communication link, and judging whether the standby communication link is normal or not;
if the information of checking that the data transmission state is normal is obtained in the second preset clock period threshold, the standby communication link is normal;
If the information of the normal sending state of the check data is not obtained in the second preset clock period threshold, the standby communication link is abnormal.
6. The on-board dual system communication link backup method of claim 5, wherein said synchronously refreshing data transmission buffer data of said primary communication link and data transmission buffer data of said backup communication link comprises:
According to the current abnormality of the main communication link and the normal of the standby communication link, synchronously refreshing data transmission buffer zone data of the main communication link and data transmission buffer zone data of the standby communication link, and judging whether the main communication link is normal or not according to the period of each refreshing data transmission buffer zone data;
if the main communication link is normal, generating an instruction for stopping transmitting data of a data transmission buffer zone of the corresponding standby communication link, and generating instruction information corresponding to the normal running state of the main communication link;
And according to the instruction for stopping sending the data of the data sending buffer zone of the corresponding standby communication link, stopping sending the data of the data sending buffer zone of the standby communication link, and sending the data of the data sending buffer zone of the main communication link.
7. An on-board dual-system communication link backup device, which is characterized by comprising:
The system link information module is used for acquiring on-board dual-system communication link information, wherein the on-board dual-system communication link information comprises information of a hardware link and information of software control corresponding to the hardware link;
The hardware link classification module is used for the hardware links comprising a main communication link and a standby communication link;
the software control function module is used for synchronously storing the data of the same data source into the data transmission buffer area of the main communication link and the data transmission buffer area of the standby communication link at the same starting point and transmitting the data according to the running state of the on-board dual-system communication link.
8. An electronic device, comprising: the device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
The memory has stored therein a computer program which, when executed by the processor, causes the processor to perform the steps of the on-board dual system communication link backup method of any of claims 1 to 6.
9. A computer-readable storage medium, comprising: which stores a computer program executable by an electronic device, which when run on the electronic device causes the electronic device to perform the steps of the on-board dual system communication link backup method as claimed in any one of claims 1 to 6.
10. A vehicle, characterized by comprising:
Electronic equipment for implementing the steps of the on-board dual-system communication link backup method of any one of claims 1 to 6;
a processor that runs a program, the data output from the electronic device when the program is run performing the steps of the on-board dual-system communication link backup method of any one of claims 1 to 6;
A storage medium storing a program which, when executed, performs the steps of the on-board dual-system communication link backup method of any one of claims 1 to 6 on data output from an electronic device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410501400.4A CN118101554A (en) | 2024-04-25 | 2024-04-25 | Backup method and device for on-board dual-system communication link and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410501400.4A CN118101554A (en) | 2024-04-25 | 2024-04-25 | Backup method and device for on-board dual-system communication link and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN118101554A true CN118101554A (en) | 2024-05-28 |
Family
ID=91156573
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410501400.4A Granted CN118101554A (en) | 2024-04-25 | 2024-04-25 | Backup method and device for on-board dual-system communication link and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118101554A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101807986A (en) * | 2010-04-20 | 2010-08-18 | 杭州和利时自动化有限公司 | Realization method and device of redundant serial bus |
WO2014010988A1 (en) * | 2012-07-12 | 2014-01-16 | 엘지전자 주식회사 | Method and apparatus for carrying out device-to-device communication in wireless communication system |
US20190068486A1 (en) * | 2017-08-31 | 2019-02-28 | Fujitsu Limited | Transmitting apparatus, method and non-transitory computer-readable storage medium |
CN113302886A (en) * | 2019-01-31 | 2021-08-24 | 西门子股份公司 | Method and router for operating a communication system with redundant routers |
CN114024922A (en) * | 2022-01-06 | 2022-02-08 | 北京国科天迅科技有限公司 | Mirror image port redundancy processing method and device for optical fiber switch |
CN115336214A (en) * | 2020-04-28 | 2022-11-11 | 华为技术有限公司 | Main/standby link switching method and device, electronic equipment, router and switch |
CN116112523A (en) * | 2023-01-10 | 2023-05-12 | 武汉海微科技有限公司 | Vehicle-mounted transmission system, data transmission method and vehicle |
-
2024
- 2024-04-25 CN CN202410501400.4A patent/CN118101554A/en active Granted
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101807986A (en) * | 2010-04-20 | 2010-08-18 | 杭州和利时自动化有限公司 | Realization method and device of redundant serial bus |
WO2014010988A1 (en) * | 2012-07-12 | 2014-01-16 | 엘지전자 주식회사 | Method and apparatus for carrying out device-to-device communication in wireless communication system |
US20190068486A1 (en) * | 2017-08-31 | 2019-02-28 | Fujitsu Limited | Transmitting apparatus, method and non-transitory computer-readable storage medium |
CN113302886A (en) * | 2019-01-31 | 2021-08-24 | 西门子股份公司 | Method and router for operating a communication system with redundant routers |
CN115336214A (en) * | 2020-04-28 | 2022-11-11 | 华为技术有限公司 | Main/standby link switching method and device, electronic equipment, router and switch |
CN114024922A (en) * | 2022-01-06 | 2022-02-08 | 北京国科天迅科技有限公司 | Mirror image port redundancy processing method and device for optical fiber switch |
CN116112523A (en) * | 2023-01-10 | 2023-05-12 | 武汉海微科技有限公司 | Vehicle-mounted transmission system, data transmission method and vehicle |
Non-Patent Citations (1)
Title |
---|
索明何;邢海霞;: "基于CAN的汽车线路故障智能考核***设计", 信息技术, no. 11, 20 November 2018 (2018-11-20) * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5185877A (en) | Protocol for transfer of DMA data | |
CN103634150B (en) | A kind of high security CAN communication means of redundancy | |
US5068851A (en) | Apparatus and method for documenting faults in computing modules | |
US5163138A (en) | Protocol for read write transfers via switching logic by transmitting and retransmitting an address | |
EP2962900B1 (en) | Vehicle control device | |
CN110780909A (en) | Distributed embedded system upgrading method and device | |
CN111538319A (en) | Parallel testing method for CAN bus controller | |
CN105183575A (en) | Processor fault diagnosis method, device and system | |
CN103678031A (en) | Double 2-vote-2 redundant system and method | |
CN110896372A (en) | I2C link switching method, terminal and storage medium | |
CN103530215B (en) | A kind of self checking method of internal integrated circuit main frame, device and main frame | |
CN113434442A (en) | Switch and data access method | |
CN104484260B (en) | Simulation monitoring circuit based on GJB289 bus interface SoC (system on a chip) | |
CN116578521B (en) | Single-bus communication method, device, system and equipment | |
CN118101554A (en) | Backup method and device for on-board dual-system communication link and electronic equipment | |
US5140593A (en) | Method of checking test program in duplex processing apparatus | |
CN115454881A (en) | Debugging system and debugging method of RISC-V architecture | |
CN111641544B (en) | CAN bus controller parallel test system | |
EP0416732A2 (en) | Targeted resets in a data processor | |
CN210380890U (en) | Communication system and SIS system of Modbus equipment | |
RU2705421C1 (en) | Method of transmitting data over a bus, a communication system for realizing said method and an automatic protection device for preventing an emergency situation at a control object | |
CN103440218A (en) | CAN (Control Area Network) bus monitoring method based on USB-HID (Universal Serial Bus-Human Input Device) protocol | |
CN113886297A (en) | SPI concurrent communication SE device and method based on DMA | |
JP2856617B2 (en) | Programmable controller | |
CN103455401A (en) | Coordinated verifying method for tight coupling architecture of DSP (Digital Signal Processor) and FPGA (Field Programmable Gate Array) |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant |