CN118677717A - Method and device for transmitting data in system and electronic equipment - Google Patents
Method and device for transmitting data in system and electronic equipment Download PDFInfo
- Publication number
- CN118677717A CN118677717A CN202310264788.6A CN202310264788A CN118677717A CN 118677717 A CN118677717 A CN 118677717A CN 202310264788 A CN202310264788 A CN 202310264788A CN 118677717 A CN118677717 A CN 118677717A
- Authority
- CN
- China
- Prior art keywords
- data
- node
- processed
- message
- target node
- 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 55
- 230000005540 biological transmission Effects 0.000 claims abstract description 92
- 230000006854 communication Effects 0.000 claims abstract description 51
- 238000004891 communication Methods 0.000 claims abstract description 51
- 230000008569 process Effects 0.000 claims abstract description 9
- 238000012545 processing Methods 0.000 claims description 23
- 238000004590 computer program Methods 0.000 claims description 11
- 230000007175 bidirectional communication Effects 0.000 claims description 5
- 238000010586 diagram Methods 0.000 description 12
- 238000005516 engineering process Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 3
- 230000006978 adaptation Effects 0.000 description 2
- 230000002457 bidirectional effect Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/42—Loop networks
-
- 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/74—Address processing for routing
- H04L45/745—Address table lookup; Address filtering
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
Abstract
The present disclosure provides a method, an apparatus, and an electronic device for transmitting data in a system, where the method is applied to a data transmission system, the data transmission system includes a plurality of nodes, and the plurality of nodes form an annular communication link; the method comprises the following steps: aiming at any target node in the plurality of nodes, the target node acquires data to be processed, wherein the data to be processed comprises a message to be processed and a target node identifier corresponding to the message to be processed; if the destination node identifier corresponding to the message to be processed is the same as the identifier of the target node, the target node processes the message to be processed; and if the destination node identifier corresponding to the message to be processed is different from the identifier of the target node, the target node transmits the data to be processed to the adjacent node of the target node. The embodiment improves the data transmission efficiency and reduces the error rate and the packet loss rate.
Description
Technical Field
The present disclosure relates to the field of internet communications technologies, and in particular, to a method and an apparatus for transmitting data in a system, and an electronic device.
Background
With the rapid development of internet technology, network communication technology is becoming more and more important. At present, communication is required between nodes in a data transmission system, so that data transmission between the nodes is realized. However, the data transmission between the nodes is difficult to manage because the transmission flow direction of the data between the nodes is complex. There is a need for a scheme for efficiently transmitting data between nodes of a data transmission system.
Disclosure of Invention
The disclosure provides a method, a device and electronic equipment for transmitting data in a system.
According to a first aspect, there is provided a method of transmitting data in a system, the method being applied to a data transmission system, the data transmission system comprising a plurality of nodes, and the plurality of nodes forming a ring-shaped communication link; the method comprises the following steps:
Aiming at any target node in the plurality of nodes, the target node acquires data to be processed, wherein the data to be processed comprises a message to be processed and a target node identifier corresponding to the message to be processed;
If the destination node identifier corresponding to the message to be processed is the same as the identifier of the target node, the target node processes the message to be processed;
And if the destination node identifier corresponding to the message to be processed is different from the identifier of the target node, the target node transmits the data to be processed to the adjacent node of the target node.
According to a second aspect, there is provided an apparatus for transmitting data in a system, the apparatus being applied to a data transmission system, the data transmission system comprising a plurality of nodes, and the plurality of nodes forming a ring-shaped communication link; for any target node of the plurality of nodes, the apparatus comprises:
the device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring data to be processed, and the data to be processed comprises a message to be processed and a destination node identifier corresponding to the message to be processed;
the processing module is used for processing the message to be processed when the destination node identifier corresponding to the message to be processed is the same as the identifier of the target node;
and the transmission module is used for transmitting the data to be processed to the adjacent node of the target node when the target node identifier corresponding to the message to be processed is different from the target node identifier.
According to a third aspect, there is provided a computer readable storage medium storing a computer program which when executed by a processor implements the method of any one of the first aspects.
According to a fourth aspect, there is provided an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of any one of the first aspects when executing the program.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
The embodiment of the disclosure provides a method and a device for transmitting data in a system, which form a ring-shaped communication link formed by a plurality of nodes by organizing at least one machine room in the data transmission system into one node. For any node, obtaining the data to be processed including the information to be processed and the destination node identification thereof, if the destination node of the information to be processed is the node, directly processing the information, and if the destination node of the information to be processed is not the node, sending the data to be processed to the adjacent node connected with the node, thereby transmitting each information to be processed to the destination node corresponding to the information to be processed through a communication link. The data transmission between the nodes is convenient to manage because the transmission flow direction of the data between the nodes is simple. And, when the node transmits data, it is unnecessary to determine a transmission path of the data to be transmitted, and only the data is transmitted according to the ring link. Thereby improving the data transmission efficiency and reducing the error rate and the packet loss rate.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings that are needed in the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the present disclosure, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a scenario in which data is transmitted in a system according to an exemplary embodiment of the present disclosure;
FIG. 2 is a flow chart illustrating a method of transmitting data in a system according to an exemplary embodiment of the present disclosure;
FIG. 3A is a schematic diagram of a scenario in which data is transmitted in another system according to an exemplary embodiment of the present disclosure;
FIG. 3B is a schematic diagram of a scenario in which data is transmitted in another system according to an exemplary embodiment of the present disclosure;
FIG. 4 is a block diagram of an apparatus for transmitting data in a system according to an exemplary embodiment of the present disclosure;
FIG. 5 is a schematic block diagram of an electronic device provided by some embodiments of the present disclosure;
FIG. 6 is a schematic block diagram of another electronic device provided by some embodiments of the present disclosure;
fig. 7 is a schematic diagram of a storage medium provided by some embodiments of the present disclosure.
Detailed Description
In order to make the technical solutions in the present specification better understood by those skilled in the art, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only some embodiments of the present specification, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are intended to be within the scope of the present disclosure.
When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "in response to a determination" depending on the context.
With the rapid development of internet technology, network communication technology is becoming more and more important. At present, the machine room route in the data transmission system is generally configured according to regions, so that the machine rooms communicate through the route, and data transmission among the machine rooms is realized. However, the data transmission between the machine rooms is difficult to manage because the transmission flow direction of the data between the machine rooms is complex. When the machine room transmits data, the address of the destination machine room of the data to be transmitted needs to be searched and acquired, then the transmission path of the data to be transmitted is determined, and finally the data is transmitted according to the transmission path. Therefore, only the data with the same path is transmitted each time, the data transmission efficiency is low, and the error rate and the packet loss rate are high.
The method for transmitting data in the system is characterized in that a ring-shaped communication link formed by a plurality of nodes is formed by organizing at least one machine room in a data transmission system into one node. For any node, obtaining the data to be processed including the information to be processed and the destination node identification thereof, if the destination node of the information to be processed is the node, directly processing the information, and if the destination node of the information to be processed is not the node, sending the data to be processed to the adjacent node connected with the node, thereby transmitting each information to be processed to the destination node corresponding to the information to be processed through a communication link. The data transmission between the nodes is convenient to manage because the transmission flow direction of the data between the nodes is simple. And, when the node transmits data, it is unnecessary to determine a transmission path of the data to be transmitted, and only the data is transmitted according to the ring link. Different data of the destination node can be transmitted simultaneously, so that the data transmission efficiency is improved, and the error rate and the packet loss rate are reduced.
Referring to fig. 1, a schematic diagram of a scenario of transmitting data in a system is shown according to an exemplary embodiment.
As shown in fig. 1, the system may include 8 nodes, for example, from node 1 to node 8. Each node may correspond to at least one machine room, and each machine room may include one or more devices, servers, or clusters of equipment having computing, processing capabilities. It will be appreciated that although 8 nodes are shown in fig. 1 as being included in a system, embodiments of the present description are not so limited, but may include other numbers of nodes. The 8 nodes form a ring-shaped communication link, and each node is connected with the other two nodes through the communication link, and the communication link can be unidirectional or bidirectional.
If the communication link is unidirectional, a specific transmission procedure of data will be exemplarily described below by taking the node 1 as an example. Specifically, the node 1 performs data transmission once every period T. For example, at time T0 when one period expires, node 1 checks from the pre-stored data whether there is a message to be transmitted, and if there is no message to be transmitted, waits for time T1 when the next period expires. If there is a message to be transmitted, at least one message to be transmitted may be obtained from the pre-stored data, and after the message to be transmitted is packed into the data packet a, sent to the node 2.
During the period from the time T0 to the time T1 when the next period expires, on the one hand, the node 1 receives the data packet b sent by the node 8, and may acquire multiple messages included in the data packet b and information (such as an identifier of the destination node) of the destination node corresponding to each message. For example, the plurality of messages may include a message b1, a message b2, and the like, where the destination node corresponding to the message b1 is a node 1, and the destination node corresponding to the message b2 is a node 3. After the node 1 determines the destination nodes corresponding to the message b1 and the message b2, the message b1 is processed, and the message b2 is stored as a message to be transmitted. On the other hand, the node 1 generates the message c1, the destination node corresponding to the message c1 is node 4, and the node 1 may directly store the message c1 as the message to be transmitted after generating the message c 1.
At the time T1 when the period expires, the node 1 may acquire the message b2 and the message c1 to be transmitted from the pre-stored data, and package the message b2 and the message c1 into a data packet c, where the data packet c includes the message b2 and the message c1, and information of the destination node 3 corresponding to the message b2, information of the destination node 4 corresponding to the message c1, and so on. Then, node 1 transmits the data packet c to node 2. Thereafter, if there is data to be transmitted in the node 1, the data is transmitted to the node 2 once every other period. Also, other nodes periodically transmit data in this manner. Thus, message b2 is transmitted to node 3 via node 2 and message c1 is transmitted to node 4 via nodes 2 and 3. It should be noted that the period of transmitting data by each node may be the same or different.
If the communication link is bidirectional, for example, node 1 performs data transmission once every period T. The node 1 stores the messages to be transmitted in two transmission directions, and can store the messages transmitted in the direction of the node 2 in the message group to be transmitted 1 and the messages transmitted in the direction of the node 8 in the message group to be transmitted 2. At the time T0 when the period expires, the node 1 checks from the pre-stored message group 1 whether there is a message to be transmitted in the direction of the node 2, and checks from the message group 2 whether there is a message to be transmitted in the direction of the node 8. If none exist, wait for the time T1 of the expiration of the next period.
During the period from the time T0 to the time T1 when the next period expires, on the one hand, the node 1 receives the data packet b sent by the node 8, acquires the message b1 and the message b2 included in the data packet b, and the information of the node 1 (the destination node corresponding to the message b 1) and the node 3 (the destination node corresponding to the message b 2). After the node 1 determines the destination nodes corresponding to the message b1 and the message b2, the message b1 is processed, and the message b2 is stored in the message group 1 to be transmitted. On the other hand, the node 1 receives the data packet d sent by the node 2, and acquires the information of the message d1 and the node 6 (the destination node corresponding to the message d 1) included in the data packet d. After the node 1 determines the destination node corresponding to the message d1, the message d1 is stored in the message group 2 to be transmitted. In still another aspect, the node 1 generates the message c1, the destination node corresponding to the message c1 is the node 4, and the node 1 may store the message c1 into the message group 1 to be transmitted and the message group 2 to be transmitted after generating the message c 1.
At the time T1 when the period expires, the node 1 may obtain the message b2 and the message c1 to be transmitted from the pre-stored message group 1 to be transmitted, and package the message b2 and the message c1 into the data packet c. Then, node 1 transmits the data packet c to node 2. Meanwhile, the node 1 may also obtain the message d1 and the message c1 to be transmitted from the pre-stored message group 2 to be transmitted, and package the message d1 and the message c1 into a data packet e. Then, node 1 sends packet e to node 8. Also, other nodes periodically transmit data in this manner. Thus, message b2 is transmitted to node 3 via node 2 and message d1 is transmitted to node 6 via nodes 8 and 7. It should be noted that if the message c1 is transmitted to the node 4 via the node 2 and the node 3, the node 4 may directly ignore the message c1 when the message c1 of the other transmission direction is transmitted to the node 4 via the node 8-the node 5. Whereas if the link between node 2 and node 3 fails to disconnect, message c1 cannot be transmitted via node 2 and node 3 to node 4, but can be transmitted via node 8-node 5 to node 4 via the other transmission direction. Therefore, the present embodiment can reduce the loss rate of data to a greater extent.
The present disclosure will be described in detail with reference to specific embodiments.
Fig. 2 is a flow chart illustrating a method of transmitting data in a system according to an exemplary embodiment. The method is applied to a data transmission system, and the data transmission system can comprise a plurality of nodes, wherein the nodes form a ring-shaped communication link, and the communication link can be a one-way communication link or a two-way communication link. The target node may be any one of the above-mentioned nodes, and the method may include the steps of:
as shown in fig. 2, in step 201, the target node obtains data to be processed, and in step 202, if the destination node identifier corresponding to the message to be processed is the same as the identifier of the target node, the target node processes the message to be processed.
In this embodiment, the target node may be adjacent to two nodes, and the two nodes adjacent to the target node include a first adjacent node and a second adjacent node. In one implementation, the communication link is a unidirectional communication link, and data is transmitted between the plurality of nodes along a first transmission direction over the communication link, in the first transmission direction, a first neighboring node may be a previous node of the target node, and a second neighboring node may be a next node of the target node. That is, the first neighboring node transmits data unidirectionally to the target node, and the target node transmits data unidirectionally to the second neighboring node. For example, as shown in fig. 3A, the direction x is the first transmission direction, and data is transmitted between nodes along the direction x. The first adjacent node of the target node is the last node m for transmitting data to the target node, and the second adjacent node of the target node is the next node n for receiving the data transmitted by the target node.
In another implementation, the communication link is a bi-directional communication link, and between the plurality of nodes, data may be transmitted over the communication link in a first transmission direction and a second transmission direction, respectively, the first transmission direction and the second transmission direction being opposite. In the first transmission direction, the first neighboring node may be a previous node of the target node, and the second neighboring node may be a next node of the target node. I.e. the first neighboring node transmits data to the target node and the target node transmits data to the second neighboring node. In the second transmission direction, the second neighboring node may be a node previous to the target node, and the first neighboring node may be a node next to the target node. I.e. the second neighboring node transmits data to the target node, which transmits data to the first neighboring node. For example, as shown in fig. 3B, the direction x is a first transmission direction, the direction y is a second transmission direction, and data is transmitted between nodes along the direction x and the direction y, respectively. In the direction x, a first adjacent node of the target node is a last node m transmitting data to the target node, and a second adjacent node of the target node is a next node n receiving the data transmitted by the target node. In the direction y, the second neighboring node of the target node is the last node n transmitting data to the target node, and the first neighboring node of the target node is the next node m receiving data transmitted by the target node.
In this embodiment, the data to be processed may include a message to be processed and a destination node identifier corresponding to the message to be processed. In particular, in one implementation, the target node may receive the first data to be processed from the first neighboring node if the communication link is a unidirectional communication link. Next, the destination node may determine a destination node identification corresponding to the first message to be processed included in the first data to be processed. And if the destination node identifier corresponding to the first message to be processed is the same as the identifier of the target node, the target node processes the first message to be processed.
In another implementation manner, if the communication link is a bidirectional communication link, in one aspect, the target node may receive, from the first neighboring node, first to-be-processed data transmitted along the first transmission direction, and determine a destination node identifier corresponding to a first to-be-processed message included in the first to-be-processed data. And if the destination node identifier corresponding to the first message to be processed is the same as the identifier of the target node, the target node processes the first message to be processed. On the other hand, the target node may further receive second to-be-processed data transmitted along the second transmission direction from a second neighboring node, and determine a destination node identifier corresponding to a second to-be-processed message included in the second to-be-processed data. And if the destination node identifier corresponding to the second message to be processed is the same as the identifier of the target node, the target node processes the second message to be processed.
In step 203, if the destination node identifier corresponding to the message to be processed is different from the identifier of the target node, the target node transmits the data to be processed to the neighboring node of the target node.
In one implementation, if the communication link is a unidirectional communication link, the target node receives first to-be-processed data from the first neighboring node, and determines a destination node identifier corresponding to a first to-be-processed message included in the first to-be-processed data. If the destination node identifier corresponding to the first message to be processed is different from the identifier of the destination node, the destination node may store the received first data to be processed into first pre-stored data, where the first pre-stored data is used to store data transmitted in the first transmission direction. When the first time condition is met (for example, when the preset period expires), part or all of the data stored in the preset period can be obtained from the first pre-stored data to serve as target data to be transmitted, wherein the target data comprises first data to be processed. The target node may then generate a first data packet carrying the first data to be processed based on the target data and transmit the first data packet to a second neighboring node.
In another implementation manner, if the communication link is a bidirectional communication link, on the one hand, the target node receives, from the first neighboring node, first to-be-processed data transmitted along the first transmission direction, and determines a destination node identifier corresponding to a first to-be-processed message included in the first to-be-processed data. If the destination node identifier corresponding to the first message to be processed is different from the identifier of the destination node, the destination node stores the received first data to be processed into the first pre-stored data. When the first time condition is met, target data can be obtained from the first pre-stored data, a first data packet carrying first data to be processed is generated based on the target data, and the first data packet is transmitted to a second adjacent node. On the other hand, the target node receives second to-be-processed data transmitted along the second transmission direction from a second adjacent node, and determines a target node identifier corresponding to a second to-be-processed message included in the second to-be-processed data. And if the destination node identifier corresponding to the second message to be processed is different from the identifier of the target node, the target node stores the received second data to be processed into second pre-stored data, and the second pre-stored data is used for storing the data transmitted to the second transmission direction. And when the second time condition is met, acquiring target data from second pre-stored data, generating a second data packet carrying second data to be processed based on the target data, and transmitting the second data packet to the first adjacent node.
It should be noted that, the target data may include at least one message to be processed, where each message to be processed corresponds to a source node and a destination node, and any message to be processed is generated by the source node corresponding to the message to be processed and needs to be transmitted to the destination node corresponding to the message to be processed. If there are multiple messages to be processed, the source node and the destination node corresponding to different messages to be processed may be the same or different. The data packet generated based on the target data may include a key information header and a message body, the message body may include each message to be processed, the key information header may include information of a source node and a destination node corresponding to each message to be processed, and include generation time corresponding to each message to be processed, etc.
It should be noted that, the target node may generate a message as a third message to be processed, and the target node may store the generated third message to be processed and a target node identifier corresponding to the third message to be processed as third data to be processed, and store the third data to be processed into the first pre-stored data and the second pre-stored data.
The method for transmitting data in the system is characterized in that a ring-shaped communication link formed by a plurality of nodes is formed by organizing at least one machine room in a data transmission system into one node. For any node, obtaining the data to be processed including the information to be processed and the destination node identification thereof, if the destination node of the information to be processed is the node, directly processing the information, and if the destination node of the information to be processed is not the node, sending the data to be processed to the adjacent node connected with the node, thereby transmitting each information to be processed to the destination node corresponding to the information to be processed through a communication link. The data transmission between the nodes is convenient to manage because the transmission flow direction of the data between the nodes is simple. And, when the node transmits data, it is unnecessary to determine a transmission path of the data to be transmitted, and only the data is transmitted according to the ring link. The data transmission efficiency is improved, and the error rate and the packet loss rate are reduced.
It should be noted that while in the above embodiments, the operations of the methods of the embodiments of the present disclosure are described in a particular order, this does not require or imply that the operations must be performed in that particular order or that all of the illustrated operations be performed in order to achieve desirable results. Rather, the steps depicted in the flowcharts may change the order of execution. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform.
Corresponding to the foregoing embodiments of the method for transmitting data in a system, the present disclosure also provides embodiments of an apparatus for transmitting data in a system.
As shown in fig. 4, fig. 4 is a block diagram of an apparatus for transmitting data in a system according to an exemplary embodiment of the present disclosure, the apparatus being applied to a data transmission system including a plurality of nodes, the plurality of nodes constituting a ring-shaped communication link, the apparatus being disposed at any one of a plurality of nodes, the apparatus may include: an acquisition module 401, a processing module 402 and a transmission module 403.
The obtaining module 401 is configured to obtain data to be processed, where the data to be processed includes a message to be processed and a destination node identifier corresponding to the message to be processed.
And the processing module 402 is configured to process the message to be processed when the destination node identifier corresponding to the message to be processed is the same as the identifier of the target node.
And the transmission module 403 is configured to transmit the data to be processed to a neighboring node of the target node when the identifier of the target node corresponding to the message to be processed is different from the identifier of the target node.
In some embodiments, data is transmitted in a first transmission direction over a communication link between a plurality of nodes, the data to be processed comprising first data to be processed. Wherein the acquisition module 401 is configured to: and receiving first data to be processed from a first adjacent node corresponding to the target node, wherein the first adjacent node is connected with the target node through a communication link, and the first adjacent node is the last node of the target node in the first transmission direction.
In other embodiments, the transmission module 403 is configured to: and storing the received first data to be processed into first pre-stored data, wherein the first pre-stored data is used for storing the data transmitted to the first transmission direction, and when the first time condition is met, acquiring the first data to be processed from the first pre-stored data, and transmitting the first data to be processed to the second adjacent node. The second adjacent node is connected with the target node through a communication link, and in the first transmission direction, the second adjacent node is the next node of the target node.
In other embodiments, the communication link is a bi-directional communication link, and data is also transmitted between the plurality of nodes via the communication link in a second transmission direction, the second transmission direction being opposite the first transmission direction. Wherein the first neighboring node is the next node to the target node in the second transmission direction.
In other embodiments, the data to be processed further comprises second data to be processed. Wherein the acquisition module 401 is further configured to: and receiving second data to be processed from a second adjacent node, wherein the second adjacent node is connected with the target node through the communication link, and the second adjacent node is the next node of the target node in the first transmission direction. In the second transmission direction, the second neighboring node is the last node of the target node.
In other embodiments, the transmission module 403 is configured to: and storing the received second data to be processed into second pre-stored data, wherein the second pre-stored data is used for storing data transmitted to a second transmission direction. And when the second time condition is met, acquiring second data to be processed from second pre-stored data, and transmitting the second data to be processed to the first adjacent node.
In other embodiments, the data to be processed further comprises third data to be processed, wherein the obtaining module 401 is further configured to: third pending data is generated by the target node.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purposes of the embodiments of the present disclosure. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
Fig. 5 is a schematic block diagram of an electronic device provided in some embodiments of the present disclosure. As shown in fig. 5, the electronic device 910 includes a processor 911 and memory 912, which may be used to implement a client or server. Memory 912 is used to non-transitory store computer-executable instructions (e.g., one or more computer program modules). The processor 911 is operable to execute computer-executable instructions that, when executed by the processor 911, perform one or more steps in the methods of transmitting data in the systems described above, thereby implementing the methods of transmitting data in the systems described above. The memory 912 and the processor 911 may be interconnected by a bus system and/or other form of connection mechanism (not shown).
For example, the processor 911 may be a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), or other form of processing unit having data processing capabilities and/or program execution capabilities. For example, the Central Processing Unit (CPU) may be an X86 or ARM architecture, or the like. The processor 911 may be a general-purpose processor or a special-purpose processor that can control other components in the electronic device 910 to perform desired functions.
For example, memory 912 may include any combination of one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. Volatile memory can include, for example, random Access Memory (RAM) and/or cache memory (cache) and the like. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, erasable programmable read-only memory (EPROM), portable compact disc read-only memory (CD-ROM), USB memory, flash memory, and the like. One or more computer program modules may be stored on the computer-readable storage medium and executed by the processor 911 to implement various functions of the electronic device 910. Various applications and various data, as well as various data used and/or generated by the applications, etc., may also be stored in the computer readable storage medium.
It should be noted that, in the embodiments of the present disclosure, specific functions and technical effects of the electronic device 910 may refer to the above description about the method for transmitting data in the system, which is not repeated herein.
Fig. 6 is a schematic block diagram of another electronic device provided by some embodiments of the present disclosure. The electronic device 920 is, for example, suitable for implementing the method of transmitting data in the system provided by the embodiments of the present disclosure. The electronic device 920 may be a terminal device or the like, and may be used to implement a client or a server. The electronic device 920 may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), wearable electronic devices, and the like, and stationary terminals such as digital TVs, desktop computers, smart home devices, and the like. It should be noted that the electronic device 920 shown in fig. 6 is only an example, and does not impose any limitation on the functionality and scope of use of the embodiments of the present disclosure.
As shown in fig. 6, the electronic device 920 may include a processing apparatus (e.g., a central processing unit, a graphics processor, etc.) 921, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 922 or a program loaded from the storage apparatus 928 into a Random Access Memory (RAM) 923. In the RAM 923, various programs and data required for the operation of the electronic device 920 are also stored. The processing device 921, the ROM 922, and the RAM 923 are connected to each other through a bus 924. An input/output (I/O) interface 925 is also connected to bus 924.
In general, the following devices may be connected to the I/O interface 925: input devices 926 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 927 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 928 including, for example, magnetic tape, hard disk, etc.; and communication device 929. The communication device 929 may allow the electronic apparatus 920 to communicate wirelessly or by wire with other electronic apparatuses to exchange data. While fig. 6 shows the electronic device 920 with various means, it is to be understood that not all of the illustrated means are required to be implemented or provided, and that the electronic device 920 may alternatively be implemented or provided with more or fewer means.
For example, according to embodiments of the present disclosure, the method of transmitting data in the above-described system may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method of transmitting data in the system described above. In such an embodiment, the computer program may be downloaded and installed from a network via the communications device 929, or from the storage device 928, or from the ROM 922. The functions defined in the method of transmitting data in the system provided by the embodiments of the present disclosure may be implemented when the computer program is executed by the processing device 921.
Fig. 7 is a schematic diagram of a storage medium according to some embodiments of the present disclosure. For example, as shown in FIG. 7, the storage medium 930 may be a non-transitory computer-readable storage medium for storing non-transitory computer-executable instructions 931. The method of transmitting data in a system according to embodiments of the present disclosure may be implemented when the non-transitory computer-executable instructions 931 are executed by a processor, for example, one or more steps of the method of transmitting data in a system according to the above may be performed when the non-transitory computer-executable instructions 931 are executed by a processor.
For example, the storage medium 930 may be applied to the above-described electronic device, and for example, the storage medium 930 may include a memory in the electronic device.
For example, the storage medium may include a memory card of a smart phone, a memory component of a tablet computer, a hard disk of a personal computer, random Access Memory (RAM), read Only Memory (ROM), erasable Programmable Read Only Memory (EPROM), portable compact disc read only memory (CD-ROM), flash memory, or any combination of the foregoing, as well as other suitable storage media.
For example, the description of the storage medium 930 may refer to the description of the memory in the embodiment of the electronic device, and the repetition is omitted. The specific function and technical effect of the storage medium 930 may refer to the description of the method for transmitting data in the system hereinabove, and will not be repeated herein.
It should be noted that in the context of this disclosure, a computer-readable medium can be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable medium may be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium may be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (10)
1. A method of transmitting data in a system, the method being applied to a data transmission system, the data transmission system comprising a plurality of nodes, the plurality of nodes forming a ring-shaped communication link; the method comprises the following steps:
Aiming at any target node in the plurality of nodes, the target node acquires data to be processed, wherein the data to be processed comprises a message to be processed and a target node identifier corresponding to the message to be processed;
If the destination node identifier corresponding to the message to be processed is the same as the identifier of the target node, the target node processes the message to be processed;
And if the destination node identifier corresponding to the message to be processed is different from the identifier of the target node, the target node transmits the data to be processed to the adjacent node of the target node.
2. The method of claim 1, transmitting data in a first transmission direction between the plurality of nodes over the communication link; the data to be processed comprises first data to be processed; wherein, the obtaining the data to be processed includes:
Receiving the first data to be processed from a first adjacent node corresponding to the target node; the first neighboring node is connected with the target node through the communication link, and in the first transmission direction, the first neighboring node is a last node of the target node.
3. The method of claim 2, wherein the transmitting the data to be processed to the neighboring node of the target node comprises:
storing the received first data to be processed into the first pre-stored data; the first pre-stored data is used for storing data transmitted to the first transmission direction;
When a first time condition is met, acquiring the first data to be processed from the first pre-stored data;
transmitting the first data to be processed to a second adjacent node; the second adjacent node is connected with the target node through the communication link, and in the first transmission direction, the second adjacent node is the next node of the target node.
4. The method of claim 2, wherein the communication link is a bi-directional communication link; transmitting data between the plurality of nodes in a second transmission direction over the communication link; the second transmission direction is opposite to the first transmission direction; wherein the first neighboring node is a next node of the target node in the second transmission direction.
5. The method of claim 4, wherein the data to be processed further comprises second data to be processed; wherein, the obtaining the data to be processed further includes: receiving the second data to be processed from a second adjacent node; the second adjacent node is connected with the target node through the communication link; in the first transmission direction, the second adjacent node is the next node of the target node; in the second transmission direction, the second adjacent node is a node that is the last node of the target node.
6. The method of claim 5, wherein the transmitting the data to be processed to the neighboring node of the target node comprises:
Storing the received second data to be processed into the second pre-stored data; the second pre-stored data is used for storing data transmitted to the second transmission direction;
when a second time condition is met, acquiring the second data to be processed from the second pre-stored data;
and transmitting the second data to be processed to the first adjacent node.
7. The method of claim 2, wherein the data to be processed further comprises third data to be processed; wherein, the obtaining the data to be processed further includes: and generating the third data to be processed by the target node.
8. An apparatus for transmitting data in a system, the apparatus being applied to a data transmission system, the data transmission system comprising a plurality of nodes, the plurality of nodes forming a ring-shaped communication link; for any target node of the plurality of nodes, the apparatus comprises:
the device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring data to be processed, and the data to be processed comprises a message to be processed and a destination node identifier corresponding to the message to be processed;
the processing module is used for processing the message to be processed when the destination node identifier corresponding to the message to be processed is the same as the identifier of the target node;
and the transmission module is used for transmitting the data to be processed to the adjacent node of the target node when the target node identifier corresponding to the message to be processed is different from the target node identifier.
9. A computer readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method of any of claims 1-7.
10. An electronic device comprising a memory having executable code stored therein and a processor, which when executing the executable code, implements the method of any of claims 1-7.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310264788.6A CN118677717A (en) | 2023-03-17 | 2023-03-17 | Method and device for transmitting data in system and electronic equipment |
PCT/CN2024/082057 WO2024193483A1 (en) | 2023-03-17 | 2024-03-15 | Method and apparatus for transmitting data in system, and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310264788.6A CN118677717A (en) | 2023-03-17 | 2023-03-17 | Method and device for transmitting data in system and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN118677717A true CN118677717A (en) | 2024-09-20 |
Family
ID=92727126
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310264788.6A Pending CN118677717A (en) | 2023-03-17 | 2023-03-17 | Method and device for transmitting data in system and electronic equipment |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN118677717A (en) |
WO (1) | WO2024193483A1 (en) |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101702663B (en) * | 2009-11-11 | 2012-09-05 | 华为技术有限公司 | Method and device for updating ring network topology information |
CN103209088B (en) * | 2012-01-17 | 2016-12-28 | 华为技术有限公司 | Ring network label switch path creation method and associated devices and communication system |
CN104767665B (en) * | 2014-01-07 | 2018-01-12 | 维谛技术有限公司 | The method, apparatus and system of a kind of ring-type communication network main website redundancy |
CN107483346A (en) * | 2017-08-09 | 2017-12-15 | 广州市百果园信息技术有限公司 | Message delivery method, device and corresponding messaging system in autonomous system |
CN114697257A (en) * | 2017-09-27 | 2022-07-01 | 华为技术有限公司 | Method, device and system for transmitting multicast message |
-
2023
- 2023-03-17 CN CN202310264788.6A patent/CN118677717A/en active Pending
-
2024
- 2024-03-15 WO PCT/CN2024/082057 patent/WO2024193483A1/en unknown
Also Published As
Publication number | Publication date |
---|---|
WO2024193483A1 (en) | 2024-09-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US12019652B2 (en) | Method and device for synchronizing node data | |
CN111679990B (en) | Test data generation method and device, readable medium and electronic equipment | |
CN111931962B (en) | Information display method and device and electronic equipment | |
CN110781373B (en) | List updating method and device, readable medium and electronic equipment | |
CN112434620B (en) | Scene text recognition method, device, equipment and computer readable medium | |
CN111432001B (en) | Method, apparatus, electronic device and computer readable medium for jumping scenes | |
CN110007936B (en) | Data processing method and device | |
CN111858381B (en) | Application fault tolerance capability test method, electronic device and medium | |
CN110618768B (en) | Information presentation method and device | |
CN112418389A (en) | Data processing method and device, electronic equipment and computer readable storage medium | |
CN111262907B (en) | Service instance access method and device and electronic equipment | |
CN118677717A (en) | Method and device for transmitting data in system and electronic equipment | |
CN111324470A (en) | Method and device for generating information | |
CN111626802A (en) | Method and apparatus for processing information | |
CN110532115B (en) | System, method and apparatus for developing smart contracts | |
CN115022328A (en) | Server cluster, server cluster testing method and device and electronic equipment | |
CN109933556B (en) | Method and apparatus for processing information | |
CN111694679B (en) | Message processing method and device and electronic equipment | |
CN114398098B (en) | Application script execution method, device, electronic equipment and computer readable medium | |
CN111314021A (en) | Data transmission method and device, electronic equipment and computer readable storage medium | |
CN112781581B (en) | Method and device for generating path from moving to child cart applied to sweeper | |
US20240152504A1 (en) | Data interaction method, apparatus, and electronic device | |
CN112688863B (en) | Gateway data processing method and device and electronic equipment | |
CN111314457B (en) | Method and device for setting virtual private cloud | |
CN112311833B (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 |