CN116055381A - Routing table updating method and device based on many-core system and electronic equipment - Google Patents
Routing table updating method and device based on many-core system and electronic equipment Download PDFInfo
- Publication number
- CN116055381A CN116055381A CN202111264684.2A CN202111264684A CN116055381A CN 116055381 A CN116055381 A CN 116055381A CN 202111264684 A CN202111264684 A CN 202111264684A CN 116055381 A CN116055381 A CN 116055381A
- Authority
- CN
- China
- Prior art keywords
- processing core
- transmission
- data packet
- routing table
- information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 62
- 238000012545 processing Methods 0.000 claims abstract description 410
- 230000005540 biological transmission Effects 0.000 claims abstract description 209
- 238000004891 communication Methods 0.000 claims description 22
- 238000004364 calculation method Methods 0.000 claims description 14
- 230000004044 response Effects 0.000 claims description 8
- 238000012216 screening Methods 0.000 claims description 6
- 230000003416 augmentation Effects 0.000 claims description 4
- 238000004590 computer program Methods 0.000 claims description 3
- 230000008859 change Effects 0.000 description 12
- 230000006870 function Effects 0.000 description 7
- 230000008569 process Effects 0.000 description 7
- 238000013459 approach Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 238000007726 management method Methods 0.000 description 4
- 238000001514 detection method Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 239000000523 sample Substances 0.000 description 2
- 230000032683 aging Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000002068 genetic effect Effects 0.000 description 1
- 238000003062 neural network model Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000007723 transport mechanism Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/02—Topology update or discovery
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The present disclosure provides a routing table updating method, a system, an electronic device and a readable medium based on a many-core system, wherein the method comprises: under the condition that the update condition of the routing table is met, determining routing transmission information between the first processing core and the second processing core according to the current physical position of the first processing core and the current physical position of the second processing core; updating a routing table corresponding to the first processing core according to the routing transmission information; wherein the second processing core is a processing core that receives the first processing core packet, and the routing table update condition includes at least one of: the routing table corresponding to the first processing core is empty, and the physical position of the first processing core and/or the physical position of the second processing core are changed. The method can flexibly set the route transmission information, thereby being convenient for dynamically adjusting the route and being flexibly applicable to complex application scenes in which the physical position of the processing core can be dynamically changed.
Description
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to a routing table updating method and device based on a many-core system and electronic equipment.
Background
The many-core architecture is a parallel processing architecture that is widely used to execute neural network models. In the many-core architecture, each processing core can complete a certain calculation function, a certain number of processing cores are connected through a certain topological structure to form a chip, a certain number of chips are connected through a certain topological structure to form a chip array board, and the like, so that a larger-scale system can be obtained. Therefore, in the many-core system, the number of the involved processing cores is large, so how to realize efficient communication among the processing cores on the premise of large number of the processing cores becomes a technical problem to be solved in the routing computing field.
Disclosure of Invention
In view of the foregoing, the present disclosure is directed to providing a routing table updating method, apparatus and electronic device based on a many-core system, which overcomes the foregoing problems or at least partially solves the foregoing problems.
According to an aspect of the disclosed embodiments, there is provided a routing table updating method based on a many-core system, including:
under the condition that the update condition of the routing table is met, determining routing transmission information between the first processing core and the second processing core according to the current physical position of the first processing core and the current physical position of the second processing core;
Updating a routing table corresponding to the first processing core according to the routing transmission information;
wherein the second processing core is a processing core that receives the first processing core packet, and the routing table update condition includes at least one of: the routing table corresponding to the first processing core is empty, and the physical position of the first processing core and/or the physical position of the second processing core are changed.
In a second aspect, an embodiment of the present disclosure provides a routing table updating apparatus based on a many-core system, including:
the determining module is suitable for determining route transmission information between the first processing core and the second processing core according to the current physical position of the first processing core and the current physical position of the second processing core under the condition that the update condition of the routing table is met;
the updating module is suitable for updating the routing table corresponding to the first processing core according to the routing transmission information;
wherein the second processing core is a processing core that receives the first processing core packet, and the routing table update condition includes at least one of: the routing table corresponding to the first processing core is empty, and the physical position of the first processing core and/or the physical position of the second processing core are changed.
In a third aspect, embodiments of the present disclosure provide an electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon, which when executed by the one or more processors, cause the one or more processors to implement at least one of the following methods:
according to the routing table updating method in the first aspect of the embodiment of the disclosure.
In a fourth aspect, the disclosed embodiments provide a computer readable medium having stored thereon a computer program which when executed by a processor performs at least one of the following methods:
according to the routing table updating method in the first aspect of the embodiment of the disclosure.
In the routing table updating method, the device and the electronic equipment based on the many-core system provided by the embodiment of the disclosure, under the condition that the routing table updating condition is met, the routing transmission information between the first processing core and the second processing core can be determined according to the current physical position of the first processing core and the 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. Wherein the routing table update condition includes at least one of: the routing table corresponding to the first processing core is empty, and the physical position of the first processing core and/or the physical position of the second processing core are changed. Therefore, by setting the update condition of the routing table, the routing transmission information between the two processing cores can be timely acquired when the routing table needs to be updated, the routing table is updated based on the routing transmission information, the timeliness and the accuracy of the update of the routing table can be ensured, and further, the efficient communication between the processing cores can be realized on the premise of huge number of the processing cores. In addition, the routing table is updated when the physical position of the first processing core and/or the second processing core is changed, so that the method and the device can be flexibly applied to application scenes for processing core position change.
Drawings
The accompanying drawings are included to provide a further understanding of embodiments of the disclosure, and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure, without limitation to the disclosure. The above and other features and advantages will become more readily apparent to those skilled in the art by describing in detail exemplary embodiments with reference to the attached drawings, in which:
fig. 1 is a flowchart of a routing table updating method based on a many-core system according to an embodiment of the present disclosure;
FIG. 2 is a flowchart of a routing table update method based on a many-core system according to another embodiment of the present disclosure;
fig. 3 is a block diagram of a routing table updating device based on a many-core system according to another embodiment of the present disclosure;
fig. 4 is a block diagram of an electronic device according to an embodiment of the disclosure;
fig. 5 is a block diagram of a computer readable medium according to an embodiment of the present disclosure.
Detailed Description
For a better understanding of the technical solutions of the present disclosure, the following describes in detail the routing method, system, electronic device and computer readable medium provided in the present disclosure with reference to the accompanying drawings.
Example embodiments will be described more fully hereinafter with reference to the accompanying drawings, but may be embodied in various 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 the disclosure to those skilled in the art.
Embodiments of the disclosure and features of embodiments may be combined with each other without conflict.
As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used herein, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
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 be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
In the related art, a routing precompilation manner is generally adopted to determine a routing manner among the processing cores. However, the inventors found that the above precoding method has at least the following drawbacks in the implementation of the present invention: the routing flexibility set by adopting the pre-compiling mode is poor, once compiling is completed, the routing cannot be dynamically adjusted, and the method cannot be suitable for complex application scenes in which the physical position of the processing core can be dynamically changed.
One embodiment of the present disclosure provides a routing table updating method based on a many-core system. In the method provided by the embodiment, one chip in the many-core system includes a plurality of processing cores capable of communicating with each other, and the physical positions of the processing cores can be dynamically adjusted according to the application running state. Fig. 1 shows a flowchart of a routing table updating method based on a many-core system according to an embodiment of the present disclosure, as shown in fig. 1, where the method includes:
Step S110: and under the condition that the routing table updating condition is met, determining routing transmission information between the first processing core and the second processing core according to the current physical position of the first processing core and the current physical position of the second processing core.
Wherein the routing table update condition includes at least one of: the routing table corresponding to the first processing core is empty, and the physical position of the first processing core and/or the physical position of the second processing core are changed. For example, when the routing table corresponding to the first processing core is empty, it is indicated that updating is required for the routing table; as another example, when the physical location of the first processing core and/or the second processing core changes, the routing information stored in the routing table is indicated as being out of date, and thus requires updating for the routing table.
Correspondingly, route transmission information between the first processing core and the second processing core is determined according to the current physical position of the first processing core and the current physical position of the second processing core. The second processing core is a processing core for receiving the first processing core data packet. The determination of the routing of information between the first processing core and the second processing core may be accomplished in a number of ways. For example, in a first manner, route transmission information between a first processing core and a second processing core is determined by a path calculation manner; as another example, in a second approach, routing information between the first processing core and the second processing core is determined by transmitting discovery packets.
In addition, in the case where 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 may be determined by: broadcasting a location query message to the second processing core; and receiving a position response message sent by the second processing core, and determining the current physical position of the second processing core according to the position response message.
Step S120: and updating a routing table corresponding to the first processing core according to the routing transmission information.
Specifically, when the routing table is empty, the routing table corresponding to the first processing core may be updated directly according to the route transmission information. In addition, when the routing table is not empty, the stored routing information between the first processing core and the second processing core can be queried in the routing table corresponding to the first processing core; updating the stored route information according to the route transmission information; wherein the updating operation includes at least one of: a replacement class update operation, and an augmentation class update operation.
Therefore, by setting the update condition of the routing table, the routing transmission information between the two processing cores can be timely acquired when the routing table needs to be updated, the routing table is updated based on the routing transmission information, the timeliness and the accuracy of the update of the routing table can be ensured, and further, the efficient communication between the processing cores can be realized on the premise of huge number of the processing cores. In addition, the routing table is updated when the physical position of the first processing core and/or the second processing core is changed, so that the method and the device can be flexibly applied to application scenes for processing core position change.
Fig. 2 is a schematic flow chart of a routing table updating method based on a many-core system according to another embodiment of the disclosure. In the embodiment shown in fig. 2, a many-core chip is provided with a plurality of processing cores capable of communicating with each other. Each processing core has a logical address (also called a logical identifier) and a physical address (also called a physical identifier), wherein the logical address is used for uniquely identifying one processing core from the viewpoint of the service function of the processing core, and the physical address is used for uniquely identifying one processing core from the viewpoint 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 as the application running state changes. As shown in fig. 2, the method includes:
step S200: and setting a routing table according to the position relation among the processing cores.
The step is an optional step, and in practical situations, the step can be omitted, and the routing table is directly and dynamically created in the routing process. Specifically, in order to facilitate communication, a routing table is set in each processing core, where the routing table is used to store a transmission path and/or a transmission position when the processing core communicates with other processing cores. The transmission path is used for describing specific path information, and specifically comprises the contents such as position information, transmission sequence information and the like of each processing core through which a data packet passes in the transmission process; the transfer location is used to describe the location offset of the target processing core (i.e., destination address) relative to the current processing core (i.e., current starting address).
Specifically, the routing table is empty in the initial state, and when the current processing core needs to send a data packet to other processing cores, route transmission information is calculated according to the physical position of the target processing core (i.e., the second processing core) for receiving the data packet, and updated into the routing table.
In this embodiment, since each processing core is independent from each other, in order to improve communication efficiency and avoid query latency, a routing table is maintained in each processing core independently, that is: the routing table is in one-to-one correspondence with the processing cores. Of course, in other embodiments of the present disclosure, the routing tables related to the respective processing cores may be uniformly stored in a processing core for implementing a routing management function (referred to as a routing management processing core for short), and other processing cores implement query and update operations on the routing tables through communication with the routing management processing core.
Step S210: and according to the historical communication state of the first processing core, adjusting the physical position of the first processing core, and broadcasting the physical position update message of the first processing core to other processing cores.
The step may be performed at any time, that is: the invention is not limited to the order of the steps.
The historical communication state is used for describing an information transmission path, information transmission delay, information transmission frequency, information transmission quantity, information transmission type and the like between one 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: and determining whether to adjust the physical position of the processing core according to the detection result. Specifically, when the information transmission delay between one processing core and other processing cores exceeds a preset delay threshold, the physical position of the relevant processing core can be dynamically adjusted, so that the transmission delay between the two processing cores which are in communication with each other is shorter; the physical positions of the related processing cores can be dynamically adjusted when the information transmission frequency between one processing core and the other processing cores exceeds a preset frequency threshold value and/or the information transmission quantity exceeds a preset quantity threshold value, so that the communication between the two processing cores which are in communication with each other is more convenient; the physical position of the relevant processing core can be dynamically adjusted when the information transmission type between one processing core and other processing cores belongs to a preset type (such as an information type with higher requirements on time delay and reliability).
For example, the current processing core dynamically detects information transmission delay, information transmission frequency, information transmission quantity and information transmission type between the current processing core and each processing core, and determines a communication processing core corresponding to the current processing core (i.e. a processing core with more communication with the current processing core) according to the detection result; when it is determined that the communication processing core has a corresponding adjacent idle core, the physical location of the processing core is updated according to the physical location of the adjacent idle core. When the physical location of the processing core is updated according to the physical location of the neighboring idle core, the physical address of the processing core can be directly updated to the physical address of the neighboring idle core, so that the logical address of the neighboring idle core is the same as the logical address of the processing core, thereby realizing the effect of moving the processing core to the neighboring idle core.
Specifically, in the case that the physical location of the current processing core is updated, a physical location update message may be sent to other processing cores in a broadcast manner, so that the other processing cores determine the latest location of the current processing core according to the physical location update message. In particular implementations, the physical location update message may be broadcast directly by the current processing core to other processing cores; alternatively, the current processing core may send the physical location update message to the controller or the processing core for implementing the control function (which may be the route management processing core mentioned above), and then the controller or the processing core for implementing the control function broadcasts the physical location update message to other processing cores. In short, the global broadcasting method can ensure that the position change of any processing core can be timely perceived by other processing cores.
Accordingly, the current processing core is further to: and receiving a physical location update message of the second processing core, which is sent by the second processing core, wherein the physical location update message is a message broadcasted after the second processing core adjusts the physical location of the second processing core according to the historical communication state of the second processing core. For example, after any processing core receives the broadcast physical location update message, the physical location update message is parsed, and the identification information (the logical address mentioned above) of the processing core in which the location change occurs and the updated physical location contained therein are acquired. In order to facilitate the inquiry of the above location update information in the subsequent routing process, the current processing core may uniformly store the analysis results corresponding to each received physical location update message in the storage unit; alternatively, the current processing core may traverse each piece of routing information related to the processing core where the location change occurs, where the routing information related to the processing core where the location change occurs is stored in the routing table, and set the routing information related to the processing core where the location change occurs to an expired state or an invalid state, so as to update the routing table in a subsequent routing process. The routing dependencies between the first processing core and the second processing core change, i.e.: 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 practical situations, the position of one of the first processing core and the second processing core is changed, and the position of the other processing core is unchanged; or the locations of the two processing cores may be changed at the same time.
Accordingly, in this step, it is necessary to detect whether the physical positions of the first processing core and the second processing core are changed, so as to obtain the latest physical position after the change. If the physical position of the first processing core is changed, the current physical position of the first processing core refers to the changed physical position; similarly, if the physical location of the second processing core changes, the current physical location of the second processing core refers to the changed physical location.
In practice, the current physical locations of the first processing core and the second processing core may be determined according to the above-mentioned physical location update message and the storage unit; alternatively, the above-mentioned routing table may be queried, and the determination may be determined according to whether the relevant route stored in the routing table is provided with an expiration identifier or an invalid identifier, which is not limited in specific details by the present disclosure.
In addition, in actual situations, the current physical location of the second processing core may also be determined by the first processing core broadcasting the addressing message. Specifically, the first processing core broadcasts and sends an addressing message containing identification information of the second processing core, and the second processing core feeds back an address response message containing current address information to the first processing core after receiving the addressing message. Correspondingly, the first processing core compares the address information of the second processing core contained in the address response message with the address information of the second processing core pre-stored locally, and if the address information of the second processing core is inconsistent with the address information of the second processing core, the position of the second processing core is determined to be changed.
Step S220: and under the condition that the routing table updating condition is met, determining routing transmission information between the first processing core and the second processing core according to the current physical position of the first processing core and the current physical position of the second processing core.
Wherein the routing table update conditions include: the routing table corresponding to the first processing core is empty, and the physical position of the first processing core and/or the physical position of the second processing core are changed. In this embodiment, the implementation manner of determining the route transmission information between the first processing core and the second processing core at least includes the following two kinds of:
path calculation mode
The method can directly determine the route transmission information through calculation, and is convenient and quick. Specifically, route transmission information between the first processing core and the second processing core is determined through a path calculation mode. In the implementation, a first position coordinate corresponding to the current physical position of a first processing core and a second position coordinate corresponding to the current physical position of a second processing core are obtained; determining at least one piece of path information corresponding to the first position coordinate and the second position coordinate according to a preset path setting strategy; and respectively calculating the transmission cost of each piece of path information, and determining route transmission information according to the calculation result.
The path setting policy may be preconfigured, and specifically includes at least one of the following policies:
the first strategy is avoidance type strategy, which is used for setting transmission nodes corresponding to processing cores needing to be avoided in the path selection process so as to be convenient for bypassing the transmission nodes in the path calculation process. Specifically, the avoidance class policy further includes: absolute avoidance strategies and suggested avoidance strategies. The absolute avoidance strategy generally corresponds to the situation that the transmission node is physically damaged and cannot be transmitted, and at this time, the node needs to be absolutely avoided; the proposed avoidance strategy generally corresponds to a situation where the transmission efficiency of the transmission node is low due to an excessively high load, and the like, and at this time, whether to avoid the node can be selected according to actual situations.
The second strategy is a selection type strategy, which is used for selecting the transmission node corresponding to the processing core with higher priority in the path selection process, so that the transmission node is selected as much as possible in the path calculation process. Specifically, the selection class policy may be set according to factors such as the load capacity and the transmission delay of each transmission node. In specific implementation, selecting the class policy further includes: absolute selection policies and suggested selection policies. The absolute selection policy can be configured by an operator to flexibly define a default routing mode.
The two strategies may be used alone or in combination, and the disclosure is not limited thereto. In the implementation, the transmission cost of each path can be determined according to the route line statistics of the previous period of time, so as to determine the route transmission information.
(II) exploration method
The route transmission information is determined by exploring the data packet, so that the route can be dynamically adjusted according to the dynamic change of the physical core position. Specifically, route transmission information between the first processing core and the second processing core is determined by transmitting the exploration data packet.
Specifically, generating an exploration data packet according to the relative position relation between the current physical position of the first processing core and the current physical position of the second processing core; transmitting the exploration data packet to the second processing core in an exploration mode; the exploration data packet is used for recording transmission parameters corresponding to the exploration data packet in the transmission process; and determining route transmission information between the first processing core and the second processing core according to the transmission parameters of the exploration data packet. Wherein the transmission parameters include transmission paths and/or positional offsets. After each transmission node receives the exploration data packet, transmitting the data packet to the transmission node positioned at the next hop according to the exploration strategy, and updating the transmission path and/or the position offset of the exploration data packet according to the transmission path; the transmission node is a transmission node located between the first processing core and the second processing core, and may specifically 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, and therefore, the transmission node includes at least: the first processing core is used for processing the first data, the second processing core is used for processing the second data, and the first processing core is used for processing the second data. In addition, the exploration strategy includes: the present disclosure does not limit a specific policy as long as different routing directions can be tried as much as possible. For example, an attempt may be made by genetic algorithm: a large number of probe packets are sent at the bifurcation node to find the fastest path or paths. For example, in the initial stage of transmission, a bifurcation point may be tried, and each time an uncertain routing node is encountered, a part of the data packets go in a first direction, and a part of the data packets go in a second direction, so as to find out fast one to N paths as transmission paths, where N is a natural number. It follows that by sending a large number of trial packets at the bifurcation point, the fastest or TOP N can be found as the path of choice. This approach is slow to update and sends the probe packet until the preferred path is determined.
The transmission parameters are used for recording the information of each transmission node of the data packet in the transmission process, correspondingly, the information content of the transmission parameters is dynamically updated along with the change of the transmission hop count of the data packet, and the transmission path of the data packet can be determined through the transmission parameters. Since the transmission path of each packet in the search transmission scheme is unknown, it is necessary to dynamically record the transmission path by using the transmission parameters. In practice, the transmission path in the transmission parameters may be determined in a number of ways. For example, corresponding number numbers are set for the respective transmission orientations, respectively, and the transmission path is represented by a number sequence composed of a set of number numbers. For example, let it be assumed that transmission to a first direction (e.g., left) corresponds to number 0, transmission to a second direction (e.g., right) corresponds to number 1, transmission to a third direction (e.g., top) corresponds to number 2, transmission to a fourth direction (e.g., bottom) corresponds to number 3, and accordingly, if transmission to the left first, and transmission to the top, the correspondence is denoted as number sequence 02, and so on.
In addition, when determining the route transmission information between the first processing core and the second processing core according to the transmission parameters of the exploration data packet, the method can be implemented in at least one of the following two ways:
In a first mode, the transmission parameters of each exploration data packet sent by the second processing core are received, at least one transmission path is screened as a target path according to the transmission parameters of each exploration data packet, and route transmission information between the first processing core and the second processing core is determined according to the target path. In this manner, 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), and the first processing core screens at least one transmission path as a target path according to the transmission parameters of each exploration data packet, and determines route transmission information between the first processing core and the second processing core according to the target path.
In a second mode, the transmission parameters of each exploration data packet sent by the second processing core are received, at least one transmission path is screened as a target path according to the transmission parameters of each exploration data packet, and route transmission information between the first processing core and the second processing core is determined according to the target path. In this manner, after receiving the exploration data packets, the second processing core obtains transmission parameters of each exploration data packet, screens at least one transmission path as a target path according to the transmission parameters of each exploration data packet, and directly transmits the target path to the first processing core.
It can be seen that the two ways are different in that: the execution subjects of the screening target paths are different. In a first approach, screening a target path by a first processing core; in a second approach, the target path is screened by a second processing core.
In addition, when determining the route transmission information between the first processing core and the second processing core by transmitting the explored data packet, in order to facilitate determining the transmission efficiency of the explored data packet, a certain number of preset path data packets may be further set, and the final route transmission information is determined by comparing the explored data packet with the transmission result of the preset path data packet. Specifically, transmitting a first number of exploration data packets to a second processing core in an exploration mode; transmitting a second number of preset path data packets to a second processing core according to a preset transmission path; and determining route transmission information between the first processing core and the second processing core according to the exploration data packet and the preset path data packet. The preset transmission path may be determined according to a path calculation manner. For example, assuming that a plurality of paths are determined by a path calculation method, at least one path is selected from the plurality of paths as a preset transmission path of a preset path packet.
In addition, in the case where the search packet and the preset path packet are set at the same time as mentioned above, it may be determined whether the packet to be transmitted is the search packet by at least one of the following three means:
(1) And acquiring the sequence numbers of the data packets to be transmitted, and determining the first number of data packets as exploration data packets according to the sequence numbers of the data packets to be transmitted. For example, the ratio between the discovery packet and the preset path packet may be set by the sequence number. For example, a first proportion of data packets are transmitted according to a preset optimal path, and a second proportion of data packets are used as exploration data packets to try different paths. In a specific case, 90% of the packets may be used as the preset path packets and 10% of the packets may be used as the search packets.
(2) And acquiring the information type of the data packet to be transmitted, and determining the data packet with the information type belonging to the preset type as the exploration data packet. For example, the delay requirement, the reliability requirement and the like of the data packet are judged according to the information type, so that the important data packet is preset, and whether the path is to be changed is judged according to the transmission delay of the exploration data packet. The preset type is usually a type of information with important content and high aging requirement.
(3) Judging whether the current time period information belongs to a preset exploration time period, if so, determining a data packet to be transmitted in the current time period as an exploration data packet. According to the method, different time periods can be flexibly configured as exploration time periods according to the network states of the service time periods. The method mainly divides the transmission mode of the data packet from the time dimension, so that a certain time period is taken as an exploration period. Specifically, the communication traffic of each period in one day may be monitored in advance, and the traffic low-peak period with lower traffic is determined as a preset exploration period.
In addition, the above-mentioned transmission parameters may further record a time stamp when each transmission node forwards the data packet, so as to determine a transmission delay of the data packet, so that when the target path is screened, a transmission cost is calculated according to the transmission hop count and/or the transmission delay, and then the target path is screened 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 smaller transmission cost is added into the routing table. In specific implementation, the transmission cost of each transmission path can be calculated respectively, and each transmission path is sequenced according to the sequence from low transmission cost to high transmission cost, and then a plurality of transmission paths with the front sequencing are extracted as target paths. In addition, in the scenario of combining and transmitting the exploration data packet and the preset path data packet, the transmission cost of the exploration data packet and the transmission cost of the preset path data packet can be compared, and the routing table is updated based on the transmission path of the exploration data packet only when the transmission cost of the exploration data packet is smaller than the transmission cost of the preset path data packet.
In addition, the search packet needs to include the destination address of the packet, and the search packet can be specifically expressed in various ways. For example, the identification may be performed directly by the physical address of the second processing core, or may be performed by a position offset of the second processing core relative to the first processing core, which is not limited in this disclosure. In addition, the search packet may further include information such as start address information and information type indicating the importance of the packet, in addition to the destination address information. Of course, the exploration data packet may further set an exploration identifier, so that each routing node determines that its transmission mode is an exploration transmission mode according to the exploration identifier.
Step S230: and updating a routing table corresponding to the first processing core according to the routing transmission information.
Specifically, in a routing table corresponding to the first processing core, inquiring stored routing information between the first processing core and the second processing core; updating the stored route information according to the route transmission information; wherein the updating operation includes at least one of: a replacement class update operation, and an augmentation class update operation.
In summary, by means of the method in this embodiment, the route transmission information can be flexibly set by dynamically determining the physical positions of the first processing core and the second processing core, so that the routing table is convenient to dynamically update and adjust the route, and the method is flexibly applicable to complex application scenarios in which the physical positions of the processing cores can be dynamically changed. The combination of transmission and deterministic paths is explored, so that the requirements of path reliability and flexibility can be met.
In addition, still another embodiment of the present disclosure further provides a routing table updating device based on a many-core system, fig. 3 shows a schematic structural diagram of the device, and as shown in fig. 3, the device includes:
a determining module 31, adapted to determine route 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 if the routing table update condition is satisfied;
the updating module 32 updates the routing table corresponding to the first processing core according to the routing transmission information; wherein the second processing core is a processing core that receives the first processing core packet, and the routing table update condition includes at least one of: the routing table corresponding to the first processing core is empty, and the physical position of the first processing core and/or the physical position of the second processing core are changed.
Optionally, in the case that 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; and receiving a position response message sent by the second processing core, and determining the current physical position of the second processing core according to the position response message.
Optionally, the determining module is specifically adapted to:
determining route transmission information between the first processing core and the second processing core in a path calculation mode; and/or
And determining route transmission information between the first processing core and the second processing core in a mode of transmitting the exploration data packet.
Optionally, the determining module is specifically adapted to:
acquiring a first position coordinate corresponding to the current physical position of the first processing core and a second position coordinate corresponding to the current physical position of the second processing core;
determining at least one piece of path information corresponding to the first position coordinate and the second position coordinate according to a preset path setting strategy;
and respectively calculating the transmission cost of each piece of path information, and determining the route transmission information according to the calculation result.
Optionally, the determining module is specifically adapted to determine, by transmitting a discovery packet, route transmission information between the first processing core and the second processing core, including:
generating an exploration data packet according to the relative position relation between the current physical position of the first processing core and the current physical position of the second processing core;
Transmitting the exploration data packet to the second processing core in an exploration mode; the exploration data packet is used for recording transmission parameters corresponding to the exploration data packet in a transmission process, and the transmission parameters comprise a transmission path and/or position offset;
and receiving transmission parameters of each exploration data packet sent by the second processing core, screening at least one transmission path as a target path according to the transmission parameters of each exploration data packet, and determining route transmission information between the first processing core and the second processing core according to the target path.
Optionally, the determining module is specifically adapted to:
generating an exploration data packet according to the relative position relation between the current physical position of the first processing core and the current physical position of the second processing core;
transmitting the exploration data packet to the second processing core in an exploration mode; the exploration data packet is used for recording transmission parameters corresponding to the exploration data packet in a transmission process, and the transmission parameters comprise a transmission path and/or position offset;
and receiving at least one target path obtained by screening the second processing core according to the transmission parameters of each exploration data packet, and determining route transmission information between the first processing core and the second processing core according to the target path.
Optionally, after each transmission node receives the exploration data packet, transmitting the data packet to a transmission node located at the next hop according to an exploration strategy, and updating a transmission path and/or position offset of the exploration data packet according to a transmission path; wherein the transmission node is a transmission node located between the first processing core and the second processing core, the exploration policy comprising: a random selection strategy, or a sequential selection strategy.
Optionally, the determining module is specifically adapted to:
transmitting a first number of discovery packets to the second processing core by discovery;
transmitting a second number of preset path data packets to the second processing core according to a preset transmission path;
and determining route transmission information between the first processing core and the second processing core according to the exploration data packet and the preset path data packet.
Optionally, the determining module is specifically adapted to:
acquiring sequence numbers of data packets to be transmitted, and determining a first number of data packets as exploring data packets according to the sequence numbers of the data packets to be transmitted; or,
acquiring the information type of a data packet to be transmitted, and determining the data packet with the information type belonging to a preset type as an exploration data packet; or,
Judging whether the current time period information belongs to a preset exploration time period, if so, determining a data packet to be transmitted in the current time period as an exploration data packet.
Optionally, the updating module is specifically adapted to:
querying stored routing information between the first processing core and the second processing core in a routing table corresponding to the first processing core;
updating the stored route information according to the route transmission information; wherein the updating operation includes at least one of: a replacement class update operation, and an augmentation class update operation.
Optionally, the determining module is further adapted to:
and according to the historical communication state of the first processing core, adjusting the physical position of the first processing core, and broadcasting the physical position update message of the first processing core to other processing cores.
Optionally, the determining module is further adapted to: and receiving a physical location update message of the second processing core, which is sent by the second processing core, wherein the physical location update message is a message broadcasted after the second processing core adjusts the physical location of the second processing core according to the historical communication state of the second processing core.
In addition, referring to fig. 4, an embodiment of the present disclosure provides an electronic device including:
One or more processors 101;
One or more I/O interfaces 103, coupled between the processor and the memory, are configured to enable information interaction of the processor with the memory.
Wherein the processor 101 is a device having data processing capabilities, including but not limited to a Central Processing Unit (CPU) or the like; memory 102 is a device with data storage capability including, but not limited to, random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically charged erasable programmable read-only memory (EEPROM), FLASH memory (FLASH); an I/O interface (read/write interface) 103 is connected between the processor 101 and the memory 102 to enable information interaction between the processor 101 and the memory 102, including but not limited to a data Bus (Bus) or the like.
In some embodiments, processor 101, memory 102, and I/O interface 103 are connected to each other via bus 104, and thus to other components of the computing device.
In addition, referring to fig. 5, an embodiment of the present disclosure provides a computer readable medium having a computer program stored thereon, which when executed by a processor implements the routing method provided in any of the above embodiments.
Those of ordinary skill in the art will appreciate that all or some of the steps, systems, functional modules/units in the apparatus, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between the functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed cooperatively by several physical components. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as known to those skilled in the art. 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 which can be used to store the desired information and which can be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, 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 includes any information delivery media.
Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted in a generic and descriptive sense only and not for purpose of limitation. In some instances, it will be apparent to one skilled in the art that features, characteristics, and/or elements described in connection with a particular embodiment may be used alone or in combination with other embodiments unless explicitly stated otherwise. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the disclosure as set forth in the appended claims.
Claims (15)
1. A routing table updating method based on a many-core system comprises the following steps:
under the condition that the update condition of the routing table is met, determining routing transmission information between a first processing core and a second processing core according to the current physical position of the first processing core and the current physical position of the second processing core;
updating a routing table corresponding to the first processing core according to the routing transmission information;
wherein the second processing core is a processing core that receives the first processing core packet, and the routing table update condition includes at least one of: the routing table corresponding to the first processing core is empty, and the physical position of the first processing core and/or the physical position of the second processing core are changed.
2. The method of claim 1, wherein, in the event that 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;
and receiving a position response message sent by the second processing core, and determining the current physical position of the second processing core according to the position response message.
3. The method of claim 1, wherein the determining routing information between the first processing core and the second processing core comprises:
determining route transmission information between the first processing core and the second processing core in a path calculation mode; and/or
And determining route transmission information between the first processing core and the second processing core in a mode of transmitting the exploration data packet.
4. The method of claim 3, wherein the determining, by way of path computation, routing information between the first processing core and the second processing core comprises:
acquiring a first position coordinate corresponding to the current physical position of the first processing core and a second position coordinate corresponding to the current physical position of the second processing core;
Determining at least one piece of path information corresponding to the first position coordinate and the second position coordinate according to a preset path setting strategy;
and respectively calculating the transmission cost of each piece of path information, and determining the route transmission information according to the calculation result.
5. The method of claim 3, wherein the determining routing information between the first processing core and the second processing core by way of transmitting discovery packets comprises:
generating an exploration data packet according to the relative position relation between the current physical position of the first processing core and the current physical position of the second processing core;
transmitting the exploration data packet to the second processing core in an exploration mode; the exploration data packet is used for recording transmission parameters corresponding to the exploration data packet in a transmission process, and the transmission parameters comprise a transmission path and/or position offset;
and receiving transmission parameters of each exploration data packet sent by the second processing core, screening at least one transmission path as a target path according to the transmission parameters of each exploration data packet, and determining route transmission information between the first processing core and the second processing core according to the target path.
6. The method of claim 3, wherein the determining routing information between the first processing core and the second processing core by way of transmitting discovery packets comprises:
generating an exploration data packet according to the relative position relation between the current physical position of the first processing core and the current physical position of the second processing core;
transmitting the exploration data packet to the second processing core in an exploration mode; the exploration data packet is used for recording transmission parameters corresponding to the exploration data packet in a transmission process, and the transmission parameters comprise a transmission path and/or position offset;
and receiving at least one target path obtained by screening the second processing core according to the transmission parameters of each exploration data packet, and determining route transmission information between the first processing core and the second processing core according to the target path.
7. The method according to claim 5 or 6, wherein after each transmission node receives the explored data packet, the data packet is transmitted to a transmission node located at the next hop according to an explored policy, and transmission parameters of the explored data packet are updated according to a transmission path; wherein the transmission node is a transmission node located between the first processing core and the second processing core, the exploration policy comprising: a random selection strategy, or a sequential selection strategy.
8. The method of claim 3, wherein the determining routing information between the first processing core and the second processing core by way of transmitting discovery packets comprises:
transmitting a first number of discovery packets to the second processing core by discovery;
transmitting a second number of preset path data packets to the second processing core according to a preset transmission path;
and determining route transmission information between the first processing core and the second processing core according to the exploration data packet and the preset path data packet.
9. The method of claim 8, wherein prior to determining routing information between the first processing core and the second processing core by way of transmitting discovery packets, further comprising:
acquiring sequence numbers of data packets to be transmitted, and determining a first number of data packets as exploring data packets according to the sequence numbers of the data packets to be transmitted; or,
acquiring the information type of a data packet to be transmitted, and determining the data packet with the information type belonging to a preset type as an exploration data packet; or,
judging whether the current time period information belongs to a preset exploration time period, if so, determining a data packet to be transmitted in the current time period as an exploration data packet.
10. The method of claim 1, wherein updating the routing table corresponding to the first processing core according to the routing transmission information comprises:
querying stored routing information between the first processing core and the second processing core in a routing table corresponding to the first processing core;
updating the stored route information according to the route transmission information; wherein the updating operation includes at least one of: a replacement class update operation, and an augmentation class update operation.
11. The method of any of claims 1-10, wherein prior to performing the method, further comprising:
and according to the historical communication state of the first processing core, adjusting the physical position of the first processing core, and broadcasting the physical position update message of the first processing core to other processing cores.
12. The method of claim 11, wherein the method further comprises: and receiving a physical location update message of the second processing core, which is sent by the second processing core, wherein the physical location update message is a message broadcasted after the second processing core adjusts the physical location of the second processing core according to the historical communication state of the second processing core.
13. A routing table updating device based on a many-core system, comprising:
the determining module is suitable for determining route transmission information between the first processing core and the second processing core according to the current physical position of the first processing core and the current physical position of the second processing core under the condition that the update condition of the routing table is met;
the updating module is suitable for updating the routing table corresponding to the first processing core according to the routing transmission information;
wherein the second processing core is a processing core that receives the first processing core packet, and the routing table update condition includes at least one of: the routing table corresponding to the first processing core is empty, and the physical position of the first processing core and/or the physical position of the second processing core are changed.
14. An electronic device, comprising:
one or more processors;
storage means having stored thereon one or more programs which, when executed by the one or more processors, cause the one or more processors to implement a many-core system based routing table updating method according to any of claims 1 to 12.
15. A computer readable medium having stored thereon a computer program which when executed by a processor implements at least one of the following methods:
A method of routing table update based on a many-core system according to any one of claims 1 to 12.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111264684.2A CN116055381A (en) | 2021-10-28 | 2021-10-28 | Routing table updating method and device based on many-core system and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111264684.2A CN116055381A (en) | 2021-10-28 | 2021-10-28 | Routing table updating method and device based on many-core system and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116055381A true CN116055381A (en) | 2023-05-02 |
Family
ID=86120512
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111264684.2A Pending CN116055381A (en) | 2021-10-28 | 2021-10-28 | Routing table updating method and device based on many-core system and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116055381A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116578522A (en) * | 2023-07-13 | 2023-08-11 | 中电海康集团有限公司 | Data processing method, device, equipment and storage medium based on many-core architecture |
CN117880227A (en) * | 2024-03-12 | 2024-04-12 | 苏州仰思坪半导体有限公司 | Chip routing system, method and related device |
-
2021
- 2021-10-28 CN CN202111264684.2A patent/CN116055381A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116578522A (en) * | 2023-07-13 | 2023-08-11 | 中电海康集团有限公司 | Data processing method, device, equipment and storage medium based on many-core architecture |
CN116578522B (en) * | 2023-07-13 | 2023-12-01 | 中电海康集团有限公司 | Data processing method, device, equipment and storage medium based on many-core architecture |
CN117880227A (en) * | 2024-03-12 | 2024-04-12 | 苏州仰思坪半导体有限公司 | Chip routing system, method and related device |
CN117880227B (en) * | 2024-03-12 | 2024-05-31 | 苏州仰思坪半导体有限公司 | Chip routing system, method and related device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN116055381A (en) | Routing table updating method and device based on many-core system and electronic equipment | |
US8150946B2 (en) | Proximity-based memory allocation in a distributed memory system | |
KR20210102107A (en) | Method for forwarding packet in hybrid network, device, and system | |
US20180205635A1 (en) | File access path selection method for torus network-based distributed file system and apparatus for the same | |
CN111382115B (en) | Path creating method and device for network on chip and electronic equipment | |
US20080069094A1 (en) | Urgent packet latency control of network on chip (NOC) apparatus and method of the same | |
CN111327651A (en) | Resource downloading method, device, edge node and storage medium | |
CN115102896B (en) | Data broadcasting method, broadcasting accelerator, NOC, SOC and electronic equipment | |
CN107547400B (en) | Virtual machine migration method and device | |
JP7559212B2 (en) | Method for distributing time via air interface of mobile terminal, mobile terminal and readable storage medium | |
CN111984290A (en) | Method for upgrading embedded equipment, embedded equipment and storage medium | |
CN113141267B (en) | Firmware upgrading and information processing method, device and equipment | |
CN113568863B (en) | Data transmission method, routing node, many-core system and computer readable medium | |
CN114546493A (en) | Core sharing method and device, processing core, electronic device and medium | |
CN116708394B (en) | Terminal upgrading method, electronic equipment and computer readable storage medium | |
CN116389414A (en) | Address allocation method, multi-device system and storage medium | |
CN114239192A (en) | Path searching method, electronic device and storage medium | |
CN116055380A (en) | Routing updating method and system based on many-core system, electronic equipment and medium | |
CN114204979A (en) | Unmanned aerial vehicle ad hoc network method and device based on relative position | |
CN117880227B (en) | Chip routing system, method and related device | |
CN112788153A (en) | Internet of things equipment upgrade management method, device, equipment and storage medium | |
US20060018331A1 (en) | Inter-module communication apparatus | |
US20220224774A1 (en) | Application programming interface for network service devices | |
CN111865794A (en) | Correlation method, system and equipment of logical port and data transmission system | |
CN104394195A (en) | Data updating method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |