Communication method of intra-domain node, vehicle and storage medium
By creating service nodes and verifying their names in the embedded real-time operating system, determining the existence of client nodes, establishing connection relationships, and detecting disconnection anomalies, the problems of easy crashes and high CPU load in Unix socket communication are solved, and more stable intra-domain node communication is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG GEELY HLDG GRP CO LTD
- Filing Date
- 2025-12-12
- Publication Date
- 2026-05-08
AI Technical Summary
Using Unix sockets for communication in embedded real-time operating systems is prone to crashes and high CPU loads, necessitating improvements in stability and reduction of CPU load.
By creating a service node and verifying its name during process restart, the existence of client nodes is determined, a connection is established, and disconnection anomalies are detected in real time to avoid duplicate connections and abnormal situations.
This improved the stability of the embedded real-time operating system and reduced CPU load, enabling more stable intra-domain node communication.
Smart Images

Figure CN121309657B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of embedded real-time operating system technology, and more particularly to a communication method, vehicle, and storage medium for intra-domain nodes. Background Technology
[0002] Currently, embedded real-time operating systems are used in intelligent driving controllers and cockpit instrument controllers.
[0003] In embedded real-time operating systems, Scalable Service-Oriented Middleware over IP (SOMEIP) is used as a communication method, specifically, inter-process communication uses Unix sockets. However, using Unix sockets for communication is prone to crashes and high CPU load in embedded real-time operating systems.
[0004] Therefore, there is an urgent need for a communication method for nodes within a domain that can improve the stability of embedded real-time operating systems and reduce CPU load. Summary of the Invention
[0005] To solve the above-mentioned technical problems, or at least partially solve them, embodiments of this disclosure provide a communication method, vehicle, and storage medium for nodes within a domain.
[0006] A first aspect of this disclosure provides a communication method for nodes within a domain, applied to a service terminal, the method comprising:
[0007] In response to a process restart operation, a service node is created and a name is created for the service node;
[0008] If the name of the service node does not exist in the named communication channel, then the name of the service node is retained; wherein, the named communication channel is a communication channel named using the name of an already created service node;
[0009] In response to a connection message sent by a client node, the existence of the client node is determined based on a function that opens a server connection; wherein, the connection message is used to establish a connection between the client node and the service node;
[0010] If the customer node exists, obtain the name of the customer node, and determine whether to establish a connection between the customer node and the service node based on the relationship between the name of the customer node and the customer node list information.
[0011] In one example, after determining whether the client node exists based on the function that opens a server connection, the method further includes:
[0012] If the client node does not exist, it is determined that the client node authentication failed, and the connection message sent by the client node is ignored.
[0013] In one example, determining whether to establish a connection between the customer node and the service node based on the relationship between the customer node's name and the customer node list information includes:
[0014] If the name of the client node is in the client node list information, it is determined that the client node has a duplicate connection with the service node, and the connection message sent by the client node is ignored.
[0015] In one example, determining whether to establish a connection between the customer node and the service node based on the relationship between the customer node's name and the customer node list information includes:
[0016] If the name of the customer node is not in the customer node list information, then a connection relationship is established between the customer node and the service node.
[0017] In one example, after establishing the connection between the client node and the service node, the method includes:
[0018] The name of the customer node is stored in the customer node list information.
[0019] In one example, after establishing the connection between the client node and the service node, the method includes:
[0020] The node information of the client node is recorded. If a preset function detects that there is no data in the message queue and there is an abnormal message in the message queue, the client node list information is traversed to check whether the name of the client node still exists. The preset function is used for data transfer between the client node and the service node.
[0021] If the name of the client node does not exist, it is determined that the client node and the service node are disconnected. The node information of the client node is then deleted, and a message indicating that the client node is disconnected is reported.
[0022] In one example, after creating the service node and creating the name of the service node, the method includes:
[0023] If the name of the service node already exists in the naming communication channel, an exception notification message is sent, and the creation of the name of the service node and the allocation of a new service node name are terminated.
[0024] A second aspect of this disclosure provides a communication method for nodes within a domain, applied to a client terminal, the method comprising:
[0025] Send a connection message; wherein the connection message is used to establish a connection between the client node and the service node;
[0026] If the client node successfully establishes a connection with the service node, then the process ID of the service node is recorded.
[0027] If a preset function detects that there is no data in the message queue and there is an abnormal message in the message queue, then wait for a preset time and determine whether the process ID to which the service node belongs exists.
[0028] If not, it is determined that the service node and the client node are disconnected, and a message indicating that the service node is disconnected is reported.
[0029] A third aspect of this disclosure provides a service terminal for communication between nodes within a domain, comprising:
[0030] A module is created to create a service node and name the service node in response to a process restart operation;
[0031] A retention module is configured to retain the name of the service node if the name of the service node does not exist in the named communication channel; wherein the named communication channel is a communication channel named using the name of an already created service node;
[0032] The first judgment module is used to determine whether the client node exists based on the function of opening a server connection in response to a connection message sent by the client node; wherein, the connection message is used to establish a connection relationship between the client node and the service node;
[0033] The module is configured to, if the customer node exists, obtain the name of the customer node and, based on the relationship between the name of the customer node and the customer node list information, determine whether to establish a connection between the customer node and the service node.
[0034] A fourth aspect of this disclosure provides a client terminal for communication between nodes within a domain, comprising:
[0035] The first sending module is used to send a connection message; wherein the connection message is used to establish a connection relationship between the client node and the service node;
[0036] The first recording module is used to record the process number of the service node if the client node and the service node successfully establish a connection.
[0037] The second judgment module is used to determine whether the process ID to which the service node belongs exists if the message queue does not contain data and there is an abnormal message in the message queue, based on a preset function;
[0038] The determination module is used to determine if the service node and the client node are disconnected if the service node does not exist, and to report the disconnection message of the service node.
[0039] A fifth aspect of this disclosure provides a vehicle, including:
[0040] A processor and a memory, wherein the memory stores a computer program that, when executed by the processor, performs the method described in the first aspect or the method described in the second aspect.
[0041] A sixth aspect of this disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the methods of the first or second aspect described above.
[0042] This disclosure provides a communication method, vehicle, and storage medium for nodes within a domain. The method includes: in response to a process restart operation, creating a service node and creating a name for the service node; if the name of the service node does not exist in the named communication channel, maintaining the name of the service node; in response to a connection message sent by a client node, determining whether the client node exists based on a function to open a server connection; if the client node exists, obtaining the name of the client node, and determining whether to establish a connection between the client node and the service node based on the relationship between the name of the client node and client node list information. Using this technical solution can improve the stability of the embedded real-time operating system and reduce the CPU load. Attached Figure Description
[0043] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0044] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1 This is a schematic diagram of a SOMEIP communication link provided in an embodiment of this disclosure;
[0046] Figure 2This is a flowchart illustrating a communication method for nodes within a domain, as provided in an embodiment of this disclosure.
[0047] Figure 3 This is a flowchart illustrating a communication method for nodes within a domain, as provided in an embodiment of this disclosure.
[0048] Figure 4 This is a signaling diagram of communication between a service node and a client node provided in an embodiment of this disclosure;
[0049] Figure 5 This is a flowchart illustrating a communication method for nodes within a domain, as provided in an embodiment of this disclosure.
[0050] Figure 6 This is a schematic diagram of the structure of a service terminal for communication between nodes within a domain, provided in an embodiment of this disclosure;
[0051] Figure 7 This is a schematic diagram of the structure of a client terminal used for communication between nodes within a domain, provided in an embodiment of this disclosure. Detailed Implementation
[0052] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0053] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.
[0054] For a clearer explanation, please refer to [link to relevant documentation]. Figure 1 The diagram illustrates a communication link for SOMEIP. The SOMEIP communication link can be between Ethernet nodes, between an Ethernet node and a node within the same domain, or between nodes within the same domain. This embodiment applies to a scenario of communication between nodes within the same domain. Communication is based on message passing (MP).
[0055] Figure 2 This is a flowchart illustrating a communication method for nodes within a domain, provided in an embodiment of this disclosure. This method can be executed by a service terminal. The service terminal can be exemplarily understood as a device such as a vehicle, tablet computer, laptop computer, desktop computer, or smart TV. Figure 2 As shown, the method provided in this embodiment includes the following steps:
[0056] S201. In response to the process restart operation, create a service node and create a name for the service node.
[0057] In one example, a process restart operation could be due to an abnormal situation, a simple process restart, or a concurrent process startup. In these cases, because the embedded real-time operating system needs time to update the MP's name information, if the process restarts or resumes normally during this period, it's highly likely that a service node with the same name will be created. This can lead to unpredictable behavior in the entire SOMEIP communication. Therefore, to avoid creating service nodes with the same name, it's necessary to verify the service node names. Specifically, this can be done using the MP API (name_open) to determine if a service node with the same name has been created.
[0058] In this embodiment, the name of the service node can be represented in the following way:
[0059] someip-<server_id> ;
[0060] in,<server_id> Allocated by the upper-layer protocol stack,<server_id> In the Server node, it represents its own ID.
[0061] S202. If the name of the service node does not exist in the named communication channel, then the name of the service node is retained; wherein, the named communication channel is a communication channel named using the name of the service node that has already been created.
[0062] In one example, MP communication is similar to named communication channels, using names to identify the communication channel. For example, the service node's name is someip-<server_1> If the service node with the same name is not present in the named communication channel, it means that no service node with the same name has been created. Therefore, the service node name `someip-` will remain unchanged.<server_1> .
[0063] S203. In response to a connection message sent by a client node, determine whether a client node exists based on the function for opening a server connection; wherein, the connection message is used to establish a connection relationship between the client node and the service node.
[0064] In one example, the client node name is as follows:
[0065] someip-<server_id> -<Process ID><Unique ID>;
[0066] in,<server_id> In a client node, the client node represents the target service node to which it is connected. To prevent duplicate names among multiple client nodes, the client node suffix will include a <process ID> and a <unique ID> to ensure name uniqueness. The <process ID> is the process ID of the process in which the client node is located, and the <unique ID> is an incrementing number for the process in which the client node is located. Each time a new client node is created, the <unique ID> is the number of the last creation + 1.
[0067] In one example, a connection message is used to establish a client node someip-<server_1> - <1> <1> With service node someip-<server_1> The connection relationship can be established using the function name_open to open a server connection.
[0068] This step is used by the service node to maintain the connection of the client node. Specifically, it responds to the client node's `someip-`<server_1> - <1> <1> The sent connection message uses name_open to determine if a client node someip exists.<server_1> - <1> <1> .
[0069] S204. If a customer node exists, obtain the name of the customer node and determine whether to establish a connection between the customer node and the service node based on the relationship between the customer node name and the customer node list information.
[0070] In one example, if a client node is determined to exist, its name is retrieved, and then it is checked whether the client node name appears in the client node list information. This client node list information is used to store the storage node someip-<server_1> The names of client nodes that have already been connected.
[0071] This disclosure provides a communication method for nodes within a domain. The method includes: in response to a process restart operation, creating a service node and its name; if the service node's name does not exist in the named communication channel, maintaining the service node's name; then, in response to a connection message sent by a client node, determining whether a client node exists based on a function to open a server connection; if a client node exists, obtaining its name and determining whether to establish a connection between the client node and the service node based on the relationship between the client node's name and the client node list information. This technical solution can improve the stability of the embedded real-time operating system and reduce CPU load.
[0072] Figure 3This illustration shows a flowchart of a communication method for nodes within a domain, according to an embodiment of this disclosure. This embodiment is an optimization of the above embodiments and can be combined with various optional solutions from one or more of the above embodiments.
[0073] like Figure 3 As shown, the communication method for nodes within this domain may include the following steps:
[0074] S301. In response to the process restart operation, create a service node and create a name for the service node.
[0075] In one example, after creating the service node and its name, the method includes:
[0076] If the name of the service node already exists in the named communication channel, an exception notification message is sent, and the creation of the service node name and the allocation of a new service node name are terminated.
[0077] In one example, for instance, the name of the service node is someip-<server_1> If the name exists in the named communication channel, it indicates that a service node with the same name has been created. An exception notification message is then sent, and the creation of the service node with the name "someip-" is terminated.<server_1> And assign a name to the new service node, for example, the name of the new service node is someip-<server_2> .
[0078] S302. If the name of the service node does not exist in the named communication channel, then retain the name of the service node.
[0079] In one example, this step can be found in step S202, and will not be repeated here.
[0080] S303. In response to a connection message sent by a client node, determine whether a client node exists based on the function for opening a server connection; wherein, the connection message is used to establish a connection relationship between the client node and the service node.
[0081] In one example, this step can be found in step S203, and will not be repeated here.
[0082] S304. If the name of the customer node is not in the customer node list information, then establish a connection between the customer node and the service node.
[0083] In one example, if a client node someip-<server_1> - <1> <1> And the client node someip-<server_1> - <1> <1> If the node information is not in the client node list, it means that the client node someip has not been connected to before.<server_1> - <1> <1> Then establish a client node someip-<server_1> With service node someip-<server_1> - <1> <1> The connection relationship.
[0084] In one example, after establishing the connection between the client node and the service node, the method includes:
[0085] Store the names of the customer nodes in the customer node list information.
[0086] In one example, after establishing the connection between the client node and the service node, the client node's name (someip-) can be stored in the client node list information.<server_1> - <1> <1> .
[0087] In one example, after establishing the connection between the client node and the service node, the method includes:
[0088] Record the node information of the client node. If a preset function detects that there is no data in the message queue and there is an abnormal message in the message queue, then iterate through the client node list information to check whether the name of the client node still exists. The preset function is used for data transfer between the client node and the service node.
[0089] If the name of the customer node does not exist, it is determined that the connection between the customer node and the service node is broken. The node information of the customer node is then deleted, and a message indicating that the customer node is disconnected is reported.
[0090] In one example, after establishing the connection between the client node and the service node, the client node's `someip` is recorded.<server_1> - <1> <1> Node information.
[0091] In this embodiment, the preset function can be MsgReceive. If MsgReceive is received, and based on MsgReceive, it detects that there is no data in the message queue, and there is an abnormal message in the message queue, then the client node list information is traversed to check whether the name of the client node still exists. The advantage of this setting is that it allows viewing previously connected client nodes (someip-)<server_1> - <1> <1> Does it no longer exist? If the client node someip does not exist,<server_1> - <1> <1> If the connection between the client node and the service node is determined to be broken, then the client node someip- is deleted.<server_1> - <1> <1> The node information is reported to the client node someip-<server_1> - <1> <1> The message that the connection was lost.
[0092] In this embodiment, if MsgReceive is received and data is detected in the message queue based on MsgReceive, then the data can be processed.
[0093] If MsgReceive is received, and based on MsgReceive, it is detected that there is no data in the message queue and there are no abnormal messages in the message queue, then continue searching for MsgReceive.
[0094] S305. If no client node exists, it is determined that the client node authentication failed, and the connection message sent by the client node is ignored.
[0095] In one example, if the client node someip- does not exist<server_1> - <1> <1> Then the client node someip-<server_1> - <1> <1> If there are potential security risks, and the client node authentication fails, the connection message sent by the client node will be ignored.
[0096] S306. If the name of the client node is in the client node list information, it is determined that the client node and the service node are connected repeatedly, and the connection message sent by the client node is ignored.
[0097] In one example, if a client node someip-<server_1> - <1> <1> Then iterate through the customer node list information. If the customer node name is someip-<server_1> - <1> <1> The customer node list information describes the previous state of this customer node, someip-<server_1> - <1> <1> If a connection to the service node is already established, the client node someip- is ignored.<server_1> - <1> <1> The connection message sent.
[0098] For a clearer explanation, please refer to [link to relevant documentation]. Figure 4The diagram illustrates a signaling diagram for communication between a service node and a client node.
[0099] This disclosure provides a communication method for nodes within a domain. The method includes: if no client node exists, determining that the client node authentication has failed, and ignoring connection packets sent by the client node; if a client node exists, traversing the client node list information; if the name of the client node is in the client node list information, determining that the client node and the service node are connected repeatedly, and ignoring connection packets sent by the client node. This technical solution enables real-time detection and capture of connection failures of nodes within the domain.
[0100] Figure 5 This illustration shows a flowchart of a communication method for nodes within a domain, according to an embodiment of this disclosure. This embodiment optimizes the above embodiments and is applied to a client terminal. This embodiment can be combined with various optional solutions from one or more of the above embodiments. The specific steps are as follows:
[0101] S501, Send connection message.
[0102] In one example, a connection message is used to establish a connection between a client node and a service node.
[0103] In this embodiment, for ease of description, the client node is denoted as someip-<server_1> - <1> <1> The service node is someip-<server_1> In this embodiment, the client node someip-<server_1> - <1> <1> To the service node someip-<server_1> Send a connection message.
[0104] S502. If the client node and the service node successfully establish a connection, record the process number to which the service node belongs.
[0105] In this embodiment, if the client node someip-<server_1> - <1> <1> With service node someip-<server_1> If a connection is successfully established, the service node someip is recorded.<server_1> Process ID <1> .
[0106] S503. If a preset function detects that there is no data in the message queue and there is an abnormal message in the message queue, wait for a preset time and determine whether the process ID to which the service node belongs exists.
[0107] In this embodiment, the preset function can be MsgReceive, and the preset time can be 100ms. This preset time is used to refresh the process information of the embedded real-time operating system (OS).
[0108] In this embodiment, if MsgReceive is received, and based on MsgReceive, it is detected that there is no data in the message queue, and there is an abnormal message in the message queue, then wait for 100ms, and then use the embedded real-time operating system OS API (kill(<service node process ID>, 0)) to determine the process ID. <1> Does the corresponding process still exist?
[0109] If a preset function detects that data exists in the message queue, the data is processed directly. If a preset function detects that no data exists in the message queue and there are no abnormal messages in the message queue, the process continues until the preset function detects data in the message queue.
[0110] S504. If not, determine that the service node and the client node are disconnected, and report the disconnection message of the service node.
[0111] In this embodiment, if it does not exist, then the service node someip is determined.<server_1> With client node someip-<server_1> - <1> <1> The connection was interrupted, and the service node someip was reported.<server_1> The message that the connection was lost.
[0112] In this embodiment, if the data exists, the process continues until a preset function detects the data in the message queue.
[0113] This disclosure provides a communication method for nodes within a domain. The method includes: sending a connection message; if a client node and a service node successfully establish a connection, recording the process ID of the service node; if a preset function detects that no data exists in the message queue and an abnormal message exists in the message queue, waiting for a preset time to determine if the process ID of the service node exists. If it does not exist, determining that the connection between the service node and the client node is broken, and reporting the service node's disconnection message. By employing this technical solution and detecting the connection relationship between the service node and the client node in real time, the connection stability of the system can be improved.
[0114] Figure 6 This is a schematic diagram of the structure of a service terminal for communication between nodes within a domain, provided in an embodiment of this disclosure. This service terminal for communication between nodes within a domain can be understood as the aforementioned vehicle or a functional module within the aforementioned vehicle. For example... Figure 6 As shown, the service terminal 60 used for communication between nodes within the domain includes:
[0115] Create module 601 to create a service node and its name in response to a process restart operation;
[0116] The retention module 602 is used to retain the name of the service node if the name of the service node does not exist in the named communication channel; wherein, the named communication channel is a communication channel named with the name of the service node that has already been created.
[0117] The first judgment module 603 is used to determine whether a client node exists based on the function of opening a server connection in response to a connection message sent by a client node; wherein, the connection message is used to establish a connection relationship between the client node and the service node;
[0118] Module 604 is established to obtain the name of the customer node if a customer node exists, and determine whether to establish a connection between the customer node and the service node based on the relationship between the customer node name and the customer node list information.
[0119] In one example, after determining the existence of a client node based on a function that opens a server connection, the service terminal 60 for communication between nodes within the domain also includes:
[0120] The first ignore module 605 is used to ignore connection packets sent by the client node if the client node authentication fails and no client node exists.
[0121] In one example, module 604 is created, specifically for:
[0122] If the name of the client node is in the client node list information, it is determined that the client node and the service node are connected repeatedly, and the connection message sent by the client node is ignored.
[0123] In one example, module 604 is created, specifically for:
[0124] If the name of the customer node is not in the customer node list information, then a connection relationship is established between the customer node and the service node.
[0125] In one example, after establishing the connection between the client node and the service node, the service terminal 60 used for communication between nodes within the domain also includes:
[0126] Storage module 606 is used to store the names of customer nodes in the customer node list information.
[0127] In one example, after establishing the connection between the client node and the service node, the service terminal 60 used for communication between nodes within the domain also includes:
[0128] The second recording module 607 is used to record the node information of the customer node. If a preset function detects that there is no data in the message queue and there is an abnormal message in the message queue, the customer node list information is traversed to check whether the name of the customer node still exists. The preset function is used for data transfer between the customer node and the service node.
[0129] The deletion module 608 is used to delete the node information of the customer node and report the disconnection message if the name of the customer node does not exist.
[0130] In one example, after creating the service node and its name, the service terminal 60, which is used for communication between nodes within the domain, also includes:
[0131] The second sending module 609 is used to send an abnormal notification message if the name of the service node already exists in the naming communication channel, and to terminate the creation of the service node name and the allocation of a new service node name.
[0132] The service terminal provided in this embodiment can execute the methods of any of the above embodiments, and its execution method and beneficial effects are similar, so they will not be described again here.
[0133] Figure 7 This is a schematic diagram of the structure of a client terminal for communication between nodes within a domain, provided in an embodiment of this disclosure. This client terminal for communication between nodes within a domain can be understood as the aforementioned vehicle or a functional module within the aforementioned vehicle. For example... Figure 7 As shown, the client terminal 70 used for communication between nodes within the domain includes:
[0134] The first sending module 701 is used to send connection messages; wherein, the connection message is used to establish a connection relationship between the client node and the service node.
[0135] The first recording module 702 is used to record the process number of the service node if the client node and the service node successfully establish a connection.
[0136] The second judgment module 703 is used to determine whether the process ID of the service node exists if the message queue does not contain data and there is an abnormal message in the message queue, based on a preset function.
[0137] The determination module 704 is used to determine if the service node and the client node are disconnected if the service node does not exist, and to report the disconnection message of the service node.
[0138] The client terminal provided in this embodiment can execute the methods of any of the above embodiments, and its execution method and beneficial effects are similar, so they will not be described again here.
[0139] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0140] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0141] The aforementioned computer-readable medium may be included in the aforementioned vehicle; or it may exist independently and not installed in the service terminal.
[0142] The aforementioned computer-readable medium carries one or more programs, which, when executed by the service terminal, cause the service terminal to:
[0143] In response to a process restart operation, create a service node and name the service node.
[0144] If the name of the service node does not exist in the named communication channel, the name of the service node is retained; where the named communication channel is a communication channel named with the name of the service node that has already been created.
[0145] In response to a connection message sent by a client node, the presence of a client node is determined based on the function that opens a server connection; the connection message is used to establish a connection between the client node and the service node.
[0146] If a client node exists, obtain the name of the client node, and determine whether to establish a connection between the client node and the service node based on the relationship between the client node name and the client node list information.
[0147] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0148] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0149] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units are not, in some cases, intended to limit the specific unit.
[0150] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.
[0151] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0152] This disclosure also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement the methods of any of the above embodiments. The execution method and beneficial effects are similar, and will not be described again here.
[0153] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0154] The above are merely specific embodiments of this disclosure, enabling those skilled in the art to understand or implement this disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to these embodiments, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A communication method for nodes within a domain, characterized in that, Applied to a service terminal, wherein the service terminal communicates with client nodes based on a message passing mechanism; including: In response to a process restart operation, a service node is created and a name is created for the service node; If the name of the service node does not exist in the named communication channel, then the name of the service node is retained; wherein, the named communication channel is a communication channel named using the name of an already created service node; In response to a connection message sent by the client node, the system determines whether the client node exists based on a function that opens a server connection; wherein the connection message is used to establish a connection between the client node and the service node. If the client node exists, the name of the client node is obtained, and based on the relationship between the name of the client node and the client node list information, it is determined whether to establish a connection between the client node and the service node. The name of the client node includes the name of the service node to be connected corresponding to the client node, the process ID of the process in which the client node is located, and the unique, incrementing number of the process.
2. The method according to claim 1, characterized in that, After determining whether the client node exists based on the function that opens a server connection, the method further includes: If the client node does not exist, it is determined that the client node authentication failed, and the connection message sent by the client node is ignored.
3. The method according to claim 1, characterized in that, The step of determining whether to establish a connection between the customer node and the service node based on the relationship between the customer node's name and the customer node list information includes: If the name of the client node is in the client node list information, it is determined that the client node has a duplicate connection with the service node, and the connection message sent by the client node is ignored.
4. The method according to claim 1, characterized in that, The step of determining whether to establish a connection between the customer node and the service node based on the relationship between the customer node's name and the customer node list information includes: If the name of the customer node is not in the customer node list information, then a connection relationship is established between the customer node and the service node.
5. The method according to claim 4, characterized in that, After establishing the connection between the client node and the service node, the method includes: The name of the customer node is stored in the customer node list information.
6. The method according to claim 4, characterized in that, After establishing the connection between the client node and the service node, the method includes: The node information of the client node is recorded. If a preset function detects that there is no data in the message queue and there is an abnormal message in the message queue, the client node list information is traversed to check whether the name of the client node still exists. The preset function is used for data transfer between the client node and the service node. If the name of the client node does not exist, it is determined that the client node and the service node are disconnected. The node information of the client node is then deleted, and a message indicating that the client node is disconnected is reported.
7. The method according to claim 1, characterized in that, After creating the service node and creating the name of the service node, the method includes: If the name of the service node already exists in the naming communication channel, an exception notification message is sent, and the creation of the name of the service node and the allocation of a new service node name are terminated.
8. A vehicle, characterized in that, include: A processor and a memory, wherein the memory stores a computer program that, when executed by the processor, performs the method of any one of claims 1-7.
9. A computer-readable storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1-7.
Citation Information
Patent Citations
Inter-process communication method and device, electronic equipment and storage medium
CN118277117A
Communication method and communication device
CN118784706A