Route verification method and device for network topology and storage medium

By determining the expected output path of data packets in the network topology and classifying them, comparing the actual data output situation, verifying whether the target nodes in the network topology meet the first-in-first-out principle, the problem of inability to effectively verify packet routing and order in the prior art is solved, and optimization and stability guarantee of network topology performance are achieved.

CN120200946APending Publication Date: 2025-06-24SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510431541.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-08
Publication Date
2025-06-24

AI Technical Summary

Technical Problem

It is difficult for the prior art to verify whether the packets in the network topology are routed to the desired nodes strictly following the algorithm logic. Especially when the service load in the output direction is high, it is impossible to effectively verify the first-in, first-out principle of data packets, resulting in problems such as large routing delays in the overall performance of the network topology.

Method used

By determining the expected output path of the data packet, classifying the data packets, and comparing them with the actual data output situation, we judge whether the classification group is consistent with the actual data output situation of the corresponding output path, to verify whether the target node in the network topology meets the first-in-first-out principle.

Benefits of technology

The first-in-first-out principle of any node in the network topology is realized. By comparing the actual output of the data packet and the expected output, it effectively identifies whether the data packet is routed to the desired node strictly following the algorithm logic, optimizes the performance of the network topology, checks design defects within the routing module, and ensures the reliability and stability of the network topology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120200946A_ABST
    Figure CN120200946A_ABST
Patent Text Reader

Abstract

The invention discloses a routing verification method and device of network topology and a storage medium, and relates to the technical field of data transmission, the method comprises the following steps: firstly, determining a theoretical expected output path of a data packet input to a node, classifying the data packet into different classification groups according to the expected output path, and after the data packet is output, carrying out routing verification on the data packet; according to the actual data output condition of the data packet, whether the data packet input to the node realizes data output according to a first-in first-out principle is verified; any node in the network topology can be verified according to the first-in-first-out principle, the first-in-first-out principle of the data packet is verified through comparison of actual output and expected output of the data packet, meanwhile, whether the data packet strictly follows the algorithm logic to be routed to the expected node or not can be effectively identified, and performance verification of the network topology is achieved. And design defects possibly existing in the routing module are checked, so that the reliability and the stability of the network topology are ensured, and the performance of the network topology is favorably optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data transmission, and particularly to a routing verification method, apparatus, and storage medium for a network topology. Background Art

[0002] With the development of computer technology, especially the popularization of the Internet, the network topology structure has evolved from simple bus and tree topologies to more complex ring, mesh, and hybrid topologies. The complex topology structure can effectively improve throughput and latency, enabling it to be widely applied in devices such as cloud computing, routers, and chip routing modules. To ensure that the performance of the network topology meets the predetermined standards, the network topology is generally tested and verified during the research and development process in advance, especially data transmission tests are required to verify the performance of the network topology. Currently, traditional verification methods mainly monitor data at the ports of the network topology, and can only simply verify whether the data is correctly output, etc., and cannot verify whether the data packets strictly follow the algorithm logic and are routed to the desired nodes in the network topology. When the business load in the output direction is high, the first-in, first-out principle of the data packets cannot be verified either, resulting in problems such as large routing delays in the overall performance of the finally tested and verified network topology.

[0003] It can be seen that how to verify the network topology to ensure its performance in actual applications is a problem that needs to be solved by those skilled in the art. Summary of the Invention

[0004] The purpose of the embodiments of the present invention is to provide a routing verification method, apparatus, and storage medium for a network topology, which can solve the verification problem of the network topology.

[0005] To solve the above technical problems, the embodiments of the present invention provide a routing verification method for a network topology, which is applied to any node in the network topology. The routing verification method for the network topology includes:

[0006] Determine the expected output path of the data packet input to the target node in the network topology;

[0007] Classify the data packets input to the target node according to the expected output path of the data packet to obtain several classification groups corresponding one-to-one to several output paths of the target node;

[0008] Compare each classification group with the actual data output situation of the corresponding output path to verify whether the target node in the network topology meets the first-in, first-out principle by determining whether the classification group is consistent with the actual data output situation of the corresponding output path.

[0009] In some embodiments, before determining the expected output path of the data packet input to the target node in the network topology, it further includes:

[0010] When there is a data packet input into the network topology, determine the routing end information of the data packet from the packet header of the data packet;

[0011] Determine the complete output path of the data packet in the network topology based on a preset algorithm logic;

[0012] Determine the expected output path of the data packet input to the target node in the network topology, including:

[0013] Extract the path branch where the data packet outputs from the target node from the complete output path of the data packet;

[0014] Determine the path branch as the expected output path of the data packet input to the target node in the network topology.

[0015] In some embodiments, before determining the expected output path of the data packet input to the target node in the network topology, it further includes:

[0016] Determine all output paths when the data packet outputs from the target node;

[0017] Initialize N classification groups based on all output paths of the target node; where N is the total number of all output paths of the target node, and the N classification groups correspond one-to-one with the N output paths of the target node, and N is a positive integer.

[0018] In some embodiments, before comparing each classification group with the actual data output situation of the corresponding output path, it further includes:

[0019] For any output path of the target node, record in sequence according to the output time the data packets that output from the target node and pass through any output path;

[0020] Generate N actual data output queues corresponding one-to-one with the N output paths of the target node based on the recording results, so as to obtain the actual data output situation of the corresponding output path according to the N actual data output queues.

[0021] In some embodiments, compare each classification group with the actual data output situation of the corresponding output path, so as to verify whether the target node in the network topology meets the first-in-first-out principle by determining whether the classification group is consistent with the actual data output situation of the corresponding output path, including:

[0022] For any output path of the target node, extract the first element from the actual data output queue corresponding to any output path as the actual output data;

[0023] Determine the classification group corresponding to any output path, and extract the first element of the classification group corresponding to any output path as the theoretical output data;

[0024] Compare whether the actual output data and the theoretical output data are the same data packet;

[0025] If the actual output data and the theoretical output data are the same data packet, continue to extract the next element from the actual data output queue corresponding to any output path as the actual output data, and extract the next element of the classification group corresponding to any output path as the theoretical output data;

[0026] Redirect to the step of comparing whether the actual output data and the theoretical output data are the same data packet again, until the element corresponding to the actual output data is the last element in the actual data output queue;

[0027] If the actual output data and the theoretical output data are always the same data packet, it is determined that the target node meets the first-in, first-out principle.

[0028] In some embodiments, if there is an inconsistency between the classification group and the actual data output situation of the corresponding output path, the routing verification method of the network topology further includes:

[0029] Determine the problem data packet that causes the inconsistency between the classification group and the actual data output situation of the corresponding output path;

[0030] Traverse all the data packets input to the target node, and determine whether there is a data packet that is input at the same time as the problem data packet and has the same expected output path;

[0031] If so, it is determined that there is a situation of simultaneous input in the target node, and the target node meets the first-in, first-out principle;

[0032] If not, it is determined that the target node does not meet the first-in, first-out principle.

[0033] In some embodiments, it further includes:

[0034] When there is an input data packet in the target node, generate a timestamp mark for the data packet based on the input time of the data packet;

[0035] Determining whether there is a data packet that is input at the same time as the problem data packet and has the same expected output path includes:

[0036] Determine whether there is a data packet in the classification group corresponding to the problem data packet that has the same timestamp mark as the problem data packet;

[0037] If so, it is determined that there is a data packet that is input at the same time as the problem data packet and has the same expected output path;

[0038] If not, it is determined that there is no data packet that is input at the same time as the problem data packet and has the same expected output path.

[0039] To solve the above technical problems, an embodiment of the present invention further provides a routing verification device for a network topology, which is applied to any node in the network topology. The routing verification device for the network topology includes:

[0040] An expected path determination unit, configured to determine an expected output path of a data packet input to a target node in the network topology;

[0041] A classification unit, configured to classify the data packets input to the target node according to the expected output path of the data packets, so as to obtain several classification groups corresponding one by one to several output paths of the target node;

[0042] A verification unit, configured to compare each classification group with the actual data output situation of the corresponding output path, so as to verify whether the target node in the network topology meets the first-in first-out principle by determining whether the classification group is consistent with the actual data output situation of the corresponding output path.

[0043] To solve the above technical problems, an embodiment of the present invention further provides an electronic device, including:

[0044] Several signal proxy modules respectively corresponding to and connected to several external ports of the network topology, configured to generate data packets required for routing verification and receive the data packets output from the network topology;

[0045] A processing module, configured to execute a computer program to implement the steps of the routing verification method for the network topology as described above.

[0046] In some embodiments, the processing module is further configured to detect the data packet input situation and data packet output situation of each external port of the network topology;

[0047] The electronic device further includes:

[0048] Several inspection modules respectively corresponding to several external ports of the network topology. The input end of the inspection module is connected to the output end of the processing module, and is configured to verify whether the data packets input to each external port of the network topology are output from the expected external port.

[0049] To solve the above technical problems, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the routing verification method for the network topology as described above are implemented.

[0050] As can be seen from the above technical solutions, first determine the theoretically expected output path of the data packets input to the node, and classify the data packets into different classification groups according to the expected output path. After the data packets are output, verify whether the data packets input to the node have achieved data output according to the first-in-first-out principle based on the actual data output situation of the data packets. The beneficial effect of the present invention is that any node in the network topology can verify the first-in-first-out principle. By comparing the actual output and the expected output of the data packets, the first-in-first-out principle of the data packets can be verified. At the same time, it can also effectively identify whether the data packets strictly follow the algorithm logic and are routed to the expected nodes, realizing the performance verification of the network topology, detecting possible design defects inside the routing module, ensuring the reliability and stability of the network topology, and helping to optimize the performance of the network topology. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the embodiments of the present invention, the following will briefly introduce the drawings required for the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0052] Figure 1 It is a schematic flowchart of a routing verification method for a network topology provided by an embodiment of the present invention;

[0053] Figure 2 It is a schematic diagram of an algorithm model of a routing verification method for a network topology provided by an embodiment of the present invention;

[0054] Figure 3 It is a schematic flowchart of another routing verification method for a network topology provided by an embodiment of the present invention;

[0055] Figure 4 It is a schematic diagram of a comparison method of the actual data output situation of a classification group and the corresponding output path provided by an embodiment of the present invention;

[0056] Figure 5 It is a schematic diagram of the structure of a network topology provided by an embodiment of the present invention;

[0057] Figure 6 It is a schematic diagram of the structure of a verification system provided by an embodiment of the present invention;

[0058] Figure 7 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0059] 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 only a part of the embodiments of the present invention, rather than all the embodiments. 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.

[0060] The terms "including" and "having" in the specification of the present invention and the accompanying drawings above, and any variations related to "including" and "having", 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 limited to the listed steps or units, but may include steps or units not listed.

[0061] In order to enable those skilled in the art of this technology to better understand the solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0062] Next, a routing verification method for a network topology provided by the embodiments of the present invention will be introduced in detail. Refer to Figure 1 as shown in Figure 1 is a schematic flowchart of a routing verification method for a network topology provided by an embodiment of the present invention; an embodiment of the present invention provides a routing verification method for a network topology, which is applied to any node in the network topology. The routing verification method for the network topology includes:

[0063] S11: Determine the expected output path of the data packet input to the target node in the network topology.

[0064] It should be noted that a network topology includes external ports and internal nodes. The external ports are the interfaces for the network topology to connect with external devices or networks, enabling the network topology to access external resources. The internal nodes are various devices within this network topology, and the internal nodes are interconnected through transmission media to form this network topology. In the internal structure of the network topology, after each node receives a data packet, it processes the data in the data packet according to a preset algorithm logic and decides whether to forward the data to the next node or directly output it to the port. Therefore, the network topology needs to achieve communication between nodes through data routing. When evaluating the performance of the network topology, the latency of data routing and the accuracy of the path are two key metrics. Each node in the network topology may have multiple input sources and output destinations. Therefore, when performing data routing, it is necessary to ensure that the data packet is routed to the desired node strictly following the algorithm logic in the network topology structure. At the same time, when a node processes data, it needs to satisfy the FIFO (First In, First Out) principle. Otherwise, it will cause problems such as chaotic data processing and unreasonable resource allocation, and will also have a significant negative impact on the overall performance of the network topology, resulting in a large routing delay.

[0065] It can be understood that the present invention provides a routing verification method for a network topology to verify the path accuracy of data routing in the network topology and whether each node satisfies the first-in, first-out principle when processing data. To achieve efficient data transmission, the routing module of the network topology will pre-determine the optimal transmission path of the data packet in the network topology according to the source node and the destination node of the data packet. Therefore, for any internal node in the network topology, when using any internal node as the destination node for routing verification, when there is a data packet input at the destination node, the expected output path of the data packet when it is output from the destination node can be first determined according to the optimal transmission path determined by the routing module, that is, the theoretical output path of the data packet when it is output from the destination node theoretically.

[0066] It should be noted that the present application does not make special limitations on the determination method of the optimal transmission path of the data packet in the network topology, etc. The source node of the data packet refers to the node that initiates the data transmission of the data packet, that is, the data sender, and the destination node is the destination of the data transmission, that is, the data receiver. When the data packet is output from an external device / network and enters the network topology through an external port, the external port where the data packet is input can be regarded as the source node of the data packet, or the internal node directly connected to the external port can be used as the source node of the data packet. When the data packet needs to be output to an external device / network through an external port, the external port where the data packet is output is regarded as the destination node of the data packet, or the internal node directly connected to the external port can be used as the destination node of the data packet.

[0067] S12: Classify the data packets input to the target node according to the expected output paths of the data packets, so as to obtain several classification groups corresponding one by one to several output paths of the target node.

[0068] It is not difficult to understand that for the target node, there are multiple corresponding output paths, and the verification of each output path is independent of each other. Several data packets input to the target node will be output through different output paths. Therefore, after obtaining the expected output paths of the data packets, when the data packets are input to the target node, the several data packets input to the target node can be classified according to the expected output paths. The data packets with different expected output paths will be classified into corresponding different classification groups. At the same time, the classification of each data packet will be carried out when the data packet is input to the target node. Therefore, the data packets in each classification group will be sorted according to the input order when input to the target node. Regarding the specific types and implementation methods of the classification groups, etc., this application does not make special provisions here. It can be implemented by means of a data queue, etc. The classification of the data packets is completed when the data packets are input to the target node, which is independent of the transmission process of the data packets and will not affect the output process of the data packets from the target node.

[0069] S13: Compare each classification group with the actual data output situation of the corresponding output path, so as to verify whether the target node in the network topology meets the first-in-first-out principle by judging whether the actual data output situation of the classification group and the corresponding output path is consistent.

[0070] It can be understood that after the data packets are input to the target node, they will be continuously forwarded to the next node until they are output from the target node, completing a complete transmission process of a data packet. When the data packets are output from the target node, the actual data output situations of each output path of the target node can be detected in real time respectively. The actual data output situation of any output path includes all the data packets output from the target node and the output order of the data packets. At this time, each classification group can be compared with the actual data output situation of its corresponding output path respectively. For any output path, judge whether each data packet arranged in the input order in its corresponding classification group is consistent with each data packet arranged in the output order in the actual data output situation. If they are consistent, it means that all the data packets input to the target node are output from the expected output paths and can be accurately routed to the expected nodes. At the same time, the consistent order can also ensure that all the data packets input to the target node meet the first-in-first-out principle when output.

[0071] It should be noted that the classification of data packets, that is, steps S11 and S12, is performed during the data transmission process. When there are data packets input to the target node, steps S11 and S12 are directly executed to classify the data packets; while the final verification needs to be compared with the actual data output situation, so step S13 is performed after the data transmission is completed. During the routing verification, several data packets can be input to the network topology through an external port to simulate data routing during a single verification process. After several data packets are all output from the expected external port, the path accuracy and first-in-first-out verification are then performed.

[0072] It is not difficult to understand that in order to achieve first-in-first-out of data, a common data cache module is usually equipped inside the nodes in the network topology. When the data input first occupies the output path, the data input later can be temporarily stored in the common data cache module and output after the data input first is output. The specific type and implementation method of the common data cache module are not particularly limited in this application. The detection and acquisition method of the actual data output situation of each output path are not particularly limited in this application, and can be implemented by using data acquisition tools such as data acquisition cards, or can also be implemented by writing programs such as triggers.

[0073] It should be noted that the specific structure of the network topology and the specific implementation method of data routing therein are not particularly limited in this application. Data routing can be achieved by setting up a routing module in the network topology. The specific type and implementation method of the routing module are not particularly limited in this application. The design of the routing module has a high degree of flexibility and can be interconnected with user-defined protocols or various bus protocols through its ports. The bus protocols include but are not limited to PCIE (Peripheral Component Interconnect Express, high-speed peripheral component interconnect standard) protocol and AMBA (Advanced Microcontroller Bus Architecture, advanced microcontroller bus architecture) protocol, such as AXI (Advanced eXtensible Interface, advanced extensible interface), AHB (Advanced HighPerformance Bus, advanced high-performance bus) and APB (Advanced Peripheral Bus, advanced peripheral bus), etc. The integration of these protocols provides an effective interaction mechanism for the input and output of data in the network topology. The specific implementation method of each node in the network topology is not particularly limited in this application, and devices such as computers, servers, switches, and routers can be used.

[0074] The present invention provides a routing verification method for a network topology, which is not limited to monitoring the port signals of the network topology, but can also pay attention to the input and output signals of its internal nodes. According to the packet information and the preset algorithm logic, the expected output channel of the packet is calculated, and the packets are classified and stored in different group queues. By comparing the contents of the corresponding queues, it is judged whether the packets satisfy the first-in-first-out principle at the node, effectively identifying and troubleshooting possible design defects inside the routing module, thereby improving the stability of the module and optimizing its performance indicators such as delay and bandwidth. Monitoring the input and output signals of the internal nodes of the network topology and processing and checking through the node first-in-first-out model can efficiently check whether the first-in-first-out principle of packets is satisfied inside the node. The entire algorithm is crucial for optimizing the performance indicators such as delay and bandwidth of the routing module and helps to improve the overall performance of the routing module. This verification strategy allows the network topology to effectively organize and manage the packets with the same destination according to the established routing rules when processing packets. In addition, it also ensures the order and consistency of the packets during the transmission process.

[0075] See Figure 2 as shown in Figure 2 which is a schematic diagram of the algorithm model of a routing verification method for a network topology provided by an embodiment of the present invention; See Figure 3 as shown in Figure 3 which is a schematic flowchart of another routing verification method for a network topology provided by an embodiment of the present invention; In some embodiments, before determining the expected output path of the packet input to the target node in the network topology, it further includes:

[0076] When there is a packet input to the network topology, determine the routing end point information of the packet from the packet header;

[0077] Based on the preset algorithm logic, determine the complete output path of the packet in the network topology;

[0078] Determining the expected output path of the packet input to the target node in the network topology includes:

[0079] Extract the path branch of the packet output from the target node from the complete output path of the packet;

[0080] Determine the path branch as the expected output path of the packet input to the target node in the network topology.

[0081] It can be understood that when there is data input to the network topology through an external port or there is data to be transmitted inside the network topology, when the source node corresponding to the power supply device sends data in the form of a data packet, it will clearly fill in information such as the source address, destination address, and protocol type of the data in the packet header. When the data packet is output from the source node, the routing module will calculate the complete transmission path of the data to be transmitted in the network topology according to the destination address in the packet header, that is, all the transmission paths from the source address output to the final input to the destination address. Therefore, when verifying the target node, both the input of the data packet to the target node and the output from the target node are part of its complete transmission path. At this time, the expected output path when the data packet is output from the target node can be determined by extracting the corresponding path branch from the complete output path. The specific type and implementation method of the preset algorithm logic are not particularly limited in this application, and routing algorithms such as the distance vector algorithm and the link state algorithm can be used to implement it.

[0082] It should be noted that when the source node needs to transmit a certain data packet, it will first send the data packet to the routing module so that the routing module can generate the complete output path of the data packet in the network topology. At this time, the source node will output a target signal to specify the destination address or destination device of the data transmission. The routing module determines the routing end point information of the data packet according to the received target signal, and at the same time generates the optimal output path of the data packet, that is, the complete output path of the data packet in the network topology, according to the routing rules stored in its own internal. There are various options for the way the routing module generates the complete data path and the way to obtain the routing end point information of the data packet, which are not particularly limited in this application.

[0083] Specifically, the expected output path can be directly extracted from the optimal output path of the data packet generated by the routing module without being regenerated, which reduces the data transmission delay, reduces resource consumption, and facilitates the management and maintenance of the network topology.

[0084] In some embodiments, before determining the expected output path of the data packet input to the target node in the network topology, it further includes:

[0085] Determine all the output paths when the data packet outputs from the target node;

[0086] Initialize N classification groups based on all the output paths of the target node; where N is the total number of all the output paths of the target node, and the N classification groups correspond one-to-one to the N output paths of the target node, and N is a positive integer.

[0087] It is not difficult to understand that for different nodes, the number of corresponding output paths may be inconsistent. Therefore, before verifying the target node, it is necessary to determine all the output paths corresponding to the target node according to the actual structure of the target node, that is, all the paths that can be output when data is output from the target node. Then, initialize the classification groups corresponding to the target node according to the total number of paths of all the determined data paths. When the target node has N output paths, initialize N classification groups for subsequent data packet classification. The total number of output paths of the target node can be determined according to the specific structure of the network topology. A preferred embodiment of each classification group is implemented in the same way, for example, all are implemented in the form of a data queue.

[0088] Specifically, before verification, it is necessary to first initialize several classification groups according to the specific situation of the target node. During subsequent verification, directly classify and store the data packets into the corresponding classification groups to avoid the impact of temporarily generating classification groups during verification, such as data transmission delay, and ensure the data transmission efficiency.

[0089] In some embodiments, before comparing each classification group with the actual data output situation of the corresponding output path, it further includes:

[0090] For any output path of the target node, record the data packets output from the target node and passing through any output path in sequence according to the output time;

[0091] Generate N actual data output queues corresponding one by one to the N output paths of the target node based on the recording results, so as to obtain the actual data output situation of the corresponding output path according to the N actual data output queues.

[0092] It can be understood that after the data packets of the target node are transmitted, it is necessary to compare the actual data output situation of each output path of the target node with each classification group to conduct the first-in-first-out verification. Therefore, it is necessary to detect and collect the actual data output situation of each output path of the target node in real time. For the convenience of comparison, the actual data output situation of each output path is saved in the form of an actual data output queue. The elements in the queue represent the output data packets, and the queue order represents the output order of the data packets. If the classification group is also implemented in the form of a data queue, the first-in-first-out verification can be directly performed by comparing the two data queues, namely, the classification group corresponding to any output path and the actual data output queue.

[0093] Specifically, for the convenience of subsequent first-in-first-out verification, when there are data packets output from the target node, detect the data packet output situation on each output path of the target node in real time, so as to realize the first-in-first-out verification of the target node by comparing the actual data output situation with the theoretical data output situation, that is, the classification group.

[0094] In some embodiments, each classification group is compared with the actual data output situation of the corresponding output path, and whether the target node in the network topology meets the first-in-first-out principle is verified by determining whether the classification group is consistent with the actual data output situation of the corresponding output path, including:

[0095] For any output path of the target node, the first element is extracted from the actual data output queue corresponding to the output path as the actual output data;

[0096] Determine the classification group corresponding to any output path, and extract the first element of the classification group corresponding to any output path as the theoretical output data;

[0097] Compare whether the actual output data and the theoretical output data are the same data packet;

[0098] If the actual output data and the theoretical output data are the same data packet, continue to extract the next element from the actual data output queue corresponding to any output path as the actual output data, and extract the next element of the classification group corresponding to any output path as the theoretical output data;

[0099] Jump back to the step of comparing whether the actual output data and the theoretical output data are the same data packet until the element corresponding to the actual output data is the last element in the actual data output queue;

[0100] If the actual output data and the theoretical output data are always the same data packet, it is determined that the target node meets the first-in-first-out principle.

[0101] It is not difficult to understand that for any output path, the corresponding classification group will sequentially record several data packets to be output from the output path according to the input order of the data packets, and the corresponding actual data output situation includes several data packets output from the output path sequentially recorded according to the actual output order of the data packets. Therefore, by sequentially comparing each element in the classification group and each element in the corresponding actual data output situation one by one, it is determined whether the expected output corresponding to any data path is consistent with the actual output from two aspects: the input-output order and the element itself, that is, the data packet itself, so as to verify whether the target node meets the first-in-first-out principle. If there is a difference between the actual output data and the theoretical output data during the comparison process, it means that the classification group is inconsistent with the actual data output situation of the corresponding output path, and the target node may not meet the first-in-first-out principle.

[0102] Specifically, by checking whether each element in each queue is the same in sequence, it is possible to effectively determine whether the actual situation of the data packets output from any output path and the output order of the data packets are consistent with the expectations, thereby realizing an effective verification of whether the target node meets the first-in, first-out principle. By comparing them in sequence, the logic is clear, reducing the chaos and errors in the verification process. A comprehensive inspection and comparison of each element ensure the accuracy and reliability of the verification process.

[0103] In some embodiments, if there is an inconsistency between the classification group and the actual data output situation of the corresponding output path, the routing verification method for the network topology further includes:

[0104] Determine the problematic data packet that causes the inconsistency between the classification group and the actual data output situation of the corresponding output path;

[0105] Traverse all the data packets input to the target node and determine whether there is a data packet that is input at the same time as the problematic data packet and has the same expected output path;

[0106] If so, it is determined that there is a situation of simultaneous input in the target node, and the target node meets the first-in, first-out principle;

[0107] If not, it is determined that the target node does not meet the first-in, first-out principle.

[0108] It can be understood that since the nodes in the network topology are usually connected to multiple other nodes, and the transmission lines between nodes are usually two-way transmissions, when there are multiple output paths for a node, there will also be corresponding multiple input paths for the node to achieve data transmission. Therefore, in data transmission, there is a special case where two data packets are input to the target node at the same time. At this time, if these two data packets are output from the same output path and have the same input time, any one of these two data packets is output from the target node first, and the target node satisfies the first-in-first-out principle. Therefore, if there is an inconsistency when comparing the actual data output situation of the classification group and the corresponding output path, this special case needs to be further excluded. Therefore, if there is an inconsistency between the classification group and the actual data output situation of the corresponding output path, first determine the problem data packet that causes the inconsistency between the classification group and the actual data output situation of the corresponding output path. Specifically, it is the element corresponding to the actual output data in the actual data output situation or the element corresponding to the theoretical output data in the classification group when the actual output data and the theoretical output data are not the same data packet. Then traverse all the data packets input to the target node during the current verification process to determine whether there is a special case with the problem data packet, that is, data packets input at the same time and with the same expected output path. If so, it means that the inconsistency between the classification group and the actual data output situation of the corresponding output path is caused by this special case, and the target node still satisfies the first-in-first-out principle; if not, it means that the inconsistency between the classification group and the actual data output situation of the corresponding output path is caused by the target node not following the first-in-first-out principle. Traversing all the data packets input to the target node can be achieved by traversing all the classification groups, or by detecting and collecting all the data input to the target node in real time. This application does not make special limitations here. Or this special case can be excluded by directly checking whether the input times of the two data packets that cause the inconsistency between the classification group and the actual data output situation of the corresponding output path, that is, the first data packet in the classification group and the second data packet in the actual data output situation, are the same. If the input times are the same, it is determined that there is a situation of simultaneous input for the target node, and the target node satisfies the first-in-first-out principle; if they are different, the target node does not satisfy the first-in-first-out principle.

[0109] Specifically, considering that when the target node satisfies the first-in-first-out principle, two or more data packets with the same input time and output from the same output path will cause an abnormal determination of the inconsistency between the classification group and the actual data output situation. Therefore, before determining that the target node does not satisfy the first-in-first-out principle, this special case needs to be excluded to avoid misjudging that the target node does not satisfy the first-in-first-out principle and improve the accuracy and reliability of the entire verification process.

[0110] In some embodiments, it further includes:

[0111] When there is an input data packet at the target node, generate a timestamp mark for the data packet based on the input time of the data packet;

[0112] Determine whether there is a data packet that is input at the same time as the problem data packet and has the same expected output path, including:

[0113] Determine whether there is a data packet in the classification group corresponding to the problem data packet with the same timestamp mark as the problem data packet;

[0114] If so, it is determined that there is a data packet that is input at the same time as the problem data packet and has the same expected output path;

[0115] If not, it is determined that there is no data packet that is input at the same time as the problem data packet and has the same expected output path.

[0116] It is not difficult to understand that, in order to facilitate the exclusion of misjudgment caused by the special case of multiple data packets that are input at the same time and have the same expected output path, when the data packet is input to the target node, a timestamp mark is directly added to each data packet according to the input time of the data packet, so as to directly traverse and compare the timestamp marks later to determine whether there is a special case of data packets that are input at the same time and have the same expected output path. The specific type and implementation method of the timestamp mark are not particularly limited in this application. Specifically, the SN (Sequence Number) coding mechanism can be used for implementation. The SN coding mechanism is added to solve the data packet competition problem that may occur when different input sources point to the same output channel, and significantly improve the accuracy and efficiency of the verification process.

[0117] It should be noted that the entire verification method can be implemented in the form of a function. The implementation of the entire first-in-first-out check and verification can be achieved by being encapsulated as a function based on the system verilog (hardware description and verification language) verification language. Before calling this function, the user needs to follow the verification algorithm described above, pack the input data with different expected output paths and their SN codes and store them in the input_queue three-dimensional queue. Correspondingly, the output data is stored in the output_queue three-dimensional queue. The information of the three dimensions of these two queue structures respectively represents the node number, the path number, and the stored data packet.

[0118] As a specific embodiment, see Figure 4 shown Figure 4 is a schematic diagram of a comparison method for the actual data output situation of a classification group and the corresponding output path provided by an embodiment of the present invention; the implementation of the entire verification algorithm is as Figure 2As shown, a three-dimensional queue of input_queue is used to implement classification groups, and a three-dimensional queue of output_queue is used to implement the actual data output situation. Figure 2 Figure 2 shows the first-in, first-out check process executed by a single node. This node has n input paths and n output paths. input_queue 0 corresponds to the classification group with the expected output path being the first output path, input_queue 1 corresponds to the classification group with the expected output path being the second output path, and input_queue n-1 corresponds to the classification group with the expected output path being the nth output path; output_queue 0 corresponds to the actual data output situation of the first output path, output_queue 1 corresponds to the actual data output situation with the expected output path being the second output path, and output_queue n-1 corresponds to the actual data output situation with the expected output path being the nth output path; input 0 represents the data packet input from the first input path of the node, input 1 represents the data packet input from the second input path of the node, and input n-1 represents the data packet input from the nth input path of the node; output 0 represents the data packet output from the first output path of the node, output 1 represents the data packet output from the second output path of the node, and output n-1 represents the data packet output from the nth output path of the node.

[0119] To facilitate accurate and efficient data transmission among various nodes, an input valid signal (input valid, abbreviated as vld) and an input ready signal (input ready, abbreviated as rdy) are set during the data transmission process. The valid signal is used to indicate whether the currently transmitted signal is valid, and the ready signal is used to indicate whether the current data receiver is ready to receive data. Therefore, it is possible to determine whether there is a data packet input to the target node based on the vaild signal and the ready signal, and at the same time, process the input data. When the vaild and ready signals handshake successfully (i.e., the input data is valid), the verification system will generate an SN code (timestamp mark). In this embodiment, the SN code is the moment when data is valid. This SN code is encapsulated together with the data packet input to the target node to form a new data unit, and then this data unit will enter the classification process of the next stage. Specifically, an AND gate U1 is used to implement the judgment of the handshake between the vaild signal and the ready signal, and an OR gate U2 is used to implement the generation of the SN code of the data packet.

[0120] After the data packet input to the target node and its SN code are packed, the verification system will classify the data packets, obtain the routing end information of the data packets from the target signal input to the routing module or the packet header of the input data packet, then determine the expected output path of the data packets according to the preset algorithm logic built into the node, and then temporarily store the data packets in the input_queue queue corresponding to the path based on the expected output path for subsequent inspection and comparison. At the same time, the output of the data packet also depends on the synchronization mechanism of vaild and ready. Once the ready signal of the next node where the data packet is transmitted and the vaild signal of the target node complete the handshake, it means that the data packet is output. At this time, the output data packet will be directly stored in the output_queue queue corresponding to its output path for subsequent inspection and comparison.

[0121] See Figure 5 as shown Figure 5 is a schematic structural diagram of a network topology provided by an embodiment of the present invention; taking Figure 5 the shown tree-shaped network topology as an example, where the squares are the external ports of the network topology structure, the circles are the internal nodes of the network topology, and each connection supports bidirectional data transmission. This network topology includes 15 external ports and 10 internal nodes. Taking node 6 in this tree-shaped network topology structure as an example, its input and output paths both involve node 0, node 1, node 9, and port 12. The output paths include four paths: from node 6 to port 12, from node 6 to node 9, from node 6 to node 0, and from node 6 to node 1. These four paths are named Lane 0, Lane 1, Lane 2, and Lane3 in sequence. During the routing process of the data packets, two specific data packets are considered: data packet A is routed from node 0 to node 9, while data packet B is routed from port 12 to the same node 9. When input to node 6, after classification processing, both data packet A and B are assigned to the same queue Input queue Lane 2. When data packet A and B are output to node 9, they are directly stored in the corresponding Output queue Lane 2.

[0122] After the data routing is completed, the first-in-first-out check is finally performed, and the check process is as Figure 3As shown, the checking logic is as follows: For any Output queue Lane and the corresponding Input queue Lane, use the pop_front() function to retrieve a data packet from the Output queue Lane and simultaneously retrieve a data packet from the corresponding Input queue Lane for comparison. Under normal circumstances, the order in which data packets are retrieved from the queue is the same as the order of input and output data packets of the node. If the node adheres to the first-in, first-out principle, the two data packets being compared are equal. For example Figure 4 As shown, if the first retrieved data packets are both C, the check is successful.

[0123] It should be noted that, as Figure 4 shown, the data packets retrieved from the two queues the second time are A and B respectively. At this time, the data comparison fails, but it cannot be immediately proven that the node does not follow the first-in, first-out principle. Further verification is required through the SN code. Record the SN code of data packet A and denote it as enter_sn. Then traverse all Input queue Lanes to search for data packet B. If the SN code of data packet B is the same as the SN code of the recorded enter_sn, it is considered that there are multiple data packets with the same target path input to the node simultaneously, and the check still passes. If data packet B does not exist or the SN code of data packet B is different from that of data packet A, it is considered that the check fails and the node does not adhere to the first-in, first-out principle.

[0124] As a specific embodiment, the entire verification algorithm is encapsulated and defined as a function named check_node_out_order(). The specific implementation of this function is shown in the following example code: function check_node_out_order(); / / Define the checking function int enter_sn; / / Temporarily store the SN code int find_flg; / / Data matching success flag for(int node = 0; node < node_num; node++) begin / / Traverse each node for(int lane = 0; lane < lane_num; lane++) begin / / Traverse each path of the node for(int k = 0; k < out_queue[node][lane].size(); k++) begin if(out_queue[node][lane][k] != in_queue[node][lane][k]) begin / / Data comparison fails. It may be due to multiple sets of data being input simultaneously. Check according to the SN code enter_sn = in_queue[node][lane][k].sn; for(int m = 0; m < in_queue[node][lane].size(); m++) begin if(in_queue[node][lane][m] == out_queue[node][lane][k]) begin find_flg = 1; if(enter_sn == in_queue[node][lane][m].sn) begin pass_cnt++; / / This comparison is successful enter_sn = 0; end else / / Comparison fails. This node does not meet the first-in, first-out principle `uvm_error(“error”,“node_out_order_check_error”) end end if(find_flg == 1’b1) find_flg = 0; else / / Comparison fails. This node does not meet the first-in, first-out principle `uvm_error(“error”,“node_out_order_check_error”) end else pass_cnt++; / / This comparison is successful end end end end endfunction

[0125] In practical applications, users can initialize the input_queue and output_queue according to the specific network topology. Subsequently, by calling check_node_out_order(), the system will automatically perform the first-in-first-out check within the node.

[0126] Furthermore, for some specific network topologies and routing modules, their output paths may be assigned different priority weights according to specific service requirements or performance metrics. For example, in the network topology shown as follows, the data transmission pressure of node 9 is relatively large. For node 6 among them, the output path to the tertiary node 9 may bear a relatively large transmission pressure. Designers can thus configure a higher arbitration ratio and priority for it. When performing the first-in-first-out verification, the SN code can be dynamically generated according to these arbitration ratios or other relevant parameters, and the check and verification logic can be adjusted accordingly to ensure that the verification process can accurately identify and evaluate the transmission order of data packets and the performance of the routing module. Specifically, if the i-th input path among the N input paths of the target node has the highest priority, and if the first data packet input from the i-th input path and the second data packet input from the j-th input path are both output from the k-th output path, the first data packet is input later than the second data packet, but at this time, for service requirements, the target node may choose to output the first data packet first. Therefore, if it is found during verification that the first data packet is output before the second data packet in the actual data output corresponding to the k-th output path, then further calculate the difference between the input time of the first data packet and the input time of the second data packet. If the difference is less than the preset value, it is determined that the target node outputs the first data packet first due to special circumstances. If all other elements except the first data packet and the second data packet in the actual data output are consistent with the corresponding classification groups, it is still determined that the target node meets the first-in-first-out principle. i, j, and k are all positive integers less than N. Figure 5 As shown, in the network topology, the data transmission pressure of node 9 is relatively large. For node 6 among them, the output path to the tertiary node 9 may bear a relatively large transmission pressure. Designers can thus configure a higher arbitration ratio and priority for it. When performing the first-in-first-out verification, the SN code can be dynamically generated according to these arbitration ratios or other relevant parameters, and the check and verification logic can be adjusted accordingly to ensure that the verification process can accurately identify and evaluate the transmission order of data packets and the performance of the routing module. Specifically, if the i-th input path among the N input paths of the target node has the highest priority, and if the first data packet input from the i-th input path and the second data packet input from the j-th input path are both output from the k-th output path, the first data packet is input later than the second data packet, but at this time, for service requirements, the target node may choose to output the first data packet first. Therefore, if it is found during verification that the first data packet is output before the second data packet in the actual data output corresponding to the k-th output path, then further calculate the difference between the input time of the first data packet and the input time of the second data packet. If the difference is less than the preset value, it is determined that the target node outputs the first data packet first due to special circumstances. If all other elements except the first data packet and the second data packet in the actual data output are consistent with the corresponding classification groups, it is still determined that the target node meets the first-in-first-out principle. i, j, and k are all positive integers less than N.

[0127] Specifically, the valid time of the data packet is used as the SN code to ensure that special cases of input at the same time are excluded when detecting and verifying the first-in-first-out principle of data packets within the routing module nodes, improving the accuracy and reliability of the verification process. An algorithm model for first-in-first-out check of internal nodes of the routing module is designed. When data is input to the node, the data packet and the SN code are combined into a new data unit, and they are classified and stored according to their routing target paths; the data packets are stored according to different paths in the output direction. The competition problem of data packets that may occur when different input sources point to the same output channel is solved through the verification of the SN code.

[0128] To solve the above technical problems, an embodiment of the present invention further provides a routing verification device for a network topology, which is applied to any node in the network topology. The routing verification device for the network topology includes:

[0129] An expected path determination unit for determining an expected output path of a data packet of a target node input into a network topology;

[0130] A classification unit for classifying data packets input into the target node according to the expected output path of the data packets to obtain several classification groups corresponding one-to-one to several output paths of the target node;

[0131] A verification unit for comparing each classification group with the actual data output situation of the corresponding output path, so as to verify whether the target node in the network topology meets the first-in first-out principle by judging whether the classification group is consistent with the actual data output situation of the corresponding output path.

[0132] In some embodiments, it further includes:

[0133] An end point determination unit for determining routing end point information of a data packet from the packet header when there is a data packet input into the network topology;

[0134] A complete path determination unit for determining a complete output path of a data packet in the network topology based on a preset algorithm logic;

[0135] The expected path determination unit includes:

[0136] A path extraction unit for extracting a path branch where a data packet outputs from the target node from the complete output path of the data packet;

[0137] An expected path determination subunit for determining the path branch as the expected output path of the data packet of the target node input into the network topology.

[0138] In some embodiments, it further includes:

[0139] An output path determination unit for determining all output paths when a data packet outputs from the target node;

[0140] An initialization unit for initializing N classification groups based on all output paths of the target node; where N is the total number of all output paths of the target node, and the N classification groups correspond one-to-one to the N output paths of the target node, and N is a positive integer.

[0141] In some embodiments, it further includes:

[0142] An output record unit for, for any output path of the target node, sequentially recording data packets that output from the target node and pass through any output path according to the output time;

[0143] An actual data output situation generating unit, configured to generate N actual data output queues corresponding one by one to N output paths of a target node based on a recording result, so as to obtain the actual data output situation of the corresponding output path according to the N actual data output queues.

[0144] In some embodiments, the verification unit includes:

[0145] An actual data acquisition unit, configured to, for any output path of the target node, extract the first element from the actual data output queue corresponding to the any output path as the actual output data;

[0146] A theoretical data acquisition unit, configured to determine the classification group corresponding to any output path, and extract the first element of the classification group corresponding to the any output path as the theoretical output data;

[0147] A comparison unit, configured to compare whether the actual output data and the theoretical output data are the same data packet;

[0148] A comparison data update unit, configured to, if the actual output data and the theoretical output data are the same data packet, continue to extract the next element from the actual data output queue corresponding to the any output path as the actual output data, and extract the next element of the classification group corresponding to the any output path as the theoretical output data; re-trigger the comparison unit until the element corresponding to the actual output data is the last element in the actual data output queue;

[0149] A verification subunit, configured to, if the actual output data and the theoretical output data are always the same data packet, determine that the target node meets the first-in first-out principle.

[0150] In some embodiments, if there is an inconsistency between the classification group and the actual data output situation of the corresponding output path, it further includes:

[0151] A problem data determination unit, configured to determine the problem data packet that causes the inconsistency between the classification group and the actual data output situation of the corresponding output path;

[0152] A special data determination unit, configured to traverse all data packets input to the target node, and determine whether there is a data packet that is input at the same time as the problem data packet and has the same expected output path; if so, trigger the first determination unit, if not, trigger the second determination unit;

[0153] A first determination unit, configured to determine that there is a situation of simultaneous input in the target node, and the target node meets the first-in first-out principle;

[0154] A second determination unit, configured to determine that the target node does not meet the first-in first-out principle.

[0155] In some embodiments, it further includes:

[0156] A timestamp generation unit, configured to generate a timestamp mark for a data packet based on the input time of the data packet when there is an input data packet at the target node;

[0157] The special data determination unit includes:

[0158] A special case judgment unit, configured to judge whether there is a data packet with the same timestamp mark as the problem data packet in the classification group corresponding to the problem data packet; if so, trigger the third determination unit, if not, trigger the fourth determination unit;

[0159] A third determination unit, configured to determine that there is a data packet that is input at the same time as the problem data packet and has the same expected output path;

[0160] A fourth determination unit, configured to determine that there is no data packet that is input at the same time as the problem data packet and has the same expected output path.

[0161] For the description of the features in the routing verification device of the network topology provided by the embodiments of the present invention, reference may be made to the relevant descriptions in the embodiments of the routing verification method of the network topology, which will not be elaborated here one by one.

[0162] See Figure 6 as shown in Figure 6 is a schematic structural diagram of a verification system provided by an embodiment of the present invention; see Figure 7 as shown in Figure 7 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. To solve the above technical problems, an embodiment of the present invention further provides an electronic device, including:

[0163] A plurality of signal proxy modules respectively corresponding to and connected to a plurality of external ports of the network topology, configured to generate data packets required for routing verification and receive data packets output from the network topology;

[0164] A processing module 61, configured to execute a computer program to implement the steps of the routing verification method of the network topology as described above.

[0165] In some embodiments, the processing module 61 is further configured to detect the data packet input situation and data packet output situation of each external port of the network topology;

[0166] The electronic device further includes:

[0167] A plurality of check modules respectively corresponding to a plurality of external ports of the network topology, the input end of the check module is connected to the output end of the processing module, and is configured to verify whether the data packets input to each external port of the network topology are output from the expected external port.

[0168] It is not difficult to understand that when performing routing verification on the network topology, it is also necessary to pay attention to port signals to verify whether data packets are correctly routed to the expected ports and calculate routing delays. At the same time, considering that the system itself needs to generate data for verification during verification. Therefore, the present invention also designs a verification system for the routing priority of the network topology structure. This system implements a verification platform env based on UVM (Universal Verification Methodology) and system verilog. The entire verification system includes a processing module, a number of signal proxy modules agent that are connected one-to-one with several external ports port of the network topology, and a number of checker modules checker that correspond one-to-one with several external ports port of the network topology. As shown in Figure 6 For example, taking the network topology with m external ports port as an example. The processing module includes a monitoring module monitor and a reference model reference model. The routing verification method of the network topology described above is set in the reference model. In this verification platform, the functions and data flow paths of each component are summarized as follows: The routing module of the chip to be verified or the routing module of the network topology serves as the DUT (Device Under Test), and is connected to the agent in the verification platform through the interface interface. The agent is used to generate data packets, and can send data packets to the DUT or receive the data packets output by the DUT, and send the data packets to the routing module for processing through the interface interface. The interface interface can convert all the data packets sent by the agents into a group of signals, and after realizing signal conversion, send the unified data packets to the DUT. The monitor monitors the input and output data packets of the DUT port on the interface interface, and sends the monitored data input situation and data output situation to the reference model, where the routing path of the data packet is simulated according to the routing algorithm, and finally the data and routing path are checked in the checker. At the same time, the internal node signals of the routing module are transmitted to the interface interface through the assign statement, and the first-in-first-out check verification of the data packets in the nodes is completed in the reference model.

[0169] It should be noted that by setting up signal proxy modules (agents) and checker modules that correspond one-to-one with the ports of the DUT in the verification system, the signals of each port of the DUT are effectively split, and the signals corresponding to an independent port are assigned to a corresponding agent component, effectively reducing the coupling between ports. It is possible to record the input and output times of data packets for each port respectively, as well as the header information of the data packets. By comparing the header content of the data packets through the corresponding checker module, it is determined whether the data packets are correctly routed to the expected ports. By analyzing the input and output times of the data packets, the routing delay and bandwidth performance can be calculated.

[0170] Specifically, when building the verification platform, the corresponding number of agent and checker components are instantiated according to the ports of the routing module; each port of the network topology is independently managed by a group of agent and checker components (including generating, sending data packets, and comparing and checking the data), so as to reduce the code complexity and the coupling between ports. A dedicated agent component is instantiated for each port, allowing each port to independently generate and send data packets that belong only to itself. Similarly, the corresponding number of checkers are also instantiated, which are responsible for verifying and validating the data packets sent and received by their respective ports. Only a signal that can identify the port number needs to be passed during the instantiation process. Since the influence between ports does not need to be considered, the coupling between ports is reduced, the code complexity is significantly reduced, the difficulty of constructing test cases is simplified, and the data transmission efficiency and the stability of the platform are improved. It not only improves the pertinence and efficiency of data transmission, but also simplifies the code complexity. In the reference model, the node first-in-first-out model and the check together constitute the verification algorithm for the routing priority. By designing the node first-in-first-out model and the check in the reference model component, it is used to detect possible defects in the DUT. At the same time, the in-node first-in-first-out check logic and the encapsulated function: check_node_out_order() are designed, and the SN coding mechanism is added to solve the data packet competition problem that may occur when different input sources point to the same output channel.

[0171] Among them, the processing module 61 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processing module 61 may be implemented in at least one of the following hardware forms: Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processing module 61 may also include a main processor and a coprocessor. The main processor is a processor used to process data in the wake state, also known as the Central Processing Unit (CPU); the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processing module 61 may be integrated with a Graphics Processing Unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processing module 61 may further include an Artificial Intelligence (AI) processor, which is used to process computational operations related to machine learning.

[0172] A memory 60 may also be provided in the electronic device for storing computer programs; the memory 60 may include one or more computer-readable storage media, and the computer-readable storage media may be non-transitory. The memory 60 may further include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash storage devices. In this embodiment, the memory 60 is at least used to store the following computer program 601. After the computer program is loaded and executed by the processing module 61, it can implement the relevant steps of the routing verification method for the network topology disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 60 may further include an operating system 602 and data 603, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 602 may include Windows, Unix, Linux, etc. The data 603 may include, but is not limited to, the data in the routing verification method of the network topology, etc.

[0173] In some embodiments, the electronic device may further include a display screen 62, an input / output interface 63, a communication interface 64, a power supply 65, and a communication bus 66.

[0174] Those skilled in the art can understand that Figure 7 the structure shown in

[0175] For the description of the features in the electronic device provided in the embodiments of the present invention, reference can be made to the relevant descriptions in the embodiments of the routing verification method of the network topology, which will not be elaborated here one by one.

[0176] It can be understood that if the routing verification method of the network topology in the above embodiments is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the current technology, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods in the various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, magnetic disks, or optical discs that can store program codes.

[0177] To solve the above technical problems, the embodiments of the present invention also provide a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the routing verification method of the network topology as described above are implemented.

[0178] For the description of the features in the computer-readable storage medium provided in the embodiments of the present invention, reference can be made to the relevant descriptions in the embodiments of the routing verification method of the network topology, which will not be elaborated here one by one.

[0179] The embodiments of the present invention also provide a computer program product, including a computer program / instructions. When the computer program / instructions are executed by a processor, the steps of the routing verification method of the network topology described in the above embodiments are implemented.

[0180] For the description of the features in the computer program product provided in the embodiments of the present invention, reference can be made to the relevant descriptions in the embodiments of the routing verification method of the network topology, which will not be elaborated here one by one.

[0181] The above has introduced in detail a routing verification method, device, and storage medium of a network topology provided by the embodiments of the present invention. The various embodiments in the specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts among the various embodiments can be referred to each other. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method part.

[0182] Those skilled in the art may further realize that the units and algorithm steps of each example described in connection with the embodiments disclosed herein 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.

[0183] The above has introduced in detail a method, device, and storage medium for route verification of a network topology provided by the present invention. Specific examples are used herein to elaborate on the principles and implementation manners of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principles of the present invention, several improvements and modifications can still be made to the present invention, and these improvements and modifications also fall within the protection scope of the present invention.

Claims

1. A method for verifying routing of a network topology, characterized in that: Applied to any node in a network topology, the routing verification method of the network topology includes: determining a desired output path for a data packet input to a destination node in the network topology; Classifying the data packets input to the target node according to the expected output paths of the data packets to obtain a plurality of classification groups corresponding to the plurality of output paths of the target node; The actual data output situation of each of the classification groups is compared with the corresponding output path, so as to verify whether the target node in the network topology satisfies the first-in-first-out principle by judging whether the actual data output situation of the classification group and the corresponding output path is consistent.

2. The method for verifying the routing of a network topology according to claim 1, wherein: Before determining the expected output path of the data packet input to the target node in the network topology, the method further includes: When there is a data packet input into the network topology, determining the routing destination information of the data packet from the packet header of the data packet; Determine the complete output path of the data packet in the network topology based on a preset algorithm logic; Determining an expected output path of a data packet input to a target node in the network topology includes: Extracting the path branch where the data packet is output from the target node from the complete output path of the data packet; The path branch is determined as a desired output path of a data packet input to a destination node in the network topology.

3. The method for verifying the routing of a network topology according to claim 1, wherein: Before determining the expected output path of the data packet input to the target node in the network topology, the method further includes: Determine all output paths of the data packet when it outputs the target node; Initialize N classification groups based on all output paths of the target node; wherein N is the total number of all output paths of the target node, the N classification groups correspond one-to-one to the N output paths of the target node, and N is a positive integer.

4. The method for verifying the routing of a network topology according to claim 3, characterized in that: Before comparing each of the classification groups with the actual data output of the corresponding output path, the method further includes: For any output path of the target node, sequentially record data packets output from the target node and passing through any output path according to output time; Based on the recording results, N actual data output queues corresponding to the N output paths of the target node are generated one by one, so as to obtain the actual data output status of the corresponding output paths according to the N actual data output queues.

5. The method for verifying the routing of a network topology according to claim 4, characterized in that: Comparing each of the classification groups with the actual data output of the corresponding output path to verify whether the target node in the network topology meets the first-in-first-out principle by determining whether the classification group is consistent with the actual data output of the corresponding output path, including: For any output path of the target node, extracting the first element from the actual data output queue corresponding to the any output path as the actual output data; Determine the classification group corresponding to any output path, and extract the first element of the classification group corresponding to any output path as theoretical output data; Comparing the actual output data and the theoretical output data to see whether they are the same data packet; If the actual output data and the theoretical output data are the same data packet, then continue to extract the next element from the actual data output queue corresponding to any output path as the actual output data, and extract the next element of the classification group corresponding to any output path as the theoretical output data; Re-jumping to the step of comparing the actual output data and the theoretical output data to see whether they are the same data packet, until the element corresponding to the actual output data is the last element in the actual data output queue; If the actual output data and the theoretical output data are always the same data packet, it is determined that the target node satisfies the first-in-first-out principle.

6. The method for verifying the routing of a network topology according to any one of claims 1 to 5, characterized in that: If there is inconsistency between the classification group and the actual data output of the corresponding output path, the routing verification method of the network topology further includes: Determine the problematic data packets that cause the classification group to be inconsistent with the actual data output of the corresponding output path; Traverse all data packets input to the target node to determine whether there is a data packet input at the same time as the problematic data packet and having the same expected output path; If yes, it is determined that the target node has simultaneous input and the target node satisfies the first-in-first-out principle; If not, it is determined that the target node does not satisfy the first-in-first-out principle.

7. The method for verifying the routing of a network topology according to claim 6, wherein: Also includes: When there is an input data packet at the target node, a timestamp mark of the data packet is generated based on the input time of the data packet; Determining whether there is a data packet input at the same time as the problematic data packet and having the same expected output path includes: Determine whether there is a data packet with the same timestamp as the data packet in question in the classification group corresponding to the data packet in question; If so, it is determined that there is a data packet input at the same time as the problematic data packet and having the same expected output path; If not, it is determined that there is no data packet input at the same time as the problematic data packet and having the same expected output path.

8. A network topology routing verification device, characterized in that: Applied to any node in a network topology, the routing verification device of the network topology comprises: an expected path determination unit, used to determine an expected output path of a data packet input to a target node in the network topology; A classification unit, used for classifying the data packets input to the target node according to the expected output paths of the data packets, so as to obtain a plurality of classification groups corresponding to a plurality of output paths of the target node; The verification unit is used to compare each of the classification groups with the actual data output of the corresponding output path, so as to verify whether the target node in the network topology meets the first-in-first-out principle by judging whether the actual data output of the classification group and the corresponding output path is consistent.

9. An electronic device, characterized in that: include: A plurality of signal proxy modules connected to a plurality of external ports of the network topology in a one-to-one correspondence, used to generate data packets required for route verification and receive data packets output from the network topology; A processing module is used to execute a computer program to implement the steps of the network topology routing verification method as described in any one of claims 1 to 7.

10. The electronic device according to claim 9, characterized in that: The processing module is also used to detect the data packet input and data packet output of each external port of the network topology; The electronic device further comprises: A plurality of inspection modules corresponding to a plurality of external ports of the network topology, wherein the input end of the inspection module is connected to the output end of the processing module, and is used to verify whether the data packets input to each external port of the network topology are output from the expected external port.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the routing verification method of the network topology according to any one of claims 1 to 7 are implemented.