Test network system, communication method, program product and storage medium

By using multicasting methods in the test network system, the multicast group association between the communication node, forwarding subsystem and the acquisition subsystem is realized, which solves the shortcomings of traditional test networks in the diversified and efficient processing of data nodes, and improves network performance and flexibility.

CN120223451APending Publication Date: 2025-06-27SHANGHAI LIJIN TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510366663.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-26
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

Traditional test networks have shortcomings in the diversification, flexible control and efficient processing of data nodes, and their performance is difficult to ensure when the number of nodes and network topology changes.

Method used

A test network system is designed through multicast means, including communication nodes, forwarding subsystems and acquisition subsystems. The communication nodes correspond to the multicast group one by one, and the forwarding subsystem and acquisition subsystem are registered with the multicast group to realize the functional decoupling of data forwarding and acquisition.

Benefits of technology

The performance and flexibility of the test network are improved. Communication nodes only need to care about the data interaction of their own multicast group. The decoupling of forwarding and acquisition functions achieves more flexible and high-performance data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120223451A_ABST
    Figure CN120223451A_ABST
Patent Text Reader

Abstract

The invention provides a test network system, a communication method, a program product and a storage medium, and relates to the field of network communication. The test network system comprises communication nodes, a forwarding subsystem and an acquisition subsystem, the communication nodes are provided with multicast groups in one-to-one correspondence, and the forwarding subsystem and the acquisition subsystem are registered to the multicast groups; the communication nodes are used for sending message data to the multicast groups corresponding to the communication nodes and receiving the message data from the multicast groups corresponding to the communication nodes; the forwarding subsystem is used for receiving message data from the source multicast group according to a preset forwarding rule and sending the message data to the destination multicast group; the preset forwarding rule comprises a forwarding rule for forwarding the message data from the source multicast group to the destination multicast group; the acquisition subsystem is used for acquiring message data from the multicast group so as to monitor the message data; according to the invention, function decoupling of data forwarding and data acquisition can be realized through a multicast means, so that the overall performance and flexibility of a test network can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network communication, and particularly to a test network system, a communication method, a program product, and a storage medium. Background Art

[0002] With the wide application of embedded systems and automated testing, how to efficiently transmit, collect, and inject data in a network environment has become a research and practice hotspot. Most related technologies rely on request-response mode, publish-subscribe mode, or peer-to-peer communication protocols, and cannot fully meet the requirements of diverse data nodes, flexible control, and efficient processing. Traditional test networks are often limited to a single communication mode, lacking unified forwarding, injection, and collection services, and it is difficult to guarantee performance when the number of nodes and network topology change. Summary of the Invention

[0003] The purpose of the present invention is to provide a test network system, a communication method, a program product, and a storage medium, which can decouple the functions of data forwarding and data collection through multicast means, thereby improving the overall performance and flexibility of the test network.

[0004] To solve the above technical problems, the present invention provides a test network system, including: communication nodes, a forwarding subsystem, and a collection subsystem. The communication nodes have corresponding multicast groups one by one, and both the forwarding subsystem and the collection subsystem are registered to the multicast groups;

[0005] The communication nodes are used to send message data to their corresponding multicast groups and receive message data from their corresponding multicast groups;

[0006] The forwarding subsystem is used to receive message data from a source multicast group according to a preset forwarding rule and send it to a destination multicast group; the preset forwarding rule includes the forwarding rule for the message data to be forwarded from the source multicast group to the destination multicast group;

[0007] The collection subsystem is used to collect the message data from the multicast group to monitor the message data.

[0008] Optionally, the communication nodes are further used to:

[0009] Send a message structure to their corresponding multicast groups and receive a message structure from their corresponding multicast groups; the message structure contains multiple message data;

[0010] The forwarding subsystem is further used to:

[0011] Receive a source message structure from the source multicast group according to the preset forwarding rule, reorganize the message data in the source message structure into a destination message structure corresponding to the destination multicast group of the message data, and send the destination message structure to the destination multicast group; the preset forwarding rule further includes the position of the message data in the source message structure and the position of the message data in the destination message structure;

[0012] The acquisition subsystem is further configured to:

[0013] Collect the message structure from the multicast group according to the preset parsing rule, and extract the message data from the message structure; the preset parsing rule includes the position of the message data in the message structure.

[0014] Optionally, the forwarding subsystem includes multiple forwarding nodes, the acquisition subsystem includes multiple acquisition nodes, the preset forwarding rule is stored in each of the forwarding nodes, and the preset parsing rule is stored in each of the acquisition nodes;

[0015] The forwarding node is configured to:

[0016] Determine the target source multicast group and the target destination multicast group corresponding to the message data forwarded by itself according to the preset forwarding rule stored by itself;

[0017] Receive the source message structure from the target source multicast group, reorganize the message data forwarded by itself from the source message structure into the destination message structure of the target destination multicast group, and send the destination message structure to the target destination multicast group;

[0018] The acquisition node is configured to:

[0019] Determine the target multicast group corresponding to the message data collected by itself according to the preset parsing rule stored by itself;

[0020] Collect the message structure from the target multicast group, and extract the message data collected by itself from the message structure.

[0021] Optionally, the forwarding subsystem is further configured to:

[0022] Send a preset injection message to the destination multicast group according to the preset injection time, so as to trigger the communication node corresponding to the destination multicast group to respond to the preset injection message at the preset injection time.

[0023] Optionally, the communication node is further configured to:

[0024] Register itself to the corresponding multicast group according to its uniquely corresponding multicast address information; the multicast address information includes a multicast address and a port number;

[0025] The forwarding subsystem and the acquisition subsystem are further configured to:

[0026] Register to the corresponding multicast group according to the multicast address information corresponding to the communication node.

[0027] Optionally, the multicast address is composed of a test network identifier, a device identifier of the electronic device to which the communication node belongs, and a node identifier of the communication node.

[0028] Optionally, the port number corresponds to the input port and the output port of the communication node; the input port corresponds to the message structure received by the communication node, or corresponds to one or more bus channels in the communication node; the output port corresponds to the message structure sent by the communication node, or corresponds to one or more bus channels in the communication node.

[0029] The present invention also provides a communication method applied to the above test network system, and the method includes:

[0030] The communication node sends message data to its corresponding multicast group and receives message data from its corresponding multicast group;

[0031] The forwarding subsystem receives message data from the source multicast group according to a preset forwarding rule and sends it to the destination multicast group; the preset forwarding rule includes the forwarding rule for the message data to be forwarded from the source multicast group to the destination multicast group;

[0032] The acquisition subsystem collects the message data from the multicast group to monitor the message data.

[0033] The present invention also provides a computer program product, including a computer program or instruction, and when the computer program or instruction is executed by a processor, the above communication method is implemented.

[0034] The present invention also provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are loaded and executed by a processor, the above communication method is implemented.

[0035] The present invention provides a test network system, comprising: a communication node, a forwarding subsystem, and a collection subsystem. The communication node has a corresponding multicast group one by one, and both the forwarding subsystem and the collection subsystem are registered to the multicast group. The communication node is configured to send message data to its corresponding multicast group and receive message data from its corresponding multicast group. The forwarding subsystem is configured to receive message data from a source multicast group according to a preset forwarding rule and send it to a destination multicast group. The preset forwarding rule includes the forwarding rule for the message data to be forwarded from the source multicast group to the destination multicast group. The collection subsystem is configured to collect the message data from the multicast group to monitor the message data.

[0036] The beneficial effects of the present invention are as follows: The test network system in the present invention consists of a communication node, a forwarding subsystem, and a collection subsystem. The communication node, the forwarding subsystem, and the collection subsystem are associated through a multicast group, and the multicast group corresponds to the communication node one by one. In practical applications, the communication node only performs data sending and receiving through its corresponding multicast group. The forwarding subsystem forwards data between multicast groups according to a preset forwarding rule. The collection subsystem collects data from each multicast group. It can be seen that the communication node only needs to send its own message data to its own multicast group without caring about the subsequent transmission of the message data. At the same time, the communication node only needs to receive message data from its own multicast group without caring about the source of the message data. Therefore, the communication node can flexibly access the test network system. In addition, the message forwarding function in this system is implemented by the forwarding subsystem, which can achieve the decoupling of the forwarding function, thereby realizing more flexible and high-performance data forwarding. In addition, the data collection in this system is implemented by the collection subsystem, which can achieve the decoupling of the collection function, thereby realizing more flexible and high-performance data collection and monitoring. In summary, the present invention can achieve the functional decoupling of data forwarding and data collection through multicast means, thereby improving the overall performance and flexibility of the test network. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.

[0038] Figure 1 It is a structural block diagram of a test network system provided by an embodiment of the present invention;

[0039] Figure 2 It is a schematic diagram of data interaction between a node, a forwarding subsystem, and a collection subsystem provided by an embodiment of the invention;

[0040] Figure 3 The working principle diagram of a forwarding service provided by an embodiment of the present invention;

[0041] Figure 4 The schematic diagram of an unmanned aerial vehicle iron bird test bench system provided by an embodiment of the present invention;

[0042] Figure 5 The flowchart of a communication method provided by an embodiment of the present invention. Specific implementation manners

[0043] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0044] With the wide application of embedded systems and automated testing, how to efficiently transmit, collect and inject data in a network environment has become a research and practice hotspot. In related technologies, network transmission mostly relies on the request-response mode, publish-subscribe mode or peer-to-peer communication protocol, which cannot fully meet the requirements of diverse data nodes, flexible control and efficient processing. The above communication modes, communication protocols and their defects will be briefly introduced below.

[0045] The request-response mode is a common communication mode. Specifically: the client (requesting party) sends a request message to the server (responding party); after receiving the request, the server processes the request and returns a response message to the client. The main defects of the request-response mode are as follows: 1. The client and the server cannot be decoupled: the client needs to know which server the data comes from and needs to actively send a request to the server; the server also needs to know which clients have sent requests and return messages for each request. 2. Poor scalability: for each additional client, the server may have performance problems due to the increased client requests; for each additional server, the client may need to re-evaluate the request object instead of only focusing on the content of interest.

[0046] The Publish-Subscribe pattern is a messaging pattern. In this pattern, there are three main roles: the Publisher, the Subscriber, and the Message Broker. The Publisher is responsible for generating messages and sending them to the Message Broker. The Message Broker manages and distributes these messages and maintains a list of Subscribers. Subscribers express their interest in specific types of messages to the Message Broker. When the Message Broker receives a message from the Publisher that matches the interests of a Subscriber, it forwards the message to the Subscriber. The main drawback of the Publish-Subscribe pattern is that Subscribers and messages cannot be decoupled: Although Subscribers do not need to know who published the message, Subscribers need to actively express their interest in the message (subscribe), and the Message Broker will only send messages to Subscribers after receiving requests from Subscribers. In fact, what Subscribers are really interested in is the content, not the message.

[0047] In the P2P (Peer-to-Peer, point-to-point communication) carousel-polling pattern, nodes (peers) communicate with each other. Each node sends information to other nodes in a certain order or at certain time intervals, or attempts to receive information from other nodes. This pattern can achieve data sharing and update without a central server (or reduce the burden on the central server). The core drawbacks of the P2P carousel-polling pattern are: 1. Poor scalability: Although the P2P architecture can theoretically support a large number of nodes, as the number of nodes increases, the complexity of polling and communication overhead will increase exponentially, resulting in a decline in system performance. For example, when the number of nodes increases from 100 to 1000, the number of objects that each node needs to carousel or poll increases significantly, and the polling strategy and management will become more complex; 2. High coupling degree: Since there is no central agent, each node needs to actively establish a connection with the data source node, which is similar to the request-response pattern. Therefore, the P2P architecture also has a relatively high coupling degree.

[0048] In view of this, regarding the technical problem of how to improve the overall performance and flexibility of the test network, the present invention can provide a test network system that can decouple the functions of data forwarding and data collection through multicast means, thereby improving the overall performance and flexibility of the test network.

[0049] For ease of understanding, please refer to Figure 1 , Figure 1The structural block diagram of a test network system provided by an embodiment of the present invention. This system may include: a communication node 1, a forwarding subsystem 2, and a collection subsystem 3. The communication node 1 is a node that needs to transmit message data. It may include types such as a simulation model and an IO device (IO, input / output), where the simulation model is a program that calculates an output based on an input period; the IO device is divided into an input device, an output device, and an input / output device according to the function of the device. The test network system may include multiple communication nodes 1, and each communication node 1 has a corresponding multicast group 10, and each multicast group 10 has corresponding multicast address information. The multicast address information may include a multicast address and a port number. The multicast address is the IP address used for multicast communication, and the port number is the number of the network port. The forwarding subsystem 2 is a subsystem that provides message data forwarding services. The collection subsystem 3 is a subsystem that provides message data collection services. To be associated with the communication node 1, the forwarding subsystem 2 and the collection subsystem 2 need to register to the multicast group 10. Therefore, the multicast group 10 may include a node member 11 corresponding to the communication node 1, a forwarding member 12 corresponding to the forwarding subsystem 2, and a collection member 13 corresponding to the collection subsystem 3. The node member 11, the forwarding member 12, and the collection member 13 are all virtual logical members. The following are the specific uses of the communication node 1, the forwarding subsystem 2, and the collection subsystem 3:

[0050] The communication node 1 is used to send message data to its corresponding multicast group 10 and receive message data from its corresponding multicast group 10.

[0051] The forwarding subsystem 2 is used to receive message data from a source multicast group according to a preset forwarding rule and send it to a destination multicast group; the preset forwarding rule includes the forwarding rule for message data to be forwarded from the source multicast group to the destination multicast group.

[0052] The collection subsystem 3 is used to collect message data from the multicast group 10 to monitor the message data.

[0053] It should be noted that the above test network system may be set up based on a local area network environment (LAN, Local Area Network), and Ethernet (such as Gigabit Ethernet) may be used as the transmission medium. This embodiment does not limit the specific forms of the communication node 1, the forwarding subsystem 2, and the collection subsystem 3. For example, the three of them may be physical devices or virtual devices (such as virtual machines). In other words, the communication node 1, the forwarding subsystem 2, and the collection subsystem 3 may be set in the same physical device or in different physical devices; multiple communication nodes 1 may be set in the same physical device or in different physical devices.

[0054] In addition, the port number in the multicast address information can be set according to the input port and output port of communication node 1, so that the input and output of the communication node can be directly distinguished according to the port number. For easy understanding, please refer to Figure 2 , Figure 2 FIG. Figure 2 is a schematic diagram of data interaction between a node, a forwarding subsystem, and a collection subsystem provided by an embodiment of the invention. In the figure, the forwarding subsystem 2 (forwarding service) and the collection subsystem 3 (collection service) can directly determine the input and output of communication node 1 according to the port, so as to facilitate data collection and forwarding.

[0055] In addition, the present embodiment does not limit the setting method of the multicast group address, the data sending and receiving function of communication node 1, the data forwarding function of forwarding subsystem 2, and the multicast communication method based on the data collection function of collection subsystem 3, which can be set according to actual application requirements. For example, the multicast address can be set according to the existing multicast address form; the data sending and receiving function, the data forwarding function, and the data collection function can be implemented based on UDP multicast (User Datagram Protocol); the message data can be transmitted over the network based on UDP datagrams.

[0056] In addition, the above-mentioned source multicast group refers to the multicast group from which the message data comes, and the destination multicast group refers to the multicast group to which the message data needs to arrive. In actual communication, any multicast group can be the source multicast group and the destination multicast group.

[0057] In addition, in the preset forwarding rule, one message data can correspond to one or more destination multicast groups, and one-to-one forwarding or one-to-many forwarding of the message data can be realized.

[0058] Based on the above system structure, it can be seen that communication node 1 only performs message data interaction with its corresponding multicast group 10, neither needs to care about the destination corresponding to the message data sent by itself, nor needs to care about the source corresponding to the message data received by itself. In other words, communication node 1 does not need to consider which other communication node its message data needs to be sent to, nor does it need to consider which other communication node to request message data from. In this way, all the input and output of a communication node 1 are within its exclusive and unique multicast address, and there is no direct cross-link relationship with other communication nodes. Communication node 1 can focus on the generation and processing of message data, and can achieve decoupling between communication nodes 1; at the same time, the access of communication node 1 is very simple and flexible. It only needs to configure the multicast group 10 (multicast address) corresponding to communication node 1, and add communication node 1, forwarding subsystem 2, and collection subsystem 3 to this multicast group, which can enhance the scalability of communication node 1.

[0059] In addition, the forwarding service for message data is provided by the forwarding subsystem 2, which stores preset forwarding rules. The preset forwarding rules include the forwarding rules corresponding to each type of message data. The forwarding rules include the source multicast group (source multicast address) and the destination multicast group (destination multicast address) corresponding to the message data. For example, a forwarding rule may indicate that a data α in the input a of node A comes from a data β in the output b of node B. In actual work, the forwarding subsystem 2 can retrieve the message data from the output port of the source multicast group according to the preset forwarding rules and forward it to the input port of the destination multicast group. Therefore, this embodiment can achieve the decoupling and centralized management and control of the forwarding service. Users can statically or dynamically set forwarding rules in the forwarding subsystem, which can improve the flexibility of forwarding configuration and management and control. At the same time, the above preset forwarding rules are set for message data, so fine-grained and flexible management and control can be performed on the forwarding of each type of message data. At the same time, the decoupling of the forwarding service can facilitate the expansion of other functions in the forwarding subsystem, such as expanding the message data injection function, the message data format / data type conversion function, the unpacking / packaging function, the message data encrypted transmission function, etc., thereby enhancing the scalability of the forwarding subsystem 2. For ease of understanding the working principle of the forwarding subsystem 2, please refer to Figure 3 , Figure 3 which is a working principle diagram of a forwarding service provided by an embodiment of the present invention.

[0060] In addition, the test network system also includes an acquisition subsystem 3, which is responsible for acquiring message data from the multicast group 10 to monitor the message data. It should be noted that the message data acquired by the acquisition subsystem 3 from the multicast group 10 can come from either the communication node 1 of this multicast group or the forwarding subsystem 2 of this multicast group. In other words, the acquisition subsystem 3 can acquire and monitor the message data input by the communication node 1 into this multicast group, and can also acquire and monitor the message data input by the forwarding subsystem 2 into this multicast group, that is, it can simultaneously acquire the input situation and transmission situation of the message data in this test network system. Therefore, this embodiment can achieve the decoupling and centralized management and control of the acquisition service, and can improve the comprehensiveness, flexibility and reliability of data acquisition and monitoring; and the decoupling of the acquisition service can facilitate the expansion of other functions in the acquisition subsystem. For example, after receiving a message, the acquisition service will also parse out the data that the user is concerned about according to the format and data type of the message structure for presentation or storage. In the case where the corresponding message is not received, the valid information of the data will also be marked as invalid. For another example, the acquisition subsystem can be used to observe the change of data, can also be used to store test data, and may also be used to monitor the health status of the test network (such as judging the status of the node itself by the output of the acquisition node, and judging whether the calculation status of the node is valid by the input of the acquisition node, etc.). In this way, the scalability of the acquisition subsystem 3 can be enhanced.

[0061] In another embodiment, to improve data transmission efficiency and conform to the actual communication scenario, communication node 1 can send and receive message data based on a message structure. Specifically, communication node 1 can also be used for:

[0062] Sending a message structure to its corresponding multicast group and receiving a message structure from its corresponding multicast group; the message structure contains multiple message data.

[0063] In this embodiment, considering that a single communication node 1 can generate, send, and process multiple types of message data. For example, when communication node 1 is a simulation model, it can generate and process multiple simulation signals; when communication node 1 is an IO device, its bus interface (such as SBUS, Serial Bus, a serial communication bus) can send and receive multiple types of message data. Therefore, to improve data transmission efficiency and be closer to the actual communication scenario, communication node 1 can perform data sending and receiving based on a message structure. Among them, the message structure can contain multiple message data; and the relative positions of different message data in the message structure can be fixed, and the relative positions of message data in the message structure can be configured using a configuration file. At this time, when communication node 1 sends data, it can first combine multiple message data into a message structure and then send the message structure to its corresponding multicast group. When communication node 1 receives data, it can receive the message structure from its corresponding multicast group and parse the message structure to obtain different types of message data.

[0064] It should be noted that this embodiment does not limit the specific form of the message structure, which can be set according to actual application requirements. It should be pointed out that the size of the message structure can be set to 1 to 1472 bytes, which can effectively avoid UDP packet fragmentation. At this time, if the structure consists of single-precision floating-point numbers, it can contain at most 368 data.

[0065] Furthermore, when communication node 1 sends and receives message data based on a message structure, the forwarding subsystem 2 needs to add functions for parsing and repackaging the message structure. Specifically, the forwarding subsystem 2 can also be used for:

[0066] Receiving a source message structure from a source multicast group according to a preset forwarding rule, reorganizing the message data in the source message structure into a destination message structure corresponding to the destination multicast group of the message data, and sending the destination message structure to the destination multicast group; the preset forwarding rule also includes the position of the message data in the source message structure and the position of the message data in the destination message structure.

[0067] In this embodiment, the source message structure refers to the message structure taken from the source multicast group, and the destination message structure is the message structure to be sent to the destination multicast group. It can be seen that the forwarding subsystem 2 adds the functions of parsing and repackaging the message structure, and the preset forwarding rules add the positions of the message data in the source message structure and the positions of the message data in the destination message structure. Therefore, after receiving the source message structure from the source multicast group, the forwarding subsystem 2 needs to first reorganize the message data in the source message structure into the destination message structure of the destination multicast group corresponding to the message data according to the preset forwarding rules, and then send the destination message structure to the destination multicast group.

[0068] It should be noted that different message data in the source message structure can correspond to different destination multicast groups, so that more flexible message forwarding can be achieved.

[0069] In addition, the parsing of the source message structure by the forwarding subsystem 2 and the reorganization of the destination message structure can be completed in memory. For example, the forwarding subsystem 2 can start a receiving process and cache the source message structure in its own memory. Subsequently, the forwarding subsystem 2 extracts the message data from the memory according to the preset forwarding rules and fills it into the position corresponding to the destination multicast group in the send cache, and finally sends the assembled message structure in the send cache to the destination multicast group.

[0070] In addition, in two different message structures, the types of the same data may be different. The data types here include floating-point type, integer type, boolean type, etc., and also include two kinds of information, resolution and offset. When the forwarding subsystem 2 forwards data of different data types, corresponding data type conversion can also be performed.

[0071] Furthermore, when the communication node 1 sends and receives message data based on the message structure, the acquisition subsystem 3 needs to add the function of parsing the message structure. Specifically, the acquisition subsystem 2 can also be used for:

[0072] Collect the message structure from the multicast group according to the preset parsing rules, and extract the message data from the message structure; the preset parsing rules include the position of the message data in the message structure.

[0073] In this embodiment, similar to the forwarding subsystem 2, the acquisition subsystem 3 needs to add the preset parsing rules and the function of parsing the message structure, and the preset parsing rules include the position of the message data in the message structure. In actual work, after obtaining the message structure from the multicast group, the acquisition subsystem 3 needs to parse the message structure according to the above preset parsing rules to extract the message data.

[0074] In another embodiment, the forwarding subsystem 2 can also implement the message injection function, that is, it can also be used for:

[0075] According to a preset injection time, send a preset injection message to a destination multicast group to trigger the communication nodes corresponding to the destination multicast group to respond to the preset injection message at the preset injection time.

[0076] In this embodiment, the preset injection message refers to the message data directly sent to a specified communication node through the forwarding subsystem 2, and the preset injection time refers to the duration of maintaining the sending of the preset injection message. It can be seen that in this embodiment, the user can dynamically request the forwarding subsystem 2 to send a preset injection message to a certain communication node according to the preset injection time to trigger the communication node to respond to the preset injection message at the preset injection time.

[0077] By setting the above functions, this embodiment can perform fault injection and fault simulation in the test network system, thereby being able to simulate various fault scenarios. For example, it is possible to dynamically specify injecting a fixed signal or a forwarding signal into the input of a certain node and set the injection duration, so that the forwarding subsystem 2 continuously sends the fixed signal or the forwarding signal to the communication node according to the injection duration.

[0078] It should be noted that this embodiment does not limit how the user requests the forwarding subsystem 2 to perform message injection. A dynamic forwarding rule can be sent to the forwarding subsystem 2, and the dynamic forwarding rule includes a preset injection message, the destination multicast group (destination multicast address) corresponding to the preset injection message, and a preset expiration time. The preset expiration time plays the same role as the preset injection time, that is, when the forwarding subsystem 2 determines that the dynamic forwarding rule has not expired according to the preset expiration time, it sends the preset injection message to the destination multicast group, and when it determines that the dynamic forwarding rule has expired, it stops sending the preset injection message. This embodiment does not limit which entity sends the dynamic forwarding rule to the forwarding subsystem 2. It can be sent manually by the user or by other entities. For example, a signal generator can be set in the test network. The function of the signal generator is to prepare a series of signals for injection according to user requirements and be dynamically bound to the positions where injection is required during system operation. The signal generator can also accept some inputs and superimpose them on the output signals, and these inputs can also be dynamically bound to the inputs of other nodes, which is usually used to implement the function of superimposing the injection signal on the original signal. This embodiment also does not limit the specific values and contents of the above preset injection time and preset injection message, which can be set according to actual application requirements.

[0079] In another embodiment, to improve the reliability of the forwarding subsystem 2 and avoid service interruption caused by a single point of failure, the forwarding subsystem 2 may include multiple forwarding nodes, and the preset forwarding rules are stored in each forwarding node. The following are the specific uses of the forwarding nodes:

[0080] Determine the target source multicast group and the target destination multicast group corresponding to the message data to be forwarded by itself according to the preset forwarding rules stored by itself;

[0081] Receive the source message structure from the target source multicast group, reorganize the message data to be forwarded by itself from the source message structure into the destination message structure of the target destination multicast group, and send the destination message structure to the target destination multicast group.

[0082] In this embodiment, if the test network system configures the load sharing function of the forwarding service, that is, the forwarding subsystem 2 includes multiple forwarding nodes, an optimization program will split the preset forwarding rules to each forwarding node with the goal of minimizing duplicate reception and balancing the load. At this time, each forwarding node only forwards the message data to be forwarded by itself according to the preset forwarding rules stored by itself.

[0083] In the actual working process, the forwarding node can determine the target source multicast group and the target destination multicast group corresponding to the message data to be forwarded by itself. Subsequently, the forwarding node can receive the source message structure from the target source multicast group and only extract the message data to be forwarded by itself from the source message structure. In other words, the forwarding node will ignore the message data in the message structure that is not to be forwarded by itself. Subsequently, the forwarding node can perform message structure reorganization and send the obtained destination message structure to the target destination multicast group. Among them, the target source multicast group specifically refers to the source multicast group corresponding to the message data to be forwarded by the forwarding node, and the target destination multicast group specifically refers to the destination multicast group corresponding to the message data to be forwarded by the forwarding node. In other words, the output corresponding to a single communication node can be received by multiple forwarding nodes, but the input corresponding to a single communication node can only be sent by one forwarding node. Therefore, the splitting is based on the sending unit.

[0084] In addition, to improve the reliability of the acquisition subsystem 3 and avoid service interruption caused by single-point failure, the acquisition subsystem 3 can also include multiple acquisition nodes, and the preset parsing rules are stored in each acquisition node. The following are the specific uses of the acquisition nodes:

[0085] Determine the target multicast group corresponding to the message data collected by itself according to the preset parsing rules stored by itself;

[0086] Collect the message structure from the target multicast group and extract the message data collected by itself from the message structure.

[0087] In this embodiment, if the test network system is configured with a load sharing function for the acquisition service, that is, the acquisition subsystem 2 includes multiple acquisition nodes, an optimization program will split the preset parsing rules to each acquisition node with the goal of minimizing duplicate reception and balancing the load. At this time, each acquisition node only acquires the message data to be acquired by itself according to the preset parsing rules stored in itself.

[0088] In the actual working process, the acquisition node can determine the target multicast group corresponding to the message data acquired by itself. Subsequently, the acquisition node can receive the message structure from the target multicast group and only extract the message data to be acquired by itself from the message structure. In other words, the acquisition node will ignore the message data in the message structure that is not to be acquired by itself. In other words, the output of a communication node can be received by multiple acquisition nodes, but one piece of message data in the output is only acquired by a specific acquisition node.

[0089] In another embodiment, when the communication node 1 accesses the test network system, it needs to allocate the corresponding multicast address information and join the corresponding multicast group 10; the forwarding subsystem and the acquisition subsystem also need to join the multicast group 10. The method for the communication node 1 to access the test network system will be introduced below.

[0090] The communication node 1 can also be used for:

[0091] Register itself to the corresponding multicast group according to the multicast address information uniquely corresponding to itself; the multicast address information includes the multicast address and the port number.

[0092] The forwarding subsystem and the acquisition subsystem can also be used for:

[0093] Register to the corresponding multicast group according to the multicast address information corresponding to the communication node.

[0094] In this embodiment, the multicast address refers to the IP address used for multicast communication; the port number refers to the number corresponding to the network port used by the communication node 1 for communication, and this network port can correspond to the input port and output port of the communication node 1, so that the input and output of the communication node 1 can be directly distinguished according to the port number.

[0095] It should be noted that the multicast address allocation method in this embodiment is not limited and can be set according to actual application requirements, as long as it is ensured that each communication node 1 is assigned a different multicast address. For example, for the convenience of locating the communication node 1, the multicast address can be composed of the test network identifier (test network ID), device identifier (device ID), and node identifier (node ID). Among them, the test network identifier is the unique identifier of the test network to which the communication node 1 belongs; the device identifier is the unique identifier of the electronic device to which the communication node 1 belongs; the node identifier is the unique identifier of the communication node 1. The following introduces a setting method of the multicast address:

[0096] 1. First, determine the test network to which the node belongs. Each test network has a unique test network ID, and its range is 225 to 239. The reason for this range is that the first byte of the multicast address ranges from 224 to 239, but some addresses starting with 224 are reserved addresses. To avoid conflict problems, it is not recommended to use 224.

[0097] 2. Then, determine the computer to which the node belongs. Each computer has a unique computer ID within the test network to which it belongs, and its range is 0 to 65535.

[0098] 3. Then, determine the node ID. The node ID is unique within the computer to which it belongs, and its range is 0 to 255.

[0099] 4. Combine the test network ID, computer ID, and node ID, which is the multicast address of the node.

[0100] It can be seen that each communication node 1 has a multicast address, and each multicast address belongs to only one communication node 1. At this time, within a local area network, there can be 15 independent test networks. Each test network can contain up to 65535 computers at most, and each computer can contain 255 nodes (such as running 255 simulation models or accessing 255 IO boards). Therefore, the scale of the test network allowed by the present invention is sufficient.

[0101] Furthermore, the setting methods of the input port and output port of the communication node 1 in this embodiment are also not limited. For example, for a model node, when the structure size is sufficient, the structure composed of all the inputs of the model is used as one input and is assigned a UDP port number, and the structure composed of all the outputs is used as one output and is assigned a UDP port number. If the structure size exceeds the limit, the structure needs to be split into multiple inputs or multiple outputs, and in this case, multiple UDP port numbers need to be assigned.

[0102] For an IO node, the situation is slightly more complicated. It is best for the input and output to have a mapping relationship with the actual data bus. Generally, there are several situations:

[0103] 1. The IO device has multiple channels, and only one scalar data is transmitted on each channel at the same time. This is usually an analog or discrete quantity board. In this case, all channels can be combined into a single input or output structure (array).

[0104] 2. The IO device has multiple channels, and a message structure is transmitted on each channel, but the message structure on each channel is unique. In this case, one channel can be mapped to an input or output. For example, SBUS simulation or acquisition devices are applicable to this situation.

[0105] 3. The IO device has multiple channels, and multiple different message structures are transmitted on each channel, which is common in bus simulation or acquisition devices, such as CAN (Controller Area Network) or RS422. In this case, each message can be mapped to an input or output.

[0106] Therefore, overall, the input port of communication node 1 can correspond to the message structure received by the communication node, or can correspond to one or more bus channels in the communication node; similarly, the output port can correspond to the message structure sent by the communication node, or can correspond to one or more bus channels in the communication node.

[0107] In addition, the port number corresponding to each node in the test network can be unique, so as to avoid port number conflict problems during program design.

[0108] In another embodiment, the test network system can have corresponding control software. This control software is a set of software, divided into host computer software and service software. The functions that need to be implemented in the host computer are as follows:

[0109] 1. Simulation model code encapsulation. The simulation model usually generates code, and it is necessary to parse the input and output of the simulation model and map the input and output to UDP multicast messages according to the configuration.

[0110] 2. IO device input and output definition. The IO device code is usually handwritten code, and its input and output need to be defined in a unified format in order to be used by the forwarding service and the acquisition monitoring service.

[0111] 3. Forwarding rule configuration. The host computer software manages all messages and the data in the messages, and the user defines the binding relationship of the data in the host computer software.

[0112] 4. Signal injection configuration. The host computer software cooperates with the signal generator to automatically create the dynamic binding rules between the signal generator and the injection position, so as to encapsulate these basic functions into advanced functions such as signal injection.

[0113] 5. Data monitoring and storage. The user checks the data to be monitored on the host computer, and the host computer software sends the acquisition list to the acquisition service (or the host computer software itself integrates the acquisition service), and displays the acquired data in the form of a chart or stores it in a specified format.

[0114] The service software includes the forwarding service, which has been described above. To enhance the usability of the system, the node service is also included in this embodiment, which can control the start, stop, update, addition, deletion, and status acquisition of different nodes. The node service usually uses the HTTP protocol, which is a request-response mode because these are all low-frequency operations. This function is independent of the test network and does not affect each other.

[0115] The following is an illustration of the specific application of the present invention in a project:

[0116] The UAV iron bird test bench is a test system for the hardware in the loop (HIL) of the flight control and actuation systems. The test network is the key medium for closing the loop of the circuit, carrying the data transfer function between the input and output of the flight control system and the actuation system and the simulation model. The core part of the test network is the UDP multicast network.

[0117] The test equipment usually consists of an acquisition component, a sending component, and middleware. The acquisition component is responsible for acquiring signals, the sending device is responsible for sending simulation signals, and the middleware includes functions such as generating signals, storing signals, and processing signals. The middleware responsible for generating signals can also be regarded as a virtual acquisition component, and the middleware responsible for storing signals can also be regarded as a virtual sending component (i.e., the signal is sent to the acquisition device). The middleware for processing signals is divided into two forms: direct forwarding and computing processing, but there is no difference in terms of architecture.

[0118] User Datagram Protocol (UDP) is a connectionless transport layer protocol that provides unreliable packet transmission services and does not provide functions such as arrival confirmation, sorting, and flow control of packets. However, it also has advantages such as fast transmission speed and low overhead. Each packet only uses 8 bytes to transmit header information, including the ports of the source and destination, the data length, and the checksum. The UDP multicast mode is a one-to-many transmission method, and the destination address of the packet is not just one, but a group, forming a group address. All receivers join a group, and the data flowing to the group address immediately starts to be transmitted to the receivers, and all members within the group can receive the packet. The members of the multicast group are dynamic, and the host can join and leave the multicast group at any time. The number and location of the members are not restricted.

[0119] In the UAV iron bird test bench, all simulation models and IO sub-devices are regarded as a node, and each node has its own multicast address. Each node sends and receives data within its own multicast address. The host computer software telespider listens for data within each multicast address, while the forwarding service listens for data at a specific multicast address according to the configuration and then forwards it to the corresponding multicast address. See Figure 4 。

[0120] 1. Model node:

[0121] Each model has specific inputs and outputs. In the code generated by Simulink, the inputs and outputs are a structure. Different from other common test devices, there is no need to add a driver module to the model to map the inputs and outputs to the driver. In the models in this test network, only the data needs to be exposed through the input and output interfaces, and two UDP multicast messages for inputs and outputs will be automatically generated. By relying on the model itself alone, it is impossible to drive the peripherals to send and receive, because the data is only within the multicast address of the model itself.

[0122] The model runs in the simulation model target machine. The number of the simulation model target machine is 0x03, and the IP assigned to the simulation model target machine is 192.168.0.3, where 192.168.0.0 / 24 is the network segment of the test device, and the last digit of the IP corresponds to the device number. The multicast address of each model is 224.0.3.x, where x is the model ID, 224 is the number for distinguishing the test network, and 0.3 is consistent with the last two digits of the device IP. When expanding the test network in the future, devices in different network segments may be in the same test network, and the same device may also be in different test networks. The IP setting limits that each simulation model target machine can be configured with a maximum of 255 models, and each network segment can have a maximum of 255 devices. Under these limitations, it can far meet almost all test requirements.

[0123] The port numbers for the model to send and receive data are pre-allocated when creating a new model. In theory, the port numbers of each multicast address do not interfere with each other and can be repeated. However, generally, when resources are sufficient, try to ensure that the port numbers are unique within the test network. Currently, the port numbers of the model start from 19712, and 16 consecutive port numbers are reserved for each model, with an upper limit of 29999, supporting a total of 643 models.

[0124] 2. IO sub-device node

[0125] The number of inputs and outputs of the IO sub-device is not fixed.

[0126] Analog quantity acquisition devices, such as speed acquisition, angle acquisition, and current acquisition of hysteresis loads, each device has multiple channels, each channel corresponds to a data, the usual practice (and the implementation in this project) is to package multiple data into a message and send it to the multicast address.

[0127] Analog quantity sending devices, such as PWM simulation devices and current instructions for hysteresis loads, each device has multiple channels, each channel corresponds to a data. The usual practice (and the implementation in this project) is to obtain a message from the multicast address and parse all the data from the message at one time.

[0128] Some digital quantity transmission devices, such as SBUS devices, contain multiple channels, each channel sends multiple data at a time (SBUS contains 16 data). The usual practice (and the implementation in this project) is to map the data of each channel into a message. SBUS devices also contain multiple digital quantity acquisition devices, and the data of each channel is also mapped into a message.

[0129] Some digital transmission devices, such as SPI devices and I2C devices, have only one channel, on which multiple data are transmitted through a request-response mechanism. The usual practice (and the implementation in this project) is to map all the data involved into one message.

[0130] Devices like CAN have multiple duplex channels, each with multiple messages. Each message is a structure containing multiple data. The usual practice (and the implementation in this project) is to map each CAN message into a UDP message separately.

[0131] These framing mechanisms are all completed in the device service layer. As mentioned above, the device service is similar to the gateway from the UDP multicast network to the serial port. Similarly, these devices cannot work independently, and their data only exists in their respective multicast addresses. The device service should originally run in the IO resource device, which is numbered 0x02, but due to system architecture reasons, it is temporarily stored in the simulation model target machine. The multicast address of each sub-device is 224.0.2.x, where x is the sub-device ID. The device ID is currently classified by type, and 16 consecutive IDs are reserved for each type. For example, the IDs of the two PWM devices are 0x10 and 0x11. In this way, an IO resource device theoretically supports 16 types of devices, and each device supports 16. The ID allocation mechanism can also be adjusted at any time.

[0132] The different input and output port numbers of the sub-devices are currently allocated between 30000 and 39999. The middle three decimal digits are used to represent the sub-device ID, and the last digit is the message sequence number of the device. These allocations are all user-defined, and the rules can be defined according to needs. However, it should be noted that if the last digit of the port number is odd, it means this is a message sent from the node to the multicast address; if it is even, it is a message received by the node from the multicast address.

[0133] 3. Forwarding Service

[0134] Nodes such as models and IO sub-devices are like isolated islands in the test network. Connecting the entire test network depends on the forwarding service. The forwarding service is a tool that listens for data within multiple multicast addresses based on binding rules and then forwards the data to other multicast addresses. The binding rules here are divided into two types: static and dynamic. The static binding rules come from the binding relationships set in Telespider, which take effect by default after the forwarding service starts. The dynamic binding rules come from data incentives, and each dynamic binding rule has its own lifecycle.

[0135] The forwarding service is currently also running in the simulation model target machine.

[0136] 4. Service Management

[0137] The model service, device service, and forwarding service all have a management platform, which is based on the HTTP service. Telespider also manages these services through the management platform. Generally, all regular operations can be completed in Telespider. However, if some unexpected situations occur, directly accessing the service management platform is more flexible.

[0138] The address of the model service management is http: / / 192.168.0.2:18080, and it includes the following requests:

[0139] shutdown: Shut down the simulation model target machine;

[0140] new / <model_name>: Create a new empty model with the model name model_name, allocate resources such as ID and port number, and then return the address of the model. Subsequently, the caller can upload the model file to the simulation model target machine via scp;

[0141] make / <model_name>: Compile the specified model;

[0142] reload: Reload the model. If some additions, deletions, or modifications are made to the model in the background, this API can be used to synchronize to the model management;

[0143] models: List all current models;

[0144] start / <model_name>: Start the model;

[0145] stop / <model_name>: Stop the model;

[0146] status / <model_name>: Check the status of the model (whether it is running);

[0147] delete / <model_name>: Delete the model. Note that these steps cannot be undone;

[0148] info / <model_name>: View model information, mainly including ID, port number, etc.

[0149] To call these APIs, just append the API to the URL. For example, to create a new model called "TestModel", you only need to access http: / / 192.168.0.2:18080 / new / TestModel.

[0150] The address for device service management is http: / / 192.168.0.2:18090 and includes the following requests:

[0151] shutdown: Shut down the simulation model target machine. This API was originally used to close IO resource devices, but since the device service is currently also running inside the simulation model target machine, it also shuts down the simulation model target machine;

[0152] reload: Reload all devices. If some additions, deletions, or modifications are made to the devices in the background, you can use this API to synchronize to device management;

[0153] devices: List all current devices;

[0154] start / <device_name>: Start the device;

[0155] stop / < device_name >: Stop the device;

[0156] status / < device_name >: Check the status of the device (whether it is running);

[0157] config / <device_name>: This is a POST method that sends the device configuration items to the management platform via POST parameters and will automatically generate a device configuration file.

[0158] The device service management does not provide APIs for addition, compilation, and deletion yet. Therefore, currently, adding a device requires manual operation.

[0159] The address of the forwarding service management is http: / / 192.168.0.2:18070 and it includes the following requests:

[0160] restart: Restart the forwarding service. Generally, after updating the binding relationship, it is necessary to restart the forwarding service to take effect;

[0161] add-binding: Add a dynamic binding. This is a POST method and the binding parameters are in the POST parameters;

[0162] add-sending: Add a message to be sent. This is a POST method;

[0163] add-receiving: Add a message to be received. This is a POST method;

[0164] binding: View existing bindings;

[0165] sending: View existing messages to be sent;

[0166] receiving: View existing messages to be received.

[0167] Based on the above introduction to the test network system, the communication method in this embodiment will be introduced below. Please refer to Figure 5 , Figure 5 which is a flowchart of a communication method provided by an embodiment of the present invention. The method may include:

[0168] S501. The communication node sends message data to its corresponding multicast group and receives message data from its corresponding multicast group;

[0169] S502. The forwarding subsystem receives message data from the source multicast group according to a preset forwarding rule and sends it to the destination multicast group; the preset forwarding rule includes the forwarding rule for message data to be forwarded from the source multicast group to the destination multicast group;

[0170] S503. The acquisition subsystem acquires message data from the multicast group to monitor the message data.

[0171] It can be seen that the test network system in the present invention is composed of communication nodes, a forwarding subsystem, and a collection subsystem. The communication nodes, the forwarding subsystem, and the collection subsystem are associated through a multicast group, and the multicast group corresponds one-to-one with the communication nodes. In practical applications, the communication nodes only perform data sending and receiving through their corresponding multicast groups. The forwarding subsystem forwards data between multicast groups according to preset forwarding rules. The collection subsystem collects data from each multicast group. It can be seen that the communication nodes only need to send their own message data to their own multicast groups without caring about the subsequent transmission of the message data. At the same time, the communication nodes only need to receive message data from their own multicast groups without caring about the source of the message data. Therefore, the communication nodes can flexibly access the test network system. In addition, the message forwarding function in this system is implemented by the forwarding subsystem, which can achieve the decoupling of the forwarding function, thereby realizing more flexible and high-performance data forwarding. In addition, the data collection in this system is implemented by the collection subsystem, which can achieve the decoupling of the collection function, thereby realizing more flexible and high-performance data collection and monitoring.

[0172] It should be noted that although the order of S501 to S503 is described in this embodiment, in practical applications, S501 to S503 can be executed out of order.

[0173] Optionally, the method may further include:

[0174] The communication node sends a message structure to its corresponding multicast group and receives a message structure from its corresponding multicast group; the message structure contains multiple message data;

[0175] The forwarding subsystem receives a source message structure from the source multicast group according to the preset forwarding rules, reorganizes the message data in the source message structure into a destination message structure of the destination multicast group corresponding to the message data, and sends the destination message structure to the destination multicast group; the preset forwarding rules also include the position of the message data in the source message structure and the position of the message data in the destination message structure;

[0176] The collection subsystem

[0177] Collects a message structure from the multicast group according to the preset parsing rules, and extracts message data from the message structure; the preset parsing rules include the position of the message data in the message structure.

[0178] Optionally, the forwarding subsystem includes multiple forwarding nodes, the collection subsystem includes multiple collection nodes, the preset forwarding rules are stored in each forwarding node, and the preset parsing rules are stored in each collection node; the method may further include:

[0179] The forwarding node determines the target source multicast group and the target destination multicast group corresponding to the message data to be forwarded by itself according to the preset forwarding rules stored by itself;

[0180] The forwarding node receives the source message structure from the target source multicast group, reorganizes the message data to be forwarded by itself from the source message structure into the destination message structure of the target destination multicast group, and sends the destination message structure to the target destination multicast group;

[0181] The acquisition node determines the target multicast group corresponding to the message data acquired by itself according to the preset parsing rules stored by itself;

[0182] The acquisition node acquires the message structure from the target multicast group and extracts the message data acquired by itself from the message structure.

[0183] Optionally, this method may further include:

[0184] The forwarding subsystem sends a preset injection message to the destination multicast group according to the preset injection time, so as to trigger the communication nodes corresponding to the destination multicast group to respond to the preset injection message at the preset injection time.

[0185] This method may further include:

[0186] The communication node registers itself to the corresponding multicast group according to the multicast address information uniquely corresponding to itself; the multicast address information includes a multicast address and a port number;

[0187] Both the forwarding subsystem and the acquisition subsystem register to the corresponding multicast group according to the multicast address information corresponding to the communication node.

[0188] Optionally, the multicast address is composed of a test network identifier, a device identifier of the electronic device to which the communication node belongs, and a node identifier of the communication node.

[0189] Optionally, the port number corresponds to the input port and output port of the communication node; the input port corresponds to the message structure received by the communication node, or corresponds to one or more bus channels in the communication node; the output port corresponds to the message structure sent by the communication node, or corresponds to one or more bus channels in the communication node.

[0190] Since the embodiments in the communication method part correspond to the embodiments in the test network system part, for the description of the embodiments in this part, please refer to the description of the embodiments in the test network system part, and details will not be repeated here.

[0191] An embodiment of the present invention further provides a computer program product, including a computer program / instructions, and when the computer program / instructions are executed by a processor, the communication method described in the above embodiments is implemented.

[0192] Since the embodiments of the computer program product part correspond to the embodiments of the communication method and the test network system part, for the descriptions of the embodiments in this part, please refer to the descriptions of the embodiments of the test network system part, which will not be repeated here.

[0193] An embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the communication method described in the above embodiments is implemented.

[0194] Since the embodiments of the computer-readable storage medium part correspond to the embodiments of the communication method and the test network system part, for the descriptions of the embodiments in this part, please refer to the descriptions of the embodiments of the test network system part, which will not be repeated here.

[0195] The embodiments in the specification are described in a progressive manner. The key point of each embodiment is to illustrate the differences from other embodiments. For the same or similar parts among the embodiments, reference can be made to each other. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple. For the relevant parts, reference can be made to the descriptions in the method part.

[0196] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in this article can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.

[0197] The steps of the method or algorithm described in combination with the embodiments disclosed in this article can be directly implemented by hardware, a software module executed by a processor, or a combination of the two. The software module can be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, or any other form of storage medium well known in the technical field.

[0198] The above has introduced in detail a test network system, a communication method, a program product, and a storage medium provided by the present invention. Specific examples are used herein to illustrate the principles and implementation manners of the present invention. The description of the above embodiments is only for helping to understand the method and its core idea of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the protection scope of the present invention.

Claims

1. A test network system, characterized in that: include: A communication node, a forwarding subsystem and a collection subsystem, wherein the communication node has a one-to-one corresponding multicast group, and the forwarding subsystem and the collection subsystem are both registered to the multicast group; The communication node is used to send message data to the multicast group corresponding to itself, and receive message data from the multicast group corresponding to itself; The forwarding subsystem is used to receive message data from a source multicast group and send it to a destination multicast group according to a preset forwarding rule; the preset forwarding rule includes a forwarding rule for forwarding the message data from the source multicast group to the destination multicast group; The collection subsystem is used to collect the message data from the multicast group to monitor the message data.

2. The test network system according to claim 1, characterized in that: The communication node is further used for: Sending a message structure to the multicast group corresponding to itself, and receiving a message structure from the multicast group corresponding to itself; the message structure includes a plurality of message data; The forwarding subsystem is further used for: According to the preset forwarding rule, a source message structure is received from the source multicast group, message data in the source message structure is reorganized into a destination message structure of a destination multicast group corresponding to the message data, and the destination message structure is sent to the destination multicast group; the preset forwarding rule further includes a position of the message data in the source message structure and a position of the message data in the destination message structure; The acquisition subsystem is also used for: According to a preset parsing rule, the message structure is collected from the multicast group, and the message data is extracted from the message structure; the preset parsing rule includes the position of the message data in the message structure.

3. The test network system according to claim 2, characterized in that: The forwarding subsystem includes a plurality of forwarding nodes, the collection subsystem includes a plurality of collection nodes, the preset forwarding rule is stored in each of the forwarding nodes, and the preset parsing rule is stored in each of the collection nodes; The forwarding node is used to: Determine the target source multicast group and the target destination multicast group corresponding to the message data forwarded by itself according to the preset forwarding rules stored by itself; receiving the source message structure from the target source multicast group, reorganizing the message data forwarded by itself from the source message structure into the destination message structure of the target destination multicast group, and sending the destination message structure to the target destination multicast group; The collection node is used to: Determine the target multicast group corresponding to the message data collected by itself according to the preset parsing rules stored by itself; The message structure is collected from the target multicast group, and the message data collected by itself is extracted from the message structure.

4. The test network system according to claim 1, characterized in that: The forwarding subsystem is further used for: According to the preset injection time, the preset injection message is sent to the destination multicast group to trigger the communication node corresponding to the destination multicast group to respond to the preset injection message within the preset injection time.

5. The test network system according to claim 1, characterized in that: The communication node is further used for: Register itself to the corresponding multicast group according to its unique corresponding multicast address information; the multicast address information includes a multicast address and a port number; The forwarding subsystem and the collection subsystem are further used for: Register to the corresponding multicast group according to the multicast address information corresponding to the communication node.

6. The test network system according to claim 5, characterized in that: The multicast address is composed of a test network identifier, a device identifier of an electronic device to which the communication node belongs, and a node identifier of the communication node.

7. The test network system according to claim 5, characterized in that: The port number corresponds to the input port and output port of the communication node; the input port corresponds to the message structure received by the communication node, or corresponds to one or more bus channels in the communication node; the output port corresponds to the message structure sent by the communication node, or corresponds to one or more bus channels in the communication node.

8. A communication method, characterized in that: Applied to the test network system according to any one of claims 1 to 7, the method comprises: The communication node sends message data to the multicast group corresponding to itself, and receives message data from the multicast group corresponding to itself; The forwarding subsystem receives message data from a source multicast group and sends it to a destination multicast group according to a preset forwarding rule; the preset forwarding rule includes a forwarding rule for forwarding the message data from the source multicast group to the destination multicast group; The collection subsystem collects the message data from the multicast group to monitor the message data.

9. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the communication method according to claim 8 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are loaded and executed by the processor, the communication method according to claim 8 is implemented.