Method and apparatus for updating routing table based on many-core system and electronic device

By dynamically updating the routing table according to the current physical location of the processing cores in the many-core system, and adopting path calculation and packet exploration methods, the problem of efficient communication under the condition of a large number of processing cores and dynamically changing locations is solved, and the timely and accurate update of the routing table is achieved.

CN116055381BActive Publication Date: 2025-10-21LYNXI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111264684.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-28
Publication Date
2025-10-21
Estimated Expiration
2041-10-28

AI Technical Summary

Technical Problem

In a many-core system, how to achieve efficient communication between the various processing cores under the premise of a large number of processing cores, especially when the physical location of the processing cores changes dynamically, the existing pre-compiled routing method is not flexible enough and cannot adapt to dynamic adjustments.

Method used

By determining the routing transmission information based on the current physical location of the processing core when the routing table update conditions are met, and dynamically updating the routing table, the routing transmission path is determined by using path calculation and data packet exploration to ensure the timeliness and accuracy of the routing table.

Benefits of technology

This achieves efficient communication between processing cores when there are a large number of processing cores and their positions change dynamically, flexibly adapts to position changes, and improves the timeliness and accuracy of routing table updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116055381B_ABST
    Figure CN116055381B_ABST
Patent Text Reader

Abstract

The present disclosure provides a routing table updating method and system based on a many-core system, an electronic device and a readable medium. The method comprises: in the case that a routing table updating condition is met, determining routing transmission information between a first processing core and a second processing core according to a current physical position of the first processing core and a current physical position of the second processing core; and updating a routing table corresponding to the first processing core according to the routing transmission information. The second processing core is a processing core receiving a data packet of the first processing core. The routing table updating condition comprises at least one of the following: the routing table corresponding to the first processing core is empty, and the physical position of the first processing core and / or the second processing core is changed. This method can flexibly set routing transmission information, thereby facilitating dynamic adjustment of routing and being flexibly applicable to complex application scenarios in which the physical position of a processing core can be dynamically changed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of computer technology, and in particular to a routing table updating method, device, and electronic device based on a many-core system. Background Art

[0002] Many-core architecture is a parallel processing architecture widely used to execute neural network models. In a many-core architecture, each processing core performs a specific computational function. A certain number of processing cores connected through a specific topology form a chip, and a certain number of chips connected through a specific topology form a chip array board. This can be expanded to create larger systems. Therefore, many-core systems involve a large number of processing cores. Therefore, how to achieve efficient communication between these cores, given the large number of cores, has become a pressing technical challenge in the field of routing computing. Summary of the Invention

[0003] In view of the above problems, the present disclosure is proposed to provide a routing table updating method, device and electronic device based on a many-core system that overcome the above problems or at least partially solve the above problems.

[0004] According to one aspect of an embodiment of the present disclosure, a routing table updating method based on a many-core system is provided, comprising:

[0005] When a routing table update condition is met, determining routing transmission information between the first processing core and the second processing core according to a current physical location of the first processing core and a current physical location of the second processing core;

[0006] updating a routing table corresponding to the first processing core according to the routing transmission information;

[0007] Among them, the second processing core is the processing core that receives the data packet of the first processing core, and the routing table update condition includes at least one of the following: the routing table corresponding to the first processing core is empty, and the physical location of the first processing core and / or the second processing core changes.

[0008] In a second aspect, an embodiment of the present disclosure provides a routing table updating device based on a many-core system, comprising:

[0009] a determining module, adapted to determine, when a routing table update condition is met, routing transmission information between the first processing core and the second processing core according to a current physical location of the first processing core and a current physical location of the second processing core;

[0010] an updating module, adapted to update a routing table corresponding to the first processing core according to the routing transmission information;

[0011] Among them, the second processing core is the processing core that receives the data packet of the first processing core, and the routing table update condition includes at least one of the following: the routing table corresponding to the first processing core is empty, and the physical location of the first processing core and / or the second processing core changes.

[0012] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising:

[0013] one or more processors;

[0014] A storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement at least one of the following methods:

[0015] According to the routing table updating method described in the first aspect of the embodiment of the present disclosure.

[0016] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, at least one of the following methods is implemented:

[0017] According to the routing table updating method described in the first aspect of the embodiment of the present disclosure.

[0018] In the routing table update method, device and electronic device based on the multi-core system provided in the embodiments of the present disclosure, it is possible to determine the routing transmission information between the first processing core and the second processing core based on the current physical location of the first processing core and the current physical location of the second processing core when the routing table update conditions are met; and update the routing table corresponding to the first processing core based on the routing transmission information. Wherein, the routing table update conditions include at least one of the following: the routing table corresponding to the first processing core is empty, the physical location of the first processing core and / or the second processing core changes. It can be seen that by setting the routing table update conditions, the routing transmission information between the two processing cores can be obtained in time when the routing table needs to be updated, and the routing table can be updated based on the routing transmission information, which can ensure the timeliness and accuracy of the routing table update, and thus can achieve efficient communication between the processing cores under the premise of a large number of processing cores. In addition, by updating the routing table when the physical location of the first processing core and / or the second processing core changes, it can also be flexibly applied to application scenarios where the processing core position changes. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings are used to provide a further understanding of the embodiments of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. The above and other features and advantages will become more apparent to those skilled in the art by describing the detailed exemplary embodiments with reference to the accompanying drawings, in which:

[0020] Figure 1 A flowchart of a routing table updating method based on a many-core system is provided in accordance with an embodiment of the present disclosure;

[0021] Figure 2 A flowchart of a routing table updating method based on a many-core system is provided as another embodiment of the present disclosure;

[0022] Figure 3 A structural diagram of a routing table updating device based on a many-core system provided in yet another embodiment of the present disclosure;

[0023] Figure 4 A block diagram of an electronic device according to an embodiment of the present disclosure;

[0024] Figure 5 A block diagram of the composition of a computer-readable medium provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0025] To enable those skilled in the art to better understand the technical solutions of the present disclosure, the routing method, system, electronic device, and computer-readable medium provided by the present disclosure are described in detail below with reference to the accompanying drawings.

[0026] Example embodiments will be described more fully hereinafter with reference to the accompanying drawings, but the example embodiments may be embodied in different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the scope of this disclosure to those skilled in the art.

[0027] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.

[0028] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0029] The terms used herein are used only to describe specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "a," "an," and "the" are also intended to include the plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "comprising" and / or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements, and / or components is specified, but the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or groups thereof is not excluded.

[0030] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless expressly defined as such herein.

[0031] In the related art, routing precompilation is often used to determine the routing between processing cores. However, during the implementation of the present invention, the inventors discovered that this precompilation approach has at least the following drawbacks: Routing set using precompilation is less flexible and cannot be dynamically adjusted once compiled, making it unsuitable for complex application scenarios where the physical locations of processing cores can change dynamically.

[0032] An embodiment of the present disclosure provides a routing table update method based on a many-core system. In the method provided by this embodiment, a chip in the many-core system includes multiple processing cores that can communicate with each other, and the physical location of each processing core can be dynamically adjusted according to the application running state. Figure 1 FIG. 1 shows a flow chart of a routing table updating method based on a multi-core system provided by an embodiment of the present disclosure, as shown in FIG. Figure 1 As shown, the method includes:

[0033] Step S110 : when the routing table update condition is met, determining the routing transmission information between the first processing core and the second processing core according to the current physical location of the first processing core and the current physical location of the second processing core.

[0034] The routing table update condition includes at least one of the following: the routing table corresponding to the first processing core is empty, or the physical location of the first processing core and / or the second processing core has changed. For example, if the routing table corresponding to the first processing core is empty, it indicates that the routing table needs to be updated. For another example, if the physical location of the first processing core and / or the second processing core has changed, it indicates that the routing information stored in the routing table is out of date, and therefore the routing table needs to be updated.

[0035] Accordingly, based on the current physical location of the first processing core and the current physical location of the second processing core, the routing information between the first processing core and the second processing core is determined. The second processing core is the processing core that receives the data packet from the first processing core. Determining the routing information between the first processing core and the second processing core can be achieved in a variety of ways. For example, in the first way, the routing information between the first processing core and the second processing core is determined through path calculation. In another example, in the second way, the routing information between the first processing core and the second processing core is determined by transmitting a discovery data packet.

[0036] In addition, when the routing table update condition is that the routing table corresponding to the first processing core is empty, the current physical location of the second processing core can be determined in the following way: broadcast a location query message to the second processing core; receive a location response message sent by the second processing core, and determine the current physical location of the second processing core based on the location response message.

[0037] Step S120: updating the routing table corresponding to the first processing core according to the routing transmission information.

[0038] Specifically, when the routing table is empty, the routing table corresponding to the first processing core can be directly updated based on the routing transmission information. Additionally, when the routing table is not empty, the routing table corresponding to the first processing core can be queried for stored routing information between the first processing core and the second processing core; the stored routing information can be updated based on the routing transmission information; the update operation includes at least one of: a replacement-type update operation and an addition-type update operation.

[0039] Thus, by setting routing table update conditions, it is possible to promptly obtain routing transmission information between the two processing cores when the routing table needs to be updated, and update the routing table based on the routing transmission information, thereby ensuring the timeliness and accuracy of routing table updates, thereby enabling efficient communication between the processing cores under the premise of a large number of processing cores. In addition, by updating the routing table when the physical location of the first processing core and / or the second processing core changes, it can also be flexibly adapted to application scenarios where the processing core positions change.

[0040] Figure 2 FIG2 shows a flow chart of a method for updating a routing table based on a multi-core system according to another embodiment of the present disclosure. Figure 2 In the embodiment shown, a multi-core chip is provided with multiple processing cores that can communicate with each other. Each processing core has both a logical address (also called a logical identifier) ​​and a physical address (also called a physical identifier). The logical address is used to uniquely identify a processing core from the perspective of the business function of the processing core, and the physical address is used to uniquely identify a processing core from the perspective of the actual physical location of the processing core. In this embodiment, the physical address of the processing core identified by the same logical address can dynamically change with the change of the application running state. Figure 2 As shown, the method includes:

[0041] Step S200: Setting a routing table according to the positional relationship between the processing cores.

[0042] This step is an optional step. In actual situations, this step can also be omitted, and the routing table can be dynamically created directly during the routing process. Specifically, in order to facilitate communication, a routing table is set in each processing core, and the routing table is used to store the transmission path and / or transmission position when the processing core communicates with other processing cores. Among them, the transmission path is used to describe the specific path information, including the location information of each processing core that the data packet passes through during the transmission process, the transmission order information, etc.; the transmission position is used to describe the position offset of the target processing core (i.e., the destination address) relative to the current processing core (i.e., the current starting address).

[0043] Specifically, the routing table is empty in the initial state. When the current processing core needs to send a data packet to other processing cores, the routing transmission information is calculated based on the physical location of the target processing core (i.e., the second processing core) for receiving the data packet and updated to the routing table.

[0044] In this embodiment, since each processing core is independent of each other, in order to improve communication efficiency and avoid query delays, a routing table is maintained separately within each processing core, that is, there is a one-to-one correspondence between the routing table and the processing core. Of course, in other embodiments of the present disclosure, the routing tables related to each processing core can also be uniformly stored in a processing core used to implement the routing management function (referred to as the routing management processing core), and other processing cores can query and update the routing table through communication with the routing management processing core.

[0045] Step S210: adjusting the physical location of the first processing core according to the historical communication state of the first processing core, and broadcasting a physical location update message of the first processing core to other processing cores.

[0046] This step can be performed at any time, that is, the present invention does not limit the order between this step and other steps.

[0047] The historical communication status is used to describe the information transmission path, information transmission delay, information transmission frequency, information transmission quantity, information transmission type, etc. between a processing core and other processing cores. Accordingly, the current processing core (i.e., the first processing core) dynamically detects at least one of the following data: the information transmission delay, information transmission frequency, information transmission quantity, and information transmission type between the current processing core and each processing core, and determines whether to adjust the physical position of the current processing core based on the detection result. Specifically, when the information transmission delay between a processing core and other processing cores exceeds a preset delay threshold, the physical position of the relevant processing cores can be dynamically adjusted to shorten the transmission delay between the two communicating processing cores; when the information transmission frequency between a processing core and other processing cores exceeds a preset frequency threshold and / or the information transmission quantity exceeds a preset quantity threshold, the physical position of the relevant processing cores can be dynamically adjusted to facilitate communication between the two communicating processing cores; and when the information transmission type between a processing core and other processing cores belongs to a preset type (e.g., an information type with higher requirements for delay and reliability), the physical position of the relevant processing cores can be dynamically adjusted.

[0048] For example, the current processing core dynamically detects the information transmission delay, information transmission frequency, information transmission quantity, and information transmission type between the current processing core and each processing core, and determines the communication processing core corresponding to the current processing core (i.e., the processing core that communicates more with the current processing core) based on the detection results; when it is determined that the communication processing core has a corresponding adjacent idle core, the physical position of the current processing core is updated based on the physical position of the adjacent idle core. When updating the physical position of the current processing core based on the physical position of the adjacent idle core, the physical address of the current processing core can be directly updated to the physical address of the adjacent idle core, so that the logical address of the adjacent idle core is the same as the logical address of the current processing core, thereby achieving the effect of moving the current processing core to the adjacent idle core.

[0049] Specifically, when the physical location of the current processing core is updated, a physical location update message can be sent to other processing cores via broadcast, so that other processing cores can determine the latest location of the current processing core based on the physical location update message. In specific implementation, the current processing core can directly broadcast the physical location update message to other processing cores; or, the current processing core can first send the physical location update message to a controller or a processing core used to implement a control function (which can be the routing management processing core mentioned above), and then the controller or the processing core used to implement a control function broadcasts the physical location update message to other processing cores. In short, global broadcasting can ensure that the position changes of any processing core can be perceived by other processing cores in a timely manner.

[0050] Accordingly, the current processing core is further configured to receive a physical location update message of the second processing core sent by the second processing core, the physical location update message being a message broadcast by the second processing core after adjusting the physical location of the second processing core based on the historical communication status of the second processing core. For example, after receiving the broadcast physical location update message, any processing core parses the physical location update message to obtain the identification information (such as the logical address mentioned above) and the updated physical location of the processing core whose location has changed contained therein. To facilitate querying the above-mentioned location update information in a subsequent routing process, the current processing core may uniformly store the parsed results corresponding to each received physical location update message in a storage unit; alternatively, the current processing core may traverse each routing information related to the processing core whose location has changed stored in the routing table and set the routing information related to the processing core whose location has changed to an expired state or an invalid state, so as to facilitate updating the routing table in a subsequent routing process. When the routing dependency between the first processing core and the second processing core changes, that is, when the physical location of the first processing core changes and / or the physical location of the second processing core changes, it is determined that the routing table needs to be updated. In actual situations, the position of one of the first processing core and the second processing core may be changed while the position of the other processing core remains unchanged; alternatively, the positions of both processing cores may be changed simultaneously.

[0051] Accordingly, in this step, it is necessary to detect whether the physical positions of the first processing core and the second processing core have changed, thereby obtaining the latest physical positions after the change. If the physical position of the first processing core has changed, the current physical position of the first processing core refers to the physical position after the change; similarly, if the physical position of the second processing core has changed, the current physical position of the second processing core refers to the physical position after the change.

[0052] In specific implementation, the current physical locations of the first processing core and the second processing core can be determined based on the physical location update message and storage unit mentioned above; or, the current physical locations of the first processing core and the second processing core can be determined by querying the routing table mentioned above and determining whether the relevant routes stored in the routing table are set with an expired flag or an invalid flag. The present disclosure does not limit the specific details.

[0053] Alternatively, in practical situations, the current physical location of the second processing core can be determined by the first processing core broadcasting an addressing message. Specifically, the first processing core broadcasts an addressing message containing the identification information of the second processing core. After receiving the addressing message, the second processing core feeds back an address response message containing its current address information to the first processing core. Accordingly, the first processing core compares the address information of the second processing core contained in the address response message with the locally stored address information of the second processing core. If the two do not match, the location of the second processing core is determined to have changed.

[0054] Step S220: When the routing table update condition is met, determine the routing transmission information between the first processing core and the second processing core according to the current physical location of the first processing core and the current physical location of the second processing core.

[0055] The routing table update conditions include: the routing table corresponding to the first processing core is empty, and the physical location of the first processing core and / or the second processing core changes. In this embodiment, the implementation methods for determining the routing transmission information between the first processing core and the second processing core include at least the following two methods:

[0056] (1) Path calculation method

[0057] This method can determine routing information directly through calculation, which is convenient and quick. Specifically, routing information between the first and second processing cores is determined through path calculation. In specific implementation, a first location coordinate corresponding to the current physical location of the first processing core and a second location coordinate corresponding to the current physical location of the second processing core are obtained; at least one path information corresponding to the first and second location coordinates is determined according to a preset path setting strategy; the transmission cost of each path information is calculated, and the routing information is determined based on the calculation results.

[0058] The path setting strategy can be pre-configured and specifically includes at least one of the following strategies:

[0059] The first strategy, an avoidance strategy, is used to set transmission nodes corresponding to processing cores to be avoided during path selection, thereby circumventing these transmission nodes during path calculation. Specifically, avoidance strategies include absolute avoidance and recommended avoidance. The absolute avoidance strategy typically applies to situations where a transmission node is physically damaged and unable to transmit; in this case, such nodes must be avoided. The recommended avoidance strategy typically applies to situations where a transmission node is experiencing low transmission efficiency due to factors such as excessive load; in this case, the decision to avoid such nodes can be made based on the actual situation.

[0060] The second type of strategy is a selection strategy. This strategy is used to prioritize the transmission nodes corresponding to higher-priority processing cores during path selection, ensuring that these nodes are preferred during path calculation. Specifically, selection strategies can be set based on factors such as the load and transmission latency of each transmission node. In practice, selection strategies include absolute selection strategies and recommended selection strategies. Absolute selection strategies can be configured by operators to flexibly define the default routing method.

[0061] The above two strategies can be used alone or in combination, which is not limited in this disclosure. In specific implementation, the transmission cost of each path can be determined based on the routing line statistics of the previous period, and then the routing transmission information can be determined.

[0062] (2) Exploration methods

[0063] This method determines the routing information by exploring data packets, which is conducive to dynamically adjusting the routing according to the dynamic changes in the physical core positions. Specifically, the routing information between the first processing core and the second processing core is determined by transmitting the exploration data packets.

[0064] Specifically, an exploration packet is generated based on the relative positional relationship between the current physical location of the first processing core and the current physical location of the second processing core; the exploration packet is transmitted to the second processing core via an exploration method; the exploration packet is used to record transmission parameters corresponding to the exploration packet during transmission; and routing transmission information between the first processing core and the second processing core is determined based on the transmission parameters of the exploration packet. The transmission parameters include a transmission path and / or a position offset. After receiving the exploration packet, each transmission node transmits the packet to a transmission node located at the next hop according to the exploration strategy, and updates the transmission path and / or position offset of the exploration packet based on the transmission path. The transmission node is a transmission node located between the first processing core and the second processing core, and specifically can be a routing node located between the first processing core and the second processing core. In this embodiment, each processing core corresponds to a routing node. Therefore, the transmission nodes include at least: a first routing node corresponding to the first processing core, a second routing node corresponding to the second processing core, and a routing node located between the first processing core and the second processing core. In addition, the exploration strategy includes: a random selection strategy or a sequential selection strategy. This disclosure does not limit the specific strategy, as long as it can try different routing directions as much as possible. For example, a genetic algorithm can be used to perform trials: a large number of exploratory packets are sent at bifurcated nodes to identify the fastest path or paths. For example, in the early stages of transmission, trials can be performed at any bifurcation point. Whenever an uncertain routing node is encountered, some packets are sent in one direction and some in a second direction, thereby identifying one to N fast paths as the transmission path, where N is a natural number. Thus, by sending a large number of trial packets at bifurcated nodes, the fastest or top N paths can be found as options. This method is a slow update method, in which exploratory packets are sent until the optimal path is determined.

[0065] The transmission parameters are used to record information about each transmission node that a data packet passes through during transmission. Accordingly, the information content of the transmission parameters is dynamically updated as the number of transmission hops of the data packet changes. The transmission parameters can be used to determine the transmission path of the data packet. Since the transmission paths of each data packet in the exploratory transmission method are unknown, it is necessary to dynamically record the transmission paths using the transmission parameters. In specific implementations, the transmission paths in the transmission parameters can be determined in a variety of ways. For example, corresponding numerical numbers can be assigned to each transmission direction, and a numerical sequence consisting of a set of numerical numbers can be used to represent the transmission path. For example, assuming that transmission in a first direction (e.g., the left side) corresponds to the numerical number 0, transmission in a second direction (e.g., the right side) corresponds to the numerical number 1, transmission in a third direction (e.g., the top) corresponds to the numerical number 2, and transmission in a fourth direction (e.g., the bottom) corresponds to the numerical number 3. Accordingly, if transmission is first to the left and then to the top, the corresponding representation is the numerical sequence 02, and so on.

[0066] In addition, when determining the routing transmission information between the first processing core and the second processing core according to the transmission parameters of the discovery data packet, it can be implemented in at least one of the following two ways:

[0067] In the first method, the transmission parameters of each exploration data packet sent by the second processing core are received. Based on the transmission parameters of each exploration data packet, at least one transmission path is selected as a target path. The routing transmission information between the first and second processing cores is determined based on the target path. In this method, after receiving the exploration data packet, the second processing core directly sends the transmission parameters of each exploration data packet to the current processing core (i.e., the first processing core). The first processing core selects at least one transmission path as the target path based on the transmission parameters of each exploration data packet. The routing transmission information between the first and second processing cores is determined based on the target path.

[0068] In the second method, the second processing core receives the transmission parameters of each exploration packet sent by the second processing core, selects at least one transmission path as the target path based on the transmission parameters of each exploration packet, and determines the routing transmission information between the first and second processing cores based on the target path. In this method, after receiving the exploration packets, the second processing core obtains the transmission parameters of each exploration packet, selects at least one transmission path as the target path based on the transmission parameters of each exploration packet, and directly sends the target path to the first processing core.

[0069] Thus, the difference between the above two methods is that the execution entities for selecting the target path are different. In the first method, the first processing core selects the target path; in the second method, the second processing core selects the target path.

[0070] In addition, when determining the routing transmission information between the first processing core and the second processing core by transmitting an exploration data packet, in order to facilitate the determination of the transmission efficiency of the exploration data packet, a certain number of preset path data packets can also be set, and the final routing transmission information can be determined by comparing the transmission results of the exploration data packet with the preset path data packet. Specifically, a first number of exploration data packets are transmitted to the second processing core by an exploration method; a second number of preset path data packets are transmitted to the second processing core according to a preset transmission path; and the routing transmission information between the first processing core and the second processing core is determined based on the exploration data packet and the preset path data packet. Among them, the preset transmission path can be determined according to a path calculation method. For example, assuming that multiple paths are determined by a path calculation method, at least one path is selected from the multiple paths as the preset transmission path of the preset path data packet.

[0071] In addition, in the case where both the exploration data packet and the preset path data packet are set as mentioned above, whether the data packet to be transmitted is a exploration data packet can be determined by at least one of the following three methods:

[0072] (1) Obtaining sequence numbers of data packets to be transmitted, and determining a first number of data packets as exploration data packets based on the sequence numbers of the data packets to be transmitted. For example, the ratio between exploration data packets and preset path data packets can be set by the sequence numbers. For example, a first ratio of data packets are transmitted along a preset optimal path, and a second ratio of data packets are used as exploration data packets to try different paths. In a specific case, 90% of the data packets can be used as preset path data packets, and 10% of the data packets can be used as exploration data packets.

[0073] (2) Obtain the information type of the data packet to be transmitted and identify the data packet of the preset information type as the exploration data packet. For example, the delay and reliability requirements of the data packet are determined based on the information type, so that important data packets are routed along the preset path. Based on the transmission delay of the exploration data packet, it is determined whether to change the path. The preset type is usually the information type with important content and high timeliness requirements.

[0074] (3) Determine whether the current time period information belongs to the preset exploration period. If so, determine the data packet to be transmitted in the current time period as the exploration data packet. This method can flexibly configure different time periods as exploration periods according to the network status of each business period. This method mainly divides the transmission method of the data packet from the time dimension, so that a certain time period is used as the exploration period. Specifically, the communication business volume of each time period of the day can be monitored in advance, and the low-peak business period with low business volume can be determined as the preset exploration period.

[0075] In addition, the transmission parameters mentioned above can further record the timestamp when each transmission node forwards the data packet, so as to determine the transmission delay of the data packet, so as to calculate the transmission cost according to the number of transmission hops and / or transmission delay when screening the target path, and then screen the target path according to the transmission cost. For example, when the transmission cost is lower than the preset cost, the routing table is updated, so that the target path with the lower transmission cost is added to the routing table. In specific implementation, the transmission cost of each transmission path can be calculated separately, and each transmission path can be sorted in order from low to high according to the transmission cost, and then several transmission paths with the highest sorting can be extracted as the target path. In addition, in the scenario where the exploration data packet and the preset path data packet are transmitted in combination, the transmission cost of the exploration data packet can also be compared with the transmission cost of the preset path data packet. Only when the transmission cost of the exploration data packet is lower than the transmission cost of the preset path data packet, the routing table is updated based on the transmission path of the exploration data packet.

[0076] In addition, the exploration data packet also needs to include the destination address of the data packet, which can be specifically expressed in a variety of ways. For example, it can be directly identified by the physical address of the second processing core, or it can be identified by the position offset of the second processing core relative to the first processing core, and the present disclosure does not limit this. In addition, in addition to including the destination address information, the exploration data packet can further include starting address information, information type used to indicate the importance of the data packet, and other information. Of course, the exploration data packet can also further set an exploration identifier so that each routing node can determine that its transmission mode is the exploration transmission mode based on the exploration identifier.

[0077] Step S230: updating the routing table corresponding to the first processing core according to the routing transmission information.

[0078] Specifically, in the routing table corresponding to the first processing core, the stored routing information between the first processing core and the second processing core is queried; the stored routing information is updated according to the routing transmission information; wherein the update operation includes at least one of the following: a replacement class update operation, and an addition class update operation.

[0079] In summary, the approach of this embodiment, by dynamically determining the physical locations of the first and second processing cores, allows for flexible configuration of routing transmission information, thereby facilitating dynamic updating of routing tables and adjustment of routes. This approach is flexibly applicable to complex application scenarios where the physical locations of processing cores can change dynamically. Furthermore, the combination of exploratory transmission and deterministic paths allows for both path reliability and flexibility.

[0080] In addition, another embodiment of the present disclosure further provides a routing table updating device based on a multi-core system. Figure 3 The schematic diagram of the structure of the device is shown in FIG. Figure 3As shown, the device includes:

[0081] a determination module 31 adapted to determine, when a routing table update condition is satisfied, routing transmission information between the first processing core and the second processing core according to a current physical location of the first processing core and a current physical location of the second processing core;

[0082] The update module 32 updates the routing table corresponding to the first processing core according to the routing transmission information; wherein the second processing core is the processing core that receives the data packet of the first processing core, and the routing table update condition includes at least one of the following: the routing table corresponding to the first processing core is empty, and the physical location of the first processing core and / or the second processing core changes.

[0083] Optionally, when the routing table update condition is that the routing table corresponding to the first processing core is empty, the current physical location of the second processing core is determined by: broadcasting a location query message to the second processing core; receiving a location response message sent by the second processing core, and determining the current physical location of the second processing core based on the location response message.

[0084] Optionally, the determining module is specifically adapted to:

[0085] Determining routing information between the first processing core and the second processing core by path calculation; and / or

[0086] The routing transmission information between the first processing core and the second processing core is determined by transmitting a discovery data packet.

[0087] Optionally, the determining module is specifically adapted to:

[0088] Obtaining first position coordinates corresponding to a current physical position of the first processing core and second position coordinates corresponding to a current physical position of the second processing core;

[0089] Determine, according to a preset path setting strategy, at least one piece of path information corresponding to the first position coordinates and the second position coordinates;

[0090] The transmission cost of each path information is calculated respectively, and the routing transmission information is determined according to the calculation result.

[0091] Optionally, the determining module is specifically adapted to determine the routing transmission information between the first processing core and the second processing core by transmitting a discovery data packet, including:

[0092] generating an exploration data packet according to a relative positional relationship between a current physical position of the first processing core and a current physical position of the second processing core;

[0093] Transmitting the exploration data packet to the second processing core in an exploration manner; the exploration data packet is used to record transmission parameters corresponding to the exploration data packet during transmission, the transmission parameters including a transmission path and / or a position offset;

[0094] Receive the transmission parameters of each exploration data packet sent by the second processing core, screen at least one transmission path as a target path based on the transmission parameters of each exploration data packet, and determine the routing transmission information between the first processing core and the second processing core based on the target path.

[0095] Optionally, the determining module is specifically adapted to:

[0096] generating an exploration data packet according to a relative positional relationship between a current physical position of the first processing core and a current physical position of the second processing core;

[0097] Transmitting the exploration data packet to the second processing core in an exploration manner; the exploration data packet is used to record transmission parameters corresponding to the exploration data packet during transmission, the transmission parameters including a transmission path and / or a position offset;

[0098] The at least one target path obtained by the second processing core through screening according to the transmission parameters of each discovery data packet is received, and routing transmission information between the first processing core and the second processing core is determined according to the target path.

[0099] Optionally, after receiving the exploration data packet, each transmission node transmits the data packet to the transmission node located at the next hop according to the exploration strategy, and updates the transmission path and / or position offset of the exploration data packet based on the transmission path; wherein, the transmission node is a transmission node located between the first processing core and the second processing core, and the exploration strategy includes: a random selection strategy, or a sequential selection strategy.

[0100] Optionally, the determining module is specifically adapted to:

[0101] transmitting a first number of exploratory data packets to the second processing core in an exploratory manner;

[0102] transmitting a second number of preset path data packets to the second processing core according to a preset transmission path;

[0103] The routing transmission information between the first processing core and the second processing core is determined according to the discovery data packet and the preset path data packet.

[0104] Optionally, the determining module is specifically adapted to:

[0105] Obtaining sequence numbers of data packets to be transmitted, and determining a first number of data packets as exploration data packets according to the sequence numbers of the data packets to be transmitted; or,

[0106] Obtaining the information type of the data packet to be transmitted, and determining the data packet whose information type belongs to a preset type as an exploration data packet; or,

[0107] It is determined whether the current time period information belongs to the preset exploration time period. If so, the data packet to be transmitted in the current time period is determined as the exploration data packet.

[0108] Optionally, the update module is specifically adapted to:

[0109] querying, in a routing table corresponding to the first processing core, stored routing information between the first processing core and the second processing core;

[0110] An update operation is performed on the stored routing information according to the routing transmission information; wherein the update operation includes at least one of the following: a replacement type update operation and an addition type update operation.

[0111] Optionally, the determining module is further adapted to:

[0112] The physical position of the first processing core is adjusted according to the historical communication state of the first processing core, and a physical position update message of the first processing core is broadcast to other processing cores.

[0113] Optionally, the determination module is further adapted to: receive a physical location update message of the second processing core sent by the second processing core, where the physical location update message is a message broadcasted by the second processing core after adjusting the physical location of the second processing core according to a historical communication state of the second processing core.

[0114] In addition, refer to Figure 4 , an embodiment of the present disclosure provides an electronic device, comprising:

[0115] One or more processors 101;

[0116] The memory 102 stores one or more programs. When the one or more programs are executed by one or more processors, the one or more processors implement the routing method in any of the above embodiments.

[0117] One or more I / O interfaces 103 are connected between the processor and the memory and are configured to implement information exchange between the processor and the memory.

[0118] Among them, the processor 101 is a device with data processing capabilities, including but not limited to a central processing unit (CPU); the memory 102 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), and flash memory (FLASH); the I / O interface (read-write interface) 103 is connected between the processor 101 and the memory 102, and can realize information interaction between the processor 101 and the memory 102, including but not limited to a data bus (Bus), etc.

[0119] In some embodiments, the processor 101 , the memory 102 , and the I / O interface 103 are connected to each other via a bus 104 , and further connected to other components of the computing device.

[0120] In addition, refer to Figure 5 An embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon. When the program is executed by a processor, the routing method provided by any of the above embodiments is implemented.

[0121] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As is well known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable, and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0122] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for purposes of limitation. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly indicated, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, it will be understood by those skilled in the art that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.

Claims

1. A routing table update method based on a many-core system, comprising: When a routing table update condition is met, determining routing transmission information between the first processing core and the second processing core according to a current physical location of the first processing core and a current physical location of the second processing core; updating a routing table corresponding to the first processing core according to the routing transmission information; The second processing core is a processing core that receives data packets from the first processing core, and the routing table update condition includes at least one of the following: the routing table corresponding to the first processing core is empty, the physical location of the first processing core and / or the second processing core changes; Among them, the determining of the routing transmission information between the first processing core and the second processing core includes: determining the routing transmission information between the first processing core and the second processing core by transmitting an exploration data packet; wherein, a first number of exploration data packets are transmitted to the second processing core by an exploration method; a second number of preset path data packets are transmitted to the second processing core according to a preset transmission path; and the routing transmission information between the first processing core and the second processing core is determined based on the exploration data packet and the preset path data packet.

2. The method according to claim 1, wherein When the routing table update condition is that the routing table corresponding to the first processing core is empty, the current physical location of the second processing core is determined in the following manner: broadcasting a location query message to the second processing core; A location response message sent by the second processing core is received, and a current physical location of the second processing core is determined according to the location response message.

3. The method according to claim 1, wherein The determining of the routing transmission information between the first processing core and the second processing core further includes: The routing transmission information between the first processing core and the second processing core is determined by path calculation.

4. The method according to claim 3, wherein: The determining of the routing transmission information between the first processing core and the second processing core by means of path calculation includes: Obtaining first position coordinates corresponding to a current physical position of the first processing core and second position coordinates corresponding to a current physical position of the second processing core; Determine, according to a preset path setting strategy, at least one piece of path information corresponding to the first position coordinates and the second position coordinates; The transmission cost of each path information is calculated respectively, and the routing transmission information is determined according to the calculation result.

5. The method according to claim 3, wherein: The determining of the routing transmission information between the first processing core and the second processing core by transmitting a discovery data packet includes: generating an exploration data packet according to a relative positional relationship between a current physical position of the first processing core and a current physical position of the second processing core; Transmitting the exploration data packet to the second processing core in an exploration manner; the exploration data packet is used to record transmission parameters corresponding to the exploration data packet during transmission, the transmission parameters including a transmission path and / or a position offset; Receive the transmission parameters of each exploration data packet sent by the second processing core, screen at least one transmission path as a target path based on the transmission parameters of each exploration data packet, and determine the routing transmission information between the first processing core and the second processing core based on the target path.

6. The method according to claim 3, wherein: The determining of the routing transmission information between the first processing core and the second processing core by transmitting a discovery data packet includes: generating an exploration data packet according to a relative positional relationship between a current physical position of the first processing core and a current physical position of the second processing core; Transmitting the exploration data packet to the second processing core in an exploration manner; the exploration data packet is used to record transmission parameters corresponding to the exploration data packet during transmission, the transmission parameters including a transmission path and / or a position offset; The at least one target path obtained by the second processing core through screening according to the transmission parameters of each discovery data packet is received, and routing transmission information between the first processing core and the second processing core is determined according to the target path.

7. The method according to claim 5 or 6, wherein: After each transmission node receives the exploration data packet, it transmits the data packet to the transmission node at the next hop according to the exploration strategy, and updates the transmission parameters of the exploration data packet according to the transmission path; wherein, the transmission node is a transmission node located between the first processing core and the second processing core, and the exploration strategy includes: a random selection strategy, or a sequential selection strategy.

8. The method according to claim 1, wherein Before determining the routing transmission information between the first processing core and the second processing core by transmitting a discovery data packet, the method further includes: Obtaining sequence numbers of data packets to be transmitted, and determining a first number of data packets as exploration data packets according to the sequence numbers of the data packets to be transmitted; or, Obtaining the information type of the data packet to be transmitted, and determining the data packet whose information type belongs to a preset type as an exploration data packet; or, It is determined whether the current time period information belongs to the preset exploration time period. If so, the data packet to be transmitted in the current time period is determined as the exploration data packet.

9. The method according to claim 1, wherein The updating, according to the routing transmission information, of the routing table corresponding to the first processing core includes: querying, in a routing table corresponding to the first processing core, stored routing information between the first processing core and the second processing core; An update operation is performed on the stored routing information according to the routing transmission information; wherein the update operation includes at least one of the following: a replacement type update operation and an addition type update operation.

10. The method according to any one of claims 1 to 9, wherein: Before the method is executed, it also includes: The physical position of the first processing core is adjusted according to the historical communication state of the first processing core, and a physical position update message of the first processing core is broadcast to other processing cores.

11. The method according to claim 10, wherein: The method further includes: receiving a physical location update message of the second processing core sent by the second processing core, where the physical location update message is a message broadcasted by the second processing core after adjusting the physical location of the second processing core according to a historical communication state of the second processing core.

12. A routing table updating device based on a many-core system, comprising: a determining module adapted to determine, when a routing table update condition is satisfied, routing transmission information between the first processing core and the second processing core according to a current physical location of the first processing core and a current physical location of the second processing core; an updating module, adapted to update a routing table corresponding to the first processing core according to the routing transmission information; The second processing core is a processing core that receives data packets from the first processing core, and the routing table update condition includes at least one of the following: the routing table corresponding to the first processing core is empty, the physical location of the first processing core and / or the second processing core changes; Among them, the determining of the routing transmission information between the first processing core and the second processing core includes: determining the routing transmission information between the first processing core and the second processing core by transmitting an exploration data packet; wherein, a first number of exploration data packets are transmitted to the second processing core by an exploration method; a second number of preset path data packets are transmitted to the second processing core according to a preset transmission path; and the routing transmission information between the first processing core and the second processing core is determined based on the exploration data packet and the preset path data packet.

13. An electronic device comprising: one or more processors; A storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the routing table update method based on the many-core system according to any one of claims 1 to 11.

14. A computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, at least one of the following methods is implemented: A routing table updating method based on a many-core system according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Network routing method adopting topological distributed short path set

    CN107294852A

  • Method for establishing routing table, electronic device and network

    CN107431968A

  • Management method of multicast users in mobile network

    CN1437355A