A communication method and device based on a distributed soft bus, equipment and medium

By utilizing the DFS central node in the SOA system to store and provide node configuration information for DFS communication nodes, the problem of high resource consumption in inter-node communication is solved, and service discovery efficiency and communication efficiency are improved.

CN116915541BActive Publication Date: 2026-05-01ECARX (HUBEI) TECHCO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ECARX (HUBEI) TECHCO LTD
Filing Date
2023-07-24
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In SOA systems, communication between nodes consumes a lot of resources, resulting in excessive CPU processing overhead and low service discovery efficiency.

Method used

The central discovery approach is adopted, which uses a preset DFS central node to store the node configuration information of associated DFS communication nodes, and determines the communication configuration information of the target node by querying the request information and caches it in the memory of the target DFS communication node, thereby reducing the need for DFS communication nodes to store the node configuration information of the entire network topology.

Benefits of technology

It reduces CPU processing overhead, improves service discovery efficiency, and lowers communication costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116915541B_ABST
    Figure CN116915541B_ABST
Patent Text Reader

Abstract

The application discloses a communication method and device based on a distributed soft bus, equipment and a medium. The method comprises the following steps: a DFS communication node sends a node query request information to an associated preset DFS center node; according to the node query request information received by the preset DFS center node, target node communication configuration information and a target DFS communication node are determined from the first cache information of the preset DFS center node, and the preset DFS center node is instructed to send the target node communication configuration information to the target DFS communication node; and the target node communication configuration information received by the target DFS communication node is cached in the memory corresponding to the target DFS communication node. The technical scheme of the embodiment of the application stores the node communication configuration information of the DFS communication node by using the DFS center node deployed in advance, and provides a query service for the DFS communication node, so that the DFS communication node does not need to store the node communication configuration information irrelevant to its own business, the processing overhead of the CPU is reduced, and the efficiency of service discovery is improved.
Need to check novelty before this filing date? Find Prior Art

Description

A communication method, apparatus, device, and medium based on a distributed soft bus. Technical Field

[0001] This invention relates to the field of communication technology, and in particular to a communication method, apparatus, device and medium based on a distributed soft bus. Background Technology

[0002] With the rise of intelligent vehicles, more and more IT technologies are being introduced into the automotive control domain, such as the Distributed File System (DFS) technology. Due to the functional safety requirements of intelligent vehicles, each subsystem needs to operate independently, such as the instrument cluster system, entertainment system, and gaming system. Therefore, a middleware is needed that allows applications to directly call and implement various cross-machine communication needs without needing to know the underlying deployment. With the rise of Service-Oriented Architecture (SOA), applications can be published as services and rely on service discovery. Service discovery relies on multicast and unicast between nodes. Through service discovery, applications calling SOA do not care where they are deployed; they only need to publish their services or consume them in a pre-defined manner.

[0003] Currently, the DFS soft bus uses service discovery based on multicast and unicast. Service discovery consists of two phases: participant discovery and endpoint discovery, designed to ensure plug-and-play functionality for applications calling DFS. Each application's call to DFS goes through these two phases. The participant discovery phase uses multicast to broadcast participant information, unicast IP addresses, vendor names, and protocol versions. In the endpoint discovery phase, all participants exchange information based on the multicast information, including communication topic information. This service discovery architecture is a distributed discovery model, allowing each node to maintain a complete understanding of the network topology, regardless of whether a node needs the entire network topology during communication. The advantage of this approach is the absence of single points of failure; the failure of any single node will not affect the entire network.

[0004] However, this method has high communication costs, as nodes need to send metadata to each other, and each node needs to communicate with any other node. As the number of nodes increases, the communication cost of data increases exponentially. As the amount of communication data increases, processing this data will lead to excessive consumption of CPU (Central Processing Unit) resources, resulting in slower service discovery. Summary of the Invention

[0005] This invention provides a communication method, apparatus, device, and medium based on a distributed soft bus to solve the problem of high resource consumption during inter-node communication in SOA systems.

[0006] In a first aspect, the present invention provides a communication method based on a distributed soft bus, applied to a system-on-a-chip (SoC) running multiple subsystems, wherein at least one of the subsystems is equipped with a distributed soft bus (DFS) communication node and a preset DFS central node, and the method includes:

[0007] If the preset DFS central node does not fail, then the offline DFS communication node sends a node query request to the associated preset DFS central node.

[0008] Based on the node query request information received by the preset DFS central node, the target node communication configuration information and the target DFS communication node are determined from the first cache information of the preset DFS central node, and the preset DFS central node is instructed to send the target node communication configuration information to the target DFS communication node, wherein the first cache information contains the node communication configuration information of the plurality of DFS communication nodes;

[0009] The target DFS communication node receives the target node communication configuration information and caches it in the memory corresponding to the target DFS communication node.

[0010] Secondly, the present invention provides a communication device based on a distributed soft bus, configured in a system-on-a-chip (SOC) running multiple subsystems, wherein at least one of the subsystems deploys a distributed soft bus (DFS) communication node and a preset DFS central node, and the device includes:

[0011] The query request sending module is used to send node query request information to the associated preset DFS center node using the offline DFS communication node if the preset DFS center node has not failed.

[0012] The first configuration information sending module is used to determine the target node communication configuration information and the target DFS communication node from the first cache information of the preset DFS center node according to the node query request information received by the preset DFS center node, and instruct the preset DFS center node to send the target node communication configuration information to the target DFS communication node, wherein the first cache information includes the node communication configuration information of the plurality of DFS communication nodes;

[0013] The first caching module is used to cache the target node communication configuration information received by the target DFS communication node into the memory corresponding to the target DFS communication node.

[0014] Thirdly, the present invention provides an electronic device comprising:

[0015] At least one processor;

[0016] and memory that is communicatively connected to at least one processor;

[0017] The memory stores a computer program that can be executed by at least one processor, which enables the at least one processor to perform the communication method based on the distributed soft bus described in the first aspect.

[0018] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the communication method based on a distributed soft bus described in the first aspect.

[0019] The communication scheme based on a distributed soft bus provided by this invention utilizes DFS communication nodes to send node query request information to associated preset DFS central nodes. The SOA system includes multiple subsystems, and the preset DFS central node and the associated multiple DFS communication nodes belong to the same subsystem. Based on the node query request information received by the preset DFS central node, the target node communication configuration information and the target DFS communication node are determined from the first cache information of the preset DFS central node. The preset DFS central node is then instructed to send the target node communication configuration information to the target DFS communication node. The first cache information contains the node communication configuration information of the multiple DFS communication nodes. The target node communication configuration information received by the target DFS communication node is cached in the memory corresponding to the target DFS communication node. By adopting the above technical solution and using a central discovery approach, the pre-deployed DFS central node stores the node communication configuration information of associated DFS communication nodes and provides query services to the associated DFS communication nodes. The DFS communication nodes do not need to store the node communication configuration information of all nodes in the entire network topology, which reduces CPU processing overhead and improves the efficiency of service discovery.

[0020] It should be understood that the description in this section is not intended to identify key or essential features of the invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 is a flowchart of a communication method based on a distributed soft bus according to Embodiment 1 of the present invention;

[0023] Figure 2 is a schematic diagram of an SOA system according to Embodiment 1 of the present invention;

[0024] Figure 3 is a flowchart of a communication method based on a distributed soft bus according to Embodiment 2 of the present invention;

[0025] Figure 4 is a schematic diagram of a communication device based on a distributed soft bus according to Embodiment 3 of the present invention;

[0026] Figure 5 is a schematic diagram of the structure of an electronic device provided according to Embodiment 4 of the present invention. Detailed Implementation

[0027] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0028] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. In the description of this invention, unless otherwise stated, "a plurality of" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist; for example, A and / or B can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.

[0029] Example 1

[0030] Figure 1 is a flowchart of a communication method based on a distributed soft bus provided in Embodiment 1 of the present invention. This embodiment is applicable to communication scenarios based on a distributed soft bus. This method can be applied to a System on Chip (SOC) running multiple subsystems. At least one subsystem deploys a DFS (Distributed Framework Softbus) communication node and a preset DFS central node. This method can be executed by a communication device based on a distributed soft bus. The communication device based on a distributed soft bus can be implemented in hardware and / or software. The communication device based on a distributed soft bus can be configured in an electronic device, which can be composed of two or more physical entities or a single physical entity.

[0031] As shown in Figure 1, the communication method based on a distributed soft bus provided in Embodiment 1 of the present invention specifically includes the following steps:

[0032] S101. If the preset DFS central node does not fail, then use the offline DFS communication node to send a node query request to the associated preset DFS central node.

[0033] In this embodiment, a DFS central node associated with the DFS communication node can be pre-deployed in the subsystem where the DFS communication node resides. This DFS central node is the preset DFS central node (hereinafter referred to as the DFS central node). Multiple subsystems within the SOC can communicate across systems via DFS. Figure 2 is a schematic diagram of an SOA system. As shown in Figure 2, the SOA system can include an Android subsystem, a Linux subsystem, and a game subsystem. If the Android subsystem contains three DFS communication nodes (the numbers in the circles in Figure 2 represent the number of nodes within the rectangles), and the game subsystem also contains three DFS communication nodes, then two DFS central nodes can be deployed in the Android subsystem: one associated with the three DFS communication nodes in the Android subsystem, and the other associated with the three DFS communication nodes in the game subsystem. The DFS communication node itself does not need to store the node information of all DFS communication nodes in the entire subsystem. When a DFS communication node wants to communicate with other DFS communication nodes, it can send a node query request to the preset DFS central node.

[0034] S102. Based on the node query request information received by the preset DFS central node, determine the target node communication configuration information and the target DFS communication node from the first cache information of the preset DFS central node, and instruct the preset DFS central node to send the target node communication configuration information to the target DFS communication node, wherein the first cache information contains the node communication configuration information of the plurality of DFS communication nodes.

[0035] In this embodiment, a memory segment can be allocated in memory for the DFS central node to store metadata (including at least node communication configuration information) of associated DFS communication nodes. This metadata does not need to be stored on disk or flash memory. The advantage of this setup is that memory read / write speeds are faster than those of hard disks and flash memory. Furthermore, service discovery involves a large amount of data and frequent queries, so storing metadata in memory provides better processing performance for the SOA system. Based on the information contained in the node query request information received by the DFS central node, such as the communication topic and communication mode (e.g., client-server mode or publish-subscribe mode), the target node communication configuration information and the target DFS communication node are filtered from the first cache information, and the target node communication configuration information is sent to the target DFS communication node. The communication topic can be understood as a preset business topic. For example, if business topic A requires communication between DFS communication node 1, DFS communication node 2, and DFS communication node 3, then business topic A is the communication topic, and DFS communication node 1, DFS communication node 2, and DFS communication node 3 are all target DFS communication nodes. The first cache information may contain the correspondence between the communication topic and the node communication configuration information of the DFS communication node. The node communication configuration information may include the communication mode of the DFS communication node itself, the node identifier, the node's Internet Protocol address and port number, etc.

[0036] S103. The target node communication configuration information received by the target DFS communication node is cached in the memory corresponding to the target DFS communication node.

[0037] In this embodiment, after receiving the target node communication configuration information, the target DFS communication node can save the target node communication configuration information to its corresponding memory. This arrangement avoids repeatedly sending the same node query request information to the DFS central node, and avoids the DFS central node repeatedly sending the same target node communication configuration information to the DFS communication node. The memory of the DFS central node can also store the time when the node query request information was received, as well as the corresponding Internet Protocol address, etc.

[0038] The communication method based on a distributed soft bus provided in this embodiment of the invention utilizes DFS communication nodes to send node query request information to associated preset DFS central nodes. The SOA system includes multiple subsystems, and the preset DFS central node and the associated multiple DFS communication nodes belong to the same subsystem. Based on the node query request information received by the preset DFS central node, target node communication configuration information and the target DFS communication node are determined from the first cache information of the preset DFS central node. The preset DFS central node is then instructed to send the target node communication configuration information to the target DFS communication node. The first cache information contains the node communication configuration information of the multiple DFS communication nodes. The target node communication configuration information received by the target DFS communication node is cached in the memory corresponding to the target DFS communication node. The technical solution of this invention adopts a central discovery approach, which utilizes a pre-deployed DFS central node to store the node communication configuration information of associated DFS communication nodes and provides query services to the associated DFS communication nodes. The DFS communication nodes do not need to store the node communication configuration information of all nodes in the entire network topology, which reduces CPU processing overhead and improves the efficiency of service discovery.

[0039] Example 2

[0040] Figure 3 is a flowchart of a communication method based on a distributed soft bus provided in Embodiment 2 of the present invention. The technical solution of the present invention is further optimized based on the above optional technical solutions, and a specific communication method based on a distributed soft bus is given.

[0041] Optionally, before determining the target node communication configuration information and the target DFS communication node from the first cache information of the preset DFS central node based on the node query request information received by the preset DFS central node, the method further includes: if it is determined that the preset DFS central node has failed, then using a preset backup node to receive the node query request information, and determining the target node communication configuration information and the target DFS communication node from the second cache information of the preset backup node, wherein the content of the second cache information includes the content of the first cache information, and the preset DFS central node and the preset backup node belong to different subsystems; instructing the preset backup node to send the target node communication configuration information to the target DFS communication node. The advantage of this setup is that by deploying a backup node, when the DFS central node fails, the backup node can continue to provide services to the DFS communication node, solving the single point of failure problem in centralized service discovery.

[0042] Optionally, before sending node query request information to the associated preset DFS central node using the DFS communication node, the method further includes: instructing the DFS communication node to determine its own node information as first cache information and storing the first cache information in the memory corresponding to the preset DFS central node, wherein the node information includes at least the node communication configuration information. The advantage of this configuration is that by instructing the DFS communication node to send its own node information to the preset DFS central node associated with it and generating the first cache information, it ensures that the DFS central node can provide services to the DFS communication node in an orderly and accurate manner.

[0043] Optionally, determining the target node communication configuration information and the target DFS communication node from the first cache information of the preset DFS central node based on the node query request information received by the preset DFS central node includes: filtering out target communication topics consistent with the query topics in the node query request information from the communication topics included in the first cache information of the preset DFS central node, and filtering out target node communication configuration information associated with the target communication topics, wherein the first cache information includes the association relationship between the communication topics and the node communication configuration information; and determining the DFS communication node corresponding to the DFS communication node identifier included in the target node communication configuration information as the target DFS communication node. The advantage of this setting is that by using the query topics in the node query request information to filter the first cache information, the node communication configuration information and DFS communication node associated with the query topic can be quickly determined.

[0044] As shown in Figure 3, the communication method based on a distributed soft bus provided in Embodiment 2 of the present invention specifically includes the following steps:

[0045] S201. Instruct the DFS communication node to determine its own node information as the first cache information, and store the first cache information in the memory corresponding to the preset DFS central node.

[0046] The node information includes at least the node communication configuration information.

[0047] Specifically, upon its first startup, each DFS communication node registers its node information with the DFS central node via the network. This node information includes at least node communication configuration information and may contain all the information required for distributed service discovery. The registration process can involve at least two steps: first, instructing the DFS communication node to send a registration request to the DFS central node associated with it; second, waiting for the DFS central node to return registration success or failure information. If registration is successful, the DFS communication node can be instructed to send its own node information to the designated DFS central node. If registration fails, the DFS communication node can be instructed to delay for a preset time and then attempt to send the registration request a specified number of times. If registration still fails, the relevant information about this registration failure can be written to the system log.

[0048] S202. Determine whether the preset DFS central node has failed. If yes, proceed to step 204; otherwise, proceed to step 203.

[0049] S203. Using the DFS communication node that is not offline, send a node query request to the associated preset DFS central node, and execute step 206.

[0050] Optionally, communication between DFS communication nodes and DFS central nodes can be adjusted by modifying the proprietary communication protocol. For example, shorter data packets can be integrated into a longer data packet, which can significantly improve communication efficiency.

[0051] S204. Receive node query request information using the preset backup node, and determine the target node communication configuration information and the target DFS communication node from the second cache information of the preset backup node.

[0052] The second cache information includes the content of the first cache information, and the preset DFS central node and the preset backup node belong to different subsystems.

[0053] Specifically, a backup node (hereinafter referred to as the backup node) can be pre-deployed in a subsystem different from the subsystem where the DFS central node resides. The function of this backup node can be understood as backing up the data in the memory corresponding to the DFS central node. As shown in Figure 2, when the DFS central node is deployed in the Android subsystem, the backup node can be deployed in the Linux subsystem. These two subsystems can communicate via a network. The physical node deploying the DFS central node should have sufficient CPU processing power and sufficient network bandwidth, but the CPU processing power of the physical node deploying the backup node can be slightly weaker. When the DFS central node fails, the backup node can be used to receive node query request information and determine the target node communication configuration information and the target DFS communication node from the second cache information of the pre-deployed backup node.

[0054] Optionally, since the backup node and the DFS central node are different physical nodes, their stored data is not shared. Therefore, these two nodes can use a Redis (Remote Dictionary Server) master-slave synchronization method for data backup, with the DFS central node as the master node and the backup node as the slave node. The master node needs to replicate all data to the slave node, i.e., perform a full synchronization for the first time. After the full synchronization, the slave node can handle read requests. Because only the master node can handle write commands, the master node also needs to synchronously propagate write commands to the slave node to ensure data consistency. This is command propagation; therefore, the slave node and the master node can jointly maintain a communication connection for command propagation.

[0055] Optionally, the method for determining if the preset DFS central node has failed includes: sending heartbeat information to the preset DFS central node using the preset backup node at first preset time intervals; if, within a second preset time interval, the number of times the preset backup node fails to receive heartbeat response information from the preset DFS central node exceeds a preset threshold, then the preset DFS central node is determined to have failed, wherein the second preset time interval is longer than the first preset time interval. The advantage of this setting is that by monitoring the number of times the backup node fails to receive heartbeat response information from the DFS central node, it is possible to promptly determine whether the DFS central node has failed, so that the backup node can provide services to the DFS communication node immediately.

[0056] Specifically, it can not only instruct backup nodes to back up the data in the memory of the DFS central node in real time, but also instruct them to monitor the service status of the DFS central node. If the DFS central node fails, such as crashing, the backup node can replace the DFS central node and provide services to the DFS communication nodes. For example, the backup node can be instructed to send a heartbeat message to the DFS central node every 5 seconds. If the backup node does not receive a heartbeat response from the DFS central node more than twice within 20 seconds, it can be determined that the DFS central node has failed. Alternatively, if a DFS communication node sends node query requests to the DFS central node more than twice without a response within a specified time period, it can be determined that the DFS central node has failed. In this case, the DFS communication node can be instructed to send a node query request to the corresponding backup node, and the backup node can then replace the DFS central node and provide services to the DFS communication nodes.

[0057] Optionally, the communication link distances between the preset DFS central node and each of its associated DFS communication nodes are all less than a preset distance. The advantage of this setting is that by limiting the communication link distances between the DFS central node and its associated DFS communication nodes, the efficiency of the DFS central node in providing services to the communication nodes is ensured.

[0058] Specifically, when deploying DFS central nodes, the principle of proximity should be followed, and the communication link distance from the DFS central node to each DFS communication node associated with it should be as short as possible. That is, the communication link distance between the DFS central node and each of its associated DFS communication nodes should be less than the preset distance.

[0059] S205, Instruct the preset backup node to send the target node communication configuration information to the target DFS communication node, and execute step 209.

[0060] S206. From the communication topics contained in the first cache information of the preset DFS central node, filter out the target communication topic that matches the query topic in the node query request information, and filter out the target node communication configuration information associated with the target communication topic.

[0061] The first cache information includes the association between the communication topic and the node communication configuration information.

[0062] Specifically, when the DFS central node is not faulty, it can filter out the target communication topic that matches the query topic in the node query request information from the first cache information, and also filter out the target node communication configuration information associated with the target communication topic. For example, if the query topic is B, and the first cache information contains a communication topic B that is associated with node communication configuration information b, then communication topic B is the target communication topic, and node communication configuration information b is the target node communication configuration information. The node information sent by the DFS communication node also includes the communication topic.

[0063] For example, the communication topics and node communication configuration information can be pre-saved as a hash table with the communication topics as the key. This hash table serves as the first cache information, and is then stored in the memory corresponding to the DFS central node. The service discovery provided by the SOA system is dynamic, meaning it can be rediscovered each time the electronic device hosting the SOA system, such as an in-vehicle infotainment system, is turned on.

[0064] S207. Determine the DFS communication node corresponding to the DFS communication node identifier contained in the target node communication configuration information as the target DFS communication node.

[0065] For example, as shown above, if the node communication configuration information b contains the node identifiers of DFS communication node 4, DFS communication node 5, and DFS communication node 6, then it can be determined that DFS communication node 4, DFS communication node 5, and DFS communication node 6 are all target DFS communication nodes.

[0066] S208, Instruct the preset DFS central node to send the target node communication configuration information to the target DFS communication node.

[0067] S209. Cache the target node communication configuration information received by the target DFS communication node into the memory corresponding to the target DFS communication node.

[0068] The communication method based on a distributed soft bus provided in this invention instructs DFS communication nodes to send their node information to a preset DFS central node associated with the DFS communication node and generates first cache information. This ensures that the DFS central node can provide services to the DFS communication nodes in an orderly and accurate manner. By using the query topic in the node query request information to filter the first cache information, the node communication configuration information and DFS communication nodes associated with the query topic can be quickly determined. Furthermore, by deploying backup nodes, services can continue to be provided to the DFS communication nodes when the DFS central node fails, thus solving the single point of failure problem in centralized service discovery.

[0069] Based on the above embodiments, before sending node query request information to the associated preset DFS central node using the offline DFS communication node, the method further includes: determining the offline DFS communication node and determining the offline DFS communication node, and updating the first cache information according to the offline DFS communication node; wherein, determining the offline DFS communication node and updating the first cache information according to the offline DFS communication node includes: sending node update information to the associated preset DFS central node using the DFS communication node every third preset time interval; if the preset DFS central node is determined within a fourth preset time interval... If a node fails to receive node update information more than a preset number of times, the DFS communication node is determined to be offline, wherein the fourth preset duration is greater than the third preset duration. The node information corresponding to the offline DFS communication node and / or the node information corresponding to the actively unregistered DFS communication node is deleted from the first cache information of the preset DFS central node. The preset DFS central node is then instructed to send node update information to the associated target node, wherein the target node is the DFS communication node whose previously received target node communication configuration information included the node information of the offline and / or actively unregistered DFS communication node. The advantage of this setup is that by monitoring the number of times the DFS central node fails to receive node update information, inactive DFS communication nodes can be detected promptly, and the inactive and unregistered DFS communication nodes can be notified to the target node in a timely manner. Furthermore, the corresponding node information can be deleted from the first cache information of the DFS central node, enabling the target node to obtain network topology change information promptly without needing to send node query requests to the DFS central node again.

[0070] For example, if the third preset duration is 10 seconds, the fourth preset duration is 40 seconds, and the preset number of times is 2, then every 10 seconds, the DFS communication node needs to send node update information to the associated DFS central node. If the DFS central node fails to receive the node update information more than twice within 40 seconds, then the DFS communication node can be determined to be offline. If DFS communication node 7 is determined to be offline, then the node information corresponding to DFS communication node 7 and / or the node information corresponding to the actively deregistered DFS communication node can be deleted from the first cache information of the DFS central node associated with DFS communication node 7, and the DFS central node is instructed to send node update information to the associated target node. Here, the actively deregistered DFS communication node can be understood as a DFS communication node that actively sends deregistration request information to the associated DFS central node.

[0071] Example 3

[0072] Figure 4 is a schematic diagram of a communication device based on a distributed soft bus provided in Embodiment 3 of the present invention. The device can be configured in a system-on-a-chip (SOC) running multiple subsystems, and at least one subsystem is equipped with a distributed soft bus (DFS) communication node and a preset DFS central node.

[0073] As shown in Figure 4, the device includes: a query request sending module 301, a first configuration information sending module 302, and a first cache module 303, wherein:

[0074] The query request sending module is used to send node query request information to the associated preset DFS center node using the offline DFS communication node if the preset DFS center node has not failed.

[0075] The first configuration information sending module is used to determine the target node communication configuration information and the target DFS communication node from the first cache information of the preset DFS center node according to the node query request information received by the preset DFS center node, and instruct the preset DFS center node to send the target node communication configuration information to the target DFS communication node, wherein the first cache information includes the node communication configuration information of the plurality of DFS communication nodes;

[0076] The first caching module is used to cache the target node communication configuration information received by the target DFS communication node into the memory corresponding to the target DFS communication node.

[0077] The communication device based on a distributed soft bus provided in this embodiment of the invention adopts a central discovery approach. It utilizes a pre-deployed DFS central node to store the node communication configuration information of associated DFS communication nodes and provides query services to the associated DFS communication nodes. The DFS communication nodes do not need to store the node communication configuration information of all nodes in the entire network topology, which reduces CPU processing overhead and improves the efficiency of service discovery.

[0078] Optionally, the device may also include:

[0079] The target node and information determination module is used to determine the target node communication configuration information and the target DFS communication node from the first cache information of the preset DFS center node based on the node query request information received by the preset DFS center node. If it is determined that the preset DFS center node has failed, the module uses a preset backup node to receive the node query request information and determines the target node communication configuration information and the target DFS communication node from the second cache information of the preset backup node. The content of the second cache information includes the content of the first cache information, and the preset DFS center node and the preset backup node belong to different subsystems.

[0080] The second configuration information sending module is used to instruct the preset backup node to send the target node communication configuration information to the target DFS communication node.

[0081] Optionally, the method for determining that the preset DFS central node has failed includes: sending heartbeat information to the preset DFS central node using the preset backup node at a first preset time interval; if, within a second preset time interval, the number of times the preset backup node fails to receive heartbeat response information sent by the preset DFS central node exceeds a preset threshold, then the preset DFS central node is determined to have failed, wherein the second preset time interval is longer than the first preset time interval.

[0082] Optionally, the device may also include:

[0083] The node information sending module is used to instruct the DFS communication node to determine its own node information as first cache information and store the first cache information in the memory corresponding to the preset DFS center node before the node query request information is sent to the associated preset DFS center node by the DFS communication node.

[0084] Optionally, the first configuration information sending module includes:

[0085] The filtering unit is used to filter out target communication topics that are consistent with the query topics in the node query request information from the communication topics included in the first cache information of the preset DFS central node, and to filter out target node communication configuration information associated with the target communication topics, wherein the first cache information includes the association relationship between the communication topics and the node communication configuration information;

[0086] The target DFS communication node determination unit is used to determine the DFS communication node corresponding to the DFS communication node identifier contained in the target node communication configuration information as the target DFS communication node.

[0087] Optionally, the device may also include:

[0088] The update module is used to determine the active DFS communication nodes and the offline DFS communication nodes before sending node query request information to the associated preset DFS central node using the active DFS communication nodes, and to update the first cache information according to the offline DFS communication nodes.

[0089] Optionally, determining the offline DFS communication node and updating the first cache information based on the offline DFS communication node includes: sending node update information to the associated preset DFS center node using the DFS communication node every third preset time interval; if the preset DFS center node fails to receive the node update information more than a preset number of times within a fourth preset time interval, then determining that the DFS communication node is offline, wherein the fourth preset time interval is longer than the third preset time interval; deleting the node information corresponding to the offline DFS communication node and / or the node information corresponding to the actively unregistered DFS communication node from the first cache information of the preset DFS center node, and instructing the preset DFS center node to send node update information to the associated target node, wherein the target node is the DFS communication node whose previously received target node communication configuration information includes the node information of the offline and / or actively unregistered DFS communication node.

[0090] Optionally, the communication link distances between the preset DFS central node and each of the associated multiple DFS communication nodes are all less than a preset distance.

[0091] The communication device based on a distributed soft bus provided in the embodiments of the present invention can execute the communication method based on a distributed soft bus provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the method.

[0092] Example 4

[0093] Figure 5 shows a schematic diagram of an electronic device 40 that can be used to implement embodiments of the present invention. The electronic device is intended to represent various forms of digital computers, such as in-vehicle systems, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0094] As shown in Figure 5, the electronic device 40 includes at least one processor 41 and a memory, such as a read-only memory (ROM) 42 and a random access memory (RAM) 43, communicatively connected to the at least one processor 41. The memory stores computer programs executable by the at least one processor. The processor 41 can perform various appropriate actions and processes based on the computer program stored in the ROM 42 or loaded into the RAM 43 from storage unit 48. The RAM 43 can also store various programs and data required for the operation of the electronic device 40. The processor 41, ROM 42, and RAM 43 are interconnected via a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.

[0095] Multiple components in electronic device 40 are connected to I / O interface 45, including: input unit 46, such as keyboard, mouse, etc.; output unit 47, such as various types of monitors, speakers, etc.; storage unit 48, such as disk, optical disk, etc.; and communication unit 49, such as network card, modem, wireless transceiver, etc. Communication unit 49 allows electronic device 40 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0096] Processor 41 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 41 performs the various methods and processes described above, such as communication methods based on a distributed soft bus.

[0097] In some embodiments, the distributed soft bus-based communication method can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 48. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 40 via ROM 42 and / or communication unit 49. When the computer program is loaded into RAM 43 and executed by processor 41, one or more steps of the distributed soft bus-based communication method described above can be performed. Alternatively, in other embodiments, processor 41 can be configured to perform the distributed soft bus-based communication method by any other suitable means (e.g., by means of firmware).

[0098] Various embodiments 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-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0099] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0100] The computer equipment provided above can be used to execute the communication method based on a distributed soft bus provided in any of the above embodiments, and has corresponding functions and beneficial effects.

[0101] Example 5

[0102] In the context of this invention, the computer-readable storage medium may be a tangible medium, and the computer-executable instructions, when executed by a computer processor, are used to perform a communication method based on a distributed soft bus. This method is applied in a system-on-a-chip (SoC) running multiple subsystems, at least one of which deploys a distributed soft bus (DFS) communication node and a pre-defined DFS central node. The method includes:

[0103] If the preset DFS central node does not fail, then the offline DFS communication node sends a node query request to the associated preset DFS central node.

[0104] Based on the node query request information received by the preset DFS central node, the target node communication configuration information and the target DFS communication node are determined from the first cache information of the preset DFS central node, and the preset DFS central node is instructed to send the target node communication configuration information to the target DFS communication node, wherein the first cache information contains the node communication configuration information of the plurality of DFS communication nodes;

[0105] The target DFS communication node receives the target node communication configuration information and caches it in the memory corresponding to the target DFS communication node.

[0106] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by, or in conjunction with, an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. 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 fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0107] The computer equipment provided above can be used to execute the communication method based on a distributed soft bus provided in any of the above embodiments, and has corresponding functions and beneficial effects.

[0108] It is worth noting that in the above embodiments of the communication device based on the distributed soft bus, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of the present invention.

[0109] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

[0110] Example 6

[0111] Embodiment 5 of the present invention also provides a communication system based on a distributed soft bus, the system comprising:

[0112] The communication system based on a distributed soft bus provided in this embodiment of the invention can execute the communication method based on a distributed soft bus provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects for executing the method. Technical details not described in detail in the above embodiments can be found in the communication method based on a distributed soft bus provided in any embodiment of the invention.

[0113] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device 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 provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, 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 sound input, voice input, or tactile input).

[0114] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0115] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0116] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0117] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A communication method based on a distributed soft bus, characterized in that, The method, applied in a system-on-a-chip (SoC) with multiple subsystems, wherein at least one of the subsystems deploys a distributed soft bus (DFS) communication node and a preset DFS central node, includes: if the preset DFS central node is not faulty, sending a node query request to the associated preset DFS central node using an offline DFS communication node; determining target node communication configuration information and a target DFS communication node from the first cache information of the preset DFS central node based on the node query request received by the preset DFS central node, and instructing the preset DFS central node to send the target node communication configuration information to the target DFS communication node, wherein the first cache information contains node communication configuration information of the plurality of DFS communication nodes; caching the target node communication configuration information received by the target DFS communication node in the memory corresponding to the target DFS communication node; wherein determining the target node communication configuration information and the target DFS communication node from the first cache information of the preset DFS central node based on the node query request received by the preset DFS central node includes: determining the target node communication configuration information and the target DFS communication node from the first cache information of the preset DFS central node. In the communication topics, target communication topics that match the query topics in the node query request information are filtered out, and target node communication configuration information associated with the target communication topics is filtered out. The first cache information contains the association between the communication topics and the node communication configuration information. The DFS communication node corresponding to the DFS communication node identifier contained in the target node communication configuration information is determined as the target DFS communication node. Before sending node query request information to the associated preset DFS center node using the offline DFS communication node, the method further includes: determining the offline DFS communication node and determining the offline DFS communication node, and updating the first cache information according to the offline DFS communication node. The determination of the offline DFS communication node and updating the first cache information according to the offline DFS communication node includes: sending node update information to the associated preset DFS center node every third preset time interval; if the preset DFS center node fails to receive the node update information more than a preset number of times within a fourth preset time interval, the DFS communication node is determined to be offline. The fourth preset time interval is longer than the third preset time interval.From the first cache information of the preset DFS central node, delete the node information corresponding to the offline DFS communication node and / or the node information corresponding to the actively unregistered DFS communication node, and instruct the preset DFS central node to send node update information to the associated target node, wherein the target node is the DFS communication node whose previously received target node communication configuration information included the node information of the offline and / or actively unregistered DFS communication node.

2. The method according to claim 1, characterized in that, Before determining the target node communication configuration information and the target DFS communication node from the first cache information of the preset DFS central node based on the node query request information received by the preset DFS central node, the method further includes: if it is determined that the preset DFS central node has failed, then using a preset backup node to receive the node query request information, and determining the target node communication configuration information and the target DFS communication node from the second cache information of the preset backup node, wherein the content of the second cache information includes the content of the first cache information, and the preset DFS central node and the preset backup node are deployed in different subsystems; instructing the preset backup node to send the target node communication configuration information to the target DFS communication node.

3. The method according to claim 2, characterized in that, The method for determining that the preset DFS central node has failed includes: sending heartbeat information to the preset DFS central node using the preset backup node at a first preset time interval; if the preset backup node fails to receive heartbeat response information sent by the preset DFS central node more than a preset threshold within a second preset time interval, then the preset DFS central node is determined to have failed, wherein the second preset time interval is longer than the first preset time interval.

4. The method according to claim 1, characterized in that, Before sending node query request information to the associated preset DFS central node using the DFS communication node, the method further includes: instructing the DFS communication node to determine its own node information as first cache information and storing the first cache information in the memory corresponding to the preset DFS central node, wherein the node information includes at least the node communication configuration information.

5. The method according to claim 1, characterized in that, The communication link distances between the preset DFS central node and each of the associated multiple DFS communication nodes are all less than the preset distance.

6. A communication device based on a distributed soft bus, characterized in that, The device is configured in a system-on-a-chip (SoC) running multiple subsystems, at least one of the subsystems deploying a distributed soft bus (DFS) communication node and a preset DFS central node. The device includes: a query request sending module, configured to send a node query request to the associated preset DFS central node using an offline DFS communication node if the preset DFS central node is not faulty; a first configuration information sending module, configured to determine target node communication configuration information and a target DFS communication node from a first cache information of the preset DFS central node based on the node query request received by the preset DFS central node, and instruct the preset DFS central node to send the target node communication configuration information to the target DFS communication node, wherein the first cache information includes node communication configuration information of the plurality of DFS communication nodes; a first cache module, configured to cache the target node communication configuration information received by the target DFS communication node in the memory corresponding to the target DFS communication node; the first configuration information sending module includes: a filtering unit, configured to filter out query topics from the communication topics included in the first cache information of the preset DFS central node that match the query topics in the node query request information. The device includes a consistent target communication topic and target node communication configuration information associated with the target communication topic, wherein the first cache information contains the association between the communication topic and the node communication configuration information; a target DFS communication node determination unit is used to determine the DFS communication node corresponding to the DFS communication node identifier contained in the target node communication configuration information as the target DFS communication node; the device further includes an update module, used to determine the DFS communication nodes that are not offline and the DFS communication nodes that are offline before sending node query request information to the associated preset DFS center node using the offline DFS communication nodes, and update the first cache information according to the offline DFS communication nodes; wherein, determining the offline DFS communication nodes and updating the first cache information according to the offline DFS communication nodes includes: sending node update information to the associated preset DFS center node using the DFS communication node every third preset time interval; if the preset DFS center node fails to receive the node update information more than a preset number of times within a fourth preset time interval, then determining that the DFS communication node is offline, wherein the fourth preset time interval is longer than the third preset time interval;From the first cache information of the preset DFS central node, delete the node information corresponding to the offline DFS communication node and / or the node information corresponding to the actively unregistered DFS communication node, and instruct the preset DFS central node to send node update information to the associated target node, wherein the target node is the DFS communication node whose previously received target node communication configuration information included the node information of the offline and / or actively unregistered DFS communication node.

7. An electronic device, characterized in that, The electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the communication method based on a distributed soft bus as described in any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that are used to cause a processor to execute the communication method based on a distributed soft bus as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Data communication method and device, equipment and storage medium

    CN111385324A

  • Multiple-input-multiple-output matrix soft bus communication method and system

    CN111585858A