Information transmission method and device, computer equipment and storage medium
By detecting network segment status and establishing direct links between slave nodes in the master-slave architecture, the problem of abnormal information transmission caused by gateway damage or excessive load is solved, and normal transmission of information between nodes and load reduction are achieved.
Patent Information
- Application Number
- CN202410834573.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-09-06
AI Technical Summary
In the traditional master-slave architecture, when the gateway is damaged or the network segment load is too high, information transmission is abnormal, and the network segment load cannot be effectively reduced, affecting information transmission between nodes.
By detecting the operating status of the network segment, the target node type of the target network segment is determined, and a direct link between slave nodes is established to reduce the load of the network segment and avoid forwarding information through the master node.
It achieves normal transmission of information between nodes when the gateway is damaged or the load is too high, reducing the load on the network segment and improving the efficiency and security of information transmission.
Smart Images

Figure CN118612233A
Abstract
Description
Technical Field
[0001] The present application relates to the computer field, and more specifically, to an information transmission method, apparatus, computer equipment and storage medium in the computer field. Background Art
[0002] The traditional master-slave architecture in the electronic and electrical architecture uses the gateway as the signal forwarder, that is, the master node in the master-slave architecture, and each functional module as a slave node. Based on this, when information is transmitted between slave nodes in different network segments, the sending slave node needs to send the transmission information to the master node, and the master node forwards the transmission information to the receiving slave node. In this case, if the gateway as the master node is damaged or the network segment load is too high, it will cause abnormal information transmission. Summary of the invention
[0003] The present application provides an information transmission method, apparatus, computer equipment and storage medium. The method can reduce the network segment load and ensure the normal transmission of information between nodes by establishing a direct link between slave nodes.
[0004] In a first aspect, an information transmission method is provided, which is applied to a master node that establishes a connection with each slave node, and the method includes: detecting the operating status of a network segment between each slave node; if an operating abnormality of a target network segment is detected, determining the target node type of the target network segment to which the target network segment belongs; based on the corresponding relationship between the node type and the slave node, determining the target slave node corresponding to the target node type; determining a candidate slave node that has an information transmission relationship with the target slave node; and sending a direct link establishment request to the target slave node and the candidate slave node respectively, so that the target slave node and the candidate slave node establish a direct link based on the direct link establishment request, and transmitting information between the target slave node and the candidate slave node through the direct link.
[0005] Through the above technical scheme, the target slave node can be determined according to the target node type of the target network segment belonging node of the target network segment with abnormal operation, and then the candidate slave node that has an information transmission relationship with the target slave node can be determined, so as to send a direct link establishment request to the target slave node and the candidate slave node, so that a direct link can be established between the target slave node and the candidate slave node, without going through the master node, and only through the direct link to transmit information, thereby reducing the network segment load and ensuring the normal transmission of information between nodes.
[0006] In combination with the first aspect, in some possible implementations, the step of determining the target slave node corresponding to the target node type based on the correspondence between the node type and the slave node includes: if the target node type is a master node type, each slave node is determined as a target slave node; if the target node type is a slave node type, the node to which the target network segment belongs is determined as the target slave node.
[0007] Through the above technical solution, the target slave node corresponding to the target node type is determined according to the corresponding relationship between the node type and the slave node, thereby improving the accuracy of determining the network segment anomaly.
[0008] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, the step of sending direct link establishment requests to the target slave node and the candidate slave node respectively so that the target slave node and the candidate slave node establish a direct link based on the direct link establishment request includes: sending direct link establishment requests to the target slave node and the candidate slave node respectively, triggering the target slave node and the candidate slave node to establish a direct link; or sending direct link establishment requests to the target slave node and the candidate slave node respectively, and establishing a direct link when the target slave node and the candidate slave node transmit information.
[0009] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, the step of sending a direct link establishment request to the target slave node and the candidate slave node respectively includes: obtaining the current time and determining the current time as the request sending time; adding the request sending time to the direct link establishment request, and sending the direct link establishment request to the target slave node and the candidate slave node respectively, so that the target slave node or the candidate slave node determines whether to receive the transmission information based on the request sending time.
[0010] Through the above technical solution, when a direct link request is sent to a target slave node and a candidate slave node, the request sending time is added to the direct link request, so that the target slave node or the candidate slave node determines whether to receive the transmission information based on the request sending time, and verifies it through the request sending time, thereby improving the security of direct link information transmission.
[0011] In a second aspect, an information transmission method is provided, which is applied to a slave node that establishes a connection with a master node, and the method includes: receiving a direct link establishment request sent by the master node; based on the direct link establishment request, obtaining a candidate slave node that has an information transmission relationship with the slave node; establishing a direct link with the candidate slave node to transmit information with the candidate slave node via the direct link.
[0012] Through the above technical solution, a direct link is established between slave nodes based on a direct link request, and then information is transmitted through the direct link, which effectively reduces the network segment load, ensures the normal transmission of information, and improves the efficiency of information transmission.
[0013] In combination with the second aspect, in some possible implementations, the step of establishing a direct link with the candidate slave node includes: sending a first connection establishment request to the candidate slave node, and if a second connection establishment request sent by the candidate slave node is received, establishing a direct link with the candidate slave node; or if it is necessary to send transmission information to the candidate slave node, sending a third connection establishment request to the candidate slave node, and if a first connection confirmation message is received that is fed back by the candidate slave node based on the third connection establishment request, establishing a direct link with the candidate slave node; or if a fourth connection establishment request is received that is sent by the candidate slave node, feeding back a second connection confirmation message to the candidate slave node to establish a direct link with the candidate slave node.
[0014] In combination with the second aspect and the above-mentioned implementation methods, in some possible implementation methods, the step of transmitting information with the candidate slave node through the direct link includes: obtaining a first request sending time carried by the direct link request; sending the first request sending time and the first transmission information to the candidate slave node, triggering the candidate slave node to verify whether the first request sending time matches the target request sending time, and when the first request sending time matches the target request sending time, allowing the first transmission information to be received.
[0015] Through the above technical solution, when the candidate slave node is the receiver of the direct link, the first request sending time and the first transmission information are sent to the candidate slave node, triggering the candidate slave node to verify the first request sending time. Only if the verification is successful can the first transmission information be received. Through the verification based on the request sending time, the security of the direct link information transmission is improved.
[0016] In combination with the second aspect and the above-mentioned implementation methods, in some possible implementation methods, the step of transmitting information with the candidate slave node through the direct link includes: receiving a second request sending time sent by the candidate slave node, the second request sending time being the request sending time carried by the direct link establishment request sent by the master node and received by the candidate slave node; obtaining the first request sending time carried by the direct link request, and verifying whether the first request sending time matches the second request sending time; if the first request sending time matches the second request sending time, allowing the second transmission information sent by the candidate slave node to be received.
[0017] Through the above technical solution, when the candidate slave node is the sender of the direct link, the second transmission information and the second request sending time sent by the candidate slave node are received, and the second request sending time is verified. If the verification is successful, the second transmission information can be received. Through the verification based on the request sending time, the security of the direct link information transmission is improved.
[0018] In combination with the second aspect and the above-mentioned implementation methods, in some possible implementation methods, the step of obtaining candidate slave nodes that have an information transmission relationship with the slave node includes: obtaining associated slave nodes that have an information transmission relationship with the slave node; obtaining the priority of each associated slave node; and determining the associated slave nodes whose priorities among the associated slave nodes are higher than the preset priority as candidate slave nodes.
[0019] Through the above technical solution, among multiple associated slave nodes that have information transmission relationships with the slave node, the associated slave nodes with priorities higher than the preset priority are determined as candidate slave nodes, and the candidate slave nodes for establishing direct links are determined based on the priorities, thereby ensuring that important information can be transmitted first while reducing the network segment load.
[0020] In a third aspect, an information transmission device is provided, the device comprising:
[0021] A status detection unit, used to detect the operating status of the network segment between each slave node;
[0022] A first determining unit is used to determine a target node type of a target network segment home node of the target network segment if an operation abnormality of the target network segment is detected;
[0023] A second determining unit, configured to determine a target slave node corresponding to the target node type based on a correspondence between the node type and the slave node;
[0024] A third determining unit, configured to determine a candidate slave node having an information transmission relationship with the target slave node;
[0025] The request sending unit is used to send direct link establishment requests to the target slave node and the candidate slave node respectively, so that the target slave node and the candidate slave node establish a direct link based on the direct link establishment request, and transmit information between the target slave node and the candidate slave node through the direct link.
[0026] In a fourth aspect, an information transmission device is provided, the device comprising:
[0027] A request receiving unit, configured to receive a direct link establishment request sent by a master node;
[0028] A node acquisition unit, configured to acquire, based on a direct link establishment request, a candidate slave node having an information transmission relationship with the slave node;
[0029] The information transmission unit is used to establish a direct link with the candidate slave node to transmit information with the candidate slave node through the direct link.
[0030] In a fifth aspect, a computer device is provided, the computer device comprising: a memory for storing executable program code;
[0031] A processor is used to call and run executable program code from a memory to execute the method in the above-mentioned first aspect or any possible implementation manner of the first aspect.
[0032] In a sixth aspect, a computer program product is provided, which includes: a computer program code, which, when executed on a computer, enables the computer to execute the method in the first aspect or any possible implementation of the first aspect.
[0033] In the seventh aspect, a computer-readable storage medium is provided, which stores a computer program code. When the computer program code runs on a computer, the computer executes the method in the above-mentioned first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is a system architecture diagram of an information transmission method provided in an embodiment of the present application;
[0035] Figure 2 It is a flowchart of an information transmission method provided in an embodiment of the present application;
[0036] Figure 3 It is a flowchart of an information transmission method provided in an embodiment of the present application;
[0037] Figure 4 This is an example schematic diagram of a master-slave architecture provided in an embodiment of the present application;
[0038] Figure 5 It is a flowchart of an information transmission method provided in an embodiment of the present application;
[0039] Figure 6 It is a flowchart of an information transmission method provided in an embodiment of the present application;
[0040] Figure 7 It is a flowchart of an information transmission method provided in an embodiment of the present application;
[0041] Figure 8 is a structural schematic diagram of an information transmission device provided in an embodiment of the present application;
[0042] Fig. 9 is a structural schematic diagram of an information transmission device provided in an embodiment of the present application;
[0043] Fig.10 is a structural schematic diagram of a computer device provided in an embodiment of the present application;
[0044] Fig.11It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0045] The technical solution in the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B: "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0046] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.
[0047] See also Figure 1 , Figure 1 is a system architecture diagram of an information transmission method provided in an embodiment of the present application. Figure 1 As shown, the information transmission method provided in the embodiment of the present application is applicable to the master-slave architecture in the network bus topology. The network bus topology connects all nodes to a bus so that the information sent by one node can be received by all other nodes. The master-slave architecture in the embodiment of the present application is a master-multiple-slave structure, that is, a master node and multiple slave nodes, which can be applied to the electronic and electrical architecture of the vehicle. In this master-slave architecture, slave node 1 and slave node 2 are in the same network segment, and the information transmission between the two does not need to pass through the master node, but slave node 2 and slave node 3 are in different network segments. When slave node 2 wants to send information to slave node 3, it first needs to send the information to the master node, which packages the information and forwards it to slave node 3. When the gateway of the master node is damaged or the network segment where slave node 2 and slave node 3 are located is overloaded, the information transmission between slave node 2 and slave node 3 will fail. By adopting the information transmission method provided in the embodiment of the present application, when it is detected that the gateway of the master node is damaged or the network segment load of the slave node is too high, a direct link establishment request is sent to the slave node, and a direct link is established between the slave nodes without passing through the gateway, thereby reducing the network segment load and ensuring the normal transmission of information between nodes.
[0048] based on Figure 1 The system architecture diagram shown below will be combined with Figure 2-Figure 6 , the information transmission method provided in the embodiment of the present application is introduced in detail.
[0049] See also Figure 2, which is a flow chart of an information transmission method provided in an embodiment of the present application. Figure 2 As shown, the embodiment of the present application describes the specific process of the information transmission method from the master node side, including the following steps S101-S105.
[0050] S101, detecting the operation status of the network segment between each slave node;
[0051] Specifically, in the master-slave architecture of the network bus topology, the gateway, as the master node, will detect the operating status of the network segment between each slave node in real time. The gateway is a computer system or device used to forward information. When information is transmitted between two slave nodes in different network segments, the sending slave node must first send the transmission information to the gateway, which will package the transmission information and forward it to the receiving slave node.
[0052] S102, if it is detected that there is an operation abnormality of the target network segment, determine the target node type of the target network segment belonging node of the target network segment;
[0053] Specifically, when an abnormal operation of the target network segment is detected, the target node type of the target network segment belonging node of the target network segment is determined. If the gateway is damaged, the target network segment is the network segment where the gateway is located, that is, the target network segment belongs to the master node, and the target node type is the master node type. If the network segment load is too high when the slave node transmits information, it is specifically necessary to detect whether the load of the sender's slave node network segment is too high or the load of the receiver's slave node network segment is too high. If the load of the sender's slave node network segment is too high, the target network segment is the network segment where the sender's slave node is located, that is, the target network segment belongs to the sender's slave node, and the target node type is the slave node type; if the load of the receiver's slave node network segment is too high, the target network segment is the network segment where the receiver's slave node is located, that is, the target network segment belongs to the receiver's slave node, and the target node type is the slave node type.
[0054] S103, determining a target slave node corresponding to the target node type based on the correspondence between the node type and the slave node;
[0055] Specifically, based on the correspondence between the node type and the slave node, the target slave node corresponding to the target node type is determined. Since the gateway is the master node, the damage to the gateway will affect the information transmission between all slave nodes. Therefore, when the target node type is the master node type, the corresponding target slave node is each slave node in the master-slave architecture; if the slave node causes the network segment load to be too high when transmitting information, it will not affect other slave nodes. Therefore, when the target node type is the slave node type, the corresponding target slave node is the sender slave node or the receiver slave node. If the sender slave node network segment load is too high, the target slave node is the sender slave node; if the receiver slave node network segment load is too high, the target slave node is the receiver slave node.
[0056] S104, determining a candidate slave node that has an information transmission relationship with the target slave node;
[0057] Specifically, determine the candidate slave nodes that have an information transmission relationship with the target slave node. If the target node type is a master node, the target slave node is each slave node. Since each slave node can have an information transmission relationship with the master node, the candidate slave node is also each slave node. If the target node type is a slave node, the target slave node is a sending slave node or a receiving slave node that is currently transmitting information. If the network segment load of the sending slave node is too high, the target slave node is a sending slave node, and the candidate slave node is a receiving slave node that has an information transmission relationship with the sending slave node; if the network segment load of the receiving slave node is too high, the target slave node is a receiving slave node, and the candidate slave node is a sending slave node that has an information transmission relationship with the receiving slave node.
[0058] S105 , sending direct link establishment requests to the target slave node and the candidate slave node respectively, so that the target slave node and the candidate slave node establish a direct link based on the direct link establishment request, and transmit information between the target slave node and the candidate slave node through the direct link.
[0059] Specifically, the target slave node and the candidate slave node are both slave nodes that have a need to establish a direct link, and the master node sends a direct link establishment request to the target slave node and the candidate slave node respectively, so that the target slave node and the candidate slave node can establish a direct link based on the direct link establishment request, and transmit information between the target slave node and the candidate slave node through the direct link. The direct link request is specifically a fault alarm signal, which notifies the target slave node and the candidate slave node that a direct link can be established to directly transmit information.
[0060] In an embodiment of the present application, by detecting the operating status of the network segment between the master node and each slave node, the target network segment with abnormal operation is obtained, the target node type of the target network segment to which the target network segment belongs is determined, and based on the corresponding relationship between the node type and the slave node, the target slave node corresponding to the target node type is determined, and the candidate slave node that has an information transmission relationship with the target slave node is determined, and a direct link establishment request is sent to the target slave node and the candidate slave node respectively, so that the target slave node and the candidate slave node establish a direct link based on the direct link establishment request, and information is transmitted between the target slave node and the candidate slave node through the direct link. In an embodiment of the present application, information transmission does not need to go through the master node, but only needs to be transmitted through the direct link, which reduces the network segment load and ensures the normal transmission of information between nodes.
[0061] See also Figure 3 , which is a flow chart of an information transmission method provided in an embodiment of the present application. Figure 3As shown, the embodiment of the present application describes the specific process of the information transmission method from the master node side, including the following steps S201-S207.
[0062] S201, detecting the operation status of the network segment between each slave node;
[0063] Specifically, in the master-slave architecture of the network bus topology, the gateway, as the master node, will detect the operating status of the network segment between each slave node in real time. The gateway is a computer system or device used to forward information. When information is transmitted between two slave nodes in different network segments, the sending slave node must first send the transmission information to the gateway, which will package the transmission information and forward it to the receiving slave node.
[0064] See also Figure 4 , which provides an example schematic diagram of a master-slave architecture for an embodiment of the present application. Figure 4 As shown in the figure, taking the electronic and electrical architecture in a vehicle as an example, in the electronic and electrical architecture of a vehicle, the gateway is used as the information forwarder, i.e. the master node, and the electronic control unit (ECU) in the vehicle is used as the slave node, which is distributed on the controller area network (CAN). The ECU includes functional modules such as the intelligent cockpit module (HUT), the telematics box (T-BOX), and the transmission control unit (TCU). When the T-BOX wants to send information to the TCU, since the T-BOX and the TCU are in different CAN segments, the information transmission between the T-BOX and the TCU must be forwarded by the gateway, which packages the information and then sends it to the TCU.
[0065] S202, if it is detected that there is an operation abnormality of the target network segment, determine the target node type of the target network segment home node of the target network segment;
[0066] Specifically, when an abnormal operation of the target network segment is detected, the target node type of the target network segment belonging node of the target network segment is determined. If the gateway is damaged, the target network segment is the network segment where the gateway is located, that is, the target network segment belongs to the master node, and the target node type is the master node type. If the network segment load is too high when the slave node transmits information, it is specifically necessary to detect whether the load of the sender's slave node network segment is too high or the load of the receiver's slave node network segment is too high. If the load of the sender's slave node network segment is too high, the target network segment is the network segment where the sender's slave node is located, that is, the target network segment belongs to the sender's slave node, and the target node type is the slave node type; if the load of the receiver's slave node network segment is too high, the target network segment is the network segment where the receiver's slave node is located, that is, the target network segment belongs to the receiver's slave node, and the target node type is the slave node type.
[0067] like Figure 4 As shown, if T-BOX wants to send information to TCU of another network segment, when it is detected that the network segment where the gateway is located is abnormal, it can be considered that the gateway is damaged, and the target network segment belongs to the main node; when it is detected that the load of the network segment where T-BOX is located is too high, the target network segment belongs to the node T-BOX; when it is detected that the load of the network segment where TCU is located is too high, the target network segment belongs to the node TCU.
[0068] S203, if the target node type is a master node type, each slave node is determined as a target slave node;
[0069] Specifically, based on the correspondence between the node type and the slave node, the target slave node corresponding to the target node type is determined. Since the gateway is the master node, damage to the gateway will affect the information transmission between all slave nodes. Therefore, when the target node type is the master node type, the corresponding target slave node is each slave node on the master-slave architecture.
[0070] like Figure 4 As shown in Figure 3, if the gateway is damaged, it will affect the information transmission between all ECUs. Therefore, the target slave nodes are all ECUs.
[0071] S204, if the target node type is a slave node type, determining the target network segment home node as the target slave node;
[0072] Specifically, based on the correspondence between the node type and the slave node, the target slave node corresponding to the target node type is determined. If the network segment load is too high when the slave node transmits information, it will not affect other slave nodes. Therefore, when the target node type is a slave node type, the corresponding target slave node is a sender slave node or a receiver slave node. If the network segment load of the sender slave node is too high, the target slave node is the sender slave node; if the network segment load of the receiver slave node is too high, the target slave node is the receiver slave node.
[0073] like Figure 4As shown, when T-BOX wants to send information to TCU of another network segment, after detection, if the network segment load of T-BOX is too high, the target slave node is T-BOX; if the network segment load of TCU is too high, the target slave node is TCU.
[0074] S205, determining a candidate slave node that has an information transmission relationship with the target slave node;
[0075] Specifically, determine the candidate slave nodes that have an information transmission relationship with the target slave node. If the target node type is a master node, the target slave node is each slave node. Since each slave node can have an information transmission relationship with the master node, the candidate slave nodes are also each slave node. Figure 4 As shown, when the gateway is damaged, the target slave nodes are HUT, T-BOX and TCU, and the candidate slave nodes are HUT, T-BOX and TCU.
[0076] If the target node type is a slave node, the target slave node is a sending slave node or a receiving slave node that is transmitting information. If the network load of the sending slave node is too high, the target slave node is a sending slave node, and the candidate slave node is a receiving slave node that has an information transmission relationship with the sending slave node. If the network load of the receiving slave node is too high, the target slave node is a receiving slave node, and the candidate slave node is a sending slave node that has an information transmission relationship with the receiving slave node. Figure 4 As shown, when T-BOX wants to send information to TCU of another network segment, after detection, if the network segment load of T-BOX is too high, the target slave node is T-BOX and the candidate slave node is TCU; if the network segment load of TCU is too high, the target slave node is TCU and the candidate slave node is T-BOX.
[0077] S206, sending a direct link establishment request to the target slave node and the candidate slave node respectively, triggering the target slave node and the candidate slave node to establish a direct link;
[0078] Specifically, the current time is obtained, the current time is determined as the request sending time, the request sending time is added to the direct link establishment request, and the direct link establishment requests are respectively sent to the target slave node and the candidate slave node, triggering the target slave node and the candidate slave node to directly establish a direct link. Among them, the direct link request is specifically a fault alarm signal, and the fault alarm signal is used to notify the target slave node and the candidate slave node that a direct link can be established to directly transmit information. The request sending time is used for identity authentication in the direct link. Since the direct link has unstable factors, the information transmission between nodes is unsafe. Therefore, the request sending time is used for verification in the direct link.
[0079] S207, sending direct link establishment requests to the target slave node and the candidate slave node respectively, and establishing the direct link when the target slave node and the candidate slave node perform information transmission.
[0080] Specifically, the current time is obtained, the current time is determined as the request sending time, the request sending time is added to the direct link establishment request, and direct link establishment requests are respectively sent to the target slave node and the candidate slave node. When the target slave node and the candidate slave node transmit information, a direct link is established. Among them, the direct link request is specifically a fault alarm signal, and the fault alarm signal is used to notify the target slave node and the candidate slave node that a direct link can be established to directly transmit information. The request sending time is used for identity authentication in the direct link. Since there are unstable factors in the direct link, the information transmission between nodes is unsafe. Therefore, verification is performed in the direct link through the request sending time.
[0081] In an embodiment of the present application, by detecting the operating status of the network segment between the master node and each slave node, the target network segment with abnormal operation is obtained, and the target node type of the target network segment's target network segment's belonging node is determined. If the target node type is the master node type, each slave node is determined as a target slave node. If the target node type is the slave node type, the target network segment's belonging node is determined as the target slave node. The candidate slave node that has an information transmission relationship with the target slave node is determined, and a direct link establishment request is sent to the target slave node and the candidate slave node respectively, so that the target slave node and the candidate slave node directly establish a direct link based on the direct link establishment request, or establish a direct link when information is transmitted. The embodiment of the present application does not need to go through the master node, but only needs to transmit information through the direct link, which reduces the network segment load and ensures the normal transmission of information between nodes. When sending the direct link establishment request, the request sending time is added to the direct link establishment request, thereby improving the security of both parties of the direct link.
[0082] See also Figure 5 , which is a flow chart of an information transmission method provided in an embodiment of the present application. Figure 5 As shown, the embodiment of the present application describes the specific process of the information transmission method from the node side, including the following steps S301-S303.
[0083] S301, receiving a direct link establishment request sent by a master node;
[0084] Specifically, the slave node receives a direct link establishment request sent by the master node, where the direct link establishment request is specifically a fault alarm signal. The fault alarm signal is used to notify the target slave node and the candidate slave node that a direct link can be established to directly transmit information, that is, the direct link establishment request is used to notify the slave node that it has the right to establish a direct link.
[0085] S302, based on the direct link establishment request, obtaining a candidate slave node that has an information transmission relationship with the slave node;
[0086] Specifically, based on the direct link request, the slave node can obtain a candidate slave node with which it has an information transmission relationship. When the direct link request is sent from the master node to all slave nodes, all slave nodes can have an information transmission relationship with each slave node, so the candidate slave node is each slave node; when the direct link request is sent from the master node to a specified slave node, the candidate slave node is the slave node that currently has an information transmission relationship with the specified slave node.
[0087] S303: Establish a direct link with the candidate slave node to transmit information with the candidate slave node through the direct link.
[0088] Specifically, the slave node can establish a direct link with the candidate slave node based on the direct link establishment request to transmit information with the candidate slave node through the direct link. The slave node and the candidate slave node can directly establish a direct link when receiving the direct link establishment request, or can establish a direct link when information transmission is required.
[0089] In an embodiment of the present application, a slave node receives a direct link establishment request sent by a master node, obtains a candidate slave node with which an information transmission relationship exists based on the direct link establishment request, establishes a direct link with the candidate slave node, and transmits information with the candidate slave node through the direct link. When the gateway is damaged or the load is too high, the slave nodes can directly transmit information by establishing a direct link, which effectively reduces the network segment load, ensures the normal transmission of information, and improves the efficiency of information transmission.
[0090] See also Figure 6 , which is a flow chart of an information transmission method provided in an embodiment of the present application. Figure 6 As shown, the embodiment of the present application describes the specific process of the information transmission method from the node side, including the following steps S401-S407.
[0091] S401, receiving a direct link establishment request sent by a master node;
[0092] Specifically, the slave node receives a direct link establishment request sent by the master node, where the direct link establishment request is specifically a fault alarm signal. The fault alarm signal is used to notify the target slave node and the candidate slave node that a direct link can be established to directly transmit information, that is, the direct link establishment request is used to notify the slave node that it has the right to establish a direct link.
[0093] S402, based on the direct link establishment request, obtaining an associated slave node having an information transmission relationship with the slave node;
[0094] Specifically, based on the direct link establishment request, the associated slave nodes that have an information transmission relationship with the slave node are obtained, and the associated slave nodes are all slave nodes that can transmit information with the slave node. In the master-slave architecture, when the gateway is damaged, all slave nodes will receive a direct link establishment request, and each slave node has an information transmission relationship with all slave nodes, and the associated slave nodes are each slave node; when the load is too high, the slave node to which the overloaded network segment belongs and the slave node that is currently transmitting information with the slave node will receive a direct link establishment request. If there are multiple slave nodes that are currently transmitting information with the slave node to which the overloaded network segment belongs, then these multiple slave nodes are all associated slave nodes.
[0095] S403, obtaining the priority of each associated slave node, and determining the associated slave nodes whose priorities are higher than the preset priorities among the associated slave nodes as candidate slave nodes;
[0096] Specifically, not all information between slave nodes needs to be transmitted through a direct link. Therefore, the priority of each associated slave node is obtained, and the importance of the transmitted information is determined based on the priority. The associated slave nodes with a priority higher than the preset priority are determined as candidate slave nodes so that important information is transmitted first. The setting of the preset priority depends on the load of the master-slave architecture.
[0097] S404, sending a first connection establishment request to the candidate slave node, and if receiving a second connection establishment request sent by the candidate slave node, establishing a direct link with the candidate slave node;
[0098] Specifically, the slave node and the candidate slave node can interact directly when receiving a direct link request, and send a first connection establishment request to the candidate slave node. If a second connection establishment request sent by the candidate slave node is received, that is, the slave nodes send connection establishment requests to each other at the same time, a direct link with the candidate slave node can be established even without information transmission.
[0099] S405: if it is necessary to send transmission information to the candidate slave node, send a third connection establishment request to the candidate slave node, and if a first connection confirmation message fed back by the candidate slave node based on the third connection establishment request is received, establish a direct link with the candidate slave node;
[0100] Specifically, the slave node and the candidate slave node can also establish a direct link when information transmission is required. When the candidate slave node is the receiving slave node, the sending slave node sends a third connection establishment request to the candidate slave node. When the candidate slave node receives the third connection establishment request, it feeds back a first connection confirmation message to the sending slave node, and the direct link between the sending slave node and the candidate slave node is established.
[0101] S406, obtaining a first request sending time carried in the direct link request;
[0102] Specifically, after the direct link between the nodes is established, information can be transmitted through the direct link. First, the sender obtains the first request sending time carried by the direct link request from the node, and uses the first request sending time to verify both parties of the direct link.
[0103] S407, sending the first request sending time and the first transmission information to the candidate slave node, triggering the candidate slave node to verify whether the first request sending time matches the target request sending time, and allowing the first transmission information to be received when the first request sending time matches the target request sending time.
[0104] Specifically, when information is transmitted, the sending slave node sends a first request transmission time and a first transmission information to the candidate slave node. The first transmission information is the transmission information that the sending slave node wants to send to the candidate slave node, triggering the candidate slave node to verify the first request transmission time. When the first request transmission time is verified, it is allowed to receive the first transmission information and verify the first transmission information. If the verification is passed, it is considered that the information transmission of both parties of the direct link is completed. The specific verification process is that the sending slave node encrypts the first transmission information through a fixed encryption algorithm using the additional value verification logic to obtain a fixed additional value, combines the first request transmission time with the fixed additional value, and sends them to the candidate slave node together. The candidate slave node preferentially receives the first request transmission time and matches it with the target request transmission time in the direct link connection request received by itself. The target request transmission time is the request transmission time carried by the direct link establishment request sent by the master node and received by the candidate slave node. If the match is successful, that is, the first request transmission time is equal to the target request transmission time, then the verification is passed, the candidate slave node receives the fixed additional value, and uses its own key to decrypt the fixed additional value to obtain the first transmission information.
[0105] In an embodiment of the present application, a slave node receives a direct link establishment request sent by a master node, obtains an associated slave node with an information transmission relationship with the slave node based on the direct link establishment request, obtains the priority of each associated slave node, determines an associated slave node with a priority higher than a preset priority among the associated slave nodes as a candidate slave node, directly establishes a direct link with the candidate slave node, or establishes a direct link when information needs to be transmitted, and when the candidate slave node is a receiving slave node, obtains the first request sending time carried by the direct link request, sends the first request sending time and the first transmission information to the candidate slave node, triggers the candidate slave node to verify whether the first request sending time matches the target request sending time, and when the first request sending time matches the target request sending time, allows the first transmission information to be received. Determining the candidate slave node for establishing a direct link based on priority ensures that important information can be transmitted first, while reducing the network segment load. When transmitting information, the first request sending time and the first transmission information are sent to the candidate slave node, triggering the candidate slave node to verify the first request sending time, and only if the verification is passed can the first transmission information be received, and the security of direct link information transmission is improved by verification based on the request sending time.
[0106] See also Figure 7 , which is a flow chart of an information transmission method provided in an embodiment of the present application. Figure 7 As shown, the embodiment of the present application describes the specific process of the information transmission method from the node side, including the following steps S501-S508.
[0107] S501, receiving a direct link establishment request sent by a master node;
[0108] For specific steps, please refer to S401, which will not be repeated here.
[0109] S502, based on the direct link establishment request, obtaining an associated slave node that has an information transmission relationship with the slave node;
[0110] For specific steps, please refer to S402, which will not be repeated here.
[0111] S503, obtaining the priority of each associated slave node, and determining the associated slave nodes whose priorities are higher than the preset priorities among the associated slave nodes as candidate slave nodes;
[0112] For specific steps, please refer to S403, which will not be described again here.
[0113] S504, sending a first connection establishment request to the candidate slave node, and if receiving a second connection establishment request sent by the candidate slave node, establishing a direct link with the candidate slave node;
[0114] For specific steps, please refer to S404, which will not be described again here.
[0115] S505, if a fourth connection establishment request sent by the candidate slave node is received, feeding back a second connection confirmation message to the candidate slave node to establish a direct link with the candidate slave node;
[0116] Specifically, the slave node and the candidate slave node can also establish a direct link when information transmission is required. When the candidate slave node is a sending slave node, the candidate slave node sends a fourth connection establishment request to the receiving slave node. After the receiving slave node receives the fourth connection establishment request, it feeds back a second connection confirmation message to the candidate slave node, and the direct link between the candidate slave node and the receiving slave node is established.
[0117] S506, receiving a second request sending time sent by the candidate slave node, where the second request sending time is the request sending time carried in the direct link establishment request sent by the master node and received by the candidate slave node;
[0118] Specifically, after the direct link between the slave nodes is established, when information is transmitted, the receiving slave node receives the second request sending time sent by the candidate slave node, and performs verification based on the second request sending time. The second request sending time is the request sending time carried by the direct link establishment request sent by the master node and received by the candidate slave node.
[0119] S507, obtaining a first request sending time carried in the direct link request, and verifying whether the first request sending time matches the second request sending time;
[0120] Specifically, the receiving slave node obtains the first request sending time carried by the direct link request, and matches the first request sending time with the second request sending time sent by the candidate slave node. If the match is successful, that is, the first request sending time is equal to the second request sending time, the verification is successful.
[0121] S508: If the first request sending time matches the second request sending time, allowing reception of the second transmission information sent by the candidate slave node.
[0122] Specifically, if the verification of the request sending time passes, the receiving slave node is allowed to receive the second transmission information sent by the candidate slave node, and the second transmission information is verified. The second transmission information is the transmission information sent by the candidate slave node to the receiving slave node. If the verification passes, it is considered that the information transmission between the two parties of the direct link is completed. The specific verification process is that the candidate slave node encrypts the second transmission information through a fixed encryption algorithm using the additional value verification logic to obtain a fixed additional value, combines the second request sending time with the fixed additional value, and sends them to the receiving slave node together. The receiving slave node preferentially receives the second request sending time and matches it with the first request sending time in the direct link connection request received by itself. If the match is successful, that is, the first request sending time is equal to the second request sending time, then the verification passes, and the receiving slave node receives the fixed additional value, and uses its own key to decrypt the fixed additional value to obtain the second transmission information.
[0123] In an embodiment of the present application, a slave node receives a direct link establishment request sent by a master node, obtains an associated slave node with an information transmission relationship with the slave node based on the direct link establishment request, obtains the priority of each associated slave node, determines the associated slave node with a priority higher than a preset priority among the associated slave nodes as a candidate slave node, directly establishes a direct link with the candidate slave node, or establishes a direct link when information needs to be transmitted, and when the candidate slave node is a sender slave node, sends a second request sending time to the receiver slave node, and the receiver slave node obtains the first request sending time carried by the direct link request, verifies whether the first request sending time matches the second request sending time, and if the first request sending time matches the second request sending time, allows the reception of the second transmission information sent by the candidate slave node. The candidate slave node for establishing a direct link is determined based on the priority, ensuring that important information can be transmitted first, while reducing the network segment load. When transmitting information, the second transmission information and the second request sending time sent by the candidate slave node are received, and the second request sending time is verified. If the verification is successful, the second transmission information can be received, and the security of direct link information transmission is improved by verification based on the request sending time.
[0124] based on Figure 1 The system architecture will be combined with Figure 8 , the information transmission device provided in the embodiment of the present application is introduced in detail. It should be noted that, Figure 8 An information transmission device for executing this application Figure 2-Figure 4 For the convenience of explanation, only the part related to the embodiment of the present application is shown. For the specific technical details not disclosed, please refer to the present application. Figure 2-Figure 4 The embodiment shown.
[0125] See also Figure 8 , Figure 8 Schematic diagram of the structure of an information transmission device provided in an embodiment of the present application. Figure 8 As shown, the information transmission device 1 of the embodiment of the present application may include: a state detection unit 11, a first determination unit 12, a second determination unit 13, a third determination unit 14 and a request sending unit 15.
[0126] A status detection unit 11, used to detect the operating status of the network segment between each slave node;
[0127] A first determining unit 12 is configured to determine a target node type of a target network segment home node of the target network segment if an operation abnormality of the target network segment is detected;
[0128] A second determining unit 13, configured to determine a target slave node corresponding to the target node type based on a correspondence between the node type and the slave node;
[0129] A third determining unit 14 is used to determine a candidate slave node that has an information transmission relationship with the target slave node;
[0130] The request sending unit 15 is used to send direct link establishment requests to the target slave node and the candidate slave node respectively, so that the target slave node and the candidate slave node establish a direct link based on the direct link establishment request, and transmit information between the target slave node and the candidate slave node through the direct link.
[0131] Optionally, the second determining unit 13 is specifically configured to determine each slave node as a target slave node if the target node type is a master node type;
[0132] If the target node type is a slave node type, the target network segment belonging node is determined as the target slave node.
[0133] Optionally, the request sending unit 15 is specifically used to send a direct link establishment request to the target slave node and the candidate slave node respectively, triggering the target slave node and the candidate slave node to establish a direct link; or
[0134] A direct link establishment request is sent to the target slave node and the candidate slave node respectively, and a direct link is established when the target slave node and the candidate slave node transmit information.
[0135] Optionally, the request sending unit 15 is specifically used to obtain the current time and determine the current time as the request sending time;
[0136] The request sending time is added to the direct link establishment request, and the direct link establishment request is sent to the target slave node and the candidate slave node respectively, so that the target slave node or the candidate slave node determines whether to receive the transmission information based on the request sending time.
[0137] In an embodiment of the present application, by detecting the operating status of the network segment between the master node and each slave node, the target network segment with abnormal operation is obtained, and the target node type of the target network segment's target network segment's belonging node is determined. If the target node type is the master node type, each slave node is determined as a target slave node. If the target node type is the slave node type, the target network segment's belonging node is determined as the target slave node. The candidate slave node that has an information transmission relationship with the target slave node is determined, and a direct link establishment request is sent to the target slave node and the candidate slave node respectively, so that the target slave node and the candidate slave node directly establish a direct link based on the direct link establishment request, or establish a direct link when information is transmitted. The embodiment of the present application does not need to go through the master node, but only needs to transmit information through the direct link, which reduces the network segment load and ensures the normal transmission of information between nodes. When sending the direct link establishment request, the request sending time is added to the direct link establishment request, thereby improving the security of both parties of the direct link.
[0138] based on Figure 1 The system architecture will be combined with Fig. 9 , the information transmission device provided in the embodiment of the present application is introduced in detail. It should be noted that, Fig. 9 An information transmission device for executing this application Figure 5-Figure 7 For the convenience of explanation, only the part related to the embodiment of the present application is shown. For the specific technical details not disclosed, please refer to the present application. Figure 5-Figure 7 The embodiment shown.
[0139] See also Fig. 9 , Fig. 9 Schematic diagram of the structure of an information transmission device provided in an embodiment of the present application. Fig. 9 As shown, the information transmission device 2 of the embodiment of the present application may include: a request receiving unit 21, a node acquisition unit 22 and an information transmission unit 23.
[0140] A request receiving unit 21, configured to receive a direct link establishment request sent by a master node;
[0141] A node acquisition unit 22, configured to acquire, based on a direct link establishment request, a candidate slave node having an information transmission relationship with the slave node;
[0142] The information transmission unit 23 is used to establish a direct link with the candidate slave node to transmit information with the candidate slave node through the direct link.
[0143] Optionally, the information transmission unit 23 is specifically configured to send a first connection establishment request to the candidate slave node, and if a second connection establishment request sent by the candidate slave node is received, establish a direct link with the candidate slave node; or
[0144] If it is necessary to send transmission information to the candidate slave node, a third connection establishment request is sent to the candidate slave node, and if a first connection confirmation message fed back by the candidate slave node based on the third connection establishment request is received, a direct link with the candidate slave node is established; or
[0145] If the fourth connection establishment request sent by the candidate slave node is received, a second connection confirmation message is fed back to the candidate slave node to establish a direct link with the candidate slave node.
[0146] Optionally, the information transmission unit 23 is specifically used to obtain the first request sending time carried by the direct link request;
[0147] A first request sending time and a first transmission information are sent to the candidate slave node, triggering the candidate slave node to verify whether the first request sending time matches the target request sending time, and allowing the first transmission information to be received when the first request sending time matches the target request sending time.
[0148] Optionally, the information transmission unit 23 is specifically configured to receive a second request sending time sent by the candidate slave node, where the second request sending time is the request sending time carried in the direct link establishment request sent by the master node and received by the candidate slave node;
[0149] Obtaining a first request sending time carried in the direct link request, and verifying whether the first request sending time matches the second request sending time;
[0150] If the first request sending time matches the second request sending time, receiving the second transmission information sent by the candidate slave node is allowed.
[0151] Optionally, the node acquisition unit 22 is specifically used to acquire an associated slave node that has an information transmission relationship with the slave node;
[0152] Get the priority of each associated slave node;
[0153] An associated slave node having a priority higher than a preset priority among the associated slave nodes is determined as a candidate slave node.
[0154] In an embodiment of the present application, a slave node receives a direct link establishment request sent by a master node, obtains associated slave nodes that have an information transmission relationship with the slave node based on the direct link establishment request, obtains the priority of each associated slave node, determines the associated slave nodes whose priorities are higher than the preset priorities among the associated slave nodes as candidate slave nodes, directly establishes a direct link with the candidate slave node, or establishes a direct link when information needs to be transmitted, and when the candidate slave node is a receiving slave node, obtains a first request sending time carried by the direct link request, sends the first request sending time and the first transmission information to the candidate slave node, triggers the candidate slave node to verify whether the first request sending time matches the target request sending time, and when the first request sending time matches the target request sending time, allows the first transmission information to be received; when the candidate slave node is a sending slave node, sends a second request sending time to the receiving slave node, and the receiving slave node obtains the first request sending time carried by the direct link request, verifies whether the first request sending time matches the second request sending time, and if the first request sending time matches the second request sending time, allows the second transmission information sent by the candidate slave node to be received. The candidate slave nodes for establishing direct links are determined based on priority, ensuring that important information can be transmitted first while reducing the network segment load. During information transmission, the security of direct link information transmission is improved through verification based on the request sending time.
[0155] See also Fig.10 , Fig.10 It is a structural diagram of a computer device provided in an embodiment of the present application.
[0156] For example, Fig.10 As shown, the computer device 1000 includes: a processor 1001 and a memory 1002, wherein the processor 1001 is electrically connected to the memory 1002.
[0157] The processor 1001 is the control center of the computer device 1000 and may include one or more processing cores. The processor 1001 uses various interfaces and lines to connect various parts of the entire computer device, and executes various functions of the computer device and processes data by running or calling computer programs stored in the memory 1002, and calling data stored in the memory 1002, so as to control the computer device 1000 as a whole. Optionally, the processor 1001 can be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor 1001 can integrate one or a combination of CPU, graphics processing unit (GPU), modem, etc. Among them, the CPU mainly processes the operating system, user pages, and applications; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 1001, but may be implemented separately through a communication chip.
[0158] The memory 1002 can be used to store software programs and modules, and the processor 1001 executes various functional applications and data processing by running the computer programs and modules stored in the memory 1002. The memory 1002 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, a computer program required for at least one function, etc.; the data storage area can store data created according to the use of the computer device 1000, etc.
[0159] In addition, the memory 1002 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. Accordingly, the memory 1002 may also include a memory controller to provide the processor 1001 with access to the memory 1002.
[0160] In this embodiment, the processor 1001 in the computer device 1000 loads instructions corresponding to the processes of one or more computer programs into the memory 1002 according to the following steps, and the processor 1001 runs the computer program stored in the memory 1002, thereby realizing various functions, as follows:
[0161] Detect the operating status of the network segment between each slave node;
[0162] If an operation abnormality of the target network segment is detected, determining a target node type of a target network segment belonging node of the target network segment;
[0163] Based on the correspondence between the node type and the slave node, determine the target slave node corresponding to the target node type;
[0164] Determine a candidate slave node that has an information transmission relationship with the target slave node;
[0165] A direct link establishment request is sent to the target slave node and the candidate slave node respectively, so that the target slave node and the candidate slave node establish a direct link based on the direct link establishment request, and information is transmitted between the target slave node and the candidate slave node through the direct link.
[0166] Optionally, when the processor 1001 determines the target slave node corresponding to the target node type based on the correspondence between the node type and the slave node, it specifically executes:
[0167] If the target node type is a master node type, each slave node is determined as a target slave node;
[0168] If the target node type is a slave node type, the target network segment belonging node is determined as the target slave node.
[0169] Optionally, when the processor 1001 sends a direct link establishment request to the target slave node and the candidate slave node respectively so that the target slave node and the candidate slave node establish a direct link based on the direct link establishment request, specifically executes:
[0170] Sending a direct link establishment request to the target slave node and the candidate slave node respectively, triggering the target slave node and the candidate slave node to establish a direct link; or
[0171] A direct link establishment request is sent to the target slave node and the candidate slave node respectively, and a direct link is established when the target slave node and the candidate slave node transmit information.
[0172] Optionally, when executing sending direct link establishment requests to the target slave node and the candidate slave node respectively, the processor 1001 specifically executes:
[0173] Get the current time and set it as the request sending time;
[0174] The request sending time is added to the direct link establishment request, and the direct link establishment request is sent to the target slave node and the candidate slave node respectively, so that the target slave node or the candidate slave node determines whether to receive the transmission information based on the request sending time.
[0175] In an embodiment of the present application, by detecting the operating status of the network segment between the master node and each slave node, the target network segment with abnormal operation is obtained, and the target node type of the target network segment's target network segment's belonging node is determined. If the target node type is the master node type, each slave node is determined as a target slave node. If the target node type is the slave node type, the target network segment's belonging node is determined as the target slave node. The candidate slave node that has an information transmission relationship with the target slave node is determined, and a direct link establishment request is sent to the target slave node and the candidate slave node respectively, so that the target slave node and the candidate slave node directly establish a direct link based on the direct link establishment request, or establish a direct link when information is transmitted. The embodiment of the present application does not need to go through the master node, but only needs to transmit information through the direct link, which reduces the network segment load and ensures the normal transmission of information between nodes. When sending the direct link establishment request, the request sending time is added to the direct link establishment request, thereby improving the security of both parties of the direct link.
[0176] See also Fig.10 , Fig.10 It is a structural diagram of a computer device provided in an embodiment of the present application.
[0177] For example, Fig.10 As shown, the computer device 1000 includes: a processor 1001 and a memory 1002, wherein the processor 1001 is electrically connected to the memory 1002.
[0178] The processor 1001 is the control center of the computer device 1000 and may include one or more processing cores. The processor 1001 uses various interfaces and lines to connect various parts of the entire computer device, and executes various functions of the computer device and processes data by running or calling computer programs stored in the memory 1002, and calling data stored in the memory 1002, so as to control the computer device 1000 as a whole. Optionally, the processor 1001 can be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor 1001 can integrate one or a combination of CPU, graphics processing unit (GPU), modem, etc. Among them, the CPU mainly processes the operating system, user pages, and applications; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 1001, but may be implemented separately through a communication chip.
[0179] The memory 1002 can be used to store software programs and modules, and the processor 1001 executes various functional applications and data processing by running the computer programs and modules stored in the memory 1002. The memory 1002 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, a computer program required for at least one function, etc.; the data storage area can store data created according to the use of the computer device 1000, etc.
[0180] In addition, the memory 1002 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. Accordingly, the memory 1002 may also include a memory controller to provide the processor 1001 with access to the memory 1002.
[0181] In this embodiment, the processor 1001 in the computer device 1000 loads instructions corresponding to the processes of one or more computer programs into the memory 1002 according to the following steps, and the processor 1001 runs the computer program stored in the memory 1002, thereby realizing various functions, as follows:
[0182] Receive a direct link establishment request sent by the master node;
[0183] Based on the direct link establishment request, obtaining a candidate slave node having an information transmission relationship with the slave node;
[0184] A direct link with the candidate slave node is established to transmit information with the candidate slave node through the direct link.
[0185] Optionally, when executing to establish a direct link with the candidate slave node, the processor 1001 specifically executes:
[0186] Sending a first connection establishment request to the candidate slave node, and if receiving a second connection establishment request sent by the candidate slave node, establishing a direct link with the candidate slave node; or
[0187] If it is necessary to send transmission information to the candidate slave node, a third connection establishment request is sent to the candidate slave node, and if a first connection confirmation message fed back by the candidate slave node based on the third connection establishment request is received, a direct link with the candidate slave node is established; or
[0188] If the fourth connection establishment request sent by the candidate slave node is received, a second connection confirmation message is fed back to the candidate slave node to establish a direct link with the candidate slave node.
[0189] Optionally, when executing information transmission with the candidate slave node through the direct link, the processor 1001 specifically executes:
[0190] Obtaining a first request sending time carried in the direct link request;
[0191] A first request sending time and a first transmission information are sent to the candidate slave node, triggering the candidate slave node to verify whether the first request sending time matches the target request sending time, and allowing the first transmission information to be received when the first request sending time matches the target request sending time.
[0192] Optionally, when executing information transmission with the candidate slave node through the direct link, the processor 1001 specifically executes:
[0193] Receiving a second request sending time sent by the candidate slave node, where the second request sending time is the request sending time carried in the direct link establishment request sent by the master node and received by the candidate slave node;
[0194] Obtaining a first request sending time carried in the direct link request, and verifying whether the first request sending time matches the second request sending time;
[0195] If the first request sending time matches the second request sending time, receiving the second transmission information sent by the candidate slave node is allowed.
[0196] Optionally, when executing acquiring a candidate slave node having an information transmission relationship with the slave node, the processor 1001 specifically executes:
[0197] Acquire an associated slave node that has an information transmission relationship with the slave node;
[0198] Get the priority of each associated slave node;
[0199] An associated slave node having a priority higher than a preset priority among the associated slave nodes is determined as a candidate slave node.
[0200] In an embodiment of the present application, a slave node receives a direct link establishment request sent by a master node, obtains associated slave nodes that have an information transmission relationship with the slave node based on the direct link establishment request, obtains the priority of each associated slave node, determines the associated slave nodes whose priorities are higher than the preset priorities among the associated slave nodes as candidate slave nodes, directly establishes a direct link with the candidate slave node, or establishes a direct link when information needs to be transmitted, and when the candidate slave node is a receiving slave node, obtains a first request sending time carried by the direct link request, sends the first request sending time and the first transmission information to the candidate slave node, triggers the candidate slave node to verify whether the first request sending time matches the target request sending time, and when the first request sending time matches the target request sending time, allows the first transmission information to be received; when the candidate slave node is a sending slave node, sends a second request sending time to the receiving slave node, and the receiving slave node obtains the first request sending time carried by the direct link request, verifies whether the first request sending time matches the second request sending time, and if the first request sending time matches the second request sending time, allows the second transmission information sent by the candidate slave node to be received. The candidate slave nodes for establishing direct links are determined based on priority, ensuring that important information can be transmitted first while reducing the network segment load. During information transmission, the security of direct link information transmission is improved through verification based on the request sending time.
[0201] See also Fig.11 , Fig.11 Schematic diagram of the structure of a computer device provided in an embodiment of the present application. Fig.11 As shown, the computer device 1000 includes: a processor 1001, a memory 1002, a display screen 1003, a camera component 1004 and a power supply 1005. The processor 1001 is electrically connected to the display screen 1003, the camera component 1004 and the power supply 1005 respectively.
[0202] The display screen 1003 may be used to display information input by a user or information provided to a user and various graphical user interfaces of the computer device 1000 . These graphical user interfaces may be composed of images, texts, icons, videos, and any combination thereof.
[0203] The camera assembly 1004 may include an image processing circuit, which may be implemented using hardware and / or software components and may include various processing units that define an image signal processing pipeline. The image processing circuit may include at least: multiple cameras, an image signal processor (ISP processor), a control logic, and an image memory, etc. Each camera may include at least one or more lenses and an image sensor. The image sensor may include a color filter array (such as a Bayer filter). The image sensor may obtain light intensity and wavelength information captured by each imaging pixel of the image sensor, and provide a set of raw image data that can be processed by the image signal processor.
[0204] The power supply 1005 is used to supply power to various components of the computer device 1000. In some embodiments, the power supply 1005 may be logically connected to the processor 1001 through a power management system, so that the power management system can manage charging, discharging, power consumption, and other functions.
[0205] It should be understood that the device provided in the embodiment of the present application is used to execute the above-mentioned information transmission method, and thus can achieve the same effect as the above-mentioned implementation method.
[0206] In the case of an integrated unit, the device may include a processing module and a storage module. When the device is applied to a computer device, the processing module may be used to control and manage the actions of the computer device. The storage module may be used to support the computer device in executing related program codes, etc.
[0207] The processing module may be a processor or a controller, which may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module may be a memory.
[0208] In addition, the device provided in the embodiment of the present application may specifically be a chip, component or module, and the chip may include a connected processor and memory; wherein the memory is used to store instructions, and when the processor calls and executes the instructions, the chip can execute an information transmission method provided in the above embodiment.
[0209] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program code is stored. When the computer program code is executed on a computer, the computer executes the above-mentioned related method steps to implement an information transmission method provided in the above-mentioned embodiment.
[0210] This embodiment also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement an information transmission method provided by the above embodiment.
[0211] Among them, the device, computer-readable storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.
[0212] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0213] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0214] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. An information transmission method, characterized in that: Applied to a master node establishing a connection with each slave node, the method comprises: Detecting the operating status of the network segment between each of the slave nodes; If an operation abnormality of the target network segment is detected, determining a target node type of a target network segment home node of the target network segment; Based on the correspondence between the node type and the slave node, determining the target slave node corresponding to the target node type; Determine a candidate slave node that has an information transmission relationship with the target slave node; A direct link establishment request is sent to the target slave node and the candidate slave node respectively, so that the target slave node and the candidate slave node establish a direct link based on the direct link establishment request, and information is transmitted between the target slave node and the candidate slave node through the direct link.
2. The method according to claim 1, characterized in that The determining, based on the correspondence between the node type and the slave node, a target slave node corresponding to the target node type includes: If the target node type is a master node type, each of the slave nodes is determined as a target slave node; If the target node type is a slave node type, the target network segment home node is determined as the target slave node.
3. The method according to claim 1, characterized in that The sending a direct link establishment request to the target slave node and the candidate slave node respectively, so that the target slave node and the candidate slave node establish a direct link based on the direct link establishment request, comprises: Sending a direct link establishment request to the target slave node and the candidate slave node respectively, triggering the target slave node and the candidate slave node to establish a direct link; or A direct link establishment request is sent to the target slave node and the candidate slave node respectively, and a direct link is established when the target slave node and the candidate slave node perform information transmission.
4. The method according to claim 1, characterized in that The sending a direct link establishment request to the target slave node and the candidate slave node respectively includes: Obtaining the current time, and determining the current time as the request sending time; The request sending time is added to the direct link establishment request, and the direct link establishment request is sent to the target slave node and the candidate slave node respectively, so that the target slave node or the candidate slave node determines whether to receive the transmission information based on the request sending time.
5. An information transmission method, characterized in that: A slave node is applied to establish a connection with a master node, the method comprising: Receiving a direct link establishment request sent by the master node; Based on the direct link establishment request, acquiring a candidate slave node having an information transmission relationship with the slave node; A direct link with the candidate slave node is established to transmit information with the candidate slave node through the direct link.
6. The method according to claim 5, characterized in that The establishing of a direct link with the candidate slave node comprises: Sending a first connection establishment request to the candidate slave node, and establishing a direct link with the candidate slave node if a second connection establishment request sent by the candidate slave node is received; or If it is necessary to send transmission information to the candidate slave node, a third connection establishment request is sent to the candidate slave node, and if a first connection confirmation message fed back by the candidate slave node based on the third connection establishment request is received, a direct link with the candidate slave node is established; or If the fourth connection establishment request sent by the candidate slave node is received, a second connection confirmation message is fed back to the candidate slave node to establish a direct link with the candidate slave node.
7. The method according to claim 5, characterized in that The transmitting information with the candidate slave node through the direct link includes: Obtaining a first request sending time carried in the direct link request; The first request sending time and the first transmission information are sent to the candidate slave node, triggering the candidate slave node to verify whether the first request sending time matches the target request sending time, and when the first request sending time matches the target request sending time, allowing the reception of the first transmission information, the target request sending time being the request sending time carried by the direct link establishment request sent by the master node and received by the candidate slave node.
8. The method according to claim 5, characterized in that The transmitting information with the candidate slave node through the direct link includes: Receiving a second request sending time sent by the candidate slave node, where the second request sending time is the request sending time carried in the direct link establishment request sent by the master node and received by the candidate slave node; Obtaining a first request sending time carried in the direct link request, and verifying whether the first request sending time matches the second request sending time; If the first request sending time matches the second request sending time, receiving the second transmission information sent by the candidate slave node is allowed.
9. The method according to claim 5, characterized in that The obtaining of a candidate slave node having an information transmission relationship with the slave node comprises: Acquire an associated slave node that has an information transmission relationship with the slave node; Obtaining the priority of each of the associated slave nodes; The associated slave nodes whose priorities are higher than the preset priorities among the associated slave nodes are determined as candidate slave nodes.
10. An information transmission device, characterized in that: The device comprises: A status detection unit, used for detecting the operation status of the network segment between each of the slave nodes; A first determining unit is used to determine a target node type of a target network segment home node of the target network segment if an operation abnormality of the target network segment is detected; A second determining unit, configured to determine a target slave node corresponding to the target node type based on a correspondence between node types and slave nodes; A third determining unit, configured to determine a candidate slave node having an information transmission relationship with the target slave node; A request sending unit is used to send direct link establishment requests to the target slave node and the candidate slave node respectively, so that the target slave node and the candidate slave node establish a direct link based on the direct link establishment request, and information transmission between the target slave node and the candidate slave node is performed through the direct link.
11. An information transmission device, characterized in that: The device comprises: A request receiving unit, configured to receive a direct link establishment request sent by the master node; A node acquisition unit, configured to acquire, based on the direct link establishment request, a candidate slave node having an information transmission relationship with the slave node; An information transmission unit is used to establish a direct link with the candidate slave node to transmit information with the candidate slave node through the direct link.
12. A computer device, characterized in that: The computer device comprises: A memory for storing executable program codes; A processor, configured to call and run the executable program code from the memory, so that the computer device executes the method according to any one of claims 1 to 9.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program code, and when the computer program code is executed, the method according to any one of claims 1 to 9 is implemented.
