Method and apparatus for transmitting data in system, and electronic device
By organizing computer rooms into ring-shaped communication links in the data transmission system, and processing or forwarding data according to the destination node identification, the complexity of data transmission between computer rooms is solved, the transmission efficiency is improved, the error rate is reduced, and convenience is achieved. of data management.
Patent Information
- Application Number
- PCT/CN2024/082057
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-17
- Filing Date
- 2024-03-15
- Publication Date
- 2024-09-26
AI Technical Summary
In the existing data transmission system, the data transmission flow between computer rooms is complex, resulting in low transmission efficiency, high error rate and high packet loss rate, making it difficult to manage.
The computer room in the data transmission system is organized into a ring-shaped communication link. Each node obtains the data to be processed and decides whether to process or forward the data based on the destination node identification. Data is transmitted through the ring link without determining the transmission path.
It simplifies the data transmission flow between nodes, improves data transmission efficiency, reduces error rate and packet loss rate, and facilitates data transmission management.
Smart Images

Figure CN2024082057_26092024_PF_FP
Abstract
Description
Method, device and electronic device for transmitting data in system
[0001] This application claims priority to the Chinese invention patent application entitled “Method, device and electronic device for transmitting data in a system” and application number 202310264788.6, filed on March 17, 2023. The entire contents of that application are incorporated herein by reference. Technical Field
[0002] The present disclosure relates to the field of Internet communication technology, and in particular to a method, device, and electronic device for transmitting data in a system. Background Art
[0003] With the rapid development of the internet, network communication technology has become increasingly important. Currently, communication between nodes in a data transmission system is required to achieve inter-node data transmission. However, the complex flow of data between nodes makes inter-node data transmission difficult to manage. Therefore, a solution is needed to efficiently transmit data between nodes in a data transmission system.
[0004] Summary of the Invention
[0005] The present disclosure provides a method, device and electronic device for transmitting data in a system.
[0006] According to a first aspect, a method for transmitting data in a system is provided, 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 comprising:
[0007] For any target node among the multiple nodes, the target node obtains data to be processed, wherein the data to be processed includes a message to be processed and a destination node identifier corresponding to the message to be processed;
[0008] 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;
[0009] 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 an adjacent node of the target node.
[0010] According to a second aspect, a device for transmitting data in a system is provided, the device being applied to a data transmission system, the data transmission system including a plurality of nodes, and the plurality of nodes forming a ring-shaped communication link; for any target node among the plurality of nodes, the device comprising:
[0011] An acquisition module, configured to acquire data to be processed, wherein the data to be processed includes a message to be processed and a destination node identifier corresponding to the message to be processed;
[0012] a processing module, 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;
[0013] The transmission module is configured to transmit the data to be processed to an adjacent node of the target node when the destination node identifier corresponding to the message to be processed is different from the identifier of the target node.
[0014] According to a third aspect, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of the above-mentioned first aspects is implemented.
[0015] According to a fourth aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any one of the methods described in the first aspect when executing the program.
[0016] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0018] FIG1 is a schematic diagram of a scenario of data transmission in a system according to an exemplary embodiment of the present disclosure;
[0019] FIG2 is a flowchart of a method for transmitting data in a system according to an exemplary embodiment of the present disclosure;
[0020] FIG3A is a schematic diagram of a scenario of data transmission in another system according to an exemplary embodiment of the present disclosure;
[0021] FIG3B is a schematic diagram of a scenario of data transmission in another system according to an exemplary embodiment of the present disclosure;
[0022] FIG4 is a block diagram of an apparatus for transmitting data in a system according to an exemplary embodiment of the present disclosure;
[0023] FIG5 is a schematic block diagram of an electronic device provided by some embodiments of the present disclosure;
[0024] FIG6 is a schematic block diagram of another electronic device provided by some embodiments of the present disclosure;
[0025] FIG7 is a schematic diagram of a storage medium provided by some embodiments of the present disclosure. DETAILED DESCRIPTION
[0026] To help those skilled in the art better understand the technical solutions in this specification, the following will provide a clear and complete description of the technical solutions in the embodiments of this specification, in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. All other embodiments derived by those skilled in the art based on the embodiments in this specification without creative effort shall fall within the scope of protection of this specification.
[0027] In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
[0028] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms "a," "the," and "the" used in this disclosure are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0029] It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this disclosure, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining."
[0030] With the rapid development of the internet, network communication technology has become increasingly important. Currently, data transmission systems typically configure computer room routing by region, enabling communication between computer rooms through routing and data transmission between them. However, the complex flow of data between computer rooms makes data transmission between computer rooms difficult to manage. Furthermore, when transmitting data between computer rooms, they must first locate and obtain the address of the destination computer room, determine the transmission path for the data, and then transmit the data along that path. Consequently, only data along the same path is transmitted each time, resulting in low data transmission efficiency and high error and packet loss rates.
[0031] The present disclosure provides a method for transmitting data in a system, which forms a ring-shaped communication link composed of multiple nodes by organizing at least one computer room in the data transmission system into a node. For any node, the data to be processed including the message to be processed and its destination node identifier is obtained. If the destination node of the message to be processed is the node, the message is directly processed. If the destination node of the message to be processed is not the node, the data to be processed is sent to the adjacent node connected to the node, so that each message to be processed is transmitted to the destination node corresponding to the message to be processed through the communication link. Since the transmission flow of data between nodes is simple, the data transmission between nodes is easy to manage. In addition, when a node transmits data, there is no need to determine the transmission path of the data to be transmitted, and the data only needs to be transmitted according to the ring link. Data with different destination nodes can be transmitted at the same time, which improves the data transmission efficiency and reduces the error rate and packet loss rate.
[0032] Referring to FIG1 , it is a schematic diagram showing a scenario of data transmission in a system according to an exemplary embodiment.
[0033] As shown in Figure 1, the system may include, for example, 8 nodes, namely, node 1 to node 8. Each node may correspond to at least one computer room, and each computer room may include one or more devices, servers, or equipment clusters with computing and processing capabilities. It will be understood that although Figure 1 shows that the system includes 8 nodes, the embodiments of this specification are not limited thereto, but may include other numbers of nodes. The 8 nodes constitute a ring-shaped communication link, and each node is connected to the other two nodes through the communication link. The communication link may be unidirectional or bidirectional.
[0034] If the communication link is unidirectional, the following example illustrates the specific data transmission process using node 1 as an example. Specifically, node 1 transmits data every period T. For example, at time T0, at the end of a period, node 1 checks its stored data to see if there are any pending messages. If no pending messages exist, it waits until time T1, at the end of the next period. If so, it retrieves at least one pending message from the stored data, packages the pending messages into data packet a, and sends it to node 2.
[0035] During the period from time T0 to time T1 when the next cycle expires, on the one hand, node 1 receives data packet b sent by node 8 and can obtain the multiple messages included in data packet b and the information of the destination node corresponding to each message (such as the identifier of the destination node). For example, the multiple messages may include message b1 and message b2, etc. The destination node corresponding to message b1 is node 1, and the destination node corresponding to message b2 is node 3. After node 1 determines the destination nodes corresponding to messages b1 and b2, it processes message b1 and saves message b2 as a message to be transmitted. On the other hand, node 1 generates message c1, and the destination node corresponding to message c1 is node 4. After generating message c1, node 1 can directly save message c1 as a message to be transmitted.
[0036] At time T1 when the cycle expires, node 1 can obtain the messages b2 and c1 to be transmitted from the pre-stored data, and package the messages b2 and c1 into data packet c. Data packet c includes messages b2 and c1, as well as information about the destination node 3 corresponding to message b2 and the destination node 4 corresponding to message c1. Node 1 then sends data packet c to node 2. Thereafter, every other cycle, if there is data to be transmitted in node 1, the data is transmitted to node 2 once. Similarly, other nodes also perform data transmission periodically in this way. Therefore, 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 data transmission cycle of each node can be the same or different.
[0037] If the communication link is bidirectional, using node 1 as an example, node 1 will still transmit data every period T. Node 1 stores messages to be transmitted in both directions. Messages destined for node 2 can be stored in group 1 of pending messages, while messages destined for node 8 can be stored in group 2 of pending messages. At time T0, when a period expires, node 1 checks group 1 for pending messages destined for node 2 and group 2 for pending messages destined for node 8. If neither of these messages exists, the process waits for the next period to expire, at time T1.
[0038] During the period from time T0 to time T1, when the next cycle expires, on the one hand, node 1 receives data packet b sent by node 8 and obtains message b1 and message b2 included in data packet b, as well as information about node 1 (the destination node corresponding to message b1) and node 3 (the destination node corresponding to message b2). After node 1 determines the destination nodes corresponding to messages b1 and b2, it processes message b1 and stores message b2 in message group 1 to be transmitted. On the other hand, node 1 receives data packet d sent by node 2 and obtains message d1 included in data packet d, as well as information about node 6 (the destination node corresponding to message d1). After node 1 determines the destination node corresponding to message d1, it stores message d1 in message group 2 to be transmitted. On the other hand, node 1 generates message c1, the destination node corresponding to message c1 is node 4. After generating message c1, node 1 can store message c1 in message group 1 to be transmitted and message group 2 to be transmitted.
[0039] At time T1, when the period expires, node 1 retrieves messages b2 and c1 from the pre-stored group of messages to be transmitted, and packages them into data packet c. Node 1 then sends data packet c to node 2. Simultaneously, node 1 retrieves messages d1 and c1 from the pre-stored group of messages to be transmitted, and packages them into data packet e. Node 1 then sends data packet e to node 8. Similarly, 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 message c1 is first transmitted to node 4 via nodes 2 and 3, then when message c1 is transmitted to node 4 in the other direction via nodes 8 and 5, node 4 can simply ignore message c1. However, if the link between nodes 2 and 3 fails and becomes disconnected, message c1 cannot be transmitted to node 4 via nodes 2 and 3, but can be transmitted to node 4 in the other direction via nodes 8 and 5. Therefore, this embodiment can reduce the data loss rate to a greater extent.
[0040] The present disclosure will be described in detail below with reference to specific embodiments.
[0041] Figure 2 is a flowchart illustrating a method for transmitting data in a system according to an exemplary embodiment. The method is applied to a data transmission system, which may include multiple nodes that form a ring-shaped communication link. The communication link may be a unidirectional communication link or a bidirectional communication link. The target node may be any of the multiple nodes. The method may include the following steps:
[0042] As shown in FIG2 , 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.
[0043] 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 multiple nodes along a first transmission direction via the communication link. In the first transmission direction, the first adjacent node may be the previous node of the target node, and the second adjacent node may be the next node of the target node. That is, the first adjacent node transmits data unidirectionally to the target node, and the target node transmits data unidirectionally to the second adjacent node. For example, as shown in FIG3A , direction x is the first transmission direction, and data is transmitted between nodes along direction x. The first adjacent node of the target node is the previous node m that transmitted data to the target node, and the second adjacent node of the target node is the next node n that receives data transmitted by the target node.
[0044] In another implementation, the communication link is a bidirectional communication link. Data can be transmitted between multiple nodes via the communication link along a first transmission direction and a second transmission direction, respectively, with the first transmission direction and the second transmission direction being opposite. In the first transmission direction, the first adjacent node may be the previous node of the target node, and the second adjacent node may be the next node of the target node. That is, the first adjacent node transmits data to the target node, and the target node transmits data to the second adjacent node. In the second transmission direction, the second adjacent node may be the previous node of the target node, and the first adjacent node may be the next node of the target node. That is, the second adjacent node transmits data to the target node, and the target node transmits data to the first adjacent node. For example, as shown in FIG3B , direction x is the first transmission direction, and direction y is the second transmission direction. Nodes transmit data along directions x and y, respectively. In direction x, the first adjacent node of the target node is the previous node m that transmitted data to the target node, and the second adjacent node of the target node is the next node n that receives data transmitted by the target node. In direction y, the second adjacent node of the target node is the previous node n that transmitted data to the target node, and the first adjacent node of the target node is the next node m that receives data transmitted by the target node.
[0045] 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. Specifically, in one implementation, if the communication link is a unidirectional communication link, the destination node may receive the first data to be processed from the first adjacent node. The destination node may then determine the destination node identifier corresponding to the first message to be processed included in the first data to be processed. If the destination node identifier corresponding to the first message to be processed is the same as the identifier of the destination node, the destination node processes the first message to be processed.
[0046] In another implementation, if the communication link is a bidirectional communication link, on the one hand, the target node can receive the first data to be processed transmitted along the first transmission direction from the first adjacent node, and determine the destination node identifier corresponding to the first message to be processed included in the first data to be processed. 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 can also receive the second data to be processed transmitted along the second transmission direction from the second adjacent node, and determine the destination node identifier corresponding to the second message to be processed included in the second data to be processed. 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.
[0047] 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.
[0048] In one implementation, if the communication link is a unidirectional communication link, the target node receives the first data to be processed from the first adjacent node, and determines the destination node identifier corresponding to the first message to be processed included in the first data to be processed. If the destination node identifier corresponding to the first message to be processed is different from the identifier of the target node, the target node can store the received first data to be processed in the first pre-stored data, and 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 time period can be obtained from the first pre-stored data as the target data to be transmitted, and the target data includes the first data to be processed. Then, the target node can generate a first data packet carrying the first data to be processed based on the target data, and transmit the first data packet to the second adjacent node.
[0049] In another implementation, if the communication link is a bidirectional communication link, on the one hand, the destination node receives first data to be processed from a first neighboring node transmitted along a first transmission direction and determines the destination node identifier corresponding to a first message to be processed included in the first data to be processed. 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 in first pre-stored data. When a first time condition is met, the destination node can retrieve the target data from the first pre-stored data, 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. On the other hand, the destination node receives second data to be processed from a second neighboring node transmitted along a second transmission direction and determines the destination node identifier corresponding to a second message to be processed included in the second data to be processed. If the destination node identifier corresponding to the second message to be processed is different from the identifier of the destination node, the destination node stores the received second data to be processed in second pre-stored data, which is used to store data transmitted in the second transmission direction. When a second time condition is met, the destination node can retrieve the target data from the second pre-stored data, generate a second data packet carrying the second data to be processed based on the target data, and transmit the second data packet to the first neighboring node.
[0050] It should be noted that the target data may include at least one message to be processed, each message to be processed corresponds to a source node and a destination node. Any message to be processed is generated by its corresponding source node and needs to be transmitted to its corresponding destination node for processing. If there are multiple messages to be processed, the source nodes and destination nodes corresponding to different messages to be processed can be the same or different. Among them, 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 about the source node and destination node corresponding to each message to be processed, as well as the generation time corresponding to each message to be processed.
[0051] It should be noted that the target node can generate a message as a third message to be processed. The target node can use the generated third message to be processed and the target node identifier corresponding to the third message to be processed as the third data to be processed, and store the third data to be processed in the first pre-stored data and the second pre-stored data.
[0052] The present disclosure provides a method for transmitting data in a system, which forms a ring-shaped communication link composed of multiple nodes by organizing at least one computer room in the data transmission system into a node. For any node, the data to be processed including the message to be processed and its destination node identifier is obtained. If the destination node of the message to be processed is the node, the message is directly processed. If the destination node of the message to be processed is not the node, the data to be processed is sent to the adjacent node connected to the node, so that each message to be processed is transmitted to the destination node corresponding to the message to be processed through the communication link. Since the transmission flow of data between nodes is simple, the data transmission between nodes is easy to manage. In addition, when a node transmits data, there is no need to determine the transmission path of the data to be transmitted, and the data only needs to be transmitted according to the ring link. The data transmission efficiency is improved and the error rate and packet loss rate are reduced.
[0053] It should be noted that although the operations of the methods of the embodiments of the present disclosure are described in a specific order in the above embodiments, this does not require or imply that these operations must be performed in this specific order, or that all of the operations shown must be performed to achieve the desired results. On the contrary, the steps depicted in the flowcharts can be performed in a different order. Additionally or alternatively, certain steps can be omitted, multiple steps can be combined into one step, and / or one step can be decomposed into multiple steps.
[0054] The embodiments of the present disclosure provide a method and device for transmitting data in a system, which organizes at least one computer room in the data transmission system into a node to form a ring-shaped communication link composed of multiple nodes. For any node, the data to be processed including the message to be processed and its destination node identifier is obtained. If the destination node of the message to be processed is the node, the message is directly processed. If the destination node of the message to be processed is not the node, the data to be processed is sent to the adjacent node connected to the node, so that each message to be processed is transmitted to the destination node corresponding to the message to be processed through the communication link. Since the transmission flow of data between nodes is simple, the data transmission between nodes is easy to manage. In addition, when a node transmits data, there is no need to determine the transmission path of the data to be transmitted, and the data only needs to be transmitted according to the ring link. This improves the data transmission efficiency and reduces the error rate and packet loss rate.
[0055] Corresponding to the aforementioned method embodiment for transmitting data in the system, the present disclosure also provides an embodiment of an apparatus for transmitting data in the system.
[0056] As shown in Figure 4, Figure 4 is a block diagram of a device for transmitting data in a system according to an exemplary embodiment of the present disclosure. The device is applied to a data transmission system. The data transmission system includes multiple nodes, and the multiple nodes form a ring-shaped communication link. The device is deployed at any target node among the multiple nodes. The device may include: an acquisition module 401, a processing module 402 and a transmission module 403.
[0057] The acquisition module 401 is configured to acquire data to be processed, wherein the data to be processed includes a message to be processed and a destination node identifier corresponding to the message to be processed.
[0058] 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.
[0059] The transmission module 403 is configured to transmit the data to be processed to an adjacent node of the target node when the destination node identifier corresponding to the message to be processed is different from the identifier of the target node.
[0060] In some embodiments, data is transmitted between multiple nodes along a first transmission direction via a communication link, and the data to be processed includes first data to be processed. The acquisition module 401 is configured to receive the first data to be processed from a first neighboring node corresponding to a target node, where the first neighboring node is connected to the target node via the communication link, and in the first transmission direction, the first neighboring node is the previous node of the target node.
[0061] In other embodiments, the transmission module 403 is configured to: store the received first data to be processed in first pre-stored data, the first pre-stored data being used to store data to be transmitted in a first transmission direction; when a first time condition is met, retrieve the first data to be processed from the first pre-stored data, and transmit the first data to be processed to a second adjacent node. The second adjacent node is connected to the target node via a communication link, and the second adjacent node is the next node of the target node in the first transmission direction.
[0062] In other embodiments, the communication link is a bidirectional communication link, and data is further transmitted between the multiple nodes via the communication link in a second transmission direction, the second transmission direction being opposite to the first transmission direction, wherein the first adjacent node is the next node of the target node in the second transmission direction.
[0063] In some other embodiments, the data to be processed further includes second data to be processed. The acquisition module 401 is further configured to receive the second data to be processed from a second neighboring node, where the second neighboring node is connected to the target node via the communication link. In the first transmission direction, the second neighboring node is the next node of the target node. In the second transmission direction, the second neighboring node is the previous node of the target node.
[0064] In some other embodiments, the transmission module 403 is configured to: store the received second data to be processed in second pre-stored data, where the second pre-stored data is used to store data transmitted in the second transmission direction; and when a second time condition is met, obtain the second data to be processed from the second pre-stored data, and transmit the second data to be processed to the first neighboring node.
[0065] In some other implementations, the data to be processed further includes third data to be processed, wherein the acquisition module 401 is further configured to: generate the third data to be processed by the target node.
[0066] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiment scheme of the present disclosure. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0067] Figure 5 is a schematic block diagram of an electronic device provided by some embodiments of the present disclosure. As shown in Figure 5, the electronic device 910 includes a processor 911 and a memory 912, which can be used to implement a client or a server. The memory 912 is used to store computer-executable instructions (e.g., one or more computer program modules) non-transiently. The processor 911 is used to run the computer-executable instructions, which, when run by the processor 911, can execute one or more steps in the method for transmitting data in the system described above, thereby implementing the method for transmitting data in the system described above. The memory 912 and the processor 911 can be interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0068] For example, the processor 911 may be a central processing unit (CPU), a graphics processing unit (GPU), or other processing units with data processing capabilities and / or program execution capabilities. For example, the central processing unit (CPU) may be an X86 or ARM architecture. The processor 911 may be a general-purpose processor or a dedicated processor, and may control other components in the electronic device 910 to perform desired functions.
[0069] For example, the 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 may include, for example, random access memory (RAM) and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), a hard disk, an erasable programmable read-only memory (EPROM), a portable compact disk read-only memory (CD-ROM), a USB memory, a flash memory, etc. One or more computer program modules may be stored on the computer-readable storage medium, and the processor 911 may execute one or more computer program modules 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, may also be stored in the computer-readable storage medium.
[0070] It should be noted that, in the embodiment of the present disclosure, the specific functions and technical effects of the electronic device 910 can be referred to the above description of the method for transmitting data in the system, which will not be repeated here.
[0071] Figure 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 for transmitting data in the system provided by the embodiment of the present disclosure. The electronic device 920 can be a terminal device, etc., which can be used to implement a client or a server. The electronic device 920 can include but is not limited to mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), wearable electronic devices, etc., and fixed terminals such as digital TVs, desktop computers, smart home devices, etc. It should be noted that the electronic device 920 shown in Figure 6 is only an example and does not impose any restrictions on the functions and scope of use of the embodiments of the present disclosure.
[0072] As shown in FIG6 , the electronic device 920 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 921, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 922 or a program loaded from a storage device 928 into a random access memory (RAM) 923. Various programs and data required for the operation of the electronic device 920 are also stored in the RAM 923. The processing device 921, the ROM 922, and the RAM 923 are connected to each other via a bus 924. An input / output (I / O) interface 925 is also connected to the bus 924.
[0073] Typically, the following devices may be connected to the I / O interface 925: an input device 926 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 927 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 928 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 929. The communication device 929 may allow the electronic device 920 to communicate with other electronic devices wirelessly or by wire to exchange data. Although FIG6 shows the electronic device 920 with various devices, it should be understood that it is not required to implement or have all of the devices shown, and the electronic device 920 may alternatively implement or have more or fewer devices.
[0074] For example, according to an embodiment of the present disclosure, the method for transmitting data in the above-mentioned system can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes program code for executing the method for transmitting data in the above-mentioned system. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 929, or installed from the storage device 928, or installed from the ROM 922. When the computer program is executed by the processing device 921, the functions defined in the method for transmitting data in the system provided by the embodiment of the present disclosure can be implemented.
[0075] Figure 7 is a schematic diagram of a storage medium provided in some embodiments of the present disclosure. For example, as shown in Figure 7, storage medium 930 may be a non-transitory computer-readable storage medium for storing non-transitory computer-executable instructions 931. When non-transitory computer-executable instructions 931 are executed by a processor, the method for transmitting data in a system described in an embodiment of the present disclosure may be implemented. For example, when non-transitory computer-executable instructions 931 are executed by a processor, one or more steps of the method for transmitting data in a system described above may be performed.
[0076] For example, the storage medium 930 may be applied to the above-mentioned electronic device. For example, the storage medium 930 may include a memory in the electronic device.
[0077] For example, the storage medium may include a memory card of a smart phone, a storage component of a tablet computer, a hard disk of a personal computer, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disk read-only memory (CD-ROM), a flash memory, or any combination of the above storage media, or other applicable storage media.
[0078] For example, the description of the storage medium 930 can refer to the description of the memory in the embodiment of the electronic device, and the repeated parts are not repeated. The specific functions and technical effects of the storage medium 930 can refer to the description of the method for transmitting data in the system above, and are not repeated here.
[0079] It should be noted that in the context of the present disclosure, a computer-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium or any combination thereof. A 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 any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that may be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0080] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the claims.
[0081] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for 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 include: For any target node among the multiple nodes, the target node obtains data to be processed, wherein the data to be processed includes a message to be processed and a destination node identifier corresponding to the message to be processed; If the destination node identifier corresponding to the to-be-processed message is the same as the identifier of the target node, the target node processes the to-be-processed message; 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 an adjacent node of the target node.
2. The method according to claim 1, wherein data is transmitted between the plurality of nodes through the communication link along a first transmission direction. ; The data to be processed includes first data to be processed; wherein, The obtaining of the data to be processed comprises: Receiving the first to-be-processed data from a first adjacent node corresponding to the target node; The first adjacent node is connected to the target node via the communication link, and in the first transmission direction, the first adjacent node is a previous node of the target node.
3. The method according to claim 2, in, The transmitting the to-be-processed data to the neighboring node of the target node includes: storing the received first data to be processed into the first pre-stored data; the first pre-stored data is used to store data transmitted in the first transmission direction; When a first time condition is met, obtaining the first data to be processed from the first pre-stored data; The first data to be processed is transmitted to a second adjacent node; the second adjacent node is connected to the target node via the communication link, and in the first transmission direction, the second adjacent node is the next node of the target node.
4. The method according to claim 2, in, The communication link is a bidirectional communication link; data is also transmitted along a second transmission direction between the multiple nodes through the communication link; the second transmission direction is opposite to the first transmission direction; wherein the first adjacent node is the next node of the target node in the second transmission direction.
5. The method according to claim 4, in, The data to be processed also includes second data to be processed; wherein, obtaining the data to be processed also includes: receiving the second data to be processed from a second adjacent node; the second adjacent node is connected to 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 the previous node of the target node.
6. The method according to claim 5, in, The transmitting the to-be-processed data to the neighboring node of the target node includes: storing the received second data to be processed into the second pre-stored data; the second pre-stored data is used to store data transmitted in the second transmission direction; When a second time condition is met, acquiring the second data to be processed from the second pre-stored data; Transmit the second to-be-processed data to the first neighboring node.
7. The method according to claim 2, in, The data to be processed also includes third data to be processed; wherein, obtaining the data to be processed further includes: generating the third data to be processed by the target node.
8. A device for transmitting data in a system, the device 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 among the multiple nodes, the device includes: An acquisition module, used to acquire data to be processed, wherein the data to be processed includes a message to be processed and a destination node identifier corresponding to the message to be processed; A processing module, 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; A transmission module is used to transmit the data to be processed to an adjacent node of the target node when the destination node identifier corresponding to the message to be processed is different from the identifier of the target node.
9. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method according to any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Ring communication network master station redundancy method, device and system
CN104767665A
Method, apparatus, and system for updating ring network topology information
US20120188912A1
Method for creating ring network label switched path, related device, and communications system
US20140348028A1
Multicast Packet Transmission Method, Apparatus, and System
US20200228361A1
Message transmission method and device within autonomous system, and corresponding message transmission system
WO2019028979A1
