Communication method and device between nodes, equipment and computer readable storage medium
By setting a master node on each host and matching and establishing connections with associated ordinary nodes, a hybrid communication method is adopted, which solves the problem of communication interruption caused by master node failure, reduces network traffic, and improves communication efficiency and reliability.
Patent Information
- Application Number
- CN202310850265.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-12
- Publication Date
- 2025-01-14
AI Technical Summary
Existing node communication schemes can cause all ordinary nodes to be affected when the master node's network is abnormal, and the distributed communication method can lead to excessive network traffic.
By setting a master node on each host, obtaining and matching the service registration information of ordinary nodes, establishing connections with ordinary nodes, and adopting a hybrid communication method that combines inter-process communication and broadcast/multicast, the impact of single point of failure is avoided and the number of broadcast messages sent is reduced.
It improves the efficiency of inter-node communication, reduces network traffic, enhances the reliability and robustness of communication, and avoids communication interruptions caused by single points of failure.
Smart Images

Figure CN119316431A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of vehicle technology, and in particular to the technical field of communication methods between nodes. Background Art
[0002] Existing node communication solutions mainly include centralized and distributed ones.
[0003] Centralized communication is based on a publish-subscribe model, where a publisher (a node) sends data to a specific topic and propagates it to all components that subscribe to the topic. The publisher and subscriber (another node) register service information with the master node and establish underlying communication. With a centralized communication method, the establishment of all communications depends on the master node that provides registration services. No matter how many hosts there are, there is only one master node. In this way, when the network communication of the master node is abnormal, the communication of all ordinary nodes will be affected.
[0004] Using a distributed communication method, publishers and subscribers communicate through broadcast or multicast, so that publishers can find subscribers and establish communication connections. Distributed communication solves the problem that all ordinary nodes are affected when the main node network is abnormal. However, the large number of broadcast messages used greatly increases the network traffic in the system. Summary of the invention
[0005] The present disclosure provides a communication method, device, equipment, storage medium and vehicle between nodes, which is conducive to improving the communication efficiency between nodes, reducing the sending of broadcast messages, and reducing network traffic.
[0006] According to a first aspect of the present disclosure, a communication method between nodes is provided. The method comprises:
[0007] Obtaining service registration information through the master node on the host, wherein both the host and other hosts have master nodes, and the service registration information includes: service registration information of ordinary nodes on the host and service registration information of ordinary nodes on other hosts sent by the master nodes of the other hosts;
[0008] Matching the service registration information of different common nodes to confirm whether there is an associated common node of the common node on the host;
[0009] If so, the service registration information is sent to the associated common node to establish a connection between the common node and the associated common node.
[0010] According to the above aspects and any possible implementation manner, an implementation manner is further provided, wherein the common nodes on the host include a first number, the common nodes on the other hosts include a second number, and the matching of the service registration information to confirm whether there is an associated common node of the common node on the host includes:
[0011] Matching the service registration information of the first number and the second number of common nodes with the service registration information of the first number of common nodes on the host in sequence respectively; wherein, when matching with the service registration information of the first number of common nodes in sequence, the service registration information of the same common node on the host is no longer matched;
[0012] If any ordinary node in the first number and the second number of ordinary nodes matches one ordinary node in the first number of ordinary nodes, it is confirmed that an associated ordinary node of the ordinary node exists on the host, wherein the one ordinary node is an associated ordinary node of any ordinary node.
[0013] According to the above aspects and any possible implementation manner, an implementation manner is further provided, wherein the service registration information includes: service information and address information, wherein:
[0014] The service information includes: at least one of the service number, topic name, and event information provided by the common node;
[0015] The address information includes: at least one of: a network address, a shared memory address, a domain socket address, and pipeline information; and the address information also includes: host identifiers of the host and the other hosts.
[0016] According to the above aspect and any possible implementation manner, an implementation manner is further provided, wherein establishing a connection between the common node and the associated common node includes:
[0017] The common node is controlled to send a connection establishment request to the associated common node corresponding to the address information, so as to establish a communication connection with the associated common node.
[0018] According to the above aspects and any possible implementation manner, an implementation manner is further provided, wherein obtaining, through the master node on the host, the service registration information of the common node on the host and the service registration information of the common nodes on the other hosts sent by the master nodes of the other hosts, comprises:
[0019] Control the master node on the host to obtain service registration information of the common nodes on the host through inter-process communication;
[0020] The master node on the host is controlled to receive service registration information of common nodes on other hosts sent by the master nodes of other hosts through broadcast or multicast.
[0021] According to the above aspects and any possible implementation manner, an implementation manner is further provided, wherein the method further includes:
[0022] The master node on the host is controlled to send the service registration information of the common node on the host to the master nodes of other hosts by broadcasting or multicasting.
[0023] According to the aspects described above and any possible implementation method, an implementation method is further provided, wherein the master node on the host includes one or more master nodes.
[0024] According to a second aspect of the present disclosure, a communication device between nodes is provided. The device includes:
[0025] an acquisition module, configured to acquire service registration information through a master node on the host, wherein the host and other hosts both have master nodes, and the service registration information includes: service registration information of ordinary nodes on the host and service registration information of ordinary nodes on other hosts sent by the master nodes of the other hosts;
[0026] A matching module, used for matching the service registration information of different common nodes to confirm whether there is an associated common node of the common node on the host;
[0027] A sending module is used to send the service registration information to the associated common node if it exists, so as to establish a connection between the common node and the associated common node.
[0028] According to the above aspects and any possible implementation manner, an implementation manner is further provided, wherein the common nodes on the host include a first number, the common nodes on the other hosts include a second number, and the matching module is specifically configured to:
[0029] Matching the service registration information of the first number and the second number of common nodes with the service registration information of the first number of common nodes on the host in sequence respectively; wherein, when matching with the service registration information of the first number of common nodes in sequence, the service registration information of the same common node on the host is no longer matched;
[0030] If any ordinary node in the first number and the second number of ordinary nodes matches one ordinary node in the first number of ordinary nodes, it is confirmed that an associated ordinary node of the ordinary node exists on the host, wherein the one ordinary node is an associated ordinary node of any ordinary node.
[0031] According to a third aspect of the present disclosure, an electronic device is provided, which includes a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the program, the method described above is implemented.
[0032] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the method according to the first aspect and / or the second aspect of the present disclosure is implemented.
[0033] According to a fifth aspect of the present disclosure, a vehicle is provided, the vehicle comprising the communication device between nodes as described in the second aspect and / or the electronic device as described in the third aspect.
[0034] In the present disclosure, after obtaining the service registration information of the ordinary node on the host and the service registration information of the ordinary nodes on other hosts sent by the master nodes of other hosts through the master node on the host, the service registration information of different ordinary nodes can be matched to confirm whether there is an associated ordinary node of the ordinary node on the host. If so, the service registration information is sent to the associated ordinary node to establish a connection between the ordinary node and the associated ordinary node. In this way, since there is a master node in each host, the master nodes of different hosts can receive the service registration information sent by the master nodes of other hosts so that a communication connection is established between the ordinary nodes. Therefore, if the network communication of the master node of a host is abnormal, it will not affect the establishment of communication between the ordinary nodes of other hosts, and the communication of the ordinary nodes of all hosts will not be affected. This is conducive to improving communication efficiency. The master node in the host can obtain the service registration information of the ordinary node, which means that the master node and the ordinary node in the host can also communicate independently and do not need to communicate in a broadcast or multicast manner. Therefore, it is conducive to reducing the sending of broadcast messages and reducing network traffic.
[0035] It should be understood that the contents described in the summary of the invention are not intended to limit the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, among which:
[0037] Figure 1 A flow chart showing a communication method between nodes according to an embodiment of the present disclosure;
[0038] Figure 2 A schematic diagram showing a communication method between multiple host nodes according to an embodiment of the present disclosure is shown;
[0039] Figure 3 A schematic diagram showing a communication method between nodes in the same host according to an embodiment of the present disclosure is shown;
[0040] Figure 4 A schematic diagram showing a communication method between multiple host master nodes according to an embodiment of the present disclosure is shown;
[0041] Figure 5 A flow chart showing a communication method between common nodes on a host according to an embodiment of the present disclosure is shown;
[0042] Figure 6 A flow chart showing a communication method between master nodes on a host according to an embodiment of the present disclosure is shown;
[0043] Figure 7 A block diagram showing a communication device between nodes according to an embodiment of the present disclosure;
[0044] Figure 8 A block diagram of an exemplary electronic device capable of implementing embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0046] In addition, the term "and / or" in this article is only a description of the association relationship between the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0047] Figure 1 A flow chart of a method 100 for communicating between nodes according to an embodiment of the present disclosure is shown. The communication method is applicable to a host having a master node and a common node installed therein, and the method 100 may include:
[0048] Step 110, obtaining service registration information through the master node on the host, wherein the host and other hosts both have master nodes, and the service registration information includes: service registration information of ordinary nodes on the host and service registration information of ordinary nodes on other hosts sent by the master nodes of the other hosts;
[0049] There can be not only one but also multiple master nodes on each host; there can also be multiple ordinary nodes on each host.
[0050] The service registration information includes: service information and address information, wherein the service information is the information of the service provided by the node, and the address information is the information of the location of the node.
[0051] The host can be an ECU (Electronic Control Unit) or a domain controller on the vehicle.
[0052] Ordinary nodes and master nodes are different APPs on the host. The master node is pre-set and is an APP that provides services, while ordinary nodes are some APPs on the host that need to communicate.
[0053] It should be noted that obtaining the service registration information of ordinary nodes and matching the service registration information to discover associated ordinary nodes related to ordinary nodes is the process of service discovery.
[0054] Step 120, matching the service registration information of different common nodes to confirm whether there is an associated common node of the common node on the host;
[0055] Matching the service registration information of different common nodes may be: matching the service registration information of different common nodes in the same host, or matching the service registration information of any two common nodes in different hosts.
[0056] The associated common nodes are other common nodes that match the service registration information of a common node on one or more hosts. The associated common nodes and the common node can be on the same host or on different hosts.
[0057] The service registration information is matched, that is, the master node on the host matches different common nodes on the same or different hosts to confirm whether the service registration information of different common nodes is the same. If the service registration information is the same, it is matched, otherwise, it is not matched.
[0058] Step 130: If it exists, the service registration information is sent to the associated common node to establish a connection between the common node and the associated common node.
[0059] Sending the service registration information to the associated common node may be: sending the service registration information of a common node in a host to the associated common node associated with it in the same host, or sending the service registration information of a common node in a host to the associated common node associated with it in a different host.
[0060] After obtaining the service registration information of the ordinary node on the host and the service registration information of the ordinary nodes on other hosts sent by the master nodes of other hosts through the master node on the host, the service registration information of different ordinary nodes can be matched to confirm whether there is an associated ordinary node of the ordinary node on the host. If so, the service registration information is sent to the associated ordinary node to establish a connection between the ordinary node and the associated ordinary node. In this way, since there is a master node in each host, the master nodes of different hosts can receive the service registration information sent by the master nodes of other hosts so that a communication connection is established between the ordinary nodes. Therefore, if the network communication of the master node of a host is abnormal, it will not affect the establishment of communication between the ordinary nodes of other hosts, and the communication of the ordinary nodes of all hosts will not be affected. This is conducive to improving communication efficiency. The fact that the master node in the host can obtain the service registration information of the ordinary node indicates that the master node and the ordinary node in the host can also communicate independently and do not need to communicate in a broadcast or multicast manner. Therefore, it is conducive to reducing the sending of broadcast messages and reducing network traffic.
[0061] In some embodiments, the common nodes on the host include a first number, the common nodes on the other hosts include a second number, and matching the service registration information to confirm whether there is an associated common node of the common node on the host includes:
[0062] Matching the service registration information of the first number and the second number of common nodes with the service registration information of the first number of common nodes on the host in sequence respectively; wherein, when matching with the service registration information of the first number of common nodes in sequence, the service registration information of the same common node on the host is no longer matched;
[0063] The first number and the second number can be the same or different, such as both are 3, or the first number is 2 and the second number is 4.
[0064] If any ordinary node in the first number and the second number of ordinary nodes matches one ordinary node in the first number of ordinary nodes, it is confirmed that an associated ordinary node of the ordinary node exists on the host, wherein the one ordinary node is an associated ordinary node of any ordinary node.
[0065] The service registration information of the first number and the second number of ordinary nodes are matched in sequence with the service registration information of the first number of ordinary nodes on the host, that is, the service registration information of all ordinary nodes on all hosts is matched with the service registration information of each ordinary node on the host in sequence. If the service registration information of any ordinary node among all ordinary nodes matches the service registration information of a certain ordinary node on the host, it means that any ordinary node is associated with the certain ordinary node. For example, they both discuss air conditioning status, light control, window control, seat adjustment, vehicle speed information, door status, etc.
[0066] In some embodiments, the service registration information includes: service information and address information, wherein:
[0067] The service information includes: at least one of the service number, topic name, and event information provided by the common node;
[0068] Topic names include air conditioning status, headlight control, window control, seat adjustment, vehicle speed information, door status, etc. The service number and event information are essentially the same as the content represented by the topic name, such as headlights, vehicle speed, etc.
[0069] The address information includes: at least one of: a network address, a shared memory address, a domain socket address, and pipeline information; and the address information also includes: host identifiers of the host and the other hosts.
[0070] In some embodiments, the establishing a connection between the common node and the associated common node includes:
[0071] The common node is controlled to send a connection establishment request to the associated common node corresponding to the address information, so as to establish a communication connection with the associated common node.
[0072] If the common node and its associated common node are in the same host, they can communicate through inter-process communication, or if they are not in the same host, they can perform cross-host network communication.
[0073] By controlling the ordinary node to send a connection establishment request to the associated ordinary node corresponding to the address information, communication can be established between the ordinary node and the associated ordinary node. In this way, the ordinary node and its associated ordinary node can communicate directly without indirect communication through the main node, which is beneficial to improving the communication efficiency between nodes.
[0074] In some embodiments, acquiring, through the master node on the host, the service registration information of the common node on the host and the service registration information of the common nodes on other hosts sent by the master nodes of other hosts, includes:
[0075] Control the master node on the host to obtain service registration information of the common nodes on the host through inter-process communication;
[0076] The master node on the host is controlled to receive service registration information of common nodes on other hosts sent by the master nodes of other hosts through broadcast or multicast.
[0077] The master node and ordinary nodes in the host use inter-process communication, that is, a centralized communication method. The master nodes of different hosts use broadcast or multicast to communicate, that is, a distributed communication method. This hybrid communication method avoids the problem that when the network communication of the master node is abnormal, the communication of all ordinary nodes will be affected. It also avoids the need to use a large number of broadcast messages, reduces network traffic, and improves the reliability of service discovery.
[0078] In some embodiments, the method further comprises:
[0079] The master node on the host is controlled to send the service registration information of the common node on the host to the master nodes of other hosts by broadcasting or multicasting.
[0080] By controlling the master node on the host to send the service registration information of the ordinary nodes on the host to the master nodes of other hosts through broadcast or multicast, the master nodes of different hosts can obtain the service registration information of the ordinary nodes on other hosts, so as to determine the associated ordinary nodes of the ordinary nodes on different hosts, so that each ordinary node can quickly establish a connection with its associated ordinary node.
[0081] In some embodiments, the master node on the host includes one or more.
[0082] There are multiple master nodes on the host, and these master nodes can simultaneously maintain the service registration information of different ordinary nodes. In this way, when a master node fails, it can also ensure that all hosts and the host's internal functions can operate normally.
[0083] The following will be combined Figure 2The principle of the communication method between multiple host nodes disclosed in the present invention is described as follows: Figure 2 As shown, the present disclosure proposes a hybrid node communication method, that is, ordinary nodes in the same host use centralized service discovery (wherein service discovery is a mechanism for automatically finding and identifying available services in a computer system, even if each ordinary node discovers its own associated ordinary node); and for ordinary nodes on different hosts, distributed service discovery is performed with the help of the master node. After the service discovery is completed, communication is established with the associated node based on the service and location information of the associated ordinary node returned by the master node (the service and location information is the service registration information). Using the solution of the present disclosure can reduce the network traffic used for service discovery and improve the reliability of service discovery.
[0084] The following will be combined Figure 3 The communication method between nodes in the same host in the present disclosure is described. Figure 3 As shown, the service discovery mechanism in the same host is completed by one or more master nodes and several ordinary nodes. These ordinary nodes register their service information and location information with each master node through inter-process communication. Available inter-process communication methods include but are not limited to shared memory, domain sockets, message queues, pipes, network communication, etc. The service information can be the service number, topic name, event information, etc. provided by the ordinary node. The location information can be a network address, a shared memory address, a domain socket address, a pipe information, etc. The master node is responsible for recording and managing the registration information of these ordinary nodes, and forwarding the successfully matched registration information to the associated ordinary nodes to help establish communication between ordinary nodes. In addition, in order to avoid the single point failure risk of a single master node, multiple master nodes can exist in the same host, and the registration information of different ordinary nodes can be maintained at the same time. In this way, when a master node fails, the normal operation of service discovery can also be guaranteed.
[0085] The following will be combined Figure 4 The communication method between multiple host master nodes in the present disclosure is described. Figure 4 As shown, the service discovery mechanism between different hosts is completed by the master node of each host. These master nodes send all service registration information (service and location information) of ordinary nodes in the host to the master nodes on other hosts on the network through broadcast or multicast. The network includes but is not limited to Ethernet, CAN bus, Bluetooth, etc. At the same time, the master node needs to receive the service registration information (service and location information) of the ordinary nodes of the host it is in sent by the master nodes of other hosts. When receiving the associated ordinary node information of the ordinary node in the same host, the master node will send the relevant registration information (service and location information) to the corresponding ordinary node.
[0086] The following will be combined Figure 5The communication method between common nodes on the host in the present disclosure is described. Figure 5 As shown, first, these ordinary nodes register the service and location information of the ordinary nodes with the master node. Secondly, the ordinary nodes will listen to and receive the return information of the master node. When the master node returns the service and location information of the associated ordinary node, the ordinary node will establish a communication connection with the associated ordinary node based on the service and location information returned by the master node. If the master node does not return the information of the associated node, the ordinary node continues to listen.
[0087] The following will be combined Figure 6 The communication method between the master nodes on the host in the present disclosure is described. Figure 6 As shown, first, the master node needs to receive the service and location information registered by the ordinary nodes in the same host; then, the master node sends the received service and location information of the ordinary nodes to the master nodes of other hosts through broadcast or multicast; at the same time, the master node needs to receive the service and location information sent by the master nodes of other hosts; next, the master node will determine whether it has received the associated node information of the ordinary nodes in the same host, if so, it will send the service and location information of the associated ordinary nodes to the corresponding ordinary nodes, otherwise it will continue to receive information.
[0088] Compared with the existing centralized communication method, the technical solution disclosed in the present invention can effectively avoid the communication failure problem between all ordinary nodes caused by the abnormality of the master node network, and improve the robustness of the communication middleware. Compared with the distributed communication method, after using the present invention, ordinary nodes on the same host are uniformly broadcast or multicast service discovery by the master node, which can effectively reduce the network traffic used for service discovery.
[0089] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present disclosure is not limited by the order of the actions described, because according to the present disclosure, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present disclosure.
[0090] The above is an introduction to the method embodiment. The following is a further explanation of the scheme disclosed in the present invention through an apparatus embodiment.
[0091] Figure 7 FIG. 7 is a block diagram of a communication device 700 between nodes according to an embodiment of the present disclosure. Figure 7 As shown, the apparatus 700 includes:
[0092] The acquisition module 710 is used to acquire service registration information through the master node on the host, wherein the host and other hosts both have master nodes, and the service registration information includes: service registration information of ordinary nodes on the host and service registration information of ordinary nodes on other hosts sent by the master nodes of the other hosts;
[0093] A matching module 720, configured to match the service registration information of different common nodes to confirm whether there is an associated common node of the common node on the host;
[0094] The sending module 730 is configured to send the service registration information to the associated common node, if any, so as to establish a connection between the common node and the associated common node.
[0095] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the described module can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0096] According to an embodiment of the present disclosure, the present disclosure further provides an electronic device, including:
[0097] at least one processor; and
[0098] a memory communicatively connected to the at least one processor; wherein,
[0099] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform any one of the above method embodiments.
[0100] According to an embodiment of the present disclosure, the present disclosure further provides a vehicle, comprising: a communication device between nodes as described in the above embodiment or an electronic device as described in the above embodiment.
[0101] According to an embodiment of the present disclosure, the present disclosure further provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute any one of the above method embodiments.
[0102] Figure 8A schematic block diagram of an electronic device 800 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0103] The device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0104] A number of components in the device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0105] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as method 100. For example, in some embodiments, the method 100 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the method 100 described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the method 100 in any other appropriate manner (e.g., by means of firmware).
[0106] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0107] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0108] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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 foregoing.
[0109] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0110] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0111] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0112] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0113] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A communication method between nodes, characterized in that: The communication method is applicable to a host computer having a master node and a common node installed thereon, and the communication method comprises: Obtaining service registration information through the master node on the host, wherein both the host and other hosts have master nodes, and the service registration information includes: service registration information of ordinary nodes on the host and service registration information of ordinary nodes on other hosts sent by the master nodes of the other hosts; Matching the service registration information of different common nodes to confirm whether there is an associated common node of the common node on the host; If so, the service registration information is sent to the associated common node to establish a connection between the common node and the associated common node.
2. The method according to claim 1, characterized in that The common nodes on the host include a first number, the common nodes on the other hosts include a second number, and matching the service registration information to confirm whether there is a common node associated with the common node on the host includes: Matching the service registration information of the first number and the second number of common nodes with the service registration information of the first number of common nodes on the host in sequence respectively; wherein, when matching with the service registration information of the first number of common nodes in sequence, the service registration information of the same common node on the host is no longer matched; If any ordinary node in the first number and the second number of ordinary nodes matches one ordinary node in the first number of ordinary nodes, it is confirmed that an associated ordinary node of the ordinary node exists on the host, wherein the one ordinary node is an associated ordinary node of any ordinary node.
3. The method according to claim 1, characterized in that The establishing a connection between the common node and the associated common node includes: The common node is controlled to send a connection establishment request to the associated common node corresponding to the address information, so as to establish a communication connection with the associated common node.
4. The method according to claim 1, characterized in that The acquiring, through the master node on the host, the service registration information of the common node on the host and the service registration information of the common nodes on other hosts sent by the master nodes of other hosts, comprises: Control the master node on the host to obtain service registration information of the common nodes on the host through inter-process communication; The master node on the host is controlled to receive service registration information of common nodes on other hosts sent by the master nodes of other hosts through broadcast or multicast.
5. The method according to claim 1, characterized in that The method further comprises: The master node on the host is controlled to send the service registration information of the common node on the host to the master nodes of other hosts by broadcasting or multicasting.
6. A communication device between nodes, the communication device is applicable to a host having a master node and a common node installed therein, the communication device comprising: an acquisition module, configured to acquire service registration information through a master node on the host, wherein the host and other hosts both have master nodes, and the service registration information includes: service registration information of ordinary nodes on the host and service registration information of ordinary nodes on other hosts sent by the master nodes of the other hosts; A matching module, used for matching the service registration information of different common nodes to confirm whether there is an associated common node of the common node on the host; A sending module is used to send the service registration information to the associated common node if it exists, so as to establish a connection between the common node and the associated common node.
7. The communication device according to claim 6, characterized in that: The common nodes on the host include a first number, the common nodes on the other hosts include a second number, and the matching module is specifically used for: Matching the service registration information of the first number and the second number of common nodes with the service registration information of the first number of common nodes on the host in sequence respectively; wherein, when matching with the service registration information of the first number of common nodes in sequence, the service registration information of the same common node on the host is no longer matched; If any ordinary node in the first number and the second number of ordinary nodes matches one ordinary node in the first number of ordinary nodes, it is confirmed that an associated ordinary node of the ordinary node exists on the host, wherein the one ordinary node is an associated ordinary node of any ordinary node.
8. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 5.
9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-5.
10. A vehicle, characterized in that: include: The communication device between nodes as claimed in claim 6, and / or the electronic device as claimed in claim 8, and / or the readable storage medium as claimed in claim 9.