Multi-controller communication method, device and equipment based on Ethernet and storage medium

By adopting the multi-controller communication method based on Ethernet in the vehicle controller, the problem of insufficient CAN bandwidth is solved, the communication between controllers is modularized and simplified, the data transmission efficiency is improved, and the communication complexity is solved. .

CN118659944APending Publication Date: 2024-09-17DONGFENG MOTOR GRP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410724263.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-05
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

When existing vehicle controllers exchange information through CAN, the low bandwidth cannot meet the growing demand for data transmission, especially in smart driving, audio-visual entertainment and vehicle OTA functions. Moreover, multi-controller communication lacks a unified and complete solution, resulting in communication Complex.

Method used

Adopting a multi-controller communication method based on Ethernet, by detecting the connection between the server and the client, receiving and processing communication information, and determining the sending target of communication information based on the preset address and target address, achieving modularization and simplification of communication and reducing protocols Waste of resources and bandwidth.

Benefits of technology

Through the above method, the modularization and simplification of communication between controllers are realized to a certain extent, the phenomenon of complicated communication is solved, the bandwidth utilization is improved, and the waste of resources is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118659944A
    Figure CN118659944A
Patent Text Reader

Abstract

The invention discloses a multi-controller communication method, device and equipment based on the Ethernet and a storage medium, and relates to the technical field of controller local area networks, and the multi-controller communication method based on the Ethernet comprises the steps: receiving communication information sent by a source client when it is detected that a server is connected with the source client; determining an address judgment result according to a preset address and a target address corresponding to the communication information; and when the address judgment result is that the target address is different from the preset address, sending the communication information to a target client corresponding to the target address. Through the multi-controller communication method based on the Ethernet, modularization and simplification of communication are realized to a certain extent, waste of protocol resources and bandwidth is reduced, and the problem of complicated communication among the controllers is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of controller area network technology, and in particular to a multi-controller communication method, device, equipment and storage medium based on Ethernet. Background Art

[0002] At present, vehicle controllers exchange information through CAN, which is also called controller area network. It is a serial communication protocol bus designed for real-time applications. The CAN bus has a fatal disadvantage, namely low bandwidth. The physical layer logic level of the CAN bus is divided into high-speed ISO 11898 standard (125kbps to 1Mbps) and low-speed ISO 11519 standard (10kbps to 125kbps), and the theoretical maximum is no more than 1Mbps. This low bandwidth can no longer meet the growing data transmission needs of automobiles, especially in functions such as intelligent driving, audio and video entertainment, and vehicle OTA. Ethernet is a solution to low bandwidth. Its bandwidth can reach 1000Mbps, which is 1000 times that of CAN, but the use of Ethernet is not yet mature and standardized. Taking a certain car as an example, although the application of in-vehicle Ethernet has increased the bandwidth of the vehicle network, there is still no unified and complete solution for multi-controller communication. Generally, access to Ethernet is often temporarily increased according to the needs of the current project. For example, the FAPA of the G59 controller of a certain model needs to perform vehicle OTA, so a network cable communication is added between IVI and FAPA, and there is no protocol specification for communication. Over time, the vehicle Ethernet solution will become very messy. Therefore, how to solve the complicated communication between controllers has become a technical problem that needs to be solved urgently. Summary of the invention

[0003] The main purpose of the present application is to provide a multi-controller communication method, device, equipment and storage medium based on Ethernet, aiming to solve the technical problem of complicated communication between controllers.

[0004] To achieve the above object, the present application proposes a multi-controller communication method based on Ethernet, and the multi-controller communication method based on Ethernet includes:

[0005] When detecting that the server is connected to the source client, receiving communication information sent by the source client;

[0006] Determine an address determination result according to a preset address and a target address corresponding to the communication information;

[0007] When the address determination result is that the target address and the preset address are different, the communication information is sent to a target client corresponding to the target address.

[0008] In one embodiment, when detecting that the server is connected to the source client, before receiving the communication information sent by the source client, the method further includes:

[0009] Determine the decrypted authentication information based on the server private key and the authentication information sent by the source client;

[0010] Determine the target information according to the source client public key and the decrypted authentication information, and send the target information to the source client;

[0011] When the handshake information sent by the source client is received, it is determined that the server has been connected to the source client.

[0012] In one embodiment, when the address determination result is that the target address and the preset address are different, sending the communication information to the target client corresponding to the target address includes:

[0013] When the address determination result is that the target address and the preset address are different, determining a corresponding target client according to the target address;

[0014] When the target client is online, determining a corresponding information encryption state according to the communication information;

[0015] When the information encryption state is that the information is not encrypted, the communication information is sent to the target client.

[0016] In one embodiment, when the target client is online, before determining the corresponding information encryption state according to the communication information, the method further includes:

[0017] When it is detected that the server is connected to the target client, determining the information monitoring result of the target client according to a preset time;

[0018] When the information monitoring result is that the heartbeat information sent by the target client is received within the preset time, it is determined that the target client is in an online state.

[0019] In one embodiment, when the target client is online, after determining the corresponding information encryption state according to the communication information, the method further includes:

[0020] When the information encryption state is that the information has been encrypted, determining the decrypted communication information according to the server private key and the communication information;

[0021] The target encrypted information is determined according to the public key corresponding to the target client and the decrypted communication information, and the target encrypted information is sent to the target client.

[0022] In one embodiment, after determining the address determination result according to the preset address and the target address corresponding to the communication information, the method further includes:

[0023] When the address determination result is that the target address and the preset address are the same, determining the processed communication information according to the communication information;

[0024] Send the processed communication information to the source client.

[0025] In one embodiment, when the server is connected to the source client, before receiving the communication information sent by the source client, the method further includes:

[0026] Get header and tail information, source address, destination address, encryption identifier, payload information, and payload length;

[0027] Determine initial checksum information according to the target address, the encryption identifier and the load length;

[0028] Communication information is obtained according to the header and tail information, the target address, the encryption identifier, the load length, the initial checksum information, the source address and the load information.

[0029] In addition, to achieve the above-mentioned purpose, the present application also proposes a multi-controller communication device based on Ethernet, and the multi-controller communication device based on Ethernet includes:

[0030] A receiving module, used for receiving communication information sent by the source client when detecting that the server is connected to the source client;

[0031] A judgment module, used to determine an address judgment result according to a preset address and a target address corresponding to the communication information;

[0032] The communication module is used to send the communication information to a target client corresponding to the target address when the address determination result is that the target address is different from the preset address.

[0033] In addition, to achieve the above-mentioned purpose, the present application also proposes an Ethernet-based multi-controller communication device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the Ethernet-based multi-controller communication method as described above.

[0034] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the Ethernet-based multi-controller communication method as described above are implemented.

[0035] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the Ethernet-based multi-controller communication method as described above.

[0036] The present application receives the communication information sent by the source client when detecting that the server is connected to the source client; determines the address judgment result according to the preset address and the target address corresponding to the communication information; and sends the communication information to the target client corresponding to the target address when the address judgment result is that the target address and the preset address are different. Through the above-mentioned Ethernet-based multi-controller communication method, the modularization and simplification of communication is achieved to a certain extent, the waste of protocol resources and bandwidth is reduced, and the problem of complicated communication between controllers is solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0038] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0039] Figure 1 A flowchart of a multi-controller communication method based on Ethernet provided in Example 1 of the present application;

[0040] Figure 2 A schematic diagram of a communication method between multiple controllers based on an in-vehicle Ethernet provided in Embodiment 1 of the Ethernet-based multi-controller communication method of the present application;

[0041] Figure 3 A schematic diagram of a process for establishing a socket connection between a client and a server provided in Embodiment 1 of the Ethernet-based multi-controller communication method of the present application;

[0042] Figure 4 A schematic diagram of the process of authentication between a server and a client provided in Embodiment 1 of the Ethernet-based multi-controller communication method of the present application;

[0043] Figure 5 A flow chart of the second embodiment of the Ethernet-based multi-controller communication method provided in this application;

[0044] Figure 6 A brief flowchart diagram of the first embodiment of the Ethernet-based multi-controller communication method of the present application is provided;

[0045] Figure 7 This is a schematic diagram of the module structure of a multi-controller communication device based on Ethernet according to an embodiment of the present application;

[0046] Figure 8 This is a schematic diagram of the device structure of the hardware operating environment involved in the Ethernet-based multi-controller communication method in the embodiment of the present application.

[0047] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0048] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0049] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0050] The main solution of the embodiment of the present application is: when it is detected that the server is connected to the source client, the communication information sent by the source client is received; the address judgment result is determined according to the preset address and the target address corresponding to the communication information; when the address judgment result is that the target address and the preset address are different, the communication information is sent to the target client corresponding to the target address.

[0051] At present, vehicle controllers exchange information through CAN, which is also called controller area network. It is a serial communication protocol bus designed for real-time applications. The CAN bus has a fatal disadvantage, namely low bandwidth. The physical layer logic level of the CAN bus is divided into high-speed ISO 11898 standard (125kbps to 1Mbps) and low-speed ISO 11519 standard (10kbps to 125kbps), and the theoretical maximum is no more than 1Mbps. This low bandwidth can no longer meet the growing data transmission needs of automobiles, especially in functions such as intelligent driving, audio and video entertainment, and vehicle OTA. Ethernet is a solution to low bandwidth. Its bandwidth can reach 1000Mbps, which is 1000 times that of CAN, but the use of Ethernet is not yet mature and standardized. Taking a certain car as an example, although the application of in-vehicle Ethernet has increased the bandwidth of the vehicle network, there is still no unified and complete solution for multi-controller communication. Generally, access to Ethernet is often temporarily increased according to the needs of the current project. For example, the FAPA of the G59 controller of a certain model needs to perform vehicle OTA, so a network cable communication is added between IVI and FAPA, and there is no protocol specification for communication. Over time, the vehicle Ethernet solution will become very messy. Therefore, how to solve the complicated communication between controllers has become a technical problem that needs to be solved urgently.

[0052] The present application receives the communication information sent by the source client when detecting that the server is connected to the source client; determines the address judgment result according to the preset address and the target address corresponding to the communication information; and sends the communication information to the target client corresponding to the target address when the address judgment result is that the target address and the preset address are different. Through the above-mentioned Ethernet-based multi-controller communication method, the modularization and simplification of communication is achieved to a certain extent, the waste of protocol resources and bandwidth is reduced, and the problem of complicated communication between controllers is solved.

[0053] It should be noted that the execution subject of this embodiment may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an Ethernet-based multi-controller communication device that can realize the above functions. The following takes the Ethernet-based multi-controller communication device as an example of the execution subject to illustrate this embodiment and the following embodiments.

[0054] Based on this, the embodiment of the present application provides a multi-controller communication method based on Ethernet, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the Ethernet-based multi-controller communication method of the present application.

[0055] In this embodiment, the Ethernet-based multi-controller communication method includes steps S10 to S30:

[0056] Step S10, when detecting that the server is connected to the source client, receiving communication information sent by the source client;

[0057] It should be noted that if Figure 2 As shown, this embodiment requires a service program, which can be located on the tbox controller, and several client programs, which are located on the corresponding controllers, such as IVI and FAPA. It is assumed here that the address of the server is 192.168.43.1, and the client programs are 192.168.43.100, 192.168.43.101, 192.168.43.102, and 192.168.43.103, hereinafter referred to as addresses 1, 100, 101, 102, and 103. Each client controller is connected to the tbox via a network cable or a USB cable. The address of the client is statically configured, that is, the controller is bound to the IP to form a 1-to-1 mapping relationship.

[0058] It can be understood that the source client refers to the information sending end, and the source client can also serve as the information receiving end. The communication information refers to the information sent by the source client, including data transmission information, status information, heartbeat information, etc.

[0059] In a specific implementation, after the client and the server need to establish a socket connection, the server can detect that the server and the source client are connected, so that the server can receive data transmission information, status information, heartbeat information, etc. sent by the source client. Among them, the socket connection refers to a mechanism used to implement inter-process communication in computer network programming.

[0060] It should be noted that if Figure 3 As shown in the figure, the client and the server need to establish a socket connection. The connection process is divided into two parts: the hardware driver module and the software communication module. The hardware driver module is responsible for the startup of the controller, the startup of the network driver, and the USB / network cable connection; the software communication module is responsible for the creation, connection, authentication, heartbeat and other services of the socket server and socket client. The socket server needs to provide the address and port to the socket client, such as port 10086. In addition, the server needs to support multiple client accesses, that is, the number of queues supported is greater than the actual number of clients. The server also needs to record the client's online information based on the client IP and the information during authentication.

[0061] In a feasible implementation manner, step S10 may include steps A11 to A13:

[0062] Step A11, determining the decrypted authentication information according to the server private key and the authentication information sent by the source client;

[0063] It should be noted that the server private key refers to the key used by the server to decrypt the encrypted data sent by the client in encrypted communication, and the authentication information is mainly used to detect the legitimacy of the device.

[0064] In a specific implementation, the server receives the authentication information sent by the source client, and decrypts the authentication information according to the key used by the server to decrypt the encrypted data sent by the client in encrypted communication, to obtain the decrypted authentication information, and then the legitimacy of the source client can be detected based on the decrypted authentication information.

[0065] Step A12, determining target information according to the source client public key and the decrypted authentication information, and sending the target information to the source client;

[0066] It can be understood that the source client public key refers to the public key stored by the server and used by the client to encrypt data in encrypted communication, and the target information refers to the hello information generated by the server.

[0067] In the specific implementation, the decrypted authentication information indicates that the server can successfully decrypt the authentication information sent by the source client. The server encrypts the hello information generated by the server through the public key used by the client to encrypt data in encrypted communication, and sends the encrypted hello information to the source client.

[0068] Step A13: upon receiving the handshake information sent by the source client, determining that the server has been connected to the source client.

[0069] It can be understood that handshake information is used in computer networks and communications to refer to the process of mutual identity verification, negotiation of encryption algorithms and keys and other information between two communicating entities when establishing secure communication, that is, information that determines whether the server and the source client are connected.

[0070] It should be noted that if Figure 4 As shown in the figure, the main function of authentication is to detect the legitimacy of the device. The server holds the client's public key and its own private key, and the client holds the server's public key and its own private key. During authentication, the client generates a hello message and encrypts it with the server's public key, and then sends it to the server. After receiving the authentication information, the server uses its own private key to decrypt it. If the decryption is successful, the client information is recorded, and then the server's hello message is generated and encrypted with the client's public key, and then sent back to the corresponding client. After receiving the information, the client uses its own private key to decrypt it. If the decryption is successful, it considers the device to be legitimate, and then sends a handshake heartbeat message, otherwise it disconnects and tries to reconnect.

[0071] In a feasible implementation manner, step S10 may include steps B11 to B13:

[0072] Step B11, obtaining header and tail information, source address, destination address, encryption identifier, payload information, and payload length;

[0073] It can be understood that the header and tail information refer to the header information (header) and the tail (tail), the header and the tail indicate the beginning and the end of the message, the source address refers to src, src indicates the sender of the data, the destination address refers to dst, dst indicates the receiver of the data, the encryption flag is used to identify whether the data is encrypted, the load information refers to the encrypted content (function), the load length refers to length, and length refers to the total amount of data of the function.

[0074] Step B12, determining initial checksum information according to the target address, the encryption identifier and the payload length;

[0075] It can be understood that the initial checksum information refers to the data information between src and function. By calculating the target address, encryption identifier and load length, the initial checksum information can be obtained according to the calculation result. The target address, encryption identifier and load length are recalculated at the data receiving party to obtain the target checksum information to verify the received data.

[0076] Step B13, obtaining communication information according to the header and tail information, the target address, the encryption identifier, the load length, the initial checksum information, the source address and the load information.

[0077] It is understandable that, as shown in Table 1, the sending of a message needs to follow a certain format, which mainly includes a header, a source address src, a destination address dst, an encryption identifier, a payload information function, a payload length length, a checksum, and a tail. The header and tail indicate the beginning and end of the message, src indicates the sender of the data, dst indicates the receiver of the data, the encryption identifier is used to identify whether the data is encrypted, the encrypted content is function, length refers to the total amount of data in the function, if encrypted, it is the length of the encrypted data, function is the interactive data content, and the checksum is the calculation of the data information between src and function.

[0078] Table 1:

[0079] header src dst Encryption ID length Function checksum tail

[0080] Step S20, determining an address determination result according to a preset address and a target address corresponding to the communication information;

[0081] It is understandable that the preset address refers to the server address, the target address refers to the address of the data receiving end in the communication information, and the address judgment result includes the result that the address of the data receiving end in the communication information is the same as or different from the server address.

[0082] In a specific implementation, the address of the data receiving end in the communication information is compared with the server address to obtain whether the address of the data receiving end in the communication information is the same as or different from the server address, thereby determining whether the receiving end of the communication information is the server.

[0083] In a feasible implementation manner, step S20 may include steps A21 to A22:

[0084] Step A21, when the address determination result is that the target address and the preset address are the same, determining the processed communication information according to the communication information;

[0085] It can be understood that when the address judgment result is that the target address and the preset address are the same, it indicates that the communication information of the source client is sent to the server, that is, the server is the data receiving end, so the server processes the received communication information to obtain processed communication information. For example, the server decrypts and encrypts the received communication information to obtain processed communication information.

[0086] Step A22, sending the processed communication information to the source client.

[0087] It is understandable that when the source client communicates with the server, the server processes the communication information sent by the source client and sends the processed communication information to the source client to complete the communication between the source client and the server.

[0088] Step S30, when the address determination result is that the target address and the preset address are different, sending the communication information to the target client corresponding to the target address.

[0089] It can be understood that when the address judgment result is that the target address and the preset address are different, it indicates that the data receiving end of the source client sending the communication information is not the server, so the corresponding client is found according to the data receiving end address in the communication information, and the communication information is sent to the corresponding client. For example, the server address is 1, the target client address is 100, and the data receiving end address in the communication information is 100. It can be seen that the data receiving end address in the communication information is different from the server address (address 100 is different from address 1), so the communication information is sent to the corresponding target client (address 100) according to the data receiving end address (100) in the communication information.

[0090] This embodiment receives the communication information sent by the source client when detecting that the server is connected to the source client; determines the address judgment result according to the preset address and the target address corresponding to the communication information; and sends the communication information to the target client corresponding to the target address when the address judgment result is that the target address and the preset address are different. Through the above Ethernet-based multi-controller communication method, the modularization and simplification of communication is achieved to a certain extent, the waste of protocol resources and bandwidth is reduced, and the problem of complicated communication between controllers is solved.

[0091] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 5 , step S30, the Ethernet-based multi-controller communication method further includes steps S31 to S33:

[0092] Step S31, when the address determination result is that the target address and the preset address are different, determining the corresponding target client according to the target address;

[0093] It is understandable that the server and each client have a unique address. For example, assuming the address of the server is 192.168.43.1, the addresses of the client programs are 192.168.43.100, 192.168.43.101, 192.168.43.102, and 192.168.43.103 respectively.

[0094] In a specific implementation, the target address refers to the address of the data receiving end in the communication information. When the address judgment result is that the target address and the preset address are different, it indicates that the data receiving end of the source client sending the communication information is not the server, so the corresponding target client is searched according to the data receiving end address in the communication information. For example, the target address is 192.168.43.100, that is, the client with the address 192.168.43.100 is the data receiving end.

[0095] Step S32, when the target client is online, determining a corresponding information encryption state according to the communication information;

[0096] It can be understood that the online status indicates a status in which the target client can receive communication information, and the information encryption status refers to a status in which the communication information is encrypted.

[0097] In the specific implementation, after determining the address of the data receiving end, the communication information needs to be sent to the data receiving end (target client). Therefore, the server needs to detect whether the target client is online. Only when the target client is online can the communication information be sent to the target client. However, in order to ensure the security of the communication information, when determining that the target client is online, it is also necessary to determine whether the communication information is encrypted. If it is encrypted, the server needs to decrypt the communication information and then re-encrypt the decrypted communication information according to the public key of the target client. Otherwise, when the communication information is unencrypted, the communication information is directly sent to the target client.

[0098] In a feasible implementation manner, step S32 may include steps A321 to A322:

[0099] Step A321, when it is detected that the server is connected to the target client, determining the information monitoring result of the target client according to a preset time;

[0100] It can be understood that the preset time refers to the time pre-set to determine whether the client is online, and the information monitoring result refers to the heartbeat information monitoring result, wherein the heartbeat information is used to detect whether the client is online.

[0101] In the specific implementation, when it is detected that the server is connected to the target client, it is then detected whether the target client is online, that is, within the pre-set time to determine whether the client is online, it is detected whether the heartbeat information sent by the target client is received, and then the heartbeat information monitoring result is obtained.

[0102] Step A322: when the information monitoring result is that the heartbeat information sent by the target client is received within the preset time, it is determined that the target client is in an online state.

[0103] It is understandable that whether the target client is online is determined based on the heartbeat information monitoring result. When the heartbeat information monitoring result is that the heartbeat information sent by the target client is received within a preset time, it is determined that the target client is online.

[0104] In a feasible implementation manner, step S32 may include steps B321 to B322:

[0105] Step B321, when the information encryption state is that the information has been encrypted, determining the decrypted communication information according to the server private key and the communication information;

[0106] It is understandable that when it is determined that the communication information sent to the target client is in an encrypted state, in order to ensure the security of the communication information, the encrypted communication information is decrypted according to the key used by the server to decrypt the encrypted data sent by the source client to obtain the decrypted communication information.

[0107] Step B321, determining target encrypted information according to the public key corresponding to the target client and the decrypted communication information, and sending the target encrypted information to the target client.

[0108] In the specific implementation, the target encrypted information refers to the re-encrypted communication information. To ensure the security of the communication information, the server re-encrypts the decrypted communication information according to the stored public key of the target client to obtain the re-encrypted communication information, and sends the re-encrypted communication information to the target client to complete the communication between the source client and the target client.

[0109] Step S33, when the information encryption state is that the information is not encrypted, sending the communication information to the target client.

[0110] It can be understood that when the information encryption status is unencrypted, it indicates that the communication information sent by the source client is not encrypted, that is, this communication information is not important information and does not need to be encrypted, so the server can directly send the communication information to the target client to complete the communication between the source client and the target client.

[0111] This embodiment determines the corresponding target client according to the target address when the address judgment result is that the target address and the preset address are different; determines the corresponding information encryption state according to the communication information when the target client is online; and sends the communication information to the target client when the information encryption state is that the information is not encrypted. By determining the target client corresponding to the target address, when the target client is online, the unencrypted information is sent to the target client to achieve communication between clients, thus achieving the standardization of controller communication and facilitating the platform processing of the entire vehicle, and each controller only needs to pay attention to the connection with the server, without paying attention to the controller of the opposite client.

[0112] For example, in order to help understand the implementation process of the Ethernet-based multi-controller communication method obtained by combining this embodiment with the above-mentioned embodiment 1, please refer to Figure 6 , Figure 6 A brief flow chart of a multi-controller communication method based on Ethernet is provided. Specifically: when client 1 (100) needs to communicate with client 2 (101), the specific process is as follows. Client 1 first establishes a connection with the server. The client sends information to the server. The server first detects the dst information. If it is 1, it means that the information is sent to itself. After processing, it is sent back to client 1. If dst is other (101), it is necessary to determine whether 101 is online. If not, reply to client 1 with offline information. If 101 is online, determine whether the data is encrypted. If not encrypted, send the information directly to 101. If encrypted, decrypt and then encrypt and send to 101. After receiving the information, 101 also needs to determine the dst information. If it is not itself, discard it. If it is itself, it needs to process and send it back to 100. The process of 101 replying information to 100 is the same as the above process, simplified in the figure.

[0113] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the Ethernet-based multi-controller communication method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0114] The present application also provides a multi-controller communication device based on Ethernet, please refer to Figure 7 , the Ethernet-based multi-controller communication device comprises:

[0115] The receiving module 10 is used to receive the communication information sent by the source client when detecting that the server is connected to the source client;

[0116] A determination module 20, configured to determine an address determination result according to a preset address and a target address corresponding to the communication information;

[0117] The communication module 30 is used to send the communication information to a target client corresponding to the target address when the address determination result is that the target address is different from the preset address.

[0118] Optionally, the receiving module 10 is further used for:

[0119] Determine the decrypted authentication information based on the server private key and the authentication information sent by the source client;

[0120] Determine the target information according to the source client public key and the decrypted authentication information, and send the target information to the source client;

[0121] When the handshake information sent by the source client is received, it is determined that the server has been connected to the source client.

[0122] Optionally, the communication module 30 is further used for:

[0123] When the address determination result is that the target address and the preset address are different, determining a corresponding target client according to the target address;

[0124] When the target client is online, determining a corresponding information encryption state according to the communication information;

[0125] When the information encryption state is that the information is not encrypted, the communication information is sent to the target client.

[0126] Optionally, the communication module 30 is further used for:

[0127] When it is detected that the server is connected to the target client, determining the information monitoring result of the target client according to a preset time;

[0128] When the information monitoring result is that the heartbeat information sent by the target client is received within the preset time, it is determined that the target client is in an online state.

[0129] Optionally, the communication module 30 is further used for:

[0130] When the information encryption state is that the information has been encrypted, determining the decrypted communication information according to the server private key and the communication information;

[0131] The target encrypted information is determined according to the public key corresponding to the target client and the decrypted communication information, and the target encrypted information is sent to the target client.

[0132] Optionally, the judging module 20 is further configured to:

[0133] When the address determination result is that the target address and the preset address are the same, determining the processed communication information according to the communication information;

[0134] Send the processed communication information to the source client.

[0135] Optionally, the receiving module 10 is further used for:

[0136] Get header and tail information, source address, destination address, encryption identifier, payload information, and payload length;

[0137] Determine initial checksum information according to the target address, the encryption identifier and the load length;

[0138] Communication information is obtained according to the header and tail information, the target address, the encryption identifier, the load length, the initial checksum information, the source address and the load information.

[0139] The Ethernet-based multi-controller communication device provided by the present application adopts the Ethernet-based multi-controller communication method in the above embodiment, which can solve the technical problem of complicated communication between controllers. Compared with the prior art, the beneficial effects of the Ethernet-based multi-controller communication device provided by the present application are the same as the beneficial effects of the Ethernet-based multi-controller communication method provided by the above embodiment, and other technical features in the Ethernet-based multi-controller communication device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0140] The present application provides an Ethernet-based multi-controller communication device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the Ethernet-based multi-controller communication method in the above-mentioned embodiment one.

[0141] Reference below Figure 8, which shows a schematic diagram of the structure of an Ethernet-based multi-controller communication device suitable for implementing the embodiment of the present application. The Ethernet-based multi-controller communication device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8 The Ethernet-based multi-controller communication device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0142] like Figure 8 As shown, the Ethernet-based multi-controller communication device may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. Various programs and data required for the operation of the Ethernet-based multi-controller communication device are also stored in the RAM 1004. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 can allow the Ethernet-based multi-controller communication device to communicate with other devices wirelessly or wired to exchange data. Although the figure shows an Ethernet-based multi-controller communication device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have instead.

[0143] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0144] The Ethernet-based multi-controller communication device provided by the present application adopts the Ethernet-based multi-controller communication method in the above embodiment, which can solve the technical problem of complicated communication between controllers. Compared with the prior art, the beneficial effects of the Ethernet-based multi-controller communication device provided by the present application are the same as the beneficial effects of the Ethernet-based multi-controller communication method provided by the above embodiment, and other technical features in the Ethernet-based multi-controller communication device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0145] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0146] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0147] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the Ethernet-based multi-controller communication method in the above-mentioned embodiment.

[0148] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0149] The computer-readable storage medium may be included in the Ethernet-based multi-controller communication device; or may exist independently without being assembled into the Ethernet-based multi-controller communication device.

[0150] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by an Ethernet-based multi-controller communication device, the Ethernet-based multi-controller communication device:.

[0151] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0152] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0153] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0154] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned multi-controller communication method based on Ethernet, and can solve the technical problem of complicated communication between controllers. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the multi-controller communication method based on Ethernet provided by the above-mentioned embodiment, and will not be repeated here.

[0155] The present application also provides a computer program product, including a computer program, which implements the steps of the Ethernet-based multi-controller communication method as described above when executed by a processor.

[0156] The computer program product provided by the present application can solve the technical problem of complicated communication between controllers. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the Ethernet-based multi-controller communication method provided by the above embodiment, which will not be repeated here.

[0157] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A multi-controller communication method based on Ethernet, characterized in that: The Ethernet-based multi-controller communication method comprises: When detecting that the server is connected to the source client, receiving communication information sent by the source client; Determine an address determination result according to a preset address and a target address corresponding to the communication information; When the address determination result is that the target address and the preset address are different, the communication information is sent to a target client corresponding to the target address.

2. The method according to claim 1, characterized in that When detecting that the server is connected to the source client, before receiving the communication information sent by the source client, the method further includes: Determine the decrypted authentication information based on the server private key and the authentication information sent by the source client; Determine the target information according to the source client public key and the decrypted authentication information, and send the target information to the source client; When the handshake information sent by the source client is received, it is determined that the server has been connected to the source client.

3. The method according to claim 1, characterized in that When the address determination result is that the target address and the preset address are different, sending the communication information to the target client corresponding to the target address includes: When the address determination result is that the target address and the preset address are different, determining a corresponding target client according to the target address; When the target client is online, determining a corresponding information encryption state according to the communication information; When the information encryption state is that the information is not encrypted, the communication information is sent to the target client.

4. The method according to claim 3, characterized in that When the target client is online, before determining the corresponding information encryption state according to the communication information, the method further includes: When it is detected that the server is connected to the target client, determining the information monitoring result of the target client according to a preset time; When the information monitoring result is that the heartbeat information sent by the target client is received within the preset time, it is determined that the target client is in an online state.

5. The method according to claim 3, characterized in that When the target client is online, after determining the corresponding information encryption state according to the communication information, the method further includes: When the information encryption state is that the information has been encrypted, determining the decrypted communication information according to the server private key and the communication information; The target encrypted information is determined according to the public key corresponding to the target client and the decrypted communication information, and the target encrypted information is sent to the target client.

6. The method according to claim 1, characterized in that After determining the address determination result according to the preset address and the target address corresponding to the communication information, the method further includes: When the address determination result is that the target address and the preset address are the same, determining the processed communication information according to the communication information; Send the processed communication information to the source client.

7. The method according to claim 1, characterized in that When the server is connected to the source client, before receiving the communication information sent by the source client, the method further includes: Get header and tail information, source address, destination address, encryption identifier, payload information, and payload length; Determine initial checksum information according to the target address, the encryption identifier and the load length; Communication information is obtained according to the header and tail information, the target address, the encryption identifier, the load length, the initial checksum information, the source address and the load information.

8. A multi-controller communication device based on Ethernet, characterized in that: The device comprises: A receiving module, used for receiving communication information sent by the source client when detecting that the server is connected to the source client; A judgment module, used to determine an address judgment result according to a preset address and a target address corresponding to the communication information; The communication module is used to send the communication information to a target client corresponding to the target address when the address determination result is that the target address is different from the preset address.

9. A multi-controller communication device based on Ethernet, characterized in that: The device comprises: a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the Ethernet-based multi-controller communication method according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the Ethernet-based multi-controller communication method as described in any one of claims 1 to 7 are implemented.