WO2021218741A1 - Proxy service method, device and system - Google Patents

Proxy service method, device and system Download PDF

Info

Publication number
WO2021218741A1
WO2021218741A1 PCT/CN2021/088733 CN2021088733W WO2021218741A1 WO 2021218741 A1 WO2021218741 A1 WO 2021218741A1 CN 2021088733 W CN2021088733 W CN 2021088733W WO 2021218741 A1 WO2021218741 A1 WO 2021218741A1
Authority
WO
WIPO (PCT)
Prior art keywords
ecu
client
priority
heartbeat
interface
Prior art date
Application number
PCT/CN2021/088733
Other languages
French (fr)
Chinese (zh)
Inventor
孙晓峰
Original Assignee
华为技术有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021218741A1 publication Critical patent/WO2021218741A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services

Definitions

  • This application relates to the field of communication technology, and in particular to a proxy service method, device and system.
  • ECUs electronice control units
  • the Service Oriented Architecture creates a service environment characterized by well-defined interfaces.
  • the software components in the environment can be used as service producers or service consumers to communicate through the middleware of the service bus.
  • the service provider is an independent unit that provides functions and is used to publish services
  • the service agent is a service registry, which is used to find services at runtime, which can be a distributed system; the service consumers find through the service agent Service, you can visit multiple service providers.
  • a controller with a redundant ECU circuit structure is currently provided.
  • two ECUs are provided locally, for example, ECUa and ECUb.
  • the ECUa and the ECUb are connected to each other, and the controller of the redundant ECU circuit structure shown is mainly realized by input circuit redundancy and CPU redundancy.
  • the ECU when one ECU is working normally, the other ECU is in a hot backup state.
  • the ECU considers the input signal of a certain channel to be unreliable, it can switch to the input signal from another channel.
  • a CPU fails or is untrustworthy, it can be switched to another CPU to control the device.
  • the in-vehicle service agent system shown in Figure 2 is a point-to-point backup and cannot support many-to-one backup.
  • the main and backup logic control needs to be handled by itself during the execution process, which is costly and cannot be applied to the vehicle ECU general controller.
  • This application provides an agency service method, device and system to provide an efficient, flexible and secure agency service solution.
  • an agency service method including:
  • the second electronic control unit ECU in the gateway platform determines that the heartbeat of the bound first ECU is lost; the second ECU provides proxy services for the client through the second interface for communicating with the client; wherein, the second The priority of the ECU is lower than the priority of the first ECU.
  • the embodiment of the present invention sets at least one second ECU corresponding to the local first ECU on the gateway platform to reduce the problem that the client cannot be provided with proxy services in time due to ECU failure.
  • the main and standby ECUs are determined mainly by priority.
  • the main ECU i.e., the first ECU
  • the backup ECU i.e., the second ECU
  • the service realizes the service backup, service switching, and service recovery functions of the ECU general controller, and the main-standby switching takes less time.
  • the embodiment of the present invention can adjust the number of the second ECU corresponding to the first ECU and the number of the second ECU more flexibly according to the actual situation, and there is no need to build multiple ECUs locally. Effectively reduce costs.
  • the second ECU does not receive the heartbeat of the first ECU within at least one threshold period, and it is determined that the heartbeat of the first ECU is lost.
  • an embodiment of the present invention provides a method for a second ECU to determine that the heartbeat of the first ECU is lost, that is, the second ECU does not receive the heartbeat of the first ECU within at least one threshold period, and determines The heartbeat of the first ECU is lost.
  • the second ECU before the second ECU provides proxy services for the client through the second interface for communicating with the client, the second ECU obtains the information received by the first ECU.
  • the second ECU in the embodiment of the present invention realizes the backup function of the first ECU by acquiring the proxy service message received by the first ECU.
  • the second ECU obtains the proxy service message sent by the client from the heartbeat information periodically sent by the first ECU.
  • the heartbeat information sent by the first ECU to the second ECU in the embodiment of the present invention includes the proxy service message, so that the second ECU obtains the proxy service message according to the received heartbeat information. Proxy service message.
  • the second ECU invokes the LSW interface of the LAN switch provided by the gateway platform, and updates the LSW interface from the second interface corresponding to the first ECU to the second interface corresponding to itself. interface.
  • the backup second ECU is activated, and in order for the second ECU to take over the first ECU smoothly.
  • the second ECU calls the LAN switch LSW interface provided by the gateway platform, and updates the LAN switch interface from the first interface corresponding to the first ECU to the second interface corresponding to itself, thereby performing services more effectively The smooth development of the project.
  • the second ECU receives the proxy service message sent by the client through a second interface for communicating with the client.
  • the client in the embodiment of the present invention sends the proxy service message to the first ECU while also sending the proxy service message to the second ECU.
  • the second ECU determines that the first ECU has a heartbeat, it does not send the service processing result of the proxy service message to the client.
  • the second ECU in order to avoid information conflicts, when the first ECU has a heartbeat, if the second ECU also receives the message sent by the client, the second ECU only The received message is processed, but not sent.
  • the second ECU performs business processing on the acquired proxy service message; the second ECU notifies the client of the business processing result.
  • the embodiment of the present application provides the main functions of the proxy service.
  • the second ECU performs business processing on the acquired proxy service message; the second ECU performs business processing on the business processing result Notify the client.
  • the second ECU modifies its own IP to a virtual IP corresponding to the first ECU.
  • the second ECU is located in a first gateway platform corresponding to the first ECU; or the second ECU is located in a second gateway that has a communication transmission function with the first gateway platform. In the platform.
  • the gateway platform where the second ECU is located in the embodiment of the present invention may be directly associated with the first ECU, or may be indirectly associated with the first ECU, which is more applicable.
  • the first ECU is a sensor or an actuator having a function of executing the proxy service.
  • the embodiment of the present invention can support the backup of the overall software and hardware of the ECU under the premise that the first ECU has no specific equipment, and the second ECU on the gateway platform directly interacts with sensors or actuators.
  • the second ECU loses the function of providing proxy services for the client.
  • the second ECU and the first ECU have the same group identification ID.
  • the embodiment of the present invention provides a way to determine the first ECU corresponding to the second ECU, that is, the second ECU used to back up the first ECU is the same as the first ECU. ECUs with the same group identification ID.
  • the second ECU determines that its own priority is lower than the priority of the first ECU in the following manner: the second ECU periodically sends a message carrying its own priority to the first ECU Heartbeat information, and periodically receiving heartbeat information sent from the first ECU carrying the priority of the first ECU; the second ECU according to the heartbeat sent by the first ECU carrying the priority of the first ECU Information to determine the priority of the first ECU; the second ECU determines that its own priority is lower than the priority of the first ECU according to the comparison result of its own priority and the priority of the first ECU.
  • the second ECU stops sending heartbeat information carrying its own priority to the first ECU .
  • an embodiment of the present application provides a proxy service device, which has a method for implementing the first aspect or any of the possible implementation manners in the first aspect of the foregoing embodiments.
  • This function can be realized by hardware, or by hardware executing corresponding software.
  • the hardware or software includes one or more units or modules corresponding to the above-mentioned functions.
  • the device may be an electronic control unit ECU, or a component that can be used in the ECU, such as a chip or a chip system or a circuit.
  • the embodiments of the present application provide a chip system, including a processor, and optionally a memory; wherein the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that the The communication device of the chip system executes the foregoing first aspect or any method in any possible implementation manner of the first aspect.
  • an embodiment of the present application provides an agent service system, including a second ECU, a first ECU, and a client.
  • the second ECU is used to execute the first aspect or any possible implementation of the first aspect. Any of the methods.
  • the embodiments of the present application provide a computer program product, the computer program product includes: computer program code, when the computer program code is executed by the communication unit, processing unit, transceiver, or processor of the communication device, the communication device Perform any method in the foregoing first aspect or any possible implementation manner in the first aspect.
  • the embodiments of the present application provide a computer-readable storage medium, and the computer-readable storage medium stores a program, and the program causes the ECU to execute any of the foregoing first aspect or any of the possible implementation manners in the first aspect. method.
  • Figure 1 is a schematic diagram of a service environment characterized by interfaces provided by this application;
  • FIG. 2 is a schematic diagram of an existing vehicle service agent system
  • FIG. 3 is a schematic diagram of a system architecture provided by an embodiment of the application.
  • FIG. 4 is a schematic diagram of an agency service method provided by an embodiment of the application.
  • FIG. 5 is a schematic flowchart of the first agent service in the normal startup phase provided by an embodiment of the application
  • FIG. 6 is a schematic flowchart of a second type of proxy service in the normal startup phase provided by an embodiment of the application
  • FIG. 7 is a schematic flowchart of the first switching stage proxy service provided by an embodiment of this application.
  • FIG. 8 is a schematic flowchart of a second switching stage proxy service provided by an embodiment of this application.
  • FIG. 9 is a schematic diagram of a cross-gateway platform proxy service scenario provided by an embodiment of the application.
  • FIG. 10 is a schematic diagram of the first agency service device provided by this application.
  • Fig. 11 is a schematic diagram of the second type of proxy service device provided by this application.
  • the service-oriented architecture SOA creates a service environment characterized by well-defined interfaces.
  • the software components in the environment can be used as service producers or service consumers to communicate through the middleware of the service bus.
  • a service provider is an independent unit that provides functions, and knows its own existence by publishing services
  • a service agent is a service registry, which is used to find services at runtime, which can be a distributed system; service consumers pass Service agents find services and can access multiple service providers.
  • a controller with a redundant ECU circuit structure is currently provided.
  • two ECUs are provided locally, for example, ECUa and ECUb.
  • the ECUa and the ECUb are connected to each other, and the controller of the redundant ECU circuit structure shown is mainly realized by input circuit redundancy and CPU redundancy.
  • the ECU when one ECU is working normally, the other ECU is in a hot backup state.
  • the ECU considers the input signal of a certain channel to be unreliable, it can switch to the input signal from another channel.
  • a CPU fails or is untrustworthy, it can be switched to another CPU to control the device.
  • the in-vehicle service agent system shown in Figure 2 is a point-to-point backup and cannot support many-to-one backup.
  • the main and backup logic control needs to be handled by itself during the execution process, which is costly and cannot be applied to the vehicle ECU general controller.
  • the embodiments of the present application provide a proxy service method.
  • the technical solutions of the embodiments of the present application can be applied to various communication systems, such as: long term evolution (LTE) system, global interconnection for microwave access ( Worldwide interoperability for microwave access (WiMAX) communication systems, future 5th Generation (5G) systems, such as new-generation radio access technology (NR), and future communication systems, such as 6G systems, etc. .
  • LTE long term evolution
  • WiMAX Worldwide interoperability for microwave access
  • 5G future 5th Generation
  • NR new-generation radio access technology
  • 6G systems 6G systems, etc.
  • the embodiment of the present application addresses the problem that there is no efficient, flexible, and secure proxy service solution at present, and provides a priority method to determine the main and standby ECUs.
  • the main ECU i.e., the first ECU
  • a backup ECU i.e., the second ECU
  • proxy services realizing the service backup, service switching, and service recovery of the vehicle-mounted ECU general controller
  • the communication system shown in FIG. 3 is taken as an example to describe in detail the communication system to which the embodiments of the present application are applicable.
  • the communication system includes a first ECU 300, a client 310, and a second ECU 320.
  • the first ECU300 and/or the second ECU320 are mainly composed of a microprocessor (CPU), memory (ROM, RAM), input/output interface (I/O), analog-to-digital converter (A/D), shaping, driving, etc. Composition of large-scale integrated circuits.
  • the CPU is the core part, which has the functions of calculation and control.
  • the ECU collects the signals from the sensors, performs calculations, and converts the calculation results into control signals to control the work of the controlled object .
  • the ECU also controls the memory (ROM/FLASH/EEPROM, RAM), input/output interface (I/O) and other external circuits.
  • the first ECU 300 has a service agent module 301, and the service agent module 301 is mainly used to perform state management of the first ECU 300 and control management of message transmission and reception.
  • the second ECU 320 has a service agent module 321, and the service agent module 321 is mainly used to perform state management of the second ECU 320 and control and management of message transmission and reception.
  • the second ECU in the embodiment of the present application is located in a gateway platform 330, where the gateway platform 330 also includes a forwarding engine 331, a local area network switch LSW332, and the like.
  • the forwarding engine 331 is a high-performance packet signal routing module used to provide LSW control interfaces; the LSW332 is used to implement communication link distribution in a local area network. equipment. Wherein, the LSW332 may be connected to the forwarding engine 331, or may be in the forwarding engine 331.
  • the embodiment of the present application is not limited here, and any structure of the gateway device applicable to the embodiment of the present application belongs to the present application. Embodiment protection scope.
  • the client 310 is a device that provides voice and/or data connectivity to users, and can also be referred to as user equipment (UE), access terminal, user unit, user station, mobile station, mobile station, and remote Station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent, or user device.
  • UE user equipment
  • the terminal in the embodiment of the present application may be a mobile phone (mobile phone), a tablet computer (Pad), a computer with wireless transceiver function, a virtual reality (VR) terminal, an augmented reality (AR) terminal, an industrial Wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical, wireless terminals in smart grid, transportation safety Wireless terminals in the smart city (smart city), wireless terminals in the smart home (smart home), and so on.
  • a mobile phone mobile phone
  • a tablet computer Pad
  • a computer with wireless transceiver function a virtual reality (VR) terminal
  • AR augmented reality
  • an industrial Wireless terminals in industrial control wireless terminals in self-driving
  • wireless terminals in remote medical wireless terminals in smart grid
  • transportation safety Wireless terminals in the smart city smart city
  • wireless terminals in the smart home smart home
  • FIG. 3 is only a simplified schematic diagram of an example for ease of understanding.
  • the agent service system may also include other ECUs, etc., which are not shown in FIG. 3.
  • the term "at least one" in the embodiments of the present application refers to one or more, and “multiple” refers to two or more than two.
  • “And/or” describes the association relationship of the associated objects, indicating that there can be three relationships, for example, A and/or B, which can mean: A alone exists, A and B exist at the same time, and B exists alone, where A , B can be singular or plural.
  • the character “/” generally indicates that the associated objects before and after are in an "or” relationship.
  • the following at least one item (item) or similar expressions refer to any combination of these items, including any combination of single item (item) or plural items (item).
  • at least one item (a) of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple .
  • the embodiments of the present application provide a proxy service method, and the steps are as shown in Fig. 4:
  • S400 The second ECU in the gateway platform determines that the heartbeat of the bound first ECU is lost.
  • the second ECU provides a proxy service for the client through a second interface for communicating with the client; wherein the priority of the second ECU is lower than the priority of the first ECU.
  • the integration mode of the service agent is selected according to the type of ECU that needs to implement the backup function.
  • the first ECU corresponds to one second ECU; or the first ECU corresponds to multiple second ECUs.
  • an optional way is:
  • the same group ID is set for the first ECU and at least one second ECU corresponding to the first ECU.
  • ECU1, ECU2, and ECU3 may be grouped into one group, and the group ID is assumed to be group 1; the ECU4 and ECU5 are grouped into one group, and the group ID is assumed to be group 2.
  • the ECU3 determines the corresponding second ECUs as ECU1 and ECU2 according to its own group ID.
  • the embodiment of the present application determines the priority of all ECUs in each group, determines the ECU with the highest priority in the group as the first ECU, and determines the other ECUs lower than the priority of the first ECU as the second ECU. ECU.
  • the priority of the multiple second ECUs in the group may be the same or different, and the embodiment of the present application is not limited herein.
  • the ECUs in group 1 are ECU1, ECU2, and ECU3, where the priority of the ECU3 is higher than the priority of the ECU1, and the priority of the ECU1 is higher than the priority of the ECU2, then the The ECU 3 is determined as the first ECU, and the ECU 1 and the ECU 2 are determined as the second ECU.
  • the ECU with the highest priority can be selected from the second ECU to replace the ECU 3 to execute the proxy service, that is, the ECU 1 is selected to execute the proxy service.
  • the ECU2 is selected to execute the proxy service.
  • ECUs in group 1 are ECU1, ECU2, and ECU3, where the priority of ECU3 is higher than that of ECU1, and the priority of ECU1 is equal to the priority of ECU2, then ECU3 It is determined as the first ECU, and the ECU1 and the ECU2 are determined as the second ECU.
  • an ECU can be randomly selected from the second ECU to take over the ECU 3 to execute the proxy service, for example, the ECU 1 is selected to execute the proxy service.
  • the ECU1 is selected to execute the proxy service.
  • the ECU2 is continuously selected to execute the proxy service.
  • the embodiment of the present application directly determines the virtual IP corresponding to each group, thereby effectively reducing the workload of determining the virtual IP corresponding to each ECU, and making it more efficient and convenient.
  • the second ECU will change itself The IP is modified to the virtual IP corresponding to the first ECU.
  • the second ECU may obtain the virtual IP from the heartbeat information sent by the first ECU.
  • This method mainly makes the receiving device unaware during the receiving process, and does not need to re-authenticate the sending device, which effectively improves the efficiency of the proxy service.
  • the message from the client is sent to the first ECU for processing through the forwarding engine. That is, the interface for communicating with the client is the interface corresponding to the first ECU (for example, the interface corresponding to the first ECU is the second interface).
  • the first ECU and the second ECU corresponding to the first ECU have the same group ID, and the first ECU in the same group has a higher priority than the second ECU.
  • all ECUs in the same group correspond to the same virtual IP.
  • Phase two the normal start-up phase.
  • the first ECU and the gateway platform when the first ECU and the gateway platform are started, they enter the initial state.
  • the nodes corresponding to each ECU in the same group periodically send heartbeat messages in the group to promote themselves as the main ECU.
  • the heartbeat information in the embodiment of the present application may be as shown in Table 1 below, including the group ID, its own priority, the number of IPs, and the heartbeat interval.
  • the heartbeat information may also include the information of the first ECU. Virtual IP.
  • the ECU corresponding to the node fails the election and becomes a backup node, that is, the second ECU.
  • the ECU corresponding to the node is successfully elected and becomes the master node, that is, the first ECU.
  • Implementation manner 1 In the scenario of the second phase, the second ECU will not receive the proxy service message from the client.
  • S500 The client sends a proxy service message to the LSW in the gateway platform.
  • S501 The LSW sends the proxy service message to the forwarding engine.
  • the forwarding engine sends the received proxy service message to the first ECU.
  • the forwarding engine sends the proxy service message to the first ECU through the first interface through the first interface corresponding to the first ECU.
  • S503 The first ECU receives the proxy service message.
  • the first ECU sends heartbeat information to the second ECU every threshold duration, where the heartbeat information includes the virtual IP of the first ECU.
  • the first ECU in the embodiment of the present application sends the The heartbeat information includes the latest proxy service message sent by the client, so that the second ECU obtains the proxy service message from the heartbeat information after receiving the heartbeat information sent from the first ECU.
  • This document makes the backup information of the first ECU more complete.
  • the second ECU receives heartbeat information from the first ECU, and determines that the first ECU has a heartbeat.
  • the second ECU obtains the virtual IP of the first ECU from the heartbeat information periodically sent by the first ECU.
  • the embodiment of the application does not limit the sequence of the steps described in FIG. 5, for example, the S504-S505 are periodic execution actions, which may be executed before the S500 or between S500-S503 .
  • the heartbeat information does not include the first ECU's Virtual IP, the S506 can be omitted.
  • Implementation manner 2 In the scenario of the second phase, the second ECU receives the proxy service message from the client through a second interface corresponding to the second ECU.
  • FIG. 6 Another flow of the proxy service provided by the embodiment of the present application is as shown in FIG. 6:
  • S600 The client sends a proxy service message to the LSW in the gateway platform.
  • the LSW sends the proxy service message to the forwarding engine.
  • the forwarding engine sends the received proxy service message to the second ECU.
  • the forwarding engine sends the received proxy service message to the first ECU.
  • the forwarding engine performs one-to-multiple configuration, that is, the forwarding engine sends the service message to the first ECU through the first interface through the first interface corresponding to the first ECU, and The service message is sent to the second ECU through the second interface through the second interface corresponding to the second ECU.
  • S604 The first ECU receives the proxy service message.
  • S605 The second ECU receives the proxy service message.
  • the second ECU in order to avoid information conflicts, when the first ECU has a heartbeat, if the second ECU also receives the proxy service message sent by the client, the second ECU is
  • the processing methods of the received proxy service message are not specifically limited to the following.
  • Processing method 1 After receiving the proxy service message sent by the client, the second ECU discards the proxy service message.
  • the second ECU after the second ECU receives the proxy service message sent by the client, it does not process the proxy service message, and directly discards the received vehicle proxy service message.
  • Processing method 2 After receiving the proxy service message sent by the client, the second ECU processes the received proxy service message to obtain the processing result, but after sending it to the client When the processing result is the processing result, the processing result is discarded, that is, the content sent to the client is empty.
  • the second ECU After the second ECU receives the proxy service message sent by the client, it determines the service that the client needs to provide according to the proxy service message, and provides corresponding services to the client. Service. However, since the first ECU has a heartbeat at this time, although the second ECU has determined the service that needs to be provided to the client, in order to avoid information conflicts, the content sent by the second ECU to the client Is empty.
  • Processing method 3 After receiving the proxy service message sent by the client, the second ECU processes the received proxy service message to obtain the processing result, but does not feed back to the client The result of the treatment.
  • the second ECU After the second ECU receives the proxy service message sent by the client, it determines the service that the client needs to provide according to the proxy service message, and provides corresponding services to the client. Service. However, since the first ECU has a heartbeat at this time, although the second ECU has determined the service that needs to be provided to the client, in order to avoid information conflicts, the second ECU does not provide all the services to the client. ⁇ Said service.
  • S606 The first ECU sends heartbeat information to the second ECU every threshold duration.
  • the second ECU receives heartbeat information periodically sent by the first ECU, and determines that the first ECU has a heartbeat.
  • Phase three the first ECU and the second ECU switching phase.
  • At least one second ECU in the group where the first ECU is located is reselected to determine the second ECU to replace the first ECU.
  • the situation that causes the ECU to lose the heartbeat is not specifically limited to a certain software, hardware or network failure problem.
  • the only second ECU in the group where the first ECU is located is automatically upgraded to the main ECU instead of The first ECU executes the proxy service.
  • S700 The second ECU determines that the heartbeat of the bound first ECU is lost.
  • the second ECU does not receive the heartbeat of the first ECU within at least one threshold period, and it is determined that the heartbeat of the first ECU is lost.
  • the second ECU fails to receive the heartbeat information of the first ECU within 3 cycles, it will automatically be upgraded to the primary ECU and perform the proxy service instead of the first ECU.
  • the second ECU calls the LSW control interface provided by the forwarding engine, and sets the LSW control interface as a second interface corresponding to itself.
  • the forwarding engine updates the LSW according to the second interface set by the second ECU.
  • S703 The client sends a proxy service message to the LSW in the gateway platform.
  • the LSW sends the proxy service message to the forwarding engine.
  • the forwarding engine sends the received proxy service message to the second ECU.
  • the forwarding engine sends the proxy service message to the second ECU through the second interface through the second interface corresponding to the second ECU.
  • S706 The second ECU receives the proxy service message.
  • the sequence of the steps in FIG. 7 is not limited in the embodiment of the present application.
  • the S703 may be executed before the S700.
  • S800 The client sends a proxy service message to the LSW in the gateway platform.
  • the LSW sends the proxy service message to the forwarding engine.
  • the forwarding engine sends the received proxy service message to the second ECU.
  • S803 The forwarding engine sends the received proxy service message to the first ECU.
  • the forwarding engine performs one-to-multiple configuration, that is, the forwarding engine sends the service message to the first ECU through the first interface through the first interface corresponding to the first ECU, and The service message is sent to the second ECU through the second interface through the second interface corresponding to the second ECU.
  • S804 The second ECU receives the proxy service message.
  • the first ECU will not receive the proxy service message sent from the client.
  • S805 The second ECU determines that the heartbeat of the bound first ECU is lost.
  • the second ECU does not receive the heartbeat of the first ECU within at least one threshold period, and it is determined that the heartbeat of the first ECU is lost.
  • the second ECU cannot send the processing result to the client through the second interface.
  • the second ECU cannot send the processing result to the client.
  • the ECU resumes the function of the second interface communicating with the client to send the service processing result.
  • the first ECU after the first ECU recovers the heartbeat, it re-initiates the heartbeat carrying the high priority. After receiving the high-priority heartbeat information sent by the first ECU, other ECUs in the group where the first ECU is located lose the function of executing the proxy service, that is, execute again according to the second phase.
  • the embodiment of the present application also supports cross-gateway platform transmission.
  • the ECU1 is the main ECU
  • the ECU1 corresponds to the first gateway platform
  • the first gateway platform includes ECU2
  • the second gateway platform includes ECU3
  • the ECU3 is For the backup ECU of the ECU1
  • the second gateway platform corresponds to the client 1.
  • the first gateway platform and the second gateway platform can communicate with each other.
  • the ECU1 loses the heartbeat
  • the ECU3 corresponding to the ECU1 can be used to replace the ECU1 to execute the proxy service for the client 1.
  • the detailed execution method is the same as the above content. For a brief description, please refer to the above figures 4 to 8 The content of this will not be repeated here.
  • the above-mentioned realization devices include hardware structures and/or software modules corresponding to the respective functions.
  • the present invention can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software-driven hardware depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered as going beyond the scope of the present invention.
  • an agent service device of the present application may be an ECU, and the ECU includes a processor 1000, a memory 1001, and a communication interface 1002.
  • the processor 1000 is responsible for managing the bus architecture and general processing, and the memory 1001 can store data used by the processor 1000 when performing operations.
  • the transceiver communication interface 1002 is used to receive and send data under the control of the processor 1000 for data communication with the memory 1001.
  • the processor 1000 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP.
  • the processor 1000 may further include a hardware chip.
  • the above-mentioned hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof.
  • the above-mentioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
  • the memory 1001 may include: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program codes.
  • the processor 1000, the memory 1001, and the communication interface 1002 are connected to each other.
  • the processor 1000, the memory 1001, and the communication interface 1002 may be connected to each other through a bus 1003; the bus 1003 may be a peripheral component interconnect (PCI) bus or an extended industry Standard structure (extended industry standard architecture, EISA) bus, etc.
  • PCI peripheral component interconnect
  • EISA extended industry standard architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and so on. For ease of representation, only one thick line is used to represent in FIG. 10, but it does not mean that there is only one bus or one type of bus.
  • the processor 1000 is configured to read the program in the memory 1001 and execute the method flow executed by the ECU in S400-S401 as shown in FIG. 4; or the process executed by the ECU in S500-S506 as shown in FIG. Method flow; or method flow executed by ECU in S600-S607 as shown in Figure 6; or method flow executed by ECU in S700-S707 as shown in Figure 7; or executed by ECU in S800-S806 as shown in Figure 8 Method flow.
  • the present invention provides a proxy service device, which includes a processing unit 1100 and a communication unit 1101, wherein the processing unit 1100 and the communication unit 1101 are configured to execute the following content:
  • Processing unit 1100 used to determine that the heartbeat of the bound first ECU is lost;
  • the communication unit 1101 is configured to provide a proxy service for the client through a second interface for communicating with the client, wherein the priority of the second ECU is lower than the priority of the first ECU.
  • the functions of the processing unit 1100 and the communication unit 1101 shown in FIG. 11 may be executed by the processor 1000 reading a program in the memory 1001, or executed by the processor 1000 alone.
  • the processing unit 1100 and the communication unit 1101 may execute the method flow executed by the ECU in S400-S401 as shown in FIG. 4; or S500- as shown in FIG.
  • the communication unit 1101 may include different communication units corresponding to different communication interfaces.
  • various aspects of the proxy service method provided by the embodiments of the present invention may also be implemented in the form of a program product, which includes program code.
  • program code runs on a computer device
  • the program code is used to make the computer device execute the steps in the proxy service method according to various exemplary embodiments of the present invention described in this specification.
  • the program product can use any combination of one or more readable media.
  • the readable medium may be a readable signal medium or a readable storage medium.
  • the readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above. Modifications of the readable storage medium.
  • Examples (non-exhaustive list) in one implementation of the embodiments of the present application include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read-only Memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • RAM random access memory
  • ROM read-only Memory
  • EPROM or flash memory erasable programmable read-only memory
  • CD-ROM compact disk read-only memory
  • magnetic storage device magnetic storage device, or any suitable combination of the above.
  • the program product for communication may adopt a portable compact disk read-only memory (CD-ROM) and include program code, and may run on a server device.
  • CD-ROM portable compact disk read-only memory
  • the program product of the present invention is not limited to this.
  • the readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with message transmission, devices, or devices.
  • the readable signal medium may include a data signal propagated in baseband or as a part of a carrier wave, and readable program code is carried therein. This propagated data signal can take many forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the readable signal medium may also be any readable medium other than a readable storage medium, and the readable medium may send, propagate, or transmit a program for use by or in combination with a periodic network action system, apparatus, or device.
  • the program code contained on the readable medium can be transmitted by any suitable medium, including, but not limited to, wireless, wired, optical cable, RF, etc., or any suitable combination of the above.
  • the program code used to perform the operations of the present invention can be written in any combination of one or more programming languages.
  • the programming languages include object-oriented programming languages—such as Java, C++, etc., as well as conventional procedural styles. Programming language-such as "C" language or similar programming language.
  • the program code can be executed entirely on the user's computing device, partly on the user's device, executed as an independent software package, partly on the user's computing device and partly executed on the remote computing device, or entirely on the remote computing device or server Executed on.
  • the remote computing device may be connected to a user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device.
  • LAN local area network
  • WAN wide area network
  • the embodiment of the present application further provides a computing device readable storage medium for the proxy service method, that is, the content is not lost after the power is off.
  • the storage medium stores a software program, including program code.
  • the program code runs on a computing device, the software program can implement any of the above embodiments of the present application when it is read and executed by one or more processors. Communication scheme.
  • this application may take the form of a computer program product on a computer-usable or computer-readable storage medium, which has a computer-usable or computer-readable program code implemented in the medium to be used or used by the instruction execution system. Used in conjunction with the instruction execution system.
  • a computer-usable or computer-readable medium can be any medium that can contain, store, communicate, transmit, or transmit a program for use by an instruction execution system, apparatus, or device, or in combination with an instruction execution system, Device or equipment use.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Multimedia (AREA)
  • Small-Scale Networks (AREA)

Abstract

The present application relates to the technical field of communications, and provides a proxy service method, device and system. The method comprises: a second electronic control unit (ECU) in a gateway platform determines that the heartbeat of a bound first ECU is lost; and the second ECU provides a proxy service for a client by means of a second interface in communication with the client, wherein the priority of the second ECU is lower than that of the first ECU. According to the method, main and standby ECUs are determined in a priority mode; when the main ECU (i.e., the first ECU) fails, causing the heartbeat to be lost, it is switched to the standby ECU (i.e., the second ECU) to execute the proxy service, implementing service backup, service switching, and service recovery functions of a vehicle-mounted ECU general controller. The main-standby switching takes less time, and there is no need to build a plurality of ECUs locally, which can effectively reduce costs.

Description

一种代理服务方法、装置及***Proxy service method, device and system
本申请要求于2020年04月26日提交中国专利局、申请号为202010339347.4、申请名称为“一种代理服务方法、装置及***”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on April 26, 2020, the application number is 202010339347.4, and the application name is "a method, device and system for agency services", the entire content of which is incorporated herein by reference Applying.
技术领域Technical field
本申请涉及通信技术领域,尤其涉及一种代理服务方法、装置及***。This application relates to the field of communication technology, and in particular to a proxy service method, device and system.
背景技术Background technique
随着车载行业的发展,电子控制单元(Electronic Control Unit,ECU)越来越多,车内网络也逐步向面向服务的通信演进。其中,代理服务在满足可靠性的同时,高效性和灵活性也越来越受到重视。With the development of the automotive industry, there are more and more electronic control units (ECUs), and the in-vehicle network is gradually evolving to service-oriented communication. Among them, while the agency service satisfies the reliability, the efficiency and flexibility have also been paid more and more attention.
为此,面向服务的架构(Service Oriented Architecture,SOA)创建了一个以明确定义的接口为特征的服务环境,环境中的软件组件可作为服务生产者或服务消费者,通过服务总线的中间件通信。如图1所示,服务提供者是一个提供功能的独立单元,用于发布服务;服务代理是一个服务注册中心,用于运行时查找服务,可以是分布式***;服务消费者通过服务代理查找服务,可以访问多个服务提供者。To this end, the Service Oriented Architecture (SOA) creates a service environment characterized by well-defined interfaces. The software components in the environment can be used as service producers or service consumers to communicate through the middleware of the service bus. . As shown in Figure 1, the service provider is an independent unit that provides functions and is used to publish services; the service agent is a service registry, which is used to find services at runtime, which can be a distributed system; the service consumers find through the service agent Service, you can visit multiple service providers.
其中,针对上述以接口为特征的服务环境,目前提供一种冗余ECU电路结构的控制器。如图2所示,在本地设置两个ECU,例如,ECUa与ECUb。其中,所述ECUa与ECUb之间相互连接,且所示冗余ECU电路结构的控制器主要通过输入电路冗余、CPU冗余来实现。具体的,当一个ECU在正常工作时,另一个ECU处于热备份状态,当ECU认为某一通道输入信号不可信时,可切换成从另一通道输入信号。同理,当某个CPU故障或不可信时,可切换成另一个CPU来控制设备。Among them, for the above-mentioned service environment characterized by interfaces, a controller with a redundant ECU circuit structure is currently provided. As shown in Figure 2, two ECUs are provided locally, for example, ECUa and ECUb. Wherein, the ECUa and the ECUb are connected to each other, and the controller of the redundant ECU circuit structure shown is mainly realized by input circuit redundancy and CPU redundancy. Specifically, when one ECU is working normally, the other ECU is in a hot backup state. When the ECU considers the input signal of a certain channel to be unreliable, it can switch to the input signal from another channel. In the same way, when a CPU fails or is untrustworthy, it can be switched to another CPU to control the device.
然而,图2所示的车载服务代理***,是一种点对点的备份,无法支持多对一备份,并且执行过程中需要自行处理主备逻辑控制,成本高,无法适用于车载ECU通用控制器。However, the in-vehicle service agent system shown in Figure 2 is a point-to-point backup and cannot support many-to-one backup. In addition, the main and backup logic control needs to be handled by itself during the execution process, which is costly and cannot be applied to the vehicle ECU general controller.
综上,目前并没有一种高效、灵活且安全的代理服务方案。In summary, there is currently no efficient, flexible and secure agency service solution.
发明内容Summary of the invention
本申请提供一种代理服务方法、装置及***,用以提供一种高效、灵活且安全的代理服务方案。This application provides an agency service method, device and system to provide an efficient, flexible and secure agency service solution.
第一方面,本申请实施例提供一种代理服务方法,包括:In the first aspect, an embodiment of the present application provides an agency service method, including:
网关平台中的第二电子控制单元ECU确定绑定的第一ECU心跳丢失;所述第二ECU通过与客户端进行通信的第二接口为所述客户端提供代理服务;其中,所述第二ECU的优先级低于所述第一ECU的优先级。The second electronic control unit ECU in the gateway platform determines that the heartbeat of the bound first ECU is lost; the second ECU provides proxy services for the client through the second interface for communicating with the client; wherein, the second The priority of the ECU is lower than the priority of the first ECU.
基于该方案,本发明实施例在网关平台设置了与本地的第一ECU对应的至少一个第二ECU,来降低因ECU故障而无法为客户端及时提供代理服务的问题。其中,本申请实施例中,主要通过优先级方式确定了主备ECU,当所述主ECU(即第一ECU)发生故障, 导致心跳丢失时,更换为备用ECU(即第二ECU)执行代理服务,实现了ECU通用控制器的服务备份、服务倒换、服务恢复功能,主备倒换耗时少。并且,通过上述方法,本发明实施例能够根据实际情况更加灵活的调整所述第一ECU对应的所述第二ECU以及所述第二ECU的数量,不需要在本地搭建多个ECU,从而能够有效降低成本。Based on this solution, the embodiment of the present invention sets at least one second ECU corresponding to the local first ECU on the gateway platform to reduce the problem that the client cannot be provided with proxy services in time due to ECU failure. Among them, in the embodiment of the present application, the main and standby ECUs are determined mainly by priority. When the main ECU (i.e., the first ECU) fails and causes the heartbeat to be lost, it is replaced with the backup ECU (i.e., the second ECU) to execute the agent The service realizes the service backup, service switching, and service recovery functions of the ECU general controller, and the main-standby switching takes less time. In addition, through the above method, the embodiment of the present invention can adjust the number of the second ECU corresponding to the first ECU and the number of the second ECU more flexibly according to the actual situation, and there is no need to build multiple ECUs locally. Effectively reduce costs.
在一种可能的实现方式中,所述第二ECU在至少一个阈值周期内没有接收到所述第一ECU的心跳,确定所述第一ECU心跳丢失。In a possible implementation manner, the second ECU does not receive the heartbeat of the first ECU within at least one threshold period, and it is determined that the heartbeat of the first ECU is lost.
基于该方案,本发明实施例提供了一种第二ECU确定所述第一ECU心跳丢失的方法,即所述第二ECU在至少一个阈值周期内没有接收到所述第一ECU的心跳,确定所述第一ECU心跳丢失。Based on this solution, an embodiment of the present invention provides a method for a second ECU to determine that the heartbeat of the first ECU is lost, that is, the second ECU does not receive the heartbeat of the first ECU within at least one threshold period, and determines The heartbeat of the first ECU is lost.
在一种可能的实现方式中,所述第二ECU通过与客户端进行通信的第二接口为所述客户端提供代理服务之前,所述第二ECU获取所述第一ECU接收到的所述客户端发送的代理服务报文;所述第二ECU将与所述客户端进行通信的接口更新为自身对应的所述第二接口。In a possible implementation manner, before the second ECU provides proxy services for the client through the second interface for communicating with the client, the second ECU obtains the information received by the first ECU. The proxy service message sent by the client; the second ECU updates the interface for communicating with the client to the second interface corresponding to itself.
基于该方案,本发明实施例所述第二ECU通过获取所述第一ECU接收到的代理服务报文,实现了对所述第一ECU的备份功能。Based on this solution, the second ECU in the embodiment of the present invention realizes the backup function of the first ECU by acquiring the proxy service message received by the first ECU.
在一种可能的实现方式中,所述第二ECU从所述第一ECU周期性发送的心跳信息中获取所述客户端发送的代理服务报文。In a possible implementation manner, the second ECU obtains the proxy service message sent by the client from the heartbeat information periodically sent by the first ECU.
基于该方案,本发明实施例所述第一ECU每次向所述第二ECU发送的心跳信息中包含所述代理服务报文,从而使所述第二ECU根据接收到的心跳信息获取所述代理服务报文。Based on this solution, the heartbeat information sent by the first ECU to the second ECU in the embodiment of the present invention includes the proxy service message, so that the second ECU obtains the proxy service message according to the received heartbeat information. Proxy service message.
在一种可能的实现方式中,所述第二ECU调用所述网关平台提供的局域网交换机LSW接口,将所述LSW接口由所述第一ECU对应的第二接口,更新为自身对应的第二接口。In a possible implementation manner, the second ECU invokes the LSW interface of the LAN switch provided by the gateway platform, and updates the LSW interface from the second interface corresponding to the first ECU to the second interface corresponding to itself. interface.
基于该方案,本发明实施例在所述第一ECU心跳丢失后,为了能够保证代理服务顺利进行,启动了备份的第二ECU,并且为了所述第二ECU能够顺利接管所述第一ECU的功能,所述第二ECU调用网关平台提供的局域网交换机LSW接口,将所述局域网交换机接口由所述第一ECU对应的第一接口,更新为自身对应的第二接口,从而更有效的进行业务的顺利开展。Based on this solution, in the embodiment of the present invention, after the heartbeat of the first ECU is lost, in order to ensure the smooth progress of the proxy service, the backup second ECU is activated, and in order for the second ECU to take over the first ECU smoothly. Function, the second ECU calls the LAN switch LSW interface provided by the gateway platform, and updates the LAN switch interface from the first interface corresponding to the first ECU to the second interface corresponding to itself, thereby performing services more effectively The smooth development of the project.
在一种可能的实现方式中,所述第二ECU通过与所述客户端进行通信的第二接口,接收所述客户端发送的代理服务报文。In a possible implementation manner, the second ECU receives the proxy service message sent by the client through a second interface for communicating with the client.
基于该方案,本发明实施例所述客户端再向所述第一ECU发送所述代理服务报文的同时,也将所述代理服务报文发送给所述第二ECU。Based on this solution, the client in the embodiment of the present invention sends the proxy service message to the first ECU while also sending the proxy service message to the second ECU.
在一种可能的实现方式中,所述第二ECU在确定所述第一ECU具有心跳时,不向所述客户端发送所述代理服务报文的业务处理结果。In a possible implementation manner, when the second ECU determines that the first ECU has a heartbeat, it does not send the service processing result of the proxy service message to the client.
基于该方案,本发明实施例为了避免信息冲突,当所述第一ECU具有心跳时,若所述第二ECU也接收到了所述客户端发送的报文,则所述第二ECU仅对接收到的所述报文进行处理,但不发送。Based on this solution, in the embodiment of the present invention, in order to avoid information conflicts, when the first ECU has a heartbeat, if the second ECU also receives the message sent by the client, the second ECU only The received message is processed, but not sent.
在一种可能的实现方式中,所述第二ECU对获取到的所述代理服务报文进行业务处理;所述第二ECU将所述业务处理结果通知给所述客户端。In a possible implementation manner, the second ECU performs business processing on the acquired proxy service message; the second ECU notifies the client of the business processing result.
基于该方案,本申请实施例提供了所述代理服务的主要功能,例如,所述第二ECU 对获取到的所述代理服务报文进行业务处理;所述第二ECU将所述业务处理结果通知给所述客户端。Based on this solution, the embodiment of the present application provides the main functions of the proxy service. For example, the second ECU performs business processing on the acquired proxy service message; the second ECU performs business processing on the business processing result Notify the client.
在一种可能的实现方式中,所述第二ECU通过所述第二接口为所述客户端提供代理服务之前,所述第二ECU将自身IP修改为所述第一ECU对应的虚拟IP。In a possible implementation manner, before the second ECU provides the proxy service for the client through the second interface, the second ECU modifies its own IP to a virtual IP corresponding to the first ECU.
基于该方案,本申请实施例中为了使接收设备无感知,无需重新对发送设备进行再次认证,从而将在所述第二ECU向所述客户端发送报文时,将所述第二ECU的源IP修改为所述虚拟IP,有效提高了代理服务的效率。Based on this solution, in the embodiments of the present application, in order to make the receiving device unaware, there is no need to re-authenticate the sending device, so that when the second ECU sends a message to the client, the second ECU's The source IP is modified to the virtual IP, which effectively improves the efficiency of the proxy service.
在一种可能的实现方式中,所述第二ECU位于所述第一ECU对应的第一网关平台中;或所述第二ECU位于与所述第一网关平台具有通信传输功能的第二网关平台中。In a possible implementation, the second ECU is located in a first gateway platform corresponding to the first ECU; or the second ECU is located in a second gateway that has a communication transmission function with the first gateway platform. In the platform.
基于该方案,本发明实施例中所述第二ECU所处网关平台可能直接与所述第一ECU关联,也可能间接与所述第一ECU关联,适用性更强。Based on this solution, the gateway platform where the second ECU is located in the embodiment of the present invention may be directly associated with the first ECU, or may be indirectly associated with the first ECU, which is more applicable.
在一种可能的实现方式中,所述第一ECU为具有执行所述代理服务功能的传感器或执行器。In a possible implementation manner, the first ECU is a sensor or an actuator having a function of executing the proxy service.
基于该方案,本发明实施例在所述第一ECU无特定设备的前提下,可以支持ECU整体软硬件的备份,由网关平台上的第二ECU直接跟传感器或执行器的交互。Based on this solution, the embodiment of the present invention can support the backup of the overall software and hardware of the ECU under the premise that the first ECU has no specific equipment, and the second ECU on the gateway platform directly interacts with sensors or actuators.
在一种可能的实现方式中,当所述第一ECU心跳恢复后,所述第二ECU失去为客户端提供代理服务的功能。In a possible implementation manner, after the heartbeat of the first ECU recovers, the second ECU loses the function of providing proxy services for the client.
基于该方案,本发明实施例中因为所述第一ECU的优先级高于所述第二ECU的优先级,从而当所述第一ECU心跳恢复,恢复执行所述代理服务功能后,为避免冲突以及节省***开销,使所述第二ECU失去所述代理服务功能。Based on this solution, in the embodiment of the present invention, because the priority of the first ECU is higher than the priority of the second ECU, when the heartbeat of the first ECU resumes and the proxy service function is resumed, in order to avoid Conflict and saving system overhead make the second ECU lose the proxy service function.
在一种可能的实现方式中,所述第二ECU与所述第一ECU具有相同的组标识ID。In a possible implementation manner, the second ECU and the first ECU have the same group identification ID.
基于该方案,本发明实施例中提供了一种确定所述第二ECU对应的第一ECU的方式,即用于备份所述第一ECU的所述第二ECU,是与所述第一ECU具有相同的组标识ID的ECU。Based on this solution, the embodiment of the present invention provides a way to determine the first ECU corresponding to the second ECU, that is, the second ECU used to back up the first ECU is the same as the first ECU. ECUs with the same group identification ID.
在一种可能的实现方式中,所述第二ECU通过下列方式确定自身优先级低于所述第一ECU的优先级:所述第二ECU周期性向所述第一ECU发送携带自身优先级的心跳信息,以及周期性接收来自所述第一ECU发送的携带所述第一ECU优先级的心跳信息;所述第二ECU根据所述第一ECU发送的携带所述第一ECU优先级的心跳信息,确定所述第一ECU的优先级;所述第二ECU根据自身优先级与所述第一ECU的优先级的比较结果,确定自身优先级低于所述第一ECU的优先级。In a possible implementation manner, the second ECU determines that its own priority is lower than the priority of the first ECU in the following manner: the second ECU periodically sends a message carrying its own priority to the first ECU Heartbeat information, and periodically receiving heartbeat information sent from the first ECU carrying the priority of the first ECU; the second ECU according to the heartbeat sent by the first ECU carrying the priority of the first ECU Information to determine the priority of the first ECU; the second ECU determines that its own priority is lower than the priority of the first ECU according to the comparison result of its own priority and the priority of the first ECU.
在一种可能的实现方式中,所述第二ECU确定自身优先级低于所述第一ECU的优先级之后,所述第二ECU停止向所述第一ECU发送携带自身优先级的心跳信息。In a possible implementation manner, after the second ECU determines that its own priority is lower than the priority of the first ECU, the second ECU stops sending heartbeat information carrying its own priority to the first ECU .
第二方面,本申请实施例提供一种代理服务装置,该装置具有实现上述实施例第一方面或第一方面中的任意可能的实现方式中的任一方法。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的单元或模块。In the second aspect, an embodiment of the present application provides a proxy service device, which has a method for implementing the first aspect or any of the possible implementation manners in the first aspect of the foregoing embodiments. This function can be realized by hardware, or by hardware executing corresponding software. The hardware or software includes one or more units or modules corresponding to the above-mentioned functions.
在一种可能的实现方式中,该装置可以是电子控制单元ECU,或者是可用于所述ECU的部件,例如芯片或芯片***或者电路。In a possible implementation, the device may be an electronic control unit ECU, or a component that can be used in the ECU, such as a chip or a chip system or a circuit.
第三方面,本申请实施例提供了一种芯片***,包括处理器,可选的还包括存储器;其中,存储器用于存储计算机程序,处理器用于从存储器中调用并运行计算机程序,使得安装有芯片***的通信设备执行上述第一方面或第一方面中的任意可能的实现方式中的任一方法。In the third aspect, the embodiments of the present application provide a chip system, including a processor, and optionally a memory; wherein the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that the The communication device of the chip system executes the foregoing first aspect or any method in any possible implementation manner of the first aspect.
第四方面,本申请实施例提供了一种代理服务***,包括第二ECU、第一ECU以及客户端,所述第二ECU用于执行上述第一方面或第一方面中的任意可能的实现方式中的任一方法。In a fourth aspect, an embodiment of the present application provides an agent service system, including a second ECU, a first ECU, and a client. The second ECU is used to execute the first aspect or any possible implementation of the first aspect. Any of the methods.
第五方面,本申请实施例提供了一种计算机程序产品,计算机程序产品包括:计算机程序代码,当计算机程序代码被通信设备的通信单元、处理单元或收发器、处理器运行时,使得通信设备执行上述第一方面或第一方面中的任意可能的实现方式中的任一方法。In the fifth aspect, the embodiments of the present application provide a computer program product, the computer program product includes: computer program code, when the computer program code is executed by the communication unit, processing unit, transceiver, or processor of the communication device, the communication device Perform any method in the foregoing first aspect or any possible implementation manner in the first aspect.
第六方面,本申请实施例提供了一种计算机可读存储介质,计算机可读存储介质存储有程序,程序使得ECU执行上述第一方面或第一方面中的任意可能的实现方式中的任一方法。In a sixth aspect, the embodiments of the present application provide a computer-readable storage medium, and the computer-readable storage medium stores a program, and the program causes the ECU to execute any of the foregoing first aspect or any of the possible implementation manners in the first aspect. method.
附图说明Description of the drawings
图1为本申请提供的以接口为特征的服务环境示意图;Figure 1 is a schematic diagram of a service environment characterized by interfaces provided by this application;
图2为现有车载服务代理***示意图;Figure 2 is a schematic diagram of an existing vehicle service agent system;
图3为本申请实施例提供的一种***架构示意图;FIG. 3 is a schematic diagram of a system architecture provided by an embodiment of the application;
图4为本申请实施例提供的一种代理服务的方法示意图;FIG. 4 is a schematic diagram of an agency service method provided by an embodiment of the application;
图5为本申请实施例提供的第一种正常启动阶段的代理服务的流程示意图;FIG. 5 is a schematic flowchart of the first agent service in the normal startup phase provided by an embodiment of the application;
图6为本申请实施例提供的第二种正常启动阶段的代理服务的流程示意图;FIG. 6 is a schematic flowchart of a second type of proxy service in the normal startup phase provided by an embodiment of the application;
图7为本申请实施例提供的第一种倒换阶段的代理服务的流程示意图;FIG. 7 is a schematic flowchart of the first switching stage proxy service provided by an embodiment of this application;
图8为本申请实施例提供的第二种倒换阶段的代理服务的流程示意图;FIG. 8 is a schematic flowchart of a second switching stage proxy service provided by an embodiment of this application;
图9为本申请实施例提供的一种跨网关平台代理服务场景示意图;FIG. 9 is a schematic diagram of a cross-gateway platform proxy service scenario provided by an embodiment of the application;
图10为本申请提供的第一种代理服务装置示意图;FIG. 10 is a schematic diagram of the first agency service device provided by this application;
图11为本申请提供的第二种代理服务装置示意图。Fig. 11 is a schematic diagram of the second type of proxy service device provided by this application.
具体实施方式Detailed ways
下面结合说明书附图对本申请进行具体说明。The application will be described in detail below in conjunction with the accompanying drawings of the specification.
随着车载行业的发展,ECU越来越多,车内网络也逐步向面向服务的通信演进。其中,代理服务的在满足可靠性的同时,高效性和灵活性也越来越受到重视。为此,面向服务的架构SOA创建了一个以明确定义的接口为特征的服务环境,环境中的软件组件可作为服务生产者或服务消费者,通过服务总线的中间件通信。如图1所示,服务提供者是一个提供功能的独立单元,通过发布服务周知自身的存在;服务代理是一个服务注册中心,用于运行时查找服务,可以是分布式***;服务消费者通过服务代理查找服务,可以访问 多个服务提供者。With the development of the automotive industry, there are more and more ECUs, and the in-vehicle network is gradually evolving to service-oriented communication. Among them, while satisfying the reliability of agency services, more and more attention is paid to its efficiency and flexibility. To this end, the service-oriented architecture SOA creates a service environment characterized by well-defined interfaces. The software components in the environment can be used as service producers or service consumers to communicate through the middleware of the service bus. As shown in Figure 1, a service provider is an independent unit that provides functions, and knows its own existence by publishing services; a service agent is a service registry, which is used to find services at runtime, which can be a distributed system; service consumers pass Service agents find services and can access multiple service providers.
其中,针对上述以接口为特征的服务环境,目前提供一种冗余ECU电路结构的控制器。如图2所示,在本地设置两个ECU,例如,ECUa与ECUb。其中,所述ECUa与ECUb之间相互连接,且所示冗余ECU电路结构的控制器主要通过输入电路冗余、CPU冗余来实现。具体的,当一个ECU在正常工作时,另一个ECU处于热备份状态,当ECU认为某一通道输入信号不可信时,可切换成从另一通道输入信号。同理,当某个CPU故障或不可信时,可切换成另一个CPU来控制设备。Among them, for the above-mentioned service environment characterized by interfaces, a controller with a redundant ECU circuit structure is currently provided. As shown in Figure 2, two ECUs are provided locally, for example, ECUa and ECUb. Wherein, the ECUa and the ECUb are connected to each other, and the controller of the redundant ECU circuit structure shown is mainly realized by input circuit redundancy and CPU redundancy. Specifically, when one ECU is working normally, the other ECU is in a hot backup state. When the ECU considers the input signal of a certain channel to be unreliable, it can switch to the input signal from another channel. In the same way, when a CPU fails or is untrustworthy, it can be switched to another CPU to control the device.
然而,图2所示的车载服务代理***,是一种点对点的备份,无法支持多对一备份,并且执行过程中需要自行处理主备逻辑控制,成本高,无法适用于车载ECU通用控制器。However, the in-vehicle service agent system shown in Figure 2 is a point-to-point backup and cannot support many-to-one backup. In addition, the main and backup logic control needs to be handled by itself during the execution process, which is costly and cannot be applied to the vehicle ECU general controller.
综上,目前并没有一种高效、灵活且安全的代理服务方案。In summary, there is currently no efficient, flexible and secure agency service solution.
为解决上述问题,本申请实施例提供一种代理服务方法,本申请实施例的技术方案可以应用于各种通信***,例如:长期演进(long term evolution,LTE)***,全球互联微波接入(worldwide interoperability for microwave access,WiMAX)通信***,未来的第五代(5th Generation,5G)***,如新一代无线接入技术(new radio access technology,NR),及未来的通信***,如6G***等。In order to solve the above problems, the embodiments of the present application provide a proxy service method. The technical solutions of the embodiments of the present application can be applied to various communication systems, such as: long term evolution (LTE) system, global interconnection for microwave access ( Worldwide interoperability for microwave access (WiMAX) communication systems, future 5th Generation (5G) systems, such as new-generation radio access technology (NR), and future communication systems, such as 6G systems, etc. .
以5G***(也可以称为New Radio***)为例,具体来说,本申请实施例针对目前没有一种高效、灵活且安全的代理服务方案的问题,提供了通过优先级方式确定主备ECU,当所述主ECU(即第一ECU)发生故障,导致心跳丢失时,更换为备用ECU(即第二ECU)执行代理服务,实现了车载ECU通用控制器的服务备份、服务倒换、服务恢复功能,同时,主备倒换耗时少,且无需本地搭建多个ECU,能够有效降低成本。Take the 5G system (also known as the New Radio system) as an example. Specifically, the embodiment of the present application addresses the problem that there is no efficient, flexible, and secure proxy service solution at present, and provides a priority method to determine the main and standby ECUs. When the main ECU (i.e., the first ECU) fails and the heartbeat is lost, it is replaced with a backup ECU (i.e., the second ECU) to perform proxy services, realizing the service backup, service switching, and service recovery of the vehicle-mounted ECU general controller At the same time, it takes less time to switch between active and standby, and there is no need to build multiple ECUs locally, which can effectively reduce costs.
为便于理解本申请实施例,首先以图3中示出的通信***为例详细说明本申请实施例适用的通信***。如图3所示,该通信***包括第一ECU300、客户端310和第二ECU320。To facilitate the understanding of the embodiments of the present application, first, the communication system shown in FIG. 3 is taken as an example to describe in detail the communication system to which the embodiments of the present application are applicable. As shown in FIG. 3, the communication system includes a first ECU 300, a client 310, and a second ECU 320.
第一ECU300和/或第二ECU320,主要由微处理器(CPU)、存储器(ROM、RAM)、输入/输出接口(I/O)、模数转换器(A/D)以及整形、驱动等大规模集成电路组成。The first ECU300 and/or the second ECU320 are mainly composed of a microprocessor (CPU), memory (ROM, RAM), input/output interface (I/O), analog-to-digital converter (A/D), shaping, driving, etc. Composition of large-scale integrated circuits.
在ECU中CPU是核心部分,它具有运算与控制的功能,当所述ECU在运行时,它采集各传感器的信号,进行运算,并将运算的结果转变为控制信号,控制被控对象的工作。此外,所述ECU还实行对存储器(ROM/FLASH/EEPROM、RAM)、输入/输出接口(I/O)和其它外部电路的控制。In the ECU, the CPU is the core part, which has the functions of calculation and control. When the ECU is running, it collects the signals from the sensors, performs calculations, and converts the calculation results into control signals to control the work of the controlled object . In addition, the ECU also controls the memory (ROM/FLASH/EEPROM, RAM), input/output interface (I/O) and other external circuits.
此外,本申请实施例中一种可选的方式,所述第一ECU300具有服务代理模块301,所述服务代理模块301主要用于进行所述第一ECU300的状态管理,以及报文收发控制管理。所述第二ECU320具有服务代理模块321,所述服务代理模块321主要用于进行所述第二ECU320的状态管理,以及报文收发控制管理。In addition, in an optional manner in the embodiment of the present application, the first ECU 300 has a service agent module 301, and the service agent module 301 is mainly used to perform state management of the first ECU 300 and control management of message transmission and reception. . The second ECU 320 has a service agent module 321, and the service agent module 321 is mainly used to perform state management of the second ECU 320 and control and management of message transmission and reception.
进一步的,如图3所示,本申请实施例中所述第二ECU处于网关平台330中,其中,所述网关平台330中还包含转发引擎331以及局域网交换机LSW332等。Further, as shown in FIG. 3, the second ECU in the embodiment of the present application is located in a gateway platform 330, where the gateway platform 330 also includes a forwarding engine 331, a local area network switch LSW332, and the like.
本申请实施例中一种可选的方式,所述转发引擎331是具有高性能的报文信号路由模块,用于提供LSW控制接口;所述LSW332是用于实现局域网内通讯链路分配的通讯设备。其中,所述LSW332可以与所述转发引擎331相连,也可以在所述转发引擎331中,本申请实施例在此不进行限定,任何适用于本申请实施例的网关设备的构造都属于本申请实施例保护范围。In an optional manner in the embodiment of the present application, the forwarding engine 331 is a high-performance packet signal routing module used to provide LSW control interfaces; the LSW332 is used to implement communication link distribution in a local area network. equipment. Wherein, the LSW332 may be connected to the forwarding engine 331, or may be in the forwarding engine 331. The embodiment of the present application is not limited here, and any structure of the gateway device applicable to the embodiment of the present application belongs to the present application. Embodiment protection scope.
客户端310,是一种向用户提供语音和/或数据连通性的设备,也可以称为用户设备(user equipment,UE)、接入终端、用户单元、用户站、移动站、移动台、远方站、远程终端、移动设备、用户终端、终端、无线通信设备、用户代理或用户装置。本申请的实施例中的终端可以是手机(mobile phone)、平板电脑(Pad)、带无线收发功能的电脑、虚拟现实(virtual reality,VR)终端、增强现实(augmented reality,AR)终端、工业控制(industrial control)中的无线终端、无人驾驶(self driving)中的无线终端、远程医疗(remote medical)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端等等。The client 310 is a device that provides voice and/or data connectivity to users, and can also be referred to as user equipment (UE), access terminal, user unit, user station, mobile station, mobile station, and remote Station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent, or user device. The terminal in the embodiment of the present application may be a mobile phone (mobile phone), a tablet computer (Pad), a computer with wireless transceiver function, a virtual reality (VR) terminal, an augmented reality (AR) terminal, an industrial Wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical, wireless terminals in smart grid, transportation safety Wireless terminals in the smart city (smart city), wireless terminals in the smart home (smart home), and so on.
本申请实施例描述的网络架构以及业务场景是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域普通技术人员可知,随着网络架构的演变和新业务场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。应理解,图3仅为便于理解而示例的简化示意图,例如,该代理服务***中还可以包括其他ECU等,图3中未予以画出。The network architecture and business scenarios described in the embodiments of this application are intended to more clearly illustrate the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. Those of ordinary skill in the art will know that with the network With the evolution of architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are equally applicable to similar technical problems. It should be understood that FIG. 3 is only a simplified schematic diagram of an example for ease of understanding. For example, the agent service system may also include other ECUs, etc., which are not shown in FIG. 3.
其中,本申请实施例中的术语“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中,A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。以下至少一项(个)下或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。Among them, the term "at least one" in the embodiments of the present application refers to one or more, and "multiple" refers to two or more than two. "And/or" describes the association relationship of the associated objects, indicating that there can be three relationships, for example, A and/or B, which can mean: A alone exists, A and B exist at the same time, and B exists alone, where A , B can be singular or plural. The character "/" generally indicates that the associated objects before and after are in an "or" relationship. The following at least one item (item) or similar expressions refer to any combination of these items, including any combination of single item (item) or plural items (item). For example, at least one item (a) of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple .
除非有相反的说明,本申请实施例提及“第一”、“第二”等序数词是用于对多个对象进行区分,不用于限定多个对象的顺序、时序、优先级或者重要程度。Unless otherwise stated, the ordinal numbers such as "first" and "second" mentioned in the embodiments of this application are used to distinguish multiple objects, and are not used to limit the order, timing, priority, or importance of multiple objects. .
此外,本申请实施例和权利要求书及附图中的术语“包括”和“具有”不是排他的。例如,包括了一系列步骤或模块的过程、方法、***、产品或设备,不限定于已列出的步骤或模块,还可以包括没有列出的步骤或模块。In addition, the terms "including" and "having" in the embodiments of the present application, claims and drawings are not exclusive. For example, a process, method, system, product, or device that includes a series of steps or modules is not limited to the listed steps or modules, and may also include unlisted steps or modules.
通过本申请实施例中上述应用场景等内容的介绍,本申请实施例提供一种代理服务的方法,所述步骤如图4所示:Through the introduction of the foregoing application scenarios and other contents in the embodiments of the present application, the embodiments of the present application provide a proxy service method, and the steps are as shown in Fig. 4:
S400,网关平台中的第二ECU确定绑定的第一ECU心跳丢失。S400: The second ECU in the gateway platform determines that the heartbeat of the bound first ECU is lost.
S401,所述第二ECU通过与客户端进行通信的第二接口为所述客户端提供代理服务;其中,所述第二ECU的优先级低于所述第一ECU的优先级。S401: The second ECU provides a proxy service for the client through a second interface for communicating with the client; wherein the priority of the second ECU is lower than the priority of the first ECU.
下面针对本申请实施例提供的所述代理服务方法的具体内容,根据阶段场景不同,分别进行介绍。The specific content of the proxy service method provided by the embodiment of the present application will be introduced separately according to different stages and scenarios.
阶段一、配置阶段。Phase one, configuration phase.
本申请实施例中,根据需要实现备份功能的ECU类型,选择服务代理的集成方式。In the embodiment of the present application, the integration mode of the service agent is selected according to the type of ECU that needs to implement the backup function.
示例性的,例如,在汽车开放***架构(AUTomotive Open System Architecture,AUTOSAR)经典(Classic)环境可选择编译集成;再例如,在AUTOSAR自适应(Adaptive)/Linux环境可选择部署集成。Exemplarily, for example, in the automotive open system architecture (AUTomotive Open System Architecture, AUTOSAR) classic environment, you can choose to compile and integrate; for another example, you can choose to deploy and integrate in the AUTOSAR Adaptive/Linux environment.
进一步的,本申请实施例中针对所述ECU中的服务代理模块进行如下配置:Further, in the embodiment of the present application, the following configuration is performed for the service agent module in the ECU:
1)确定第一ECU(即,主ECU)对应的第二ECU(即,备份ECU)。也就是说,相当于在网关平台上为所述第一ECU配置对应的第二ECU。1) Determine the second ECU (ie, backup ECU) corresponding to the first ECU (ie, main ECU). In other words, it is equivalent to configuring the corresponding second ECU for the first ECU on the gateway platform.
其中,所述第一ECU对应一个第二ECU;或者所述第一ECU对应多个第二ECU。Wherein, the first ECU corresponds to one second ECU; or the first ECU corresponds to multiple second ECUs.
本申请实施例中,为了在执行过程中更好的确定所述第一ECU对应的至少一个第二ECU,一种可选的方式为:In the embodiment of the present application, in order to better determine the at least one second ECU corresponding to the first ECU during the execution process, an optional way is:
为所述第一ECU以及所述第一ECU对应的至少一个第二ECU设置相同的组ID。The same group ID is set for the first ECU and at least one second ECU corresponding to the first ECU.
示例性的,假设,本申请实施例中想将ECU1、ECU2以及ECU3设置为一组主备ECU,将ECU4、ECU5设置为一组主备ECU。其中,本申请实施例可以将所述ECU1、ECU2以及ECU3分为一组,所述分组ID假设为组1;将ECU4、ECU5分为一组,所述分组ID假设为组2。假设,选取ECU3作为第一ECU,则所述ECU3根据自身的组ID,确定对应的第二ECU为ECU1、ECU2。Exemplarily, suppose that in the embodiment of the present application, it is desired to set ECU1, ECU2, and ECU3 as a set of main and standby ECUs, and set ECU4 and ECU5 as a set of main and standby ECUs. In the embodiment of the present application, the ECU1, ECU2, and ECU3 may be grouped into one group, and the group ID is assumed to be group 1; the ECU4 and ECU5 are grouped into one group, and the group ID is assumed to be group 2. Assuming that ECU3 is selected as the first ECU, the ECU3 determines the corresponding second ECUs as ECU1 and ECU2 according to its own group ID.
2)确定每个ECU的服务优先级。2) Determine the service priority of each ECU.
进一步的,本申请实施例确定每个组中所有ECU的优先级,将该组中优先级最高的ECU确定为第一ECU,低于所述第一ECU的优先级的其他ECU确定为第二ECU。Further, the embodiment of the present application determines the priority of all ECUs in each group, determines the ECU with the highest priority in the group as the first ECU, and determines the other ECUs lower than the priority of the first ECU as the second ECU. ECU.
需要说明的是,本申请实施例中,该组中,多个第二ECU的优先级可以相同,也可以不同,本申请实施例在此不进行限制。It should be noted that in the embodiment of the present application, the priority of the multiple second ECUs in the group may be the same or different, and the embodiment of the present application is not limited herein.
示例性的,假设组1中的ECU为ECU1、ECU2以及ECU3,其中,所述ECU3的优先级高于所述ECU1,所述ECU1的优先级高于所述ECU2的优先级,则将所述ECU3确定为第一ECU,将所述ECU1和所述ECU2确定为第二ECU。Exemplarily, suppose the ECUs in group 1 are ECU1, ECU2, and ECU3, where the priority of the ECU3 is higher than the priority of the ECU1, and the priority of the ECU1 is higher than the priority of the ECU2, then the The ECU 3 is determined as the first ECU, and the ECU 1 and the ECU 2 are determined as the second ECU.
可选的,当所述ECU3心跳消失时,可以从第二ECU中选取优先级最高的ECU来接替所述ECU3执行所述代理服务,即选择所述ECU1来执行所述代理服务。其中,若所述ECU1也心跳消失,且所述ECU3心跳为恢复,则选择所述ECU2来执行所述代理服务。Optionally, when the heartbeat of the ECU 3 disappears, the ECU with the highest priority can be selected from the second ECU to replace the ECU 3 to execute the proxy service, that is, the ECU 1 is selected to execute the proxy service. Wherein, if the heartbeat of the ECU1 also disappears, and the heartbeat of the ECU3 is recovered, the ECU2 is selected to execute the proxy service.
示例性的,假设组1中的ECU为ECU1、ECU2以及ECU3,其中,所述ECU3的优先级高于所述ECU1,所述ECU1的优先级等于所述ECU2的优先级,则将所述ECU3确定为第一ECU,将所述ECU1和所述ECU2确定为第二ECU。For example, suppose the ECUs in group 1 are ECU1, ECU2, and ECU3, where the priority of ECU3 is higher than that of ECU1, and the priority of ECU1 is equal to the priority of ECU2, then ECU3 It is determined as the first ECU, and the ECU1 and the ECU2 are determined as the second ECU.
可选的,当所述ECU3心跳消失时,可以从第二ECU中随机选取一个ECU来接替所述ECU3执行所述代理服务,例如,选择所述ECU1来执行所述代理服务。其中,若所述ECU1也心跳消失,且所述ECU3心跳未恢复,则继续选择所述ECU2来执行所述代理服务。Optionally, when the heartbeat of the ECU 3 disappears, an ECU can be randomly selected from the second ECU to take over the ECU 3 to execute the proxy service, for example, the ECU 1 is selected to execute the proxy service. Wherein, if the heartbeat of the ECU1 also disappears, and the heartbeat of the ECU3 has not recovered, the ECU2 is continuously selected to execute the proxy service.
3)确定ECU对应的虚拟IP。3) Determine the virtual IP corresponding to the ECU.
进一步的,本申请实施例中若事先已确定ECU的分组,则本申请实施例直接确定每组对应的虚拟IP,从而有效减轻了确定每个ECU对应的虚拟IP的工作负担,更加高效便捷。Further, in the embodiment of the present application, if the grouping of ECUs has been determined in advance, the embodiment of the present application directly determines the virtual IP corresponding to each group, thereby effectively reducing the workload of determining the virtual IP corresponding to each ECU, and making it more efficient and convenient.
此外,若本申请实施例中事先没有直接确定每个组对应的虚拟IP,则当所述第一ECU失去心跳,所述第二ECU代替所述第一ECU时,所述第二ECU将自身IP修改为所述第一ECU对应的虚拟IP。其中,所述第二ECU可以从所述第一ECU发送的心跳信息中获取所述虚拟IP。In addition, if the virtual IP corresponding to each group is not directly determined in the embodiment of this application, when the first ECU loses its heartbeat and the second ECU replaces the first ECU, the second ECU will change itself The IP is modified to the virtual IP corresponding to the first ECU. Wherein, the second ECU may obtain the virtual IP from the heartbeat information sent by the first ECU.
该种方式主要使接收设备在接收过程中无感知,无需重新对发送设备进行再次认证,有效提高了代理服务的效率。This method mainly makes the receiving device unaware during the receiving process, and does not need to re-authenticate the sending device, which effectively improves the efficiency of the proxy service.
4)转发表项配置。4) Configuration of forwarding entries.
其中,本申请实施例中在对转发表项进行配置时,默认将来自所述客户端的报文通过转发引擎送给第一ECU处理。也就是说,与所述客户端进行通信的接口为所述第一ECU对应的接口(例如,所述第一ECU对应的接口为第二接口)。Wherein, in the embodiment of the present application, when the forwarding entry is configured, by default, the message from the client is sent to the first ECU for processing through the forwarding engine. That is, the interface for communicating with the client is the interface corresponding to the first ECU (for example, the interface corresponding to the first ECU is the second interface).
综上,通过上述配置,所述第一ECU与所述第一ECU对应的第二ECU具有相同的组ID,同组中的第一ECU的优先级高于第二ECU。此外,可选的,同组的所有ECU对应相同的虚拟IP。In summary, through the above configuration, the first ECU and the second ECU corresponding to the first ECU have the same group ID, and the first ECU in the same group has a higher priority than the second ECU. In addition, optionally, all ECUs in the same group correspond to the same virtual IP.
需要说明的是,本申请实施例中上述配置内容并不限定先后顺序,任何适用于本申请实施例的配置方式都属于本申请实施例保护范围。It should be noted that the foregoing configuration content in the embodiment of the present application does not limit the sequence, and any configuration method suitable for the embodiment of the present application belongs to the protection scope of the embodiment of the present application.
阶段二、正常启动阶段。Phase two, the normal start-up phase.
本身实施例中当所述第一ECU和网关平台启动后,进入初始状态。同一组中的各个ECU对应的节点周期性在所在组内发送心跳消息,宣传自己是主ECU。其中,本申请实施例中所述心跳信息可以如下述表1所示,包含所在组ID、自身优先级、IP数量、心跳间隔,此外,所述心跳信息中还可以包含所述第一ECU的虚拟IP。In its own embodiment, when the first ECU and the gateway platform are started, they enter the initial state. The nodes corresponding to each ECU in the same group periodically send heartbeat messages in the group to promote themselves as the main ECU. Among them, the heartbeat information in the embodiment of the present application may be as shown in Table 1 below, including the group ID, its own priority, the number of IPs, and the heartbeat interval. In addition, the heartbeat information may also include the information of the first ECU. Virtual IP.
Figure PCTCN2021088733-appb-000001
Figure PCTCN2021088733-appb-000001
表1 ECU发送的心跳信息Table 1 Heartbeat information sent by ECU
进一步的,本申请实施例中,若该组中的某个节点收到优先级更高的节点发送的心跳信息,则该节点对应的所述ECU选举失败,成为备份节点,即第二ECU。同理,若该组中的某个节点没有接收到优先级更高的节点发送的心跳信息,则该节点对应的所述ECU选举成功,成为主节点,即第一ECU。Further, in the embodiment of the present application, if a node in the group receives heartbeat information sent by a node with a higher priority, the ECU corresponding to the node fails the election and becomes a backup node, that is, the second ECU. Similarly, if a node in the group does not receive the heartbeat information sent by a node with a higher priority, the ECU corresponding to the node is successfully elected and becomes the master node, that is, the first ECU.
其中,本申请实施例中,在所述阶段二的场景下,提供了多种执行代理服务的方式,具体并不限于下述几种。Among them, in the embodiment of the present application, in the scenario of the second stage, a variety of ways of executing proxy services are provided, which are not specifically limited to the following.
执行方式1:在所述阶段二的场景下,所述第二ECU不会接收到来自所述客户端的代理服务报文。Implementation manner 1: In the scenario of the second phase, the second ECU will not receive the proxy service message from the client.
示例性的,在所述执行方式1下,本申请实施例提供的一种所述代理服务的流程,如图5所示:Exemplarily, in the execution mode 1, the process of the proxy service provided by the embodiment of the present application is as shown in FIG. 5:
S500,客户端向网关平台中的LSW发送代理服务报文。S500: The client sends a proxy service message to the LSW in the gateway platform.
S501,所述LSW将所述代理服务报文发送给所述转发引擎。S501: The LSW sends the proxy service message to the forwarding engine.
S502,所述转发引擎将接收到的所述代理服务报文发送给所述第一ECU。S502: The forwarding engine sends the received proxy service message to the first ECU.
其中,所述转发引擎通过所述第一ECU对应的第一接口,将所述代理服务报文通过所述第一接口发送给所述第一ECU。Wherein, the forwarding engine sends the proxy service message to the first ECU through the first interface through the first interface corresponding to the first ECU.
S503,所述第一ECU接收所述代理服务报文。S503: The first ECU receives the proxy service message.
S504,所述第一ECU向所述第二ECU每隔阈值时长发送心跳信息,其中,所述心跳信息中包含所述第一ECU的虚拟IP。S504: The first ECU sends heartbeat information to the second ECU every threshold duration, where the heartbeat information includes the virtual IP of the first ECU.
其中,本申请实施例一种可选的方式,为了使所述第二ECU替代所述第一ECU执行 所述代理服务,本申请实施例中所述第一ECU向所述第二ECU发送的心跳信息中包含所述客户端最新发送的代理服务报文,从而使所述第二ECU在接收到来自所述第一ECU发送的心跳信息后,从所述心跳信息中获取所述代理服务报文,使自身对所述第一ECU的备份信息更完全。Wherein, in an optional manner of the embodiment of the present application, in order to make the second ECU replace the first ECU to perform the proxy service, the first ECU in the embodiment of the present application sends the The heartbeat information includes the latest proxy service message sent by the client, so that the second ECU obtains the proxy service message from the heartbeat information after receiving the heartbeat information sent from the first ECU. This document makes the backup information of the first ECU more complete.
S505,所述第二ECU接收来自所述第一ECU的心跳信息,确定所述第一ECU具有心跳。S505: The second ECU receives heartbeat information from the first ECU, and determines that the first ECU has a heartbeat.
S506,所述第二ECU从所述第一ECU周期性发送的心跳信息中获取所述第一ECU的虚拟IP。S506: The second ECU obtains the virtual IP of the first ECU from the heartbeat information periodically sent by the first ECU.
需要说明的是,本申请实施例中并不限定上述图5中所述步骤的先后顺序,例如,所述S504~S505属于周期执行动作,可能在所述S500之前,或者S500~S503之间执行。It should be noted that the embodiment of the application does not limit the sequence of the steps described in FIG. 5, for example, the S504-S505 are periodic execution actions, which may be executed before the S500 or between S500-S503 .
此外,若本申请实施例中已事先为所述第二ECU与所述第一ECU配置了相同的虚拟IP,则为了减小传输功耗,所述心跳信息中不包含所述第一ECU的虚拟IP,所述S506可省略。In addition, if the same virtual IP has been configured for the second ECU and the first ECU in the embodiment of the present application, in order to reduce transmission power consumption, the heartbeat information does not include the first ECU's Virtual IP, the S506 can be omitted.
执行方式2:在所述阶段二的场景下,所述第二ECU通过与所述第二ECU对应的第二接口,接收到来自所述客户端的代理服务报文。Implementation manner 2: In the scenario of the second phase, the second ECU receives the proxy service message from the client through a second interface corresponding to the second ECU.
示例性的,在所述执行方式2下,本申请实施例提供的另一种所述代理服务的流程,如图6所示:Exemplarily, in the execution mode 2, another flow of the proxy service provided by the embodiment of the present application is as shown in FIG. 6:
S600,客户端向网关平台中的LSW发送代理服务报文。S600: The client sends a proxy service message to the LSW in the gateway platform.
S601,所述LSW将所述代理服务报文发送给所述转发引擎。S601. The LSW sends the proxy service message to the forwarding engine.
S602,所述转发引擎将接收到的所述代理服务报文发送给所述第二ECU。S602: The forwarding engine sends the received proxy service message to the second ECU.
S603,所述转发引擎将接收到的所述代理服务报文发送给所述第一ECU。S603: The forwarding engine sends the received proxy service message to the first ECU.
其中,所述转发引擎进行一转多配置,即所述转发引擎通过所述第一ECU对应的第一接口,将所述业务报文通过所述第一接口发送给所述第一ECU,以及通过所述第二ECU对应的第二接口,将所述业务报文通过所述第二接口发送给所述第二ECU。Wherein, the forwarding engine performs one-to-multiple configuration, that is, the forwarding engine sends the service message to the first ECU through the first interface through the first interface corresponding to the first ECU, and The service message is sent to the second ECU through the second interface through the second interface corresponding to the second ECU.
S604,所述第一ECU接收所述代理服务报文。S604: The first ECU receives the proxy service message.
S605,所述第二ECU接收所述代理服务报文。S605: The second ECU receives the proxy service message.
其中,本申请实施例中,为了避免信息冲突,当所述第一ECU具有心跳时,若所述第二ECU也接收到了所述客户端发送的代理服务报文,所述第二ECU对接收到的所述代理服务报文的处理方式具体并不限于下述几种。Wherein, in the embodiment of the present application, in order to avoid information conflicts, when the first ECU has a heartbeat, if the second ECU also receives the proxy service message sent by the client, the second ECU is The processing methods of the received proxy service message are not specifically limited to the following.
处理方式1:所述第二ECU接收到所述客户端发送的所述代理服务报文后,丢弃所述代理服务报文。Processing method 1: After receiving the proxy service message sent by the client, the second ECU discards the proxy service message.
也就是说,所述第二ECU接收到所述客户端发送的所述代理服务报文后,不对所述代理服务报文进行处理,直接丢弃接收到的所述车载代理服务报文。That is, after the second ECU receives the proxy service message sent by the client, it does not process the proxy service message, and directly discards the received vehicle proxy service message.
处理方式2:所述第二ECU接收到所述客户端发送的所述代理服务报文后,对接收到的所述代理服务报文进行处理,得到处理结果,但在向所述客户端发送所述处理结果时,丢弃所述处理结果,即向所述客户端发送的内容为空。Processing method 2: After receiving the proxy service message sent by the client, the second ECU processes the received proxy service message to obtain the processing result, but after sending it to the client When the processing result is the processing result, the processing result is discarded, that is, the content sent to the client is empty.
也就是说,所述第二ECU接收到所述客户端发送的所述代理服务报文后,根据所述代理服务报文确定所述客户端需要提供的服务,并对所述客户端提供相应的服务。但是,由于此时所述第一ECU具有心跳,所以所述第二ECU虽然确定了需要为所述客户端提供 的服务,为了避免信息冲突,所述第二ECU向所述客户端发送的内容为空。That is to say, after the second ECU receives the proxy service message sent by the client, it determines the service that the client needs to provide according to the proxy service message, and provides corresponding services to the client. Service. However, since the first ECU has a heartbeat at this time, although the second ECU has determined the service that needs to be provided to the client, in order to avoid information conflicts, the content sent by the second ECU to the client Is empty.
处理方式3:所述第二ECU接收到所述客户端发送的所述代理服务报文后,对接收到的所述代理服务报文进行处理,得到处理结果,但不向所述客户端反馈所述处理结果。Processing method 3: After receiving the proxy service message sent by the client, the second ECU processes the received proxy service message to obtain the processing result, but does not feed back to the client The result of the treatment.
也就是说,所述第二ECU接收到所述客户端发送的所述代理服务报文后,根据所述代理服务报文确定所述客户端需要提供的服务,并对所述客户端提供相应的服务。但是,由于此时所述第一ECU具有心跳,所以所述第二ECU虽然确定了需要为所述客户端提供的服务,为了避免信息冲突,所述第二ECU不向所述客户端提供所述服务。That is to say, after the second ECU receives the proxy service message sent by the client, it determines the service that the client needs to provide according to the proxy service message, and provides corresponding services to the client. Service. However, since the first ECU has a heartbeat at this time, although the second ECU has determined the service that needs to be provided to the client, in order to avoid information conflicts, the second ECU does not provide all the services to the client.述服务。 Said service.
S606,所述第一ECU向所述第二ECU每隔阈值时长发送心跳信息。S606: The first ECU sends heartbeat information to the second ECU every threshold duration.
S607,所述第二ECU接收所述第一ECU周期性发送的心跳信息,确定所述第一ECU具有心跳。S607: The second ECU receives heartbeat information periodically sent by the first ECU, and determines that the first ECU has a heartbeat.
需要说明的是,本申请实施例中并不限定上述图6中所述步骤的先后顺序,例如,所述S602~S603可以为同时执行。It should be noted that the sequence of the steps in FIG. 6 is not limited in the embodiment of the present application. For example, the steps S602 to S603 may be executed simultaneously.
阶段三、第一ECU与第二ECU倒换阶段。Phase three, the first ECU and the second ECU switching phase.
本申请实施例中当第一ECU心跳丢失时,所述第一ECU所在组中的至少一个第二ECU重新进行选取,确定用于进行替代所述第一ECU的第二ECU。In the embodiment of the present application, when the heartbeat of the first ECU is lost, at least one second ECU in the group where the first ECU is located is reselected to determine the second ECU to replace the first ECU.
本申请实施例中,使ECU发生心跳丢失的情况具体并不限于某种软硬件或网络故障问题。In the embodiments of the present application, the situation that causes the ECU to lose the heartbeat is not specifically limited to a certain software, hardware or network failure problem.
进一步的,若所述第一ECU所在组中仅有一个第二ECU,则当所述第一ECU心跳丢失时,所述第一ECU所在组中的唯一第二ECU自动升级为主ECU,代替所述第一ECU执行所述代理服务。Further, if there is only one second ECU in the group where the first ECU is located, when the heartbeat of the first ECU is lost, the only second ECU in the group where the first ECU is located is automatically upgraded to the main ECU instead of The first ECU executes the proxy service.
进一步的,本申请实施例中,在所述阶段三的场景下,提供了多种所述第二ECU代替所述第一ECU执行所述代理服务的方式,具体并不限于下述几种:Further, in the embodiment of the present application, in the scenario of the stage three, a variety of ways for the second ECU to replace the first ECU to execute the proxy service are provided, which are not specifically limited to the following:
代替方式1:所述第二ECU将与客户端进行通信的接口更新为自身对应的第二接口。Alternative 1: The second ECU updates the interface for communicating with the client to its own corresponding second interface.
示例性的,在所述代替方式1下,本申请实施例提供的一种所述代理服务的流程,如图7所示:Exemplarily, in the alternative method 1, the process of the proxy service provided by the embodiment of the present application is as shown in FIG. 7:
S700,第二ECU确定绑定的第一ECU心跳丢失。S700: The second ECU determines that the heartbeat of the bound first ECU is lost.
本申请实施例中一种可选的方式,所述第二ECU在至少一个阈值周期内没有接收到所述第一ECU的心跳,确定所述第一ECU心跳丢失。In an optional manner in the embodiment of the present application, the second ECU does not receive the heartbeat of the first ECU within at least one threshold period, and it is determined that the heartbeat of the first ECU is lost.
示例性的,所述第二ECU在3个周期内收不到所述第一ECU的心跳信息,则自动升级为主ECU,代替所述第一ECU执行所述代理服务。Exemplarily, if the second ECU fails to receive the heartbeat information of the first ECU within 3 cycles, it will automatically be upgraded to the primary ECU and perform the proxy service instead of the first ECU.
S701,所述第二ECU调用转发引擎提供的LSW控制接口,将所述LSW控制接口设置为自身对应的第二接口。S701: The second ECU calls the LSW control interface provided by the forwarding engine, and sets the LSW control interface as a second interface corresponding to itself.
S702,所述转发引擎根据所述第二ECU设置的第二接口对所述LSW进行更新。S702: The forwarding engine updates the LSW according to the second interface set by the second ECU.
S703,客户端向网关平台中的LSW发送代理服务报文。S703: The client sends a proxy service message to the LSW in the gateway platform.
S704,所述LSW将所述代理服务报文发送给所述转发引擎。S704. The LSW sends the proxy service message to the forwarding engine.
S705,所述转发引擎将接收到的所述代理服务报文发送给所述第二ECU。S705: The forwarding engine sends the received proxy service message to the second ECU.
其中,所述转发引擎通过所述第二ECU对应的第二接口,将所述代理服务报文通过所述第二接口发送给所述第二ECU。Wherein, the forwarding engine sends the proxy service message to the second ECU through the second interface through the second interface corresponding to the second ECU.
S706,所述第二ECU接收所述代理服务报文。S706: The second ECU receives the proxy service message.
S707,所述第二ECU在对接收到所述代理服务报文进行处理后,将处理结果通过所述第二接口发送给所述客户端。S707: After processing the received proxy service message, the second ECU sends the processing result to the client through the second interface.
需要说明的是,本申请实施例中并不限定上述图7中所述步骤的先后顺序,例如,所述S703可能在所述S700之前执行。It should be noted that the sequence of the steps in FIG. 7 is not limited in the embodiment of the present application. For example, the S703 may be executed before the S700.
代替方式2:所述第二ECU恢复与所述客户端进行通信的第二接口发送业务处理结果的功能。Alternative 2: The second ECU resumes the function of the second interface communicating with the client to send the service processing result.
示例性的,在所述代替方式2下,本申请实施例提供的另一种所述代理服务的流程,如图8所示:Exemplarily, in the alternative mode 2, the process of another proxy service provided by an embodiment of the present application is as shown in FIG. 8:
S800,客户端向网关平台中的LSW发送代理服务报文。S800: The client sends a proxy service message to the LSW in the gateway platform.
S801,所述LSW将所述代理服务报文发送给所述转发引擎。S801. The LSW sends the proxy service message to the forwarding engine.
S802,所述转发引擎将接收到的所述代理服务报文发送给所述第二ECU。S802: The forwarding engine sends the received proxy service message to the second ECU.
S803,所述转发引擎将接收到的所述代理服务报文发送给所述第一ECU。S803: The forwarding engine sends the received proxy service message to the first ECU.
其中,所述转发引擎进行一转多配置,即所述转发引擎通过所述第一ECU对应的第一接口,将所述业务报文通过所述第一接口发送给所述第一ECU,以及通过所述第二ECU对应的第二接口,将所述业务报文通过所述第二接口发送给所述第二ECU。Wherein, the forwarding engine performs one-to-multiple configuration, that is, the forwarding engine sends the service message to the first ECU through the first interface through the first interface corresponding to the first ECU, and The service message is sent to the second ECU through the second interface through the second interface corresponding to the second ECU.
S804,所述第二ECU接收所述代理服务报文。S804: The second ECU receives the proxy service message.
其中,因为在该场景下,所述第一ECU心跳丢失,所述第一ECU不会接收到来自所述客户端发送的代理服务报文。Wherein, because in this scenario, the heartbeat of the first ECU is lost, the first ECU will not receive the proxy service message sent from the client.
S805,第二ECU确定绑定的第一ECU心跳丢失。S805: The second ECU determines that the heartbeat of the bound first ECU is lost.
本申请实施例中一种可选的方式,所述第二ECU在至少一个阈值周期内没有接收到所述第一ECU的心跳,确定所述第一ECU心跳丢失。In an optional manner in the embodiment of the present application, the second ECU does not receive the heartbeat of the first ECU within at least one threshold period, and it is determined that the heartbeat of the first ECU is lost.
S806,所述第二ECU在对接收到所述代理服务报文进行处理后,将处理结果通过所述第二接口发送给所述客户端。S806: After processing the received proxy service message, the second ECU sends the processing result to the client through the second interface.
其中,在所述阶段二的场景下,所述第二ECU无法通过所述第二接口将所述处理结果发送给所述客户端,然而,在所述阶段三的场景下,所述第二ECU恢复与所述客户端进行通信的第二接口发送业务处理结果的功能。Wherein, in the scenario of the stage two, the second ECU cannot send the processing result to the client through the second interface. However, in the scenario of the stage three, the second ECU cannot send the processing result to the client. The ECU resumes the function of the second interface communicating with the client to send the service processing result.
需要说明的是,本申请实施例中并不限定上述图8中所述步骤的先后顺序,例如,所述S806可能在所述S800之前执行。It should be noted that the sequence of the steps described in FIG. 8 is not limited in the embodiment of the present application. For example, the S806 may be executed before the S800.
阶段四、故障恢复阶段Phase four, failure recovery phase
本申请实施例中,当所述第一ECU恢复心跳后,则重新发起携带高优先级的心跳。所述第一ECU所在分组中的其他ECU在接收到所述第一ECU发送的高优先级心跳信息后,失去执行所述代理服务功能,即重新按照所述阶段二进行执行。In the embodiment of the present application, after the first ECU recovers the heartbeat, it re-initiates the heartbeat carrying the high priority. After receiving the high-priority heartbeat information sent by the first ECU, other ECUs in the group where the first ECU is located lose the function of executing the proxy service, that is, execute again according to the second phase.
进一步的,本申请实施例中一种可选的方式,在分布式网关平台上,本申请实施例同样支持跨网关平台传输。Further, in an optional manner in the embodiment of the present application, on a distributed gateway platform, the embodiment of the present application also supports cross-gateway platform transmission.
示例性的,如图9所示,所述ECU1为主ECU,所述ECU1对应第一网关平台,所述第一网关平台包含ECU2,所述第二网关平台中包含ECU3,且所述ECU3为所述ECU1的备份ECU,所述第二网关平台对应客户端1。Exemplarily, as shown in FIG. 9, the ECU1 is the main ECU, the ECU1 corresponds to the first gateway platform, the first gateway platform includes ECU2, the second gateway platform includes ECU3, and the ECU3 is For the backup ECU of the ECU1, the second gateway platform corresponds to the client 1.
其中,所述第一网关平台与第二网关平台之间能够相互进行通信。当所述ECU1失去心跳时,则可以通过所述ECU1对应的ECU3代替所述ECU1为所述客户端1执行代理服务,详细执行方式与上述内容相同,为简洁描述,参见上述图4~图8的内容,在此不进行赘述。Wherein, the first gateway platform and the second gateway platform can communicate with each other. When the ECU1 loses the heartbeat, the ECU3 corresponding to the ECU1 can be used to replace the ECU1 to execute the proxy service for the client 1. The detailed execution method is the same as the above content. For a brief description, please refer to the above figures 4 to 8 The content of this will not be repeated here.
通过上述对本申请方案的介绍,可以理解的是,上述实现各设备为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本发明能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Through the above introduction of the solution of the present application, it can be understood that, in order to realize the above functions, the above-mentioned realization devices include hardware structures and/or software modules corresponding to the respective functions. Those skilled in the art should easily realize that in combination with the units and algorithm steps of the examples described in the embodiments disclosed herein, the present invention can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software-driven hardware depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered as going beyond the scope of the present invention.
基于以上实施例,如图10所示,本申请一种代理服务装置,该装置可以是ECU,所述ECU包括处理器1000、存储器1001和通信接口1002。Based on the above embodiment, as shown in FIG. 10, an agent service device of the present application may be an ECU, and the ECU includes a processor 1000, a memory 1001, and a communication interface 1002.
处理器1000负责管理总线架构和通常的处理,存储器1001可以存储处理器1000在执行操作时所使用的数据。收发机通信接口1002用于在处理器1000的控制下接收和发送数据与存储器1001进行数据通信。The processor 1000 is responsible for managing the bus architecture and general processing, and the memory 1001 can store data used by the processor 1000 when performing operations. The transceiver communication interface 1002 is used to receive and send data under the control of the processor 1000 for data communication with the memory 1001.
所述处理器1000可以是中央处理器(central processing unit,CPU),网络处理器(network processor,NP)或者CPU和NP的组合。所述处理器1000还可以进一步包括硬件芯片。上述硬件芯片可以是专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(complex programmable logic device,CPLD),现场可编程逻辑门阵列(field-programmable gate array,FPGA),通用阵列逻辑(generic array logic,GAL)或其任意组合。存储器1001可以包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The processor 1000 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP. The processor 1000 may further include a hardware chip. The above-mentioned hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above-mentioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. The memory 1001 may include: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program codes.
所述处理器1000、所述存储器1001以及所述通信接口1002之间相互连接。可选的,所述处理器1000、所述存储器1001以及所述通信接口1002可以通过总线1003相互连接;所述总线1003可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended industry standard architecture,EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图10中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The processor 1000, the memory 1001, and the communication interface 1002 are connected to each other. Optionally, the processor 1000, the memory 1001, and the communication interface 1002 may be connected to each other through a bus 1003; the bus 1003 may be a peripheral component interconnect (PCI) bus or an extended industry Standard structure (extended industry standard architecture, EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, and so on. For ease of representation, only one thick line is used to represent in FIG. 10, but it does not mean that there is only one bus or one type of bus.
具体地,所述处理器1000,用于读取存储器1001中的程序并执行如图4所示的S400-S401中ECU执行的方法流程;或如图5所示的S500-S506中ECU执行的方法流程;或如图6所示的S600-S607中ECU执行的方法流程;或如图7所示的S700-S707中ECU执行的方法流程;或如图8所示的S800-S806中ECU执行的方法流程。Specifically, the processor 1000 is configured to read the program in the memory 1001 and execute the method flow executed by the ECU in S400-S401 as shown in FIG. 4; or the process executed by the ECU in S500-S506 as shown in FIG. Method flow; or method flow executed by ECU in S600-S607 as shown in Figure 6; or method flow executed by ECU in S700-S707 as shown in Figure 7; or executed by ECU in S800-S806 as shown in Figure 8 Method flow.
如图11所示,本发明提供一种代理服务装置,该装置包括处理单元1100和通信单元1101,其中,所述处理单元1100与所述通信单元1101用于执行以下内容:As shown in FIG. 11, the present invention provides a proxy service device, which includes a processing unit 1100 and a communication unit 1101, wherein the processing unit 1100 and the communication unit 1101 are configured to execute the following content:
处理单元1100:用于确定绑定的第一ECU心跳丢失;Processing unit 1100: used to determine that the heartbeat of the bound first ECU is lost;
通信单元1101:用于通过与客户端进行通信的第二接口为所述客户端提供代理服务, 其中,所述第二ECU的优先级低于所述第一ECU的优先级。The communication unit 1101 is configured to provide a proxy service for the client through a second interface for communicating with the client, wherein the priority of the second ECU is lower than the priority of the first ECU.
上述图11所示的处理单元1100和通信单元1101的功能可以由处理器1000读取存储器1001中的程序执行,或者由处理器1000单独执行。The functions of the processing unit 1100 and the communication unit 1101 shown in FIG. 11 may be executed by the processor 1000 reading a program in the memory 1001, or executed by the processor 1000 alone.
可选地,当所述终端设备运行时,所述处理单元1100以及所述通信单元1101可以执行如图4所示的S400-S401中ECU执行的方法流程;或如图5所示的S500-S506中ECU执行的方法流程;或如图6所示的S600-S607中ECU执行的方法流程;或如图7所示的S700-S707中ECU执行的方法流程;或如图8所示的S800-S806中ECU执行的方法流程。Optionally, when the terminal device is running, the processing unit 1100 and the communication unit 1101 may execute the method flow executed by the ECU in S400-S401 as shown in FIG. 4; or S500- as shown in FIG. The method flow executed by ECU in S506; or the method flow executed by ECU in S600-S607 as shown in FIG. 6; or the method flow executed by ECU in S700-S707 as shown in FIG. 7; or S800 as shown in FIG. -The flow of the method executed by the ECU in S806.
需要说明的是,所述通信单元1101可以包含不同的通信单元,分别对应不同的通信接口。It should be noted that the communication unit 1101 may include different communication units corresponding to different communication interfaces.
关于本申请提供的终端设备的功能或者执行的操作的详细描述可以参考本申请方法实施例中ECU执行的步骤,在此不做赘述。For a detailed description of the functions or operations performed by the terminal device provided in the present application, reference may be made to the steps performed by the ECU in the method embodiment of the present application, which will not be repeated here.
在一些可能的实施方式中,本发明实施例提供的代理服务方法的各个方面还可以实现为一种程序产品的形式,其包括程序代码,当所述程序代码在计算机设备上运行时,所述程序代码用于使所述计算机设备执行本说明书中描述的根据本发明各种示例性实施方式的代理服务方法中的步骤。In some possible implementation manners, various aspects of the proxy service method provided by the embodiments of the present invention may also be implemented in the form of a program product, which includes program code. When the program code runs on a computer device, the The program code is used to make the computer device execute the steps in the proxy service method according to various exemplary embodiments of the present invention described in this specification.
所述程序产品可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的***、装置或器件,或者任意以上的组合。可读存储介质的更本申请实施例一种实现方式中例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。The program product can use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above. Modifications of the readable storage medium. Examples (non-exhaustive list) in one implementation of the embodiments of the present application include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read-only Memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
根据本发明的实施方式的用于通信的程序产品,其可以采用便携式紧凑盘只读存储器(CD-ROM)并包括程序代码,并可以在服务器设备上运行。然而,本发明的程序产品不限于此,在本文件中,可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被消息传输、装置或者器件使用或者与其结合使用。The program product for communication according to the embodiment of the present invention may adopt a portable compact disk read-only memory (CD-ROM) and include program code, and may run on a server device. However, the program product of the present invention is not limited to this. In this document, the readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with message transmission, devices, or devices.
可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了可读程序代码。这种传播的数据信号可以采用多种形式,包括——但不限于——电磁信号、光信号或上述的任意合适的组合。可读信号介质还可以是可读存储介质以外的任何可读介质,该可读介质可以发送、传播或者传输用于由周期网络动作***、装置或者器件使用或者与其结合使用的程序。The readable signal medium may include a data signal propagated in baseband or as a part of a carrier wave, and readable program code is carried therein. This propagated data signal can take many forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the foregoing. The readable signal medium may also be any readable medium other than a readable storage medium, and the readable medium may send, propagate, or transmit a program for use by or in combination with a periodic network action system, apparatus, or device.
可读介质上包含的程序代码可以用任何适当的介质传输,包括——但不限于——无线、有线、光缆、RF等,或者上述的任意合适的组合。The program code contained on the readable medium can be transmitted by any suitable medium, including, but not limited to, wireless, wired, optical cable, RF, etc., or any suitable combination of the above.
可以以一种或多种程序设计语言的任意组合来编写用于执行本发明操作的程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、C++等,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络——包括局域网(LAN)或 广域网(WAN)—连接到用户计算设备,或者,可以连接到外部计算设备。The program code used to perform the operations of the present invention can be written in any combination of one or more programming languages. The programming languages include object-oriented programming languages—such as Java, C++, etc., as well as conventional procedural styles. Programming language-such as "C" language or similar programming language. The program code can be executed entirely on the user's computing device, partly on the user's device, executed as an independent software package, partly on the user's computing device and partly executed on the remote computing device, or entirely on the remote computing device or server Executed on. In the case of a remote computing device, the remote computing device may be connected to a user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device.
本申请实施例针对代理服务方法还提供一种计算设备可读存储介质,即断电后内容不丢失。该存储介质中存储软件程序,包括程序代码,当所述程序代码在计算设备上运行时,该软件程序在被一个或多个处理器读取并执行时可实现本申请实施例上面任何一种通信的方案。The embodiment of the present application further provides a computing device readable storage medium for the proxy service method, that is, the content is not lost after the power is off. The storage medium stores a software program, including program code. When the program code runs on a computing device, the software program can implement any of the above embodiments of the present application when it is read and executed by one or more processors. Communication scheme.
以上参照示出根据本申请实施例的方法、装置(***)和/或计算机程序产品的框图和/或流程图描述本申请。应理解,可以通过计算机程序指令来实现框图和/或流程图示图的一个块以及框图和/或流程图示图的块的组合。可以将这些计算机程序指令提供给通用计算机、专用计算机的处理器和/或其它可编程数据处理装置,以产生机器,使得经由计算机处理器和/或其它可编程数据处理装置执行的指令创建用于实现框图和/或流程图块中所指定的功能/动作的方法。The foregoing describes the present application with reference to block diagrams and/or flowcharts illustrating methods, devices (systems) and/or computer program products according to embodiments of the present application. It should be understood that one block of the block diagram and/or flowchart diagram and a combination of the blocks in the block diagram and/or flowchart diagram can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, and/or other programmable data processing devices to produce a machine, so that the instructions executed via the computer processor and/or other programmable data processing device are created for A method of implementing the functions/actions specified in the block diagrams and/or flowchart blocks.
相应地,还可以用硬件和/或软件(包括固件、驻留软件、微码等)来实施本申请。更进一步地,本申请可以采取计算机可使用或计算机可读存储介质上的计算机程序产品的形式,其具有在介质中实现的计算机可使用或计算机可读程序代码,以由指令执行***来使用或结合指令执行***而使用。在本申请上下文中,计算机可使用或计算机可读介质可以是任意介质,其可以包含、存储、通信、传输、或传送程序,以由指令执行***、装置或设备使用,或结合指令执行***、装置或设备使用。Correspondingly, hardware and/or software (including firmware, resident software, microcode, etc.) can also be used to implement this application. Furthermore, this application may take the form of a computer program product on a computer-usable or computer-readable storage medium, which has a computer-usable or computer-readable program code implemented in the medium to be used or used by the instruction execution system. Used in conjunction with the instruction execution system. In the context of this application, a computer-usable or computer-readable medium can be any medium that can contain, store, communicate, transmit, or transmit a program for use by an instruction execution system, apparatus, or device, or in combination with an instruction execution system, Device or equipment use.
尽管结合具体特征及其实施例对本申请进行了描述,显而易见的,在不脱离本申请的精神和范围的情况下,可对其进行各种修改和组合。相应地,本说明书和附图仅仅是所附权利要求所界定的本申请的示例性说明,且视为已覆盖本申请范围内的任意和所有修改、变化、组合或等同物。显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包括这些改动和变型在内。Although the application has been described in combination with specific features and embodiments, it is obvious that various modifications and combinations can be made without departing from the spirit and scope of the application. Correspondingly, the specification and drawings are merely exemplary descriptions of the application as defined by the appended claims, and are deemed to cover any and all modifications, changes, combinations or equivalents within the scope of the application. Obviously, those skilled in the art can make various changes and modifications to the application without departing from the scope of the application. In this way, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalent technologies, this application is also intended to include these modifications and variations.

Claims (31)

  1. 一种代理服务方法,其特征在于,包括:A proxy service method, characterized in that it includes:
    网关平台中的第二电子控制单元ECU确定绑定的第一ECU心跳丢失;The second electronic control unit ECU in the gateway platform determines that the heartbeat of the bound first ECU is lost;
    所述第二ECU通过与客户端进行通信的第二接口为所述客户端提供代理服务;The second ECU provides a proxy service for the client through a second interface for communicating with the client;
    其中,所述第二ECU的优先级低于所述第一ECU的优先级。Wherein, the priority of the second ECU is lower than the priority of the first ECU.
  2. 如权利要求1所述的方法,其特征在于,所述第二ECU通过下列方式确定绑定的所述第一ECU心跳丢失,包括:The method of claim 1, wherein the second ECU determines that the heartbeat of the bound first ECU is lost in the following manner, comprising:
    所述第二ECU在至少一个阈值周期内没有接收到所述第一ECU的心跳,确定所述第一ECU心跳丢失。If the second ECU does not receive the heartbeat of the first ECU within at least one threshold period, it is determined that the heartbeat of the first ECU is lost.
  3. 如权利要求1或2所述的方法,其特征在于,所述第二ECU通过与客户端进行通信的第二接口为所述客户端提供代理服务之前,还包括:The method according to claim 1 or 2, characterized in that before the second ECU provides proxy services for the client through a second interface for communicating with the client, the method further comprises:
    所述第二ECU将与所述客户端进行通信的接口更新为自身对应的所述第二接口。The second ECU updates the interface for communicating with the client to the second interface corresponding to itself.
  4. 如权利要求3所述的方法,其特征在于,所述第二ECU将与所述客户端进行通信的接口更新为自身对应的第二接口,包括:The method according to claim 3, wherein the second ECU updating the interface for communicating with the client to the second interface corresponding to itself comprises:
    所述第二ECU调用所述网关平台提供的局域网交换机LSW接口,将所述LSW接口由所述第一ECU对应的第一接口,更新为自身对应的第二接口。The second ECU invokes the LSW interface of the LAN switch provided by the gateway platform, and updates the LSW interface from the first interface corresponding to the first ECU to the second interface corresponding to itself.
  5. 如权利要求1或2所述的方法,其特征在于,所述第二ECU通过与客户端进行通信的第二接口为所述客户端提供代理服务之前,还包括:The method according to claim 1 or 2, characterized in that before the second ECU provides proxy services for the client through a second interface for communicating with the client, the method further comprises:
    所述第二ECU通过与所述客户端进行通信的第二接口,接收所述客户端发送的代理服务报文。The second ECU receives the proxy service message sent by the client through a second interface for communicating with the client.
  6. 如权利要求5所述的方法,其特征在于,所述第二ECU通过与所述客户端进行通信的第二接口,接收所述客户端发送的代理服务报文之后,还包括:The method according to claim 5, wherein after the second ECU receives the proxy service message sent by the client through the second interface for communicating with the client, the method further comprises:
    所述第二ECU在确定所述第一ECU具有心跳时,不向所述客户端发送所述代理服务报文的业务处理结果。When the second ECU determines that the first ECU has a heartbeat, it does not send the service processing result of the proxy service message to the client.
  7. 如权利要求3~6任一项所述的方法,其特征在于,所述第二ECU通过与所述客户端进行通信的第二接口为所述客户端提供代理服务,包括:The method according to any one of claims 3 to 6, wherein the second ECU provides a proxy service for the client through a second interface for communicating with the client, comprising:
    所述第二ECU对获取到的所述代理服务报文进行业务处理;The second ECU performs business processing on the acquired proxy service message;
    所述第二ECU将所述业务处理结果通知给所述客户端。The second ECU notifies the client of the service processing result.
  8. 如权利要求1~7任一项所述的方法,其特征在于,所述第二ECU通过所述第二接口为所述客户端提供代理服务之前,还包括:The method according to any one of claims 1 to 7, wherein before the second ECU provides proxy services for the client through the second interface, the method further comprises:
    所述第二ECU从所述第一ECU周期性发送的心跳信息中获取所述第一ECU的虚拟IP;The second ECU obtains the virtual IP of the first ECU from the heartbeat information periodically sent by the first ECU;
    所述第二ECU将自身IP修改为所述第一ECU的虚拟IP。The second ECU modifies its own IP to the virtual IP of the first ECU.
  9. 如权利要求1~8任一项所述的方法,其特征在于,所述第二ECU位于所述第一ECU对应的第一网关平台中;或所述第二ECU位于与所述第一网关平台具有通信传输功能的第二网关平台中。The method according to any one of claims 1 to 8, wherein the second ECU is located in a first gateway platform corresponding to the first ECU; or the second ECU is located in a first gateway platform corresponding to the first ECU; The platform has a second gateway platform with communication transmission function.
  10. 如权利要求1~9任一项所述的方法,其特征在于,所述第一ECU为具有执行所述代理服务功能的传感器或执行器。The method according to any one of claims 1-9, wherein the first ECU is a sensor or an actuator having a function of executing the proxy service.
  11. 如权利要求1~10任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 10, wherein the method further comprises:
    当所述第一ECU心跳恢复后,所述第二ECU失去为客户端提供代理服务的功能。When the heartbeat of the first ECU recovers, the second ECU loses the function of providing proxy services for the client.
  12. 如权利要求1~11任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 11, wherein the method further comprises:
    所述第二ECU与所述第一ECU具有相同的组标识ID。The second ECU and the first ECU have the same group identification ID.
  13. 如权利要求1~12任一项所述的方法,其特征在于,所述第二ECU通过下列方式确定自身优先级低于所述第一ECU的优先级:The method according to any one of claims 1 to 12, wherein the second ECU determines that its own priority is lower than the priority of the first ECU in the following manner:
    所述第二ECU周期性向所述第一ECU发送携带自身优先级的心跳信息,以及周期性接收来自所述第一ECU发送的携带所述第一ECU优先级的心跳信息;The second ECU periodically sends heartbeat information carrying its own priority to the first ECU, and periodically receives heartbeat information carrying the priority of the first ECU sent from the first ECU;
    所述第二ECU根据所述第一ECU发送的携带所述第一ECU优先级的心跳信息,确定所述第一ECU的优先级;The second ECU determines the priority of the first ECU according to the heartbeat information sent by the first ECU and carrying the priority of the first ECU;
    所述第二ECU根据自身优先级与所述第一ECU的优先级的比较结果,确定自身优先级低于所述第一ECU的优先级。The second ECU determines that its own priority is lower than the priority of the first ECU according to a comparison result of its own priority and the priority of the first ECU.
  14. 如权利要求13所述的方法,其特征在于,所述第二ECU确定自身优先级低于所述第一ECU的优先级之后,还包括:The method according to claim 13, wherein after the second ECU determines that its own priority is lower than the priority of the first ECU, the method further comprises:
    所述第二ECU停止向所述第一ECU发送携带自身优先级的心跳信息。The second ECU stops sending heartbeat information carrying its own priority to the first ECU.
  15. 一种ECU,其特征在于,包括:处理单元和通信单元;An ECU characterized by comprising: a processing unit and a communication unit;
    所述处理单元,用于确定绑定的第一ECU心跳丢失;The processing unit is used to determine that the heartbeat of the bound first ECU is lost;
    所述通信单元,用于通过与客户端进行通信的第二接口为所述客户端提供代理服务;其中,所述第二ECU的优先级低于所述第一ECU的优先级。The communication unit is configured to provide a proxy service for the client through a second interface for communicating with the client; wherein the priority of the second ECU is lower than the priority of the first ECU.
  16. 如权利要求15所述的ECU,其特征在于,所述处理单元具体用于:The ECU according to claim 15, wherein the processing unit is specifically configured to:
    在至少一个阈值周期内没有接收到所述第一ECU的心跳,确定所述第一ECU心跳丢失。If the heartbeat of the first ECU is not received within at least one threshold period, it is determined that the heartbeat of the first ECU is lost.
  17. 如权利要求15或16所述的ECU,其特征在于,所述处理单元还用于:The ECU according to claim 15 or 16, wherein the processing unit is further used for:
    将与所述客户端进行通信的接口更新为自身对应的所述第二接口。The interface for communicating with the client is updated to the second interface corresponding to itself.
  18. 如权利要求17所述的ECU,其特征在于,所述通信单元还用于:The ECU according to claim 17, wherein the communication unit is further used for:
    通过与所述客户端进行通信的第二接口,接收所述客户端发送的代理服务报文。Receive the proxy service message sent by the client through the second interface for communicating with the client.
  19. 如权利要求18所述的ECU,其特征在于,所述处理单元还用于:The ECU according to claim 18, wherein the processing unit is further used for:
    在确定所述第一ECU具有心跳时,不向所述客户端发送所述代理服务报文的业务处理结果。When it is determined that the first ECU has a heartbeat, the service processing result of the proxy service message is not sent to the client.
  20. 如权利要求17~19任一项所述的ECU,其特征在于,所述处理单元还用于:The ECU according to any one of claims 17 to 19, wherein the processing unit is further configured to:
    从所述第一ECU周期性发送的心跳信息中获取所述第一ECU的虚拟IP;所述第二ECU将自身IP修改为所述第一ECU的虚拟IP。The virtual IP of the first ECU is acquired from the heartbeat information periodically sent by the first ECU; the second ECU modifies its own IP to the virtual IP of the first ECU.
  21. 如权利要求15~20任一项所述的ECU,其特征在于,所述第二ECU位于所述第一ECU对应的第一网关平台中;或所述第二ECU位于与所述第一网关平台具有通信传输功能的第二网关平台中。The ECU according to any one of claims 15 to 20, wherein the second ECU is located in a first gateway platform corresponding to the first ECU; or the second ECU is located in the same way as the first gateway. The platform has a second gateway platform with communication transmission function.
  22. 如权利要求15~21任一项所述的ECU,其特征在于,所述第一ECU为具有执行所述代理服务功能的传感器或执行器。The ECU according to any one of claims 15 to 21, wherein the first ECU is a sensor or an actuator having a function of executing the proxy service.
  23. 如权利要求15~22任一项所述的ECU,其特征在于,所述处理单元还用于:The ECU according to any one of claims 15-22, wherein the processing unit is further configured to:
    当所述第一ECU心跳恢复后,所述第二ECU失去为客户端提供代理服务的功能。When the heartbeat of the first ECU recovers, the second ECU loses the function of providing proxy services for the client.
  24. 如权利要求15~23任一项所述的ECU,其特征在于,所述处理单元还用于:The ECU according to any one of claims 15 to 23, wherein the processing unit is further configured to:
    与所述第一ECU具有相同的组标识ID。It has the same group identification ID as the first ECU.
  25. 如权利要求15~24任一项所述的ECU,其特征在于,所述处理单元具体用于:The ECU according to any one of claims 15 to 24, wherein the processing unit is specifically configured to:
    周期性向所述第一ECU发送携带自身优先级的心跳信息,以及周期性接收来自所述第一ECU发送的携带所述第一ECU优先级的心跳信息;Periodically sending the heartbeat information carrying the priority of the first ECU to the first ECU, and periodically receiving the heartbeat information carrying the priority of the first ECU sent from the first ECU;
    根据所述第一ECU发送的携带所述第一ECU优先级的心跳信息,确定所述第一ECU的优先级;Determine the priority of the first ECU according to the heartbeat information sent by the first ECU and carrying the priority of the first ECU;
    根据自身优先级与所述第一ECU的优先级的比较结果,确定自身优先级低于所述第一ECU的优先级。According to the comparison result of the own priority and the priority of the first ECU, it is determined that the own priority is lower than the priority of the first ECU.
  26. 如权利要求25所述的ECU,其特征在于,所述处理单元还用于:The ECU according to claim 25, wherein the processing unit is further used for:
    停止向所述第一ECU发送携带自身优先级的心跳信息。Stop sending heartbeat information carrying its own priority to the first ECU.
  27. 一种ECU,其特征在于,包括:处理器、通信接口和存储器;An ECU, which is characterized by comprising: a processor, a communication interface and a memory;
    所述存储器,用于存储程序指令;The memory is used to store program instructions;
    所述处理器,用于通过调用所述存储器存储的程序指令,通过所述通信接口执行如权利要求1~14中任一项所述的方法。The processor is configured to execute the method according to any one of claims 1 to 14 through the communication interface by calling program instructions stored in the memory.
  28. 一种代理服务***,其特征在于,包括第一ECU以及位于网关平台的与所述第一ECU对应的至少一个第二ECU;其中,所述网关平台上还设置有与客户端以及所述第一ECU进行通信转发引擎;A proxy service system, characterized in that it comprises a first ECU and at least one second ECU corresponding to the first ECU located on a gateway platform; wherein the gateway platform is also provided with a client and the first ECU. An ECU carries out a communication forwarding engine;
    所述第一ECU,用于在具有心跳时,通过所述转发引擎为所述客户端提供代理服务;The first ECU is configured to provide proxy services for the client through the forwarding engine when there is a heartbeat;
    所述第二ECU,用于通过所述第一接口监听所述服务代理的第一ECU的心跳;以及,在所述第一ECU心跳丢失时,通过所述转发引擎为所述客户端提供代理服务。The second ECU is configured to monitor the heartbeat of the first ECU of the service agent through the first interface; and, when the heartbeat of the first ECU is lost, provide an agent for the client through the forwarding engine service.
  29. 如权利要求28所述的***,其特征在于,在所述第一ECU心跳丢失时,若所述第一ECU对应一个第二ECU,所述***中所述第二ECU代替所述第一ECU,通过所述转发引擎为所述客户端提供代理服务;The system of claim 28, wherein when the heartbeat of the first ECU is lost, if the first ECU corresponds to a second ECU, the second ECU in the system replaces the first ECU , Providing a proxy service for the client through the forwarding engine;
    在所述第一ECU心跳丢失时,若所述第一ECU对应多个第二ECU时,所述***中所述第二ECU中优先级最高的第二ECU代替所述第一ECU,通过所述转发引擎为所述客户端提供代理服务。When the heartbeat of the first ECU is lost, if the first ECU corresponds to multiple second ECUs, the second ECU with the highest priority among the second ECUs in the system replaces the first ECU and passes all The forwarding engine provides proxy services for the client.
  30. 一种计算机可读存储介质,其特征在于,包括计算机指令,当所述计算机指令在第二ECU上运行时,使得所述第二ECU执行如权利要求1~14中任一所述的方法。A computer-readable storage medium, characterized by comprising computer instructions, when the computer instructions are executed on a second ECU, the second ECU is caused to execute the method according to any one of claims 1-14.
  31. 一种计算机程序产品,其特征在于,所述计算机程序产品包括计算机指令,当所述计算机指令被代理服务装置执行时,使得所述代理服务装置执行如权利要求1~14中任一项所述的方法。A computer program product, characterized in that the computer program product includes computer instructions, and when the computer instructions are executed by an agent service device, the agent service device executes any one of claims 1 to 14 Methods.
PCT/CN2021/088733 2020-04-26 2021-04-21 Proxy service method, device and system WO2021218741A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010339347.4A CN113556373B (en) 2020-04-26 2020-04-26 Proxy service method, device and system
CN202010339347.4 2020-04-26

Publications (1)

Publication Number Publication Date
WO2021218741A1 true WO2021218741A1 (en) 2021-11-04

Family

ID=78101547

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/088733 WO2021218741A1 (en) 2020-04-26 2021-04-21 Proxy service method, device and system

Country Status (2)

Country Link
CN (1) CN113556373B (en)
WO (1) WO2021218741A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105822433A (en) * 2016-03-11 2016-08-03 奇瑞汽车股份有限公司 Aero engine redundant ECU controller and control method thereof
US20180212977A1 (en) * 2017-01-25 2018-07-26 Toyota Jidosha Kabushiki Kaisha In-vehicle network system
CN109162818A (en) * 2018-10-31 2019-01-08 潍柴动力股份有限公司 A kind of control system of engine, control method and engine
CN110214312A (en) * 2017-01-24 2019-09-06 三菱电机株式会社 Shared stand-by unit and control system
US10606796B2 (en) * 2016-10-25 2020-03-31 Toyota Jidosha Kabushiki Kaisha On-board network system, communication control method in the on-board network system, and on-board gateway

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5502372B2 (en) * 2009-06-05 2014-05-28 トヨタ自動車株式会社 In-vehicle electronic system
CN103744809B (en) * 2013-12-23 2016-10-05 天泽信息产业股份有限公司 Vehicle information management system double hot standby method based on VRRP
WO2018065973A1 (en) * 2016-10-06 2018-04-12 Red Bend Ltd. Systems and methods for handling a vehicle ecu malfunction
CN109229102A (en) * 2017-07-04 2019-01-18 百度在线网络技术(北京)有限公司 Automatic driving vehicle control system, method and apparatus
CN110474797B (en) * 2019-07-25 2022-07-26 北京旷视科技有限公司 API service system, and method and device for switching between main and standby

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105822433A (en) * 2016-03-11 2016-08-03 奇瑞汽车股份有限公司 Aero engine redundant ECU controller and control method thereof
US10606796B2 (en) * 2016-10-25 2020-03-31 Toyota Jidosha Kabushiki Kaisha On-board network system, communication control method in the on-board network system, and on-board gateway
CN110214312A (en) * 2017-01-24 2019-09-06 三菱电机株式会社 Shared stand-by unit and control system
US20180212977A1 (en) * 2017-01-25 2018-07-26 Toyota Jidosha Kabushiki Kaisha In-vehicle network system
CN109162818A (en) * 2018-10-31 2019-01-08 潍柴动力股份有限公司 A kind of control system of engine, control method and engine

Also Published As

Publication number Publication date
CN113556373B (en) 2023-06-02
CN113556373A (en) 2021-10-26

Similar Documents

Publication Publication Date Title
US8533728B2 (en) Resource tracking method and apparatus
WO2017113231A1 (en) Packet transmission method, device and system
US20120320918A1 (en) Bridge port between hardware lan and virtual switch
WO2021129008A1 (en) Service invocation method, apparatus and device, and medium
CN103973578A (en) Virtual machine traffic redirection method and device
CN109246720B (en) Method and terminal for determining establishment cause
CN113765801B (en) Message processing method and device applied to data center, electronic equipment and medium
WO2021218741A1 (en) Proxy service method, device and system
US9906435B2 (en) Method and apparatus for determining intermediate routing node and system
EP3361711A1 (en) Method for synchronizing a service between a service provider and a service consumer and system
US10819780B2 (en) Protected data collection in a multi-node network
CN111385211B (en) SpaceWire bus-based routing communication method and network equipment
CN109660458B (en) Routing method and device
US9647881B2 (en) Managing a network connection of a switch
CN108600073B (en) Dynamic tunnel establishment method and device
CN108574587B (en) Capacity updating method and device for distributed equipment
CN106803804B (en) Method and device for transmitting message
CN113261249A (en) Data transmission method, related equipment and computer storage medium
JP2011188623A (en) Safety control system
KR101880828B1 (en) Method and system for virtualized network entity (vne) based network operations support systems(noss)
CN107454021B (en) Communication method and device
CN117499318B (en) Cloud computing virtual network system, and use method, device, equipment and medium thereof
CN113542097B (en) Server deployment method and device, electronic equipment, storage medium and product
CN115225708B (en) Message forwarding method computer equipment and storage medium
JP7367873B2 (en) Data nodes, data node management methods, and data node management programs

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21797374

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21797374

Country of ref document: EP

Kind code of ref document: A1