Communication control method and apparatus based on dual controllers, and storage medium and processor

By obtaining the grounding status of the vehicle communication interface, determining the target controller and selecting the corresponding communication link, the problem of high development and maintenance costs of vehicle controllers is solved, and the effect of simplifying development and reducing costs is achieved.

WO2025123843A1PCT designated stage expired Publication Date: 2025-06-19CHINA FAW CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/120425
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-15
Filing Date
2024-09-23
Publication Date
2025-06-19

AI Technical Summary

Technical Problem

The development and maintenance costs of vehicle controllers are high, mainly due to the differences in communication protocols between the master controller and the slave controller, which leads to the problems of repeated development and repeated testing.

Method used

By obtaining the grounding status of the vehicle's communication interface, determine whether the target controller is the master controller or the slave controller, and select the target sending and receiving links corresponding to the target controller in the communication link to realize the transmission and reception of messages.

Benefits of technology

The development process of vehicle controllers is simplified, and repeated development and repeated testing caused by differences in communication protocols between different controllers is avoided, thus reducing development and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024120425_19062025_PF_FP_ABST
    Figure CN2024120425_19062025_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present disclosure are a communication control method and apparatus based on dual controllers, and a storage medium and a processor. The method comprises: acquiring a grounding state of a communication interface of a vehicle, wherein the grounding state is used for indicating the type of connection between the communication interface and a ground wire of the vehicle; on the basis of the grounding state of the communication interface, determining, from dual controllers of the vehicle, a target controller connected to the communication interface, wherein the target controller is at least a master controller or a slave controller; on the basis of the target controller, selecting, from among communication links of the vehicle, a target sending link and a target receiving link that correspond to the target controller; and controlling the target controller to send, by means of the target sending link, a message to be sent, and controlling the target controller to receive, by means of the target receiving link, a message to be received. The present disclosure solves the technical problem of the development cost and maintenance cost of a vehicle controller being relatively high.
Need to check novelty before this filing date? Find Prior Art

Description

Communication control method, device, storage medium and processor for dual controllers

[0001] Cross-reference

[0002] This disclosure claims priority to a Chinese patent disclosure filed with the Patent Office of China on December 15, 2023, with publication number 2023117380149 and titled “Communication Control Method, Device, Storage Medium and Processor for Dual Controllers,” the entire contents of which are incorporated herein by reference. Technical Field

[0003] The present disclosure relates to the field of vehicle control technology, and in particular to a communication control method, device, storage medium, and processor for a dual-controller. Background Art

[0004] At present, with the rapid popularization and development of vehicles, the vehicle controller (Micro Controller Unit, referred to as MCU) as the control center of the vehicle, in the development process of the vehicle controller, the testing and maintenance of the MCU is of paramount importance.

[0005] To ensure vehicle safety during driving, vehicle controllers are typically divided into a master and slave controllers. When the vehicle is operating normally, the master controller takes over. If the master controller fails, the slave controller takes over. However, aside from inconsistencies in the way they send and receive messages, the master and slave controllers share identical hardware and operating systems. This leads to frequent duplication of development and testing during controller development, resulting in high software development and maintenance costs for vehicle controllers.

[0006] Currently, no effective solution has been proposed to the technical problem of high development and maintenance costs of the above-mentioned vehicle controllers.

[0007] Summary of the Invention

[0008] The embodiments of the present disclosure provide a dual-controller communication control method, device, storage medium, and processor to at least solve the technical problem of high development and maintenance costs of vehicle controllers.

[0009] According to one aspect of an embodiment of the present disclosure, a dual-controller communication control method is provided. The method may include: obtaining a grounding state of a vehicle's communication interface, wherein the grounding state is used to indicate the connection type between the communication interface and the vehicle's ground line; based on the grounding state of the communication interface, determining a target controller connected to the communication interface in the vehicle's dual controllers, wherein the target controller is at least a master controller or a slave controller; based on the target controller, selecting a target sending link and a target receiving link corresponding to the target controller in the vehicle's communication link; controlling the target controller to send a to-be-sent message via the target sending link, and controlling the target controller to receive a to-be-received message via the target receiving link.

[0010] Optionally, based on the grounding status of the communication interface, the target controller connected to the communication interface is determined in the dual controller of the vehicle, including: in response to the communication interface being connected to the ground wire of the vehicle, determining the target controller as the master controller; in response to the communication interface being not connected to the ground wire of the vehicle, determining the target controller as the slave controller.

[0011] Optionally, the communication link includes at least a sending link and a receiving link corresponding to the main controller, and a sending link and a receiving link corresponding to the slave controller. Based on the target controller, a target sending link and a target receiving link corresponding to the target controller are selected in the communication link of the vehicle, including: in response to the target controller being the main controller, selecting the sending link corresponding to the main controller as the target sending link in the communication link, and selecting the receiving link corresponding to the main controller as the target receiving link in the communication link; in response to the target controller being the slave controller, selecting the sending link corresponding to the slave controller as the target sending link in the communication link, and selecting the receiving link corresponding to the slave controller as the target receiving link in the communication link.

[0012] Optionally, controlling the target controller to send a message to be sent through a target sending link includes: in response to the target controller being a master controller, modifying the identification information of the message to be sent of the master controller from a first original identifier to a first target identifier, wherein the first original identifier is a virtual identifier corresponding to the message to be sent of the master controller, and the first target identifier is a real identifier corresponding to the message to be sent of the master controller; in response to the target controller being a slave controller, modifying the identification of the message to be sent of the slave controller from a second original identifier to a second target identifier, wherein the second original identifier is used as a virtual identifier corresponding to the message to be sent of the slave controller, and the second target identifier is a real identifier corresponding to the message to be sent of the slave controller.

[0013] Optionally, the communication control method of the dual controller includes: controlling the remaining sending links in the communication link to be closed during the process of sending the to-be-sent message through the target sending link; and controlling the remaining receiving links in the communication link to be closed during the process of receiving the to-be-received message through the target receiving link.

[0014] Optionally, obtaining the grounding status of the vehicle's communication interface includes: obtaining the level type of the electrical signal transmitted by the communication interface, wherein the level type includes at least: a low level type and a high level type; and determining the grounding status of the communication interface based on the level type.

[0015] Optionally, based on the level type, the grounding state of the communication interface is determined, including: in response to the level type of the electrical signal transmitted by the communication interface being a low level type, determining that the grounding state of the communication interface is that the communication interface is connected to the ground wire of the vehicle; in response to the level type of the electrical signal transmitted by the communication interface being a high level type, determining that the grounding state of the communication interface is that the communication interface is not connected to the ground wire of the vehicle.

[0016] Optionally, the communication transceiver messages of the master controller and the communication transceiver messages of the slave controller are mutually exclusive.

[0017] According to another aspect of the embodiment of the present disclosure, a dual-controller communication control device is also provided. The device may include: an acquisition component, configured to acquire the grounding state of the vehicle's communication interface, wherein the grounding state is used to indicate the connection type between the communication interface and the vehicle's ground line; a determination component, configured to determine the target controller connected to the communication interface in the vehicle's dual controllers based on the grounding state of the communication interface, wherein the target controller is at least a master controller or a slave controller, and the master controller and the slave controller are allowed to switch with each other; a selection component, configured to select a target sending link and a target receiving link corresponding to the target controller in the vehicle's communication link based on the target controller; and a control component, configured to control the target controller to send a message to be sent through the target sending link, and control the target controller to receive a message to be received through the target receiving link.

[0018] According to another aspect of an embodiment of the present disclosure, a computer-readable storage medium is also provided, which includes a stored program, wherein when the program is executed by a processor, the device where the storage medium is located is controlled to execute any dual-controller communication control method in the embodiment of the present disclosure.

[0019] According to another aspect of an embodiment of the present disclosure, a processor is further provided, wherein the processor is configured to run a program, wherein when the program is run, any one of the dual-controller communication control methods in the embodiments of the present disclosure is executed.

[0020] According to another aspect of the embodiments of the present disclosure, a vehicle is further provided, wherein the vehicle is configured to execute any one of the dual-controller communication control methods of the embodiments of the present disclosure.

[0021] In the embodiment disclosed herein, by obtaining the grounding state of the vehicle's communication interface, it is determined whether the vehicle's target controller is a master controller or a slave controller based on the grounding state of the communication interface, and then the target sending link and target receiving link corresponding to the target controller are selected in the communication link based on the target controller, and then the target controller is controlled to send and receive messages through the target sending link and the target receiving link. That is, the vehicle's master controller and slave controller are integrated into a version of software and hardware, using the same set of communication protocols. After determining the target controller, it is only necessary to select the corresponding target sending link and target receiving link based on the target controller to achieve message sending and receiving, thereby avoiding the technical problem of repeated development and repeated testing caused by different communication protocols used by different controllers of the vehicle, achieving the purpose of simplifying the development of vehicle controllers, and achieving the technical effect of reducing the development cost and maintenance cost of vehicle controllers, thereby solving the technical problem of high development cost and maintenance cost of vehicle controllers. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present disclosure. The exemplary embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation of the present disclosure. In the drawings:

[0023] FIG1 is a flow chart of a communication control method of a dual controller according to an embodiment of the present disclosure;

[0024] FIG2 is a flow chart of sending a message in a dual-controller system communication method according to an embodiment of the present disclosure;

[0025] FIG3 is a flow chart of receiving a message in a dual-controller system communication method according to an embodiment of the present disclosure;

[0026] FIG4 is a schematic diagram of a communication control device with two controllers according to an embodiment of the present disclosure;

[0027] FIG5 is a schematic structural diagram of a non-volatile storage medium according to an embodiment of the present disclosure;

[0028] FIG6 is a schematic structural diagram of a processor according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0029] In order to enable those skilled in the art to better understand the solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the embodiments described are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present disclosure.

[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, functional component or device that includes a series of steps or components is not necessarily limited to those steps or components clearly listed, but may include other steps or components that are not clearly listed or inherent to these processes, methods, functional components or devices.

[0031] According to an embodiment of the present disclosure, an embodiment of a communication control method for a dual controller 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 a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0032] FIG1 is a flow chart of a dual-controller communication control method according to an embodiment of the present disclosure. As shown in FIG1 , the method may include the following steps:

[0033] Step S101: Acquire the grounding status of the vehicle's communication interface.

[0034] In the technical solution provided in step S101 above of the present disclosure, the communication interface may be an input / output interface (I / O interface), and the grounding state is used to indicate the connection type between the communication interface and the vehicle's ground wire. The connection type may be at least: the communication interface is connected to the vehicle's ground wire, or the communication interface is not connected to the vehicle's ground wire. When the connection type is that the communication interface is connected to the vehicle's ground wire, the communication interface may transmit a low-level signal; and when the communication interface is not connected to the vehicle's ground wire, the communication interface may transmit a high-level signal.

[0035] In this embodiment, the grounding state of the vehicle's communication interface is acquired, that is, the connection type between the vehicle's communication interface and the vehicle's ground line is acquired, and step S102 is executed according to the acquired interface state.

[0036] Optionally, the grounding state of the communication interface is determined by acquiring a level type of an electrical signal transmitted by the communication interface, wherein the level type of the electrical signal transmitted by the communication interface can be at least a low level or a high level.

[0037] For example, when the I / O interface transmits a low-level signal, the grounding state of the I / O interface is determined to be connected to the ground wire. When the I / O interface transmits a high-level signal, the grounding state of the I / O interface is determined to be not connected to the ground wire. This is only an illustrative example and does not limit the specific content of the grounding state.

[0038] Step S102 : Based on the grounding state of the communication interface, a target controller connected to the communication interface is determined in the dual controllers of the vehicle.

[0039] In the technical solution provided in the above step S102 of the present disclosure, the target controller is at least a master controller or a slave controller, wherein the master controller and the slave controller are allowed to be switched for use with each other.

[0040] In this embodiment, after the grounding state of the communication interface is acquired according to step S101 , a target controller connected to the communication interface may be determined in the dual controllers of the vehicle.

[0041] Optionally, a correspondence between the controller and the grounding state of the communication interface is preset, and the target controller is determined based on the correspondence.

[0042] For example, assuming that the correspondence between the pre-set controller and the grounding state of the communication interface can be: when the grounding state of the communication interface is connected to the ground wire of the vehicle, the corresponding controller is the master controller, and when the grounding state of the communication interface is not connected to the ground wire of the vehicle, the corresponding controller is the slave controller. Based on this, when the acquired grounding state of the communication interface is connected to the ground wire of the vehicle, it can be determined that the target controller connected to the communication interface is the master controller. It should be noted that this is only a preferred implementation method for determining the target controller, and the target controller can also be determined by other methods, which are not limited here.

[0043] Step S103 : Based on the target controller, a target sending link and a target receiving link corresponding to the target controller are selected in the communication link of the vehicle.

[0044] In the technical solution provided in the above step S103 of the present disclosure, the target sending link is used to indicate the link through which the target controller sends messages, and the target receiving link is used to indicate the link through which the target controller receives messages.

[0045] In this embodiment, after the target controller is determined in step S102, a target sending link and a target receiving link corresponding to the target controller may be selected in the communication link.

[0046] Optionally, a correspondence between the controller and the sending link and the receiving link may be preset, and a target sending link and a target receiving link may be selected based on the correspondence.

[0047] For example, assuming that the communication link includes link A, link B, link C and link D, the sending link corresponding to the master controller is link A, the corresponding receiving link is link C, the sending link corresponding to the slave controller is link B, and the corresponding receiving link is link D; based on this, when the target controller is the master controller, link A in the communication link is selected as the target sending link, and link C is selected as the target receiving link.

[0048] Step S104 , controlling the target controller to send the message to be sent through the target sending link, and controlling the target controller to receive the message to be received through the target receiving link.

[0049] In the technical solution provided in the above step S104 of the present disclosure, after the target sending link and the target receiving link are selected according to step S103, the target controller can be controlled to send the message to be sent through the target sending link, and the target controller can be controlled to receive the message to be received through the target receiving link.

[0050] In this embodiment, when controlling the target controller to send the message to be sent through the target sending link, the target controller can be controlled to send the message to be sent through the target sending link, wherein the message to be sent includes identification information, and the identification information is used to track the sending status of the message to be sent.

[0051] For example, when the target controller is the main controller, link A is the target sending link, and link C is the target receiving link, the main controller can be controlled to send the to-be-sent message through link A, and the main controller can be controlled to receive the message through link C.

[0052] It should be noted that the above embodiment can be executed by a communication control device with dual controllers.

[0053] In the above steps S101 to S104 of the present invention, by obtaining the grounding state of the vehicle's communication interface, according to the grounding state of the communication interface, it is determined whether the target controller of the vehicle is a master controller or a slave controller, and then the target sending link and the target receiving link corresponding to the target controller are selected in the communication link according to the target controller, and then the target controller is controlled to send and receive messages through the target sending link and the target receiving link. That is, the master controller and the slave controller of the vehicle are correspondingly integrated into one version of software and hardware, and the same set of communication protocols are used. After the target controller is determined, it is only necessary to select the corresponding target sending link and the target receiving link according to the target controller to realize the sending and receiving of messages, thereby avoiding the technical problem of repeated development and repeated testing caused by different controllers of the vehicle using different communication protocols, achieving the purpose of simplifying the development of the vehicle controller, and realizing the technical effect of reducing the development cost and maintenance cost of the vehicle controller, thereby solving the technical problem of high development cost and maintenance cost of the vehicle controller.

[0054] The above method of this embodiment is further introduced below.

[0055] As an optional embodiment, step S102, based on the grounding status of the communication interface, determines the target controller connected to the communication interface in the dual controller of the vehicle, including: in response to the communication interface and the vehicle ground being connected, determining the target controller as the master controller; in response to the communication interface and the vehicle ground not being connected, determining the target controller as the slave controller.

[0056] In this embodiment, when the communication interface is connected to the vehicle ground, the target controller is determined to be a master controller, and when the communication interface is not connected to the vehicle ground, the target controller is determined to be a slave controller. The connection of the communication interface to the vehicle ground can also be referred to as a grounded communication interface, and the disconnection of the communication interface from the vehicle ground can also be referred to as a floating communication interface. The communication interface can be an I / O interface.

[0057] For example, when the I / O interface is grounded, the target controller is determined to be a master controller, and when the I / O interface is floating, the target controller is determined to be a slave controller.

[0058] As an optional embodiment, the communication link includes at least a sending link and a receiving link corresponding to the main controller, and a sending link and a receiving link corresponding to the slave controller. Based on the target controller, the target sending link and the target receiving link corresponding to the target controller are selected in the communication link of the vehicle, including: in response to the target controller being the main controller, the sending link corresponding to the main controller is selected as the target sending link in the communication link, and the receiving link corresponding to the main controller is selected as the target receiving link in the communication link; in response to the target controller being the slave controller, the sending link corresponding to the slave controller is selected as the target sending link in the communication link, and the receiving link corresponding to the slave controller is selected as the target receiving link in the communication link.

[0059] In this embodiment, when the target controller is the master controller, the sending link corresponding to the master controller is selected in the communication link as the target sending link, and the receiving link corresponding to the master controller is selected in the communication link as the target receiving link.

[0060] Optionally, when the target controller is a slave controller, a sending link corresponding to the slave controller is selected in the communication link as the target sending link, and a receiving link corresponding to the slave controller is selected in the communication link as the target receiving link.

[0061] For example, assuming that the transmitting links in the communication link include link A and link B, and the receiving links in the communication link include link C and link D, the transmitting link corresponding to the master controller is link A, and the corresponding receiving link is link C, while the transmitting link corresponding to the slave controller is link B, and the corresponding receiving link is link D. When the target controller is the master controller, link A is selected from the transmitting links in the communication link as the target transmitting link, and link C is selected from the receiving links in the communication link as the target receiving link.

[0062] As an optional embodiment, controlling the target controller to send a message to be sent through a target sending link includes: in response to the target controller being a master controller, modifying the identification information of the message to be sent of the master controller from a first original identifier to a first target identifier, wherein the first original identifier is a virtual identifier corresponding to the message to be sent of the master controller, and the first target identifier is a real identifier corresponding to the message to be sent of the master controller; in response to the target controller being a slave controller, modifying the identification of the message to be sent of the slave controller from a second original identifier to a second target identifier, wherein the second original identifier is used as a virtual identifier corresponding to the message to be sent of the slave controller, and the second target identifier is a real identifier corresponding to the message to be sent of the slave controller.

[0063] In this embodiment, since the communication transceiver messages between the main controller and the slave controller of the vehicle are mutually exclusive, that is, the send message of the main controller can be the receive message of the slave controller, and the receive message of the main controller can be the send message of the slave controller. Based on this, when the message transceiver link of the main controller and the message transceiver link of the slave controller are integrated into a communication protocol link, in order to distinguish the transceiver messages of the two controllers, when sending the to-be-sent messages of the two controllers, a virtual identifier can be added to the to-be-sent messages of the main controller and the slave controller during the sending process, and the identification and modification can be performed at the receiving end to effectively distinguish the transceiver messages of the two controllers and ensure the accuracy and reliability of communication.

[0064] For example, assuming that the real identification information of the message to be sent by the master controller is 0x1A1, the real identification information of the message to be received by the master controller is 0x1B1, the real identification information of the message to be sent by the slave controller is 0x1B1, and the real identification information of the message to be received by the slave controller is 0x1A1, that is, the identification information of the message to be sent by the master controller can be consistent with the identification information of the message to be received by the slave controller, and the identification information of the message to be received by the master controller can be consistent with the identification information of the message to be sent by the slave controller. Based on this, in order to distinguish the message to be sent by the master controller from the message to be received by the slave controller, and the message to be received by the master controller from the message to be sent by the slave controller, a virtual identifier, for example, 0x1, can be added to the message to be sent by the master controller, and a virtual identifier 0x2 can be added to the message to be sent by the slave controller. The virtual identifier is the original identifier corresponding to the messages to be sent by the master controller and the slave controller.

[0065] Optionally, when the target controller is the master controller, since the first original identifier corresponding to the message to be sent by the master controller is a virtual identifier, not a real identifier, the identifier information of the message to be sent by the master controller can be modified from the first original identifier to the first target identifier at the receiving end. For example, a modification function is used to modify the first original identifier to the first target identifier, where the first original identifier can be 0x1 and the first target identifier can be 0x1A1. This is only an illustrative example and does not limit the specific method for modifying the first original identifier or the specific contents of the first original identifier and the first target identifier.

[0066] Optionally, when the target controller is a slave controller, since the second original identifier corresponding to the message to be sent by the slave controller is a virtual identifier rather than a real identifier, the identifier information of the message to be sent by the slave controller can be modified from the second original identifier to the second target identifier. For example, the second original identifier can be 0x2, and the second target identifier can be 0x1B1. This is merely an example and does not limit the specific contents of the second original identifier and the second target identifier.

[0067] In this embodiment, by adding a virtual identifier to the message to be sent by the target controller during the sending process, and modifying the virtual identifier of the message to be sent to its corresponding real identifier at the receiving end, on the basis of distinguishing the messages, it is achieved that the message received by the receiving end is the real message sent by the target controller.

[0068] As an optional embodiment, in step S103, in the process of sending the message to be sent through the target sending link, the remaining sending links in the communication link are controlled to be closed; in the process of receiving the message to be received through the target receiving link, the remaining receiving links in the communication link are controlled to be closed.

[0069] In this embodiment, when a message to be sent is sent through the target sending link, the remaining sending links in the communication link are controlled to be closed; when a message to be received is received through the target receiving link, the remaining receiving links in the communication link are controlled to be closed.

[0070] For example, assuming that the sending links in the communication link include link A and link B, and the receiving links in the communication link include link C and link D, when the target sending link is link A and the target receiving link is link C, link B and link D are controlled to be closed.

[0071] As an optional embodiment, the communication messages sent and received by the master controller and the communication messages sent and received by the slave controller are mutually exclusive.

[0072] In this embodiment, the communication transceiver messages of the master controller and the communication transceiver messages of the slave controller are mutually exclusive.

[0073] For example, the identifier of the message to be sent by the slave controller is 0x1B1, and the identifier of the message to be received is 0x1A1. Then, the identifier of the message to be sent by the master controller is 0x1A1, and the identifier of the message to be received is 0x1B1.

[0074] It should be noted that the above embodiment can be executed by a communication control device with dual controllers.

[0075] In this embodiment, by obtaining the grounding status of the vehicle's communication interface, it is determined whether the vehicle's target controller is a master controller or a slave controller according to the grounding status of the communication interface, and then the target sending link and the target receiving link corresponding to the target controller are selected in the communication link according to the target controller, and then the target controller is controlled to send and receive messages through the target sending link and the target receiving link. That is, the vehicle's master controller and the slave controller are correspondingly integrated into one version of software and hardware, using the same set of communication protocols. After determining the target controller, it is only necessary to select the corresponding target sending link and target receiving link according to the target controller to realize the sending and receiving of messages, avoiding the technical problem of repeated development and repeated testing caused by different controllers of the vehicle using different communication protocols, achieving the purpose of simplifying the development of the vehicle controller, and realizing the technical effect of reducing the development cost and maintenance cost of the vehicle controller, thereby solving the technical problem of high development cost and maintenance cost of the vehicle controller.

[0076] The technical solutions of the embodiments of the present disclosure are illustrated below with reference to preferred implementations.

[0077] At present, with the rapid popularization and development of vehicles, the vehicle controller is the control center of the vehicle. During the development process of the vehicle controller, the testing and maintenance of the vehicle controller is of paramount importance.

[0078] To ensure vehicle safety during driving, vehicle controllers are typically divided into a master and slave controllers. When the vehicle is operating normally, the master controller takes over. If the master controller fails, the slave controller takes over. However, aside from inconsistencies in the way they send and receive messages, the master and slave controllers share identical hardware and operating systems. This leads to frequent duplication of development and testing during controller development, resulting in high software development and maintenance costs for vehicle controllers.

[0079] However, the disclosed embodiment proposes a dual-controller system communication method, which integrates the master controller and the slave controller into one software, that is, the master controller and the slave controller of the vehicle are correspondingly integrated into one version of software and hardware, and uses the same set of communication protocols. After determining the target controller, it is only necessary to select the corresponding target sending link and target receiving link according to the target controller to realize the sending and receiving of messages, thereby avoiding the technical problems of repeated development and repeated testing caused by different controllers of the vehicle using different communication protocols, achieving the purpose of simplifying the development of vehicle controllers, and realizing the technical effect of reducing the development cost and maintenance cost of vehicle controllers, thereby solving the technical problem of high development cost and maintenance cost of vehicle controllers.

[0080] The following is a further introduction to the embodiments of the present disclosure.

[0081] FIG2 is a flow chart of sending a message in a dual-controller system communication method according to an embodiment of the present disclosure. As shown in FIG2 , the flow includes the following steps:

[0082] Step S201: initializing the controller.

[0083] In this embodiment, the master controller and the slave controller are initialized, wherein the master controller can be represented by M and the slave controller can be represented by S.

[0084] Step S202: determine whether the controller is a master controller.

[0085] In this embodiment, it is determined whether the controller currently sending the message is the main controller. If it is the main controller, step S203 is executed; if it is not the main controller, step S206 is executed.

[0086] Optionally, the status of the I / O interface can be used to determine whether the controller is the master controller. When the I / O interface is grounded, the controller is determined to be the master controller. When the I / O interface is floating, the controller is determined not to be the master controller, that is, the controller is a slave controller.

[0087] Step S203: Modify the virtual identifier of the message to be sent by the main controller into a real identifier.

[0088] In this embodiment, the virtual identifier of the message to be sent by the main controller is modified to a real identifier.

[0089] Optionally, the virtual identifier of the message to be sent by the main controller can be modified to a real identifier through the dynamic ID interface function. For example, the CanIf_SetDynamicTxId() function can be used to modify the virtual identifier to a real identifier.

[0090] For example, when the real identifier is 0x1A1 and the virtual identifier is 0x1, 0x1 is modified to 0x1A1, and step S204 is executed.

[0091] Step S204: the main controller is initialized.

[0092] In this embodiment, after the virtual identifier of the message to be sent by the main controller is modified to the real identifier in step S203, the initialization of the main controller is completed, and step S205 is executed.

[0093] In step S205 , the master controller periodically sends the message to be sent and cancels the sending task of the slave controller.

[0094] In this embodiment, after the master controller is initialized, it can periodically send messages to be sent. The identification information corresponding to the message to be sent during the initial sending phase is a virtual identification. When the message is received by the receiving end, the virtual identification can be modified to a real identification. For example, the virtual identification corresponding to the message to be sent is 0x1, and the real identification is 0x1A1.

[0095] Optionally, the send task from the controller can be canceled via the callback function.

[0096] Optionally, while the master controller is sending a message, the slave controller's task of sending a message is canceled. Since both the master and slave controllers have the task of sending messages, to avoid confusion between the messages sent by the two, the slave controller's task of sending a message can be canceled while the master controller is sending a message.

[0097] In step S206, the virtual identifier of the message to be sent from the controller is modified to a real identifier.

[0098] In this embodiment, the virtual identifier of the message to be sent from the controller is modified to a real identifier.

[0099] Optionally, the virtual identifier of the message to be sent from the controller can be modified to a real identifier through the dynamic ID interface function. For example, the CanIf_SetDynamicTxId() function can be used to modify the virtual identifier to a real identifier.

[0100] For example, when the real identifier is 0x1B1 and the virtual identifier is 0x2, 0x2 is modified to 0x1B1, and step S207 is executed.

[0101] Step S207: Initialization of the slave controller is completed.

[0102] In this embodiment, after the virtual identifier of the message to be sent from the slave controller is modified to the real identifier in step S206, the initialization of the slave controller is completed, and step S208 is executed.

[0103] Step S208: The slave controller periodically sends the message to be sent and cancels the sending task of the master controller.

[0104] In this embodiment, after the slave controller is initialized, it can periodically send messages to be sent. The identification information corresponding to the message to be sent during the initial sending phase is a virtual identification. When the message is received by the receiving end, the virtual identification can be modified to a real identification. For example, the virtual identification corresponding to the message to be sent is 0x2, and the real identification is 0x1B1.

[0105] Optionally, the send task from the controller can be canceled via the callback function.

[0106] FIG3 is a flow chart of receiving a message in a dual-controller system communication method according to an embodiment of the present disclosure. As shown in FIG3 , the flow includes the following steps:

[0107] Step S301: initializing the controller.

[0108] Initialize the master controller and slave controller. The master controller can be represented by M and the slave controller can be represented by S.

[0109] Step S302: determine whether the controller is a master controller.

[0110] In this embodiment, it is determined whether the controller currently sending the message is the main controller. If it is the main controller, step S303 is executed; if it is not the main controller, step S305 is executed.

[0111] Optionally, the status of the I / O interface can be used to determine whether the controller is the master controller. When the I / O interface is grounded, the controller is determined to be the master controller. When the I / O interface is floating, the controller is determined not to be the master controller, that is, the controller is a slave controller.

[0112] Step S303: the main controller is initialized.

[0113] In this embodiment, after the main controller completes initialization, step S304 is executed.

[0114] Step S304: Process the message received by the master controller, and do not process the message received by the slave controller.

[0115] In this embodiment, the message received by the main controller is processed, for example, data processing is performed on the received message and corresponding values ​​are returned.

[0116] Optionally, when processing messages received by the master controller, messages received by the slave controller are not processed. Since both the master and slave controllers receive messages, to avoid confusion between messages received by the two, messages received by the slave controller are not processed when processing messages received by the master controller.

[0117] Step S305: Initialization of the slave controller is completed.

[0118] In this embodiment, the initialization of the slave controller is completed. After the slave controller completes the initialization, step S306 is executed.

[0119] Step S306: Process the message received from the slave controller, and do not process the message received from the master controller.

[0120] In this embodiment, the message received from the controller is processed, for example, data processing is performed on the received message and a corresponding value is returned.

[0121] Optionally, when processing the message received from the slave controller, the message received by the master controller is not processed.

[0122] In the embodiment of the present disclosure, by integrating the main controller and the slave controller into one software, that is, the main controller and the slave controller of the vehicle are correspondingly integrated into one version of software and hardware, and the same set of communication protocols are used, after determining the target controller, it is only necessary to select the corresponding target sending link and target receiving link according to the target controller to realize the sending and receiving of messages, thereby avoiding the technical problems of repeated development and repeated testing caused by different controllers of the vehicle using different communication protocols, achieving the purpose of simplifying the development of the vehicle controller, and realizing the technical effect of reducing the development cost and maintenance cost of the vehicle controller, thereby solving the technical problem of high development cost and maintenance cost of the vehicle controller.

[0123] According to an embodiment of the present disclosure, a dual-controller communication control device is further provided. It should be noted that the dual-controller communication control device can be used to execute the dual-controller communication control method in Example 1.

[0124] FIG4 is a schematic diagram of a dual-controller communication control device according to an embodiment of the present disclosure. As shown in FIG4 , the dual-controller communication control device 400 may include: an acquisition component 401 , a determination component 402 , a selection component 403 , and a control component 404 .

[0125] The acquisition component 401 is configured to acquire a grounding status of a communication interface of the vehicle, wherein the grounding status is used to indicate a connection type between the communication interface and a ground line of the vehicle.

[0126] The determination component 402 is configured to determine a target controller connected to the communication interface in the dual controllers of the vehicle based on the grounding state of the communication interface, wherein the target controller is at least a master controller or a slave controller, and the master controller and the slave controller are allowed to switch with each other.

[0127] The selection component 403 is configured to select a target sending link and a target receiving link corresponding to the target controller in the communication link of the vehicle based on the target controller.

[0128] The control component 404 is configured to control the target controller to send the message to be sent through the target sending link, and control the target controller to receive the message to be received through the target receiving link.

[0129] Optionally, the determination component 402 is further configured to determine that the target controller is a master controller in response to the communication interface being connected to the vehicle ground; and to determine that the target controller is a slave controller in response to the communication interface being not connected to the vehicle ground.

[0130] Optionally, the selection component 403 is also configured to, in response to the target controller being the master controller, select the sending link corresponding to the master controller in the communication link as the target sending link, and select the receiving link corresponding to the master controller in the communication link as the target receiving link; in response to the target controller being the slave controller, select the sending link corresponding to the slave controller in the communication link as the target sending link, and select the receiving link corresponding to the slave controller in the communication link as the target receiving link.

[0131] Optionally, the control component 404 is also configured to, in response to the target controller being the master controller, modify the identification information of the message to be sent of the master controller from the first original identifier to the first target identifier, wherein the first original identifier is a virtual identifier corresponding to the message to be sent of the master controller, and the first target identifier is a real identifier corresponding to the message to be sent of the master controller; in response to the target controller being the slave controller, modify the identification of the message to be sent of the slave controller from the second original identifier to the second target identifier, wherein the second original identifier is used as the virtual identifier corresponding to the message to be sent of the slave controller, and the second target identifier is the real identifier corresponding to the message to be sent of the slave controller.

[0132] Optionally, the dual-controller communication control device 400 may further include: a first control component, configured to control the closure of the remaining sending links in the communication link during the process of sending the message to be sent through the target sending link; and a second control component, configured to control the closure of the remaining receiving links in the communication link during the process of receiving the message to be received through the target receiving link.

[0133] Optionally, the acquisition component 401 is further configured to: acquire the level type of the electrical signal transmitted by the communication interface, wherein the level type includes at least: a low level type and a high level type; and determine the grounding state of the communication interface based on the level type.

[0134] Optionally, the acquisition component 401 is also configured to: in response to the level type of the electrical signal transmitted by the communication interface being a low level type, determine that the grounding state of the communication interface is that the communication interface is connected to the ground wire of the vehicle; in response to the level type of the electrical signal transmitted by the communication interface being a high level type, determine that the grounding state of the communication interface is that the communication interface is not connected to the ground wire of the vehicle.

[0135] In this embodiment, by obtaining the grounding status of the vehicle's communication interface, it is determined whether the vehicle's target controller is a master controller or a slave controller according to the grounding status of the communication interface, and then the target sending link and the target receiving link corresponding to the target controller are selected in the communication link according to the target controller, and then the target controller is controlled to send and receive messages through the target sending link and the target receiving link. That is, the vehicle's master controller and the slave controller are correspondingly integrated into one version of software and hardware, using the same set of communication protocols. After determining the target controller, it is only necessary to select the corresponding target sending link and target receiving link according to the target controller to realize the sending and receiving of messages, avoiding the technical problem of repeated development and repeated testing caused by different controllers of the vehicle using different communication protocols, achieving the purpose of simplifying the development of the vehicle controller, and realizing the technical effect of reducing the development cost and maintenance cost of the vehicle controller, thereby solving the technical problem of high development cost and maintenance cost of the vehicle controller.

[0136] According to an embodiment of the present disclosure, a computer-readable storage medium is further provided. The storage medium includes a stored program, wherein the program executes the communication control method for the dual controllers in embodiment 1.

[0137] According to an embodiment of the present disclosure, a processor is further provided, which is used to run a program, wherein the communication control method of the dual controller in embodiment 1 is executed when the program is run.

[0138] According to an embodiment of the present disclosure, an electronic device is also provided, which includes one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by one or more processors, the above-mentioned dual-controller communication control method is executed.

[0139] According to an embodiment of the present disclosure, a non-volatile storage medium is also provided, wherein the non-volatile storage medium includes a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute any dual-controller communication control method in the embodiment of the present disclosure.

[0140] FIG5 is a schematic diagram of a non-volatile storage medium according to an embodiment of the present disclosure. As shown in FIG5 , a program product 50 according to an embodiment of the present disclosure is described, on which a computer program is stored. When the computer program is executed by a processor, program code is implemented to implement the following steps: obtaining the grounding state of the vehicle's communication interface, wherein the grounding state is used to indicate the connection type between the communication interface and the vehicle's ground line; based on the grounding state of the communication interface, determining the target controller connected to the communication interface in the vehicle's dual controllers, wherein the target controller is at least a master controller or a slave controller; based on the target controller, selecting a target sending link and a target receiving link corresponding to the target controller in the vehicle's communication link; controlling the target controller to send a message to be sent via the target sending link, and controlling the target controller to receive a message to be received via the target receiving link.

[0141] Non-volatile storage media may include a data signal transmitted in baseband or as part of a carrier wave, carrying readable program code. Such a transmitted data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Non-volatile storage media may transmit, propagate, or transfer programs for use by or in conjunction with an instruction execution system, apparatus, or device.

[0142] The program code contained in the non-volatile storage medium can be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, radio frequency, etc., or any suitable combination of the above.

[0143] According to an embodiment of the present disclosure, a processor is also provided, which is configured to run a program. Figure 6 is a structural schematic diagram of a processor according to an embodiment of the present disclosure. As shown in Figure 6, the processor 60 is configured to run a program, wherein the above-mentioned dual-controller communication control method is executed when the program is running.

[0144] Optionally, in this embodiment, the processor 60 can be configured to perform the following steps: obtaining the grounding status of the vehicle's communication interface, wherein the grounding status is used to indicate the connection type between the communication interface and the vehicle's ground wire; based on the grounding status of the communication interface, determining the target controller connected to the communication interface in the vehicle's dual controllers, wherein the target controller is at least a master controller or a slave controller; based on the target controller, selecting a target sending link and a target receiving link corresponding to the target controller in the vehicle's communication link; controlling the target controller to send the message to be sent through the target sending link, and controlling the target controller to receive the message to be received through the target receiving link.

[0145] The processor 60 can execute various functional applications and data processing by running software programs and components stored in the memory, that is, implement the communication control method of the dual controller.

[0146] According to another aspect of an embodiment of the present disclosure, a computer program product is also provided, including a non-volatile computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it performs the communication control method of the dual controller of the embodiment of the present disclosure.

[0147] The serial numbers of the above-mentioned embodiments of the present disclosure are for description only and do not represent the advantages or disadvantages of the embodiments.

[0148] In the above embodiments of the present disclosure, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0149] In the several embodiments provided in the present disclosure, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0150] Units described as separate components may or may not be physically separate, and 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 may be selected to achieve the purpose of the present embodiment according to actual needs.

[0151] In addition, the functional units in the various embodiments of the present disclosure may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0152] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent functional component, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure is essentially 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 functional component, and the computer software functional component is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the various embodiments of the present disclosure. The aforementioned storage medium includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, magnetic disk or optical disk, etc., various media that can store program codes.

[0153] The above is only a preferred embodiment of the present disclosure. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present disclosure. These improvements and modifications should also be regarded as within the scope of protection of the present disclosure. Industrial Applicability

[0154] The solution provided by the embodiment of the present disclosure can be applied to the communication process of a vehicle. By obtaining the grounding status of the vehicle's communication interface, the grounding status of the communication interface is determined to determine whether the vehicle's target controller is a master controller or a slave controller, and then the target sending link and target receiving link corresponding to the target controller are selected in the communication link according to the target controller, and then the target controller is controlled to send and receive messages through the target sending link and the target receiving link. That is, the master controller and the slave controller of the vehicle are integrated into a version of software and hardware, using the same set of communication protocols. After determining the target controller, it is only necessary to select the corresponding target sending link and target receiving link according to the target controller to realize the sending and receiving of messages, thereby avoiding the technical problems of repeated development and repeated testing caused by different controllers of the vehicle using different communication protocols, achieving the purpose of simplifying the development of vehicle controllers, and realizing the technical effect of reducing the development cost and maintenance cost of vehicle controllers.

Claims

1. A dual-controller communication control method, applied to a vehicle, comprising: Acquiring a grounding state of a communication interface of the vehicle, wherein the grounding state is used to indicate a connection type between the communication interface and a ground line of the vehicle; Based on the grounding state of the communication interface, determining a target controller connected to the communication interface in the dual controllers of the vehicle, wherein the target controller is at least a master controller or a slave controller; Based on the target controller, selecting a target sending link and a target receiving link corresponding to the target controller in the communication link of the vehicle; The target controller is controlled to send a message to be sent through the target sending link, and the target controller is controlled to receive a message to be received through the target receiving link.

2. The method according to claim 1, wherein: Determining a target controller connected to the communication interface in a dual controller of the vehicle based on a grounding state of the communication interface includes: In response to the communication interface being connected to the ground line of the vehicle, determining that the target controller is the main controller; In response to the communication interface being disconnected from the ground line of the vehicle, the target controller is determined to be the slave controller.

3. The method according to claim 1, wherein: The communication link at least includes a sending link and a receiving link corresponding to the master controller, and a sending link and a receiving link corresponding to the slave controller. Based on the target controller, a target sending link and a target receiving link corresponding to the target controller are selected in the communication link of the vehicle, including: In response to the target controller being the main controller, selecting the sending link corresponding to the main controller in the communication link as the target sending link, and selecting the receiving link corresponding to the main controller in the communication link as the target receiving link; In response to the target controller being the slave controller, the sending link corresponding to the slave controller is selected in the communication link as the target sending link, and the receiving link corresponding to the slave controller is selected in the communication link as the target receiving link.

4. The method according to claim 1, wherein: Controlling the target controller to send the message to be sent through the target sending link includes: In response to the target controller being the main controller, modifying the identification information of the message to be sent of the main controller from a first original identification to a first target identification, wherein the first original identification is a virtual identification corresponding to the message to be sent of the main controller, and the first target identification is a real identification corresponding to the message to be sent of the main controller; In response to the target controller being the slave controller, the identifier of the message to be sent by the slave controller is modified from the second original identifier to the second target identifier, wherein the second original identifier is used as a virtual identifier corresponding to the message to be sent by the slave controller, and the second target identifier is a real identifier corresponding to the message to be sent by the slave controller.

5. The method according to claim 1, wherein: The method comprises: In the process of sending the message to be sent through the target sending link, controlling the remaining sending links in the communication link to be closed; In the process of receiving the to-be-received message through the target receiving link, the remaining receiving links in the communication link are controlled to be closed.

6. The method according to claim 1, wherein: Acquiring a grounding state of a communication interface of the vehicle, comprising: Acquire the level type of the electrical signal transmitted by the communication interface, wherein the level type at least includes: a low level type and a high level type; Based on the level type, a grounding state of the communication interface is determined.

7. The method according to claim 6, wherein: Determining a grounding state of the communication interface based on the level type includes: In response to the level type of the electrical signal transmitted by the communication interface being the low level type, determining that the grounding state of the communication interface is that the communication interface is connected to the ground wire of the vehicle; In response to the level type of the electrical signal transmitted by the communication interface being the high level type, it is determined that the grounding state of the communication interface is that the communication interface is not connected to the ground wire of the vehicle.

8. The method according to any one of claims 1 to 7, wherein: The communication transceiver messages of the master controller and the communication transceiver messages of the slave controller are mutually exclusive.

9. A dual-controller communication control device, applied to a vehicle, comprising: an acquisition component, configured to acquire a grounding state of the communication interface of the vehicle, wherein the grounding state is used to indicate a connection type between the communication interface and a ground line of the vehicle; a determination component, configured to determine a target controller connected to the communication interface in a dual controller of the vehicle based on a grounding state of the communication interface, wherein the target controller is at least a master controller or a slave controller, and the master controller and the slave controller are allowed to switch with each other; A selection component is configured to select a target sending link and a target receiving link corresponding to the target controller in the communication link of the vehicle based on the target controller; The control component is configured to control the target controller to send the to-be-sent message through the target sending link, and control the target controller to receive the to-be-received message through the target receiving link.

10. A computer-readable storage medium, wherein: The computer-readable storage medium includes a stored program, wherein when the program is executed by a processor, the device where the storage medium is located is controlled to execute the method according to any one of claims 1 to 8.

11. A processor, wherein: The processor is used to run a program, wherein the program executes the method according to any one of claims 1 to 8 when running.

12. A vehicle, configured to perform the method according to any one of claims 1 to 8.

13. An electronic device comprising one or more processors and a memory, wherein the memory is configured to store one or more programs, wherein: When the one or more programs are executed by the one or more processors, the one or more processors are enabled to implement the method according to any one of claims 1 to 8.

14. A computer program product, comprising computer instructions, which implement the method according to any one of claims 1 to 8 when executed by a processor.

Citation Information

Patent Citations

  • SPI communication method based on double controllers, terminal equipment and storage medium

    CN109902053A

  • Controller diagnosis method and device, equipment and storage medium

    CN115933591A

  • Communication control method and device of double controllers, storage medium and processor

    CN117930624A

  • Dual communication unit and communication control method by communicaiton module

    KR100240969B1

  • Demand assign communication control system

    US5546400A