Method and apparatus for generating a data filter topology
By generating a target data filtering topology, the problem of low data filtering efficiency caused by unicast and multicast sharing bandwidth in traditional switches is solved, realizing efficient multi-level data filtering and improving the performance of data transmission networks.
Patent Information
- Application Number
- CN202111663247.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2041-12-30
AI Technical Summary
In traditional switch designs, the shared bandwidth between unicast and multicast leads to low data filtering efficiency, decreased throughput, increased latency, and a high risk of data message loss.
By determining the target topology type from multiple topology types and generating a data filtering topology based on the target data filtering strategy, multi-level filtering is achieved, avoiding the instantaneous filtering pressure when the data volume is large, and improving efficiency while ensuring the filtering sequence.
It improves data filtering efficiency, avoids the instantaneous filtering pressure when the data volume is large, and ensures an efficient and fast data filtering process.
Smart Images

Figure CN116418682B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and more specifically, to a method and apparatus for generating a data filtering topology. Background Technology
[0002] Modern switching networks consist of node machines and switches, with all nodes connected to the switches via links to achieve distributed communication. In traditional data switching equipment design, the crossbar structure is widely used. The basic form of a crossbar is a structure with multiple inputs and multiple outputs. For any output, one of the multiple inputs is selected as the output, and each output selection is different. This structure causes severe congestion and timing problems in backend cabling. In some applications, data switching equipment is required to support line-speed unobstructed filtering switching for unicast and multicast. In traditional switch designs, a single crossbar is used to implement unicast and multicast. Due to the bandwidth limitations shared by unicast and multicast, they interfere with each other, affecting the switch's data filtering and switching performance, leading to decreased throughput, increased latency, and data packet loss, resulting in low data filtering efficiency.
[0003] There is currently no effective solution to the problem of low data filtering efficiency in related technologies. Summary of the Invention
[0004] This invention provides a method and apparatus for generating a data filtering topology, which at least solves the problem of low data filtering efficiency in related technologies.
[0005] According to an embodiment of the present invention, a method for generating a data filtering topology is provided, comprising: determining a target topology type corresponding to an initial data transmission network from a plurality of topology types, wherein the initial data transmission network is used to transmit data according to the correspondence between input ports and output ports; determining a target data filtering strategy corresponding to the target topology type, wherein the target data filtering strategy is used to indicate a multi-level filtering method for the data transmitted in the data transmission network; generating a target data filtering topology corresponding to the initial data transmission network according to the target data filtering strategy to obtain a target data transmission network, wherein the target data filtering topology is used to filter data for each output port according to the correspondence between input ports and output ports of the data transmission network.
[0006] Optionally, determining the target topology type corresponding to the data transmission network from multiple topology types includes: obtaining a first data transmission parameter of the initial data transmission network, wherein the first data transmission parameter includes: the number of ports of the initial data transmission network, and / or, the signal bit width of each port of the initial data transmission network; determining a target congestion degree of the initial data transmission network based on the first data transmission parameter, wherein the target congestion degree is used to indicate the degree of congestion of the data transmitted by the initial data transmission network in the initial data transmission network; and determining the topology type that matches the target congestion degree from the multiple topology types as the target topology type.
[0007] Optionally, determining the target data filtering strategy corresponding to the target topology type includes: determining filtering grading parameters matching the target topology type based on the second data transmission parameters of the initial data transmission network; obtaining the target connection method of the target filtering device corresponding to the target topology type; and determining the filtering grading parameters and the target connection method as the target data filtering strategy.
[0008] Optionally, determining the filtering grading parameters matching the target topology type based on the second data transmission parameters of the initial data transmission network includes: obtaining the second data transmission parameters of the initial data transmission network, wherein the second data transmission parameters include: the number of ports of the initial data transmission network, and / or, the signal bit width of each port of the initial data transmission network; when the target topology type is a first type, calculating the first grading number corresponding to the second data transmission parameters according to the grading function corresponding to the first type as the filtering grading parameter, wherein the first grading number is used to indicate the number of filtering levels divided between each group of corresponding input ports and output ports under the topology belonging to the first type; when the target topology type is a second type, calculating the second grading number corresponding to the second data transmission parameters according to the grading function corresponding to the second type as the filtering grading parameter, wherein the second grading number is used to indicate the number of filtering levels divided between each group of corresponding input ports and output ports under the topology belonging to the second type.
[0009] Optionally, obtaining the target connection method of the target screening device corresponding to the target topology type includes: when the target topology type is a first type, determining the target connection method includes: the input data of the target screening devices in the first hierarchical quantity comes from the target input port in each group of corresponding input ports and output ports, and some ports in the input ports of the initial data transmission network other than the target input port; the input data of the target screening devices in the first hierarchical quantity other than the first level comes from the target screening device of the next higher level in other hierarchical levels, and ports in other ports that are not connected to the target screening device; the output terminal of the last level target screening device in the first hierarchical quantity is connected to the target output port in each group of corresponding input ports and output ports; when the target topology type is a second type, determining the target connection method includes: the input data of the multiple target screening devices included in the first level in the second hierarchical quantity comes from all input ports of the initial data transmission network; the input data of the target screening devices in the second hierarchical quantity other than the first level comes from the target screening device of the next higher level; the output terminal of the last level target screening device in the second hierarchical quantity is connected to the target output port in each group of corresponding input ports and output ports.
[0010] Optionally, obtaining the target connection method of the target screening device corresponding to the target topology type further includes: when the target topology type is a first type, determining the target connection method further includes: adjusting the data transmission timing between the first number of target screening devices through a first number of registers; when the target topology type is a second type, determining the target connection method further includes: adjusting the data transmission timing between the second number of target screening devices through a second number of registers.
[0011] Optionally, the method further includes: determining the number of target screening devices as (N-1)*(W / 2)*N; determining the first number as W*(N+1)*(N / 2)*N; determining the second number as W*(2^(Log2)). N +1)-1)*N; where the target screening device is a two-input multiplexer, N is the number of input ports or output ports included in the initial data transmission network, and W is the signal bit width of each port of the initial data transmission network.
[0012] According to another embodiment of the present invention, a data filtering topology generation apparatus is also provided, comprising: a first determining module, configured to determine a target topology type corresponding to an initial data transmission network from a plurality of topology types, wherein the initial data transmission network is used to transmit data according to the correspondence between input ports and output ports; a second determining module, configured to determine a target data filtering strategy corresponding to the target topology type, wherein the target data filtering strategy is used to indicate a multi-level filtering method for data transmitted in the data transmission network; and a generating module, configured to generate a target data filtering topology corresponding to the initial data transmission network according to the target data filtering strategy, thereby obtaining a target data transmission network, wherein the target data filtering topology is used to filter data for each output port according to the correspondence between input ports and output ports of the data transmission network.
[0013] According to yet another embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.
[0014] According to yet another embodiment of the present invention, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0015] This invention determines the target topology type corresponding to the initial data transmission network from multiple topology types. The initial data transmission network transmits data according to the correspondence between input and output ports. A target data filtering strategy corresponding to the target topology type is determined, indicating a multi-level filtering method for the data transmitted in the data transmission network. A target data filtering topology corresponding to the initial data transmission network is generated according to the target data filtering strategy, resulting in the target data transmission network. This target data filtering topology filters data for each output port according to the correspondence between input and output ports, i.e., the data transmitted in the data transmission network is filtered according to a multi-level filtering strategy. Different topologies correspond to different data filtering strategies. When multiple topologies are involved... After determining the target topology type corresponding to the initial data transmission network, the target data filtering strategy corresponding to the target topology is determined. This allows for the determination of the multi-level filtering method required for the initial data transmission network. Based on this filtering strategy, a target data filtering topology corresponding to the initial data transmission network can be generated. This target data filtering topology can filter data at each output port according to the relationship between the input and output ports of the data transmission network. By designing a hierarchical filtering topology, the data at the input ports of the data transmission network is filtered hierarchically, avoiding the instantaneous filtering pressure caused by large data volumes. While ensuring the filtering sequence, the data input to the input ports is filtered efficiently and quickly. Therefore, this solves the problem of low data filtering efficiency in related technologies and achieves the effect of improving data filtering efficiency. Attached Figure Description
[0016] Figure 1 This is a mobile terminal hardware structure block diagram of the data filtering topology generation method according to an embodiment of the present invention;
[0017] Figure 2 This is a flowchart of a method for generating a data filtering topology structure according to an embodiment of the present invention;
[0018] Figure 3 This is a schematic diagram of an optional target data transmission network according to an embodiment of the present invention;
[0019] Figure 4 This is a schematic diagram of another optional target data transmission network according to an embodiment of the present invention;
[0020] Figure 5 This is a structural block diagram of a data filtering topology generation device according to an embodiment of the present invention. Detailed Implementation
[0021] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings and examples.
[0022] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0023] The methods and embodiments provided in this application can be executed on a mobile terminal, a computer terminal, or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a mobile terminal hardware structure block diagram of the data filtering topology generation method according to an embodiment of the present invention. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0024] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the data filtering topology generation method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0025] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0026] This embodiment provides a method for generating a data filtering topology structure. Figure 2 This is a flowchart of a data filtering topology generation method according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps:
[0027] Step S202: Determine the target topology type corresponding to the initial data transmission network from multiple topology types, wherein the initial data transmission network is used to transmit data according to the correspondence between input ports and output ports;
[0028] Step S204: Determine the target data filtering strategy corresponding to the target topology type, wherein the target data filtering strategy is used to indicate the method of multi-level filtering of data transmitted in the data transmission network;
[0029] Step S206: Generate a target data filtering topology structure corresponding to the initial data transmission network according to the target data filtering strategy to obtain the target data transmission network. The target data filtering topology structure is used to filter data for each output port according to the correspondence between the input ports and output ports of the data transmission network.
[0030] Through the above steps, the data transmitted in the data transmission network is filtered according to a multi-level filtering strategy. Different topologies correspond to different data filtering strategies. After determining the target topology type corresponding to the initial data transmission network among multiple topologies, the target data filtering strategy corresponding to the target topology is determined. This allows for the determination of the multi-level filtering method required for the initial data transmission network. Based on this data filtering strategy, a target data filtering topology corresponding to the initial data transmission network can be generated. This target data filtering topology can filter data at each output port according to the relationship between the input and output ports of the data transmission network. By designing a hierarchical filtering topology, the data at the input ports of the data transmission network is filtered hierarchically, avoiding the instantaneous filtering pressure caused by large data volumes. While ensuring the filtering sequence, the data input to the input ports is filtered efficiently and quickly. Therefore, this solves the problem of low data filtering efficiency in related technologies and achieves the effect of improving data filtering efficiency.
[0031] In the technical solution provided in step S202 above, the topology type is used to indicate the type of filtering strategy for hierarchical filtering of data.
[0032] Optionally, in this embodiment, the topology type is divided according to the arrangement and connection of the devices used for data filtering. The devices used for data filtering may include, but are not limited to, data selectors and registers. The data selector is used to select the data corresponding to the data selector from multiple input ports and allow the data to pass through. The register is used to temporarily store the data to ensure the timing of data filtering.
[0033] Optionally, in this embodiment, the target topology type can be determined based on the congestion level of the data transmission network, or it can be determined based on the operator's selection instructions. For example, when the number of input ports in the data transmission network is higher than a certain value, it is determined that the data transmission network is in a congested state. Alternatively, when the data bit width allowed to be transmitted by each port in the data transmission network is higher than a certain value, it is determined that the data transmission network is in a congested state. Or, when the number of input ports is higher than a certain value and the data bit width of each port is higher than a certain value, it is determined that the data transmission network is in a congested state.
[0034] In the technical solution provided in step S204 above, the number of filtering levels in multi-level filtering is determined based on the number of input ports and / or the allowable initial data bit width of each port. For example, filtering can be performed according to the input ports, or according to each data bit of the data within the port, or according to the input ports and each data bit of the data. This solution does not limit this.
[0035] Optionally, in this embodiment, the filtering strategy includes the arrangement of data filtering devices. For example, the arrangement may include, but is not limited to, the arrangement of data selectors, the arrangement of registers, etc. This solution does not limit this.
[0036] In the technical solution provided in step S206 above, the target data transmission network includes the connection relationship between screening devices that can perform hierarchical screening operations on multiple input ports for each output port, such as the connection relationship between registers, the connection relationship between registers and data selectors, the order in which data selectors are arranged, etc.
[0037] As an optional embodiment, determining the target topology type corresponding to the data transmission network from multiple topology types includes:
[0038] Obtain the first data transmission parameters of the initial data transmission network, wherein the first data transmission parameters include: the number of ports of the initial data transmission network, and / or, the signal bit width of each port of the initial data transmission network;
[0039] The target congestion level of the initial data transmission network is determined based on the first data transmission parameters, wherein the target congestion level is used to indicate the degree of congestion of the data transmitted by the initial data transmission network in the initial data transmission network;
[0040] The topology type that matches the target congestion level among the plurality of topology types is determined as the target topology type.
[0041] Optionally, in this embodiment, the congestion level is the result of analyzing the number of ports and / or the signal bit width. For example, when the number of ports exceeds a first threshold, the data transmission network is determined to be at the target congestion level. Alternatively, the data transmission network can be determined to be at the target congestion level when the signal bit width is greater than a second threshold. Or, the data transmission network can be determined to be at the target congestion level when the number of ports exceeds the first threshold and the signal bit width is greater than the second threshold. This solution does not limit this.
[0042] As an optional embodiment, determining the target data filtering strategy corresponding to the target topology type includes:
[0043] The filtering and grading parameters that match the target topology type are determined based on the second data transmission parameters of the initial data transmission network;
[0044] Obtain the target connection method of the target screening device corresponding to the target topology type;
[0045] The filtering and grading parameters and the target connection method are determined as the target data filtering strategy.
[0046] Optionally, in this embodiment, the second data transmission parameter may include, but is not limited to, the number of ports of the initial data transmission network and / or the signal bit width of each port of the initial data transmission network.
[0047] Optionally, in this embodiment, the target screening device at each level of the target is used to screen a portion of the data within multiple input ports.
[0048] Optionally, in this embodiment, the target filtering device includes a data selector. The target filtering device is a multi-to-one data selection device. The number of data selected by the target filtering device in a single operation is less than the total amount of data received by the input port. For example, it can be a two-to-one data selector, a three-to-one data selector, or a four-to-one data selector. This solution does not limit this.
[0049] Optionally, in this embodiment, each target topology type can correspond to a target filtering device with one type of data filtering capability, or it can correspond to a target filtering device with multiple data filtering capabilities. For example, the target topology can correspond to a connection method of multiple two-to-one data filtering devices, or it can correspond to a connection method of multiple two-to-one data filtering devices and multiple three-to-one data filtering devices.
[0050] As an optional embodiment, determining the screening and grading parameters matching the target topology type based on the second data transmission parameters of the initial data transmission network includes:
[0051] Obtain the second data transmission parameters of the initial data transmission network, wherein the second data transmission parameters include: the number of ports of the initial data transmission network, and / or, the signal bit width of each port of the initial data transmission network;
[0052] When the target topology type is the first type, the first level number corresponding to the second data transmission parameter is calculated according to the hierarchical function corresponding to the first type as the filtering hierarchical parameter, wherein the first level number is used to indicate the number of filtering levels divided between each group of corresponding input ports and output ports under the topology belonging to the first type.
[0053] When the target topology type is the second type, the second number of levels corresponding to the second data transmission parameter is calculated according to the hierarchical function corresponding to the second type as the filtering hierarchical parameter, wherein the second number of levels is used to indicate the number of filtering levels divided between each group of corresponding input ports and output ports under the topology belonging to the second type.
[0054] Optionally, in this embodiment, in order to ensure the timing of data, the number of filtering levels divided between each group of input ports and output ports in the initial data transmission network is the same.
[0055] As an optional embodiment, obtaining the target connection method of the target screening device corresponding to the target topology type includes:
[0056] When the target topology type is the first type, determining the target connection method includes: the input data of the first-level target screening device in the first hierarchical quantity comes from the target input port in each group of corresponding input ports and output ports, as well as some ports in the input ports of the initial data transmission network other than the target input port; the input data of the target screening devices in the first hierarchical quantity other than the first level comes from the target screening device of the previous level in other hierarchical levels and ports in other ports that are not connected to the target screening device; the output terminal of the last-level target screening device in the first hierarchical quantity is connected to the target output port in each group of corresponding input ports and output ports;
[0057] When the target topology type is the second type, determining the target connection method includes: the input data of the multiple target screening devices included in the first level of the second hierarchical quantity comes from all the input ports of the initial data transmission network; the input data of the target screening devices in other levels of the second hierarchical quantity besides the first level comes from the target screening device of the previous level; the output terminal of the last level target screening device in the second hierarchical quantity is connected to the target output port in each group of corresponding input ports and output ports.
[0058] Optionally, in this embodiment, when the target topology type is the second type, the screening capabilities of the multiple target screening devices included in the first level can be the same or different.
[0059] As an optional embodiment, obtaining the target connection method of the target screening device corresponding to the target topology type further includes:
[0060] When the target topology type is the first type, determining the target connection method further includes: adjusting the data transmission timing between the first hierarchical number of target screening devices through a first number of registers;
[0061] When the target topology type is the second type, determining the target connection method further includes: adjusting the data transmission timing between the second number of target screening devices through a second number of registers.
[0062] Optionally, in this embodiment, to ensure timing, registers can be set continuously. For example, if no target filtering device is set in multiple filtering levels of a certain port, the data of this port will not have data filtering delay in these filtering levels. To ensure the timing of this port and other ports, registers can be set at the positions of multiple filtering levels of this port where no target filtering device is set, so as to ensure timing issues.
[0063] Optionally, in this embodiment, in the first type of topology, the first level includes a first target filter device, which is used to filter a portion of the data received by the plurality of data input ports. Each of the other filter levels in the first number of levels includes a second target filter, which is used to filter the filtering results of the previous level and the unfiltered data among the plurality of data. A first register is set in the first level, the number of which matches the number of the plurality of data input ports. The first register is used to store the plurality of data received by the plurality of data input ports. Second registers are set in the other filter levels, the number of which matches the filtering results of the previous level and the number of unfiltered data streams among the plurality of data. The second register is used to store the filtering results of the previous level and the unfiltered data among the plurality of data. A third register is set after the target filter device in the tail filter level, and the third register is used to store the filtering results of the tail filter level.
[0064] Optionally, in this embodiment, in the second type of topology, the first level includes multiple first target filtering devices, each used to filter multiple data received from multiple data input ports. Second target filtering devices in other filtering levels besides the first level in the first filtering method are used to filter the filtering results of the previous level. A first register is set in the first level, the number of which matches the number of multiple data input ports. The first register is used to store the multiple data received from the multiple data input ports for the first target filtering devices. Second registers are set in other filtering levels, the number of which matches the number of target filtering devices in the previous filtering level. The second registers are used to store the filtering results of the previous filtering level. A third register is set after the data selector in the tail filtering level of the first filtering method, and the third register is used to store the filtering results of the tail filtering level.
[0065] Figure 3This diagram illustrates an optional target data transmission network according to an embodiment of the present invention, employing a first type of topology. The diagram exemplifies the selection of data output from port A among four input ports. Taking output port A_Output as an example, the selection between A_Input and B_Input is first performed by a first-stage two-to-one target filtering device. Registers are added before and after each stage of the two-to-one target filtering device. For timing alignment, additional pipelines are needed for the other two input ports C_Input and D_Input. The input to the second-stage two-to-one target filtering device consists of two paths: one is the output of the first-stage target filtering device, and the other is the input of C_Input after passing through two pipeline stages. Logically, the output of the second-stage target filtering device is the selected output from the three input ports A_Input, B_Input, and C_Input. The input to the third-stage 2-to-1 target selection device has two paths: one is the output of the second-stage target selection device, and the other is the input of D_Input after passing through the three-stage pipeline. Logically, the output of the third-stage target selection device is the selected output from the four input ports A_Input, B_Input, C_Input, and D_Input, and finally output to the output port A_Input via a register. Each stage has only one 2-to-1 target selection device at a time; the remaining inputs are aligned in timing by inserting into the pipeline. Furthermore, registers are inserted before and after each stage's 2-to-1 target selection device. In the back-end implementation, the 2-to-1 target selection devices of each stage can be placed in a larger area, for example... Figure 3 The first stage has 1024 two-to-one target selection devices, and the second stage has 1024 two-to-one target selection devices, which can be placed further apart to avoid the problem of wire wrapping congestion. At the same time, since there are registers at both the front and back, timing convergence is also solved.
[0066] Figure 4This diagram illustrates another optional target data transmission network according to an embodiment of the present invention, applying the second type of topology of the present invention. The diagram exemplifies the selection of data output from port A from four input ports. First, two 2-to-1 target selection devices at the first stage perform selections for A_Input, B_Input, and C_Input, D_Input. Registers are added before and after each 2-to-1 target selection device at each stage. For timing alignment, the inputs of the second-stage 2-to-1 target selection devices are the outputs of the two data selectors from the previous stage. Finally, the output is sent to output port A_Input via registers. In this structure, each stage simultaneously performs pairwise selections on multiple input ports, and the second stage then performs pairwise selections on the results from the first stage, until the last stage. This reduces the use of registers and lowers the latency from the input port to the output port.
[0067] Table 1 lists the number of registers, the number of target screening devices, and the delay required for the first and second type topologies when using a two-to-one target screening device. N is the number of input ports or output ports included in the initial data transmission network, and W is the signal bit width of each port of the initial data transmission network, as shown in Table 1.
[0068]
[0069] Table 2 shows the number of registers, the number of target screening devices, and the latency for the first and second type topologies, using N=4 and W=1024 as examples.
[0070]
[0071] Table 3 shows the number of registers, the number of target screening devices, and the latency for the first and second type topologies, using N=4 and W=2048 as examples.
[0072]
[0073] Table 4 shows the number of registers, the number of target screening devices, and the latency for the first and second type topologies, taking N=16 and W=1024 as an example.
[0074]
[0075] As can be seen, with the increase in the number of input / output ports, the number of registers required and the latency of the second type of topology are significantly reduced compared to the first type. Although the first type of topology has higher resource consumption and latency compared to the second type, it allows for routing over a larger area without causing timing convergence issues because only two inputs are selected at each stage. Therefore, if severe congestion still occurs with the second type of topology, the first type of topology can be used.
[0076] As an optional embodiment, the method further includes:
[0077] The number of the target screening devices is determined to be (N-1)*(W / 2)*N;
[0078] The first quantity is determined to be W*(N+1)*(N / 2)*N;
[0079] The second quantity is determined to be W*(2^(Log2)). N +1)-1)*N;
[0080] Wherein, the target screening device is a two-input multiplexer, N is the number of input ports or output ports included in the initial data transmission network, and W is the signal bit width of each port of the initial data transmission network.
[0081] Optionally, in this embodiment, the signal bit width W can be 1, 2, 3, 6, 10, etc.
[0082] Optionally, in this embodiment, the number of ports can be 1, 3, 4, 6, 8, 9, 10, etc.
[0083] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0084] This embodiment also provides a data filtering topology generation device. Figure 5 This is a structural block diagram of a data filtering topology generation device according to an embodiment of the present invention, such as... Figure 5 As shown, the device includes:
[0085] The first determining module 52 is used to determine the target topology type corresponding to the initial data transmission network from multiple topology types, wherein the initial data transmission network is used to transmit data according to the correspondence between input ports and output ports;
[0086] The second determining module 54 is used to determine the target data filtering strategy corresponding to the target topology type, wherein the target data filtering strategy is used to indicate the method of multi-level filtering of data transmitted in the data transmission network;
[0087] The generation module 56 is used to generate a target data filtering topology structure corresponding to the initial data transmission network according to the target data filtering strategy, thereby obtaining a target data transmission network. The target data filtering topology structure is used to filter data for each output port according to the correspondence between the input ports and output ports of the data transmission network.
[0088] Optionally, the first determining module includes: an acquisition unit, configured to acquire first data transmission parameters of the initial data transmission network, wherein the first data transmission parameters include: the number of ports of the initial data transmission network, and / or, the signal bit width of each port of the initial data transmission network; a first determining unit, configured to determine a target congestion level of the initial data transmission network based on the first data transmission parameters, wherein the target congestion level is used to indicate the degree of congestion of the data transmitted by the initial data transmission network in the initial data transmission network; and a second determining unit, configured to determine the topology type that matches the target congestion level among the plurality of topology types as the target topology type.
[0089] Optionally, the second determining module includes: a third determining unit, configured to determine screening and grading parameters matching the target topology type based on the second data transmission parameters of the initial data transmission network; an acquisition unit, configured to acquire the target connection method of the target screening device corresponding to the target topology type; and a fourth determining unit, configured to determine the screening and grading parameters and the target connection method as the target data screening strategy.
[0090] Optionally, the third determining unit is configured to: obtain the second data transmission parameter of the initial data transmission network, wherein the second data transmission parameter includes: the number of ports of the initial data transmission network, and / or, the signal bit width of each port of the initial data transmission network; when the target topology type is a first type, calculate the first level number corresponding to the second data transmission parameter as the filtering level parameter according to the grading function corresponding to the first type, wherein the first level number is used to indicate the number of filtering levels divided between each group of corresponding input ports and output ports under the topology belonging to the first type; when the target topology type is a second type, calculate the second level number corresponding to the second data transmission parameter as the filtering level parameter according to the grading function corresponding to the second type, wherein the second level number is used to indicate the number of filtering levels divided between each group of corresponding input ports and output ports under the topology belonging to the second type.
[0091] Optionally, the third determining unit is configured to: determine the target connection method when the target topology type is a first type, including: the input data of the target screening devices in the first hierarchical quantity comes from the target input port in each group of corresponding input ports and output ports, and some ports in the input ports of the initial data transmission network other than the target input port; the input data of the target screening devices in the first hierarchical quantity other than the first level comes from the target screening devices of the previous level in other hierarchical levels, and ports in other ports that are not connected to the target screening devices; the output terminal of the last level target screening device in the first hierarchical quantity is connected to the target output port in each group of corresponding input ports and output ports; when the target topology type is a second type, determine the target connection method including: the input data of the multiple target screening devices included in the first level in the second hierarchical quantity comes from all input ports of the initial data transmission network; the input data of the target screening devices in the second hierarchical quantity other than the first level comes from the target screening device of the previous level; the output terminal of the last level target screening device in the second hierarchical quantity is connected to the target output port in each group of corresponding input ports and output ports.
[0092] Optionally, the third determining unit is further configured to: when the target topology type is a first type, determining the target connection method further includes: adjusting the data transmission timing between the first hierarchical number of target screening devices through a first number of registers; when the target topology type is a second type, determining the target connection method further includes: adjusting the data transmission timing between the second hierarchical number of target screening devices through a second number of registers.
[0093] Optionally, the device further includes: a fourth determining module, configured to determine the number of target screening devices as (N-1)*(W / 2)*N; a fifth determining module, configured to determine the first number as W*(N+1)*(N / 2)*N; and a sixth determining module, configured to determine the second number as W*(2^(Log2)). N +1)-1)*N; where the target screening device is a two-input multiplexer, N is the number of input ports or output ports included in the initial data transmission network, and W is the signal bit width of each port of the initial data transmission network.
[0094] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0095] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.
[0096] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0097] Embodiments of the present invention also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.
[0098] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0099] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0100] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0101] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for generating a data filtering topology, characterized in that, include: The target topology type corresponding to the initial data transmission network is determined from multiple topology types, wherein the initial data transmission network is used to transmit data according to the correspondence between input ports and output ports; Determine the target data filtering strategy corresponding to the target topology type, wherein the target data filtering strategy is used to indicate the method of multi-level filtering of data transmitted in the data transmission network; The target data filtering topology is generated according to the target data filtering strategy to obtain the target data transmission network. The target data filtering topology is used to filter data for each output port according to the correspondence between the input port and the output port of the data transmission network. The step of determining the target topology type corresponding to the data transmission network from multiple topology types includes: obtaining a first data transmission parameter of the initial data transmission network, wherein the first data transmission parameter includes: the number of ports of the initial data transmission network, and / or, the signal bit width of each port of the initial data transmission network; determining a target congestion degree of the initial data transmission network based on the first data transmission parameter, wherein the target congestion degree is used to indicate the degree of congestion of the data transmitted by the initial data transmission network in the initial data transmission network; and determining the topology type that matches the target congestion degree from the multiple topology types as the target topology type.
2. The method according to claim 1, characterized in that, The method for determining the target data filtering strategy corresponding to the target topology type includes: The filtering and grading parameters that match the target topology type are determined based on the second data transmission parameters of the initial data transmission network; Obtain the target connection method of the target screening device corresponding to the target topology type; The filtering and grading parameters and the target connection method are determined as the target data filtering strategy.
3. The method according to claim 2, characterized in that, The step of determining the screening and grading parameters matching the target topology type based on the second data transmission parameters of the initial data transmission network includes: Obtain the second data transmission parameters of the initial data transmission network, wherein the second data transmission parameters include: the number of ports of the initial data transmission network, and / or, the signal bit width of each port of the initial data transmission network; When the target topology type is the first type, the first level number corresponding to the second data transmission parameter is calculated according to the hierarchical function corresponding to the first type as the filtering hierarchical parameter, wherein the first level number is used to indicate the number of filtering levels divided between each group of corresponding input ports and output ports under the topology belonging to the first type. When the target topology type is the second type, the second number of levels corresponding to the second data transmission parameter is calculated according to the hierarchical function corresponding to the second type as the filtering hierarchical parameter, wherein the second number of levels is used to indicate the number of filtering levels divided between each group of corresponding input ports and output ports under the topology belonging to the second type.
4. The method according to claim 3, characterized in that, The step of obtaining the target connection method of the target screening device corresponding to the target topology type includes: When the target topology type is the first type, determining the target connection method includes: the input data of the target screening devices in the first hierarchical quantity comes from the target input port in each group of corresponding input ports and output ports, as well as some ports in the input ports of the initial data transmission network other than the target input port; the input data of the target screening devices in the first hierarchical quantity other than the first level comes from the target screening device of the previous level in other levels, as well as ports in other ports that are not connected to the target screening device; the output terminal of the last level target screening device in the first hierarchical quantity is connected to the target output port in each group of corresponding input ports and output ports; When the target topology type is the second type, determining the target connection method includes: the input data of the multiple target screening devices included in the first level of the second hierarchical quantity comes from all the input ports of the initial data transmission network; the input data of the target screening devices in other levels of the second hierarchical quantity besides the first level comes from the target screening device of the previous level; the output terminal of the last level target screening device in the second hierarchical quantity is connected to the target output port in each group of corresponding input ports and output ports.
5. The method according to claim 4, characterized in that, The step of obtaining the target connection method of the target screening device corresponding to the target topology type further includes: When the target topology type is the first type, determining the target connection method further includes: adjusting the data transmission timing between the first hierarchical number of target screening devices through a first number of registers; When the target topology type is the second type, determining the target connection method further includes: adjusting the data transmission timing between the second number of target screening devices through a second number of registers.
6. The method according to claim 5, characterized in that, The method further includes: The number of the target screening devices is determined to be (N-1)*(W / 2)*N; The first quantity is determined to be W*(N+1)*(N / 2)*N; The second quantity is determined to be W*(2 ^ (Log2 N +1)-1)*N; Wherein, the target screening device is a two-input multiplexer, N is the number of input ports or output ports included in the initial data transmission network, and W is the signal bit width of each port of the initial data transmission network.
7. A data filtering topology generation device, characterized in that, include: The first determining module is used to determine the target topology type corresponding to the initial data transmission network from multiple topology types, wherein the initial data transmission network is used to transmit data according to the correspondence between input ports and output ports; The second determining module is used to determine the target data filtering strategy corresponding to the target topology type, wherein the target data filtering strategy is used to indicate the method of multi-level filtering of data transmitted in the data transmission network; The generation module is used to generate a target data filtering topology structure corresponding to the initial data transmission network according to the target data filtering strategy, thereby obtaining the target data transmission network. The target data filtering topology structure is used to filter data for each output port according to the correspondence between the input ports and output ports of the data transmission network. The first determining module includes: an acquisition unit, configured to acquire first data transmission parameters of the initial data transmission network, wherein the first data transmission parameters include: the number of ports of the initial data transmission network, and / or, the signal bit width of each port of the initial data transmission network; a first determining unit, configured to determine a target congestion level of the initial data transmission network based on the first data transmission parameters, wherein the target congestion level is used to indicate the degree of congestion of the data transmitted by the initial data transmission network in the initial data transmission network; and a second determining unit, configured to determine the topology type that matches the target congestion level among the plurality of topology types as the target topology type.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described in any one of claims 1 to 6.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method described in any one of claims 1 to 6.
Citation Information
Patent Citations
On-chip network topological structure determination method and device, and chip
CN113778938A