Information sending method and device, electronic equipment and readable storage medium
By dynamically selecting the optimal management node for information transmission through network status evaluation, the problem of low information reporting success rate and uneven information volume in distributed storage clusters is solved, and efficient and stable information transmission and processing are achieved.
Patent Information
- Application Number
- CN202410694897.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2044-05-30
AI Technical Summary
In distributed storage clusters, the success rate of information reporting is low, and the amount of information processed by different management nodes is uneven, leading to problems such as information reporting failure and uneven information volume when network failures occur.
By acquiring network parameters and information volume between information sending nodes and management nodes, calculating network status evaluation values, and dynamically selecting the optimal management node for information sending, information is ensured to be synchronized to other management nodes.
It improved the success rate and efficiency of information reporting, balanced the information processing volume among management nodes, reduced network resource waste and information processing pressure, and enhanced the stability and anti-interference capability of the cluster.
Smart Images

Figure CN118631810B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of communication, and particularly relates to an information sending method and device, electronic equipment and readable storage medium. BACKGROUND
[0002] In a cluster for implementing a distributed storage function, a plurality of ordinary nodes and management nodes can be included, the ordinary nodes can report information to the management nodes for storage and management by the management nodes.
[0003] In the related art, the management nodes corresponding to the ordinary nodes can be pre-set, and the management nodes corresponding to the ordinary nodes are fixed and unchangeable. When the ordinary nodes need to report information, the information is directly sent to the fixed management nodes.
[0004] However, when the management nodes fail or other network link nodes between the ordinary nodes and the management nodes fail, the information reporting fails. And the ordinary nodes report the information to the fixed management nodes every time, which can cause an imbalance in the amount of information received and processed between different management nodes. SUMMARY
[0005] The present application aims to provide an information sending method and device, electronic equipment and readable storage medium, at least solving the problems of low success rate of information reporting and imbalance in the amount of information processed between different management nodes in the prior art.
[0006] In a first aspect, an information sending method is disclosed, applied to an information sending node in a cluster, the cluster further comprising a plurality of management nodes; the method comprises:
[0007] For each of the management nodes, a first network parameter between the information sending node and the management node is obtained, and a first information amount of information processed by the management node is obtained; the first network parameter comprises at least one of network delay, packet loss rate and network jitter level;
[0008] For each of the management nodes, a first network state evaluation value between the information sending node and the management node is obtained according to the first network parameter and the first information amount; the first network state evaluation value is negatively correlated with the degree of network state;
[0009] From the plurality of management nodes, a first management node corresponding to the smallest first network state evaluation value is obtained, and the information to be reported is sent to the first management node, so that the first management node receives the information to be reported and synchronizes the information to be reported to other management nodes.
[0010] In a second aspect, the embodiments of the present application further disclose an information sending device, the device is located in an information sending node in a cluster, the cluster further comprises a plurality of management nodes; the device comprises:
[0011] a first obtaining module, configured to obtain, for each of the management nodes, a first network parameter between the information sending node and the management node, and a first information amount of information processed by the management node; the first network parameter comprises at least one of a network delay, a packet loss rate and a network jitter level;
[0012] a second obtaining module, configured to obtain, for each of the management nodes, a first network state evaluation value between the information sending node and the management node according to the first network parameter and the first information amount; the first network state evaluation value is negatively correlated with the good degree of the network state;
[0013] a third obtaining module, configured to obtain, from the plurality of management nodes, a first management node corresponding to a minimum first network state evaluation value, and send to-be-reported information to the first management node, so that the first management node receives the to-be-reported information and synchronizes the to-be-reported information to other management nodes.
[0014] In a third aspect, the embodiments of the present application further disclose an electronic device, comprising a processor and a memory, the memory stores programs or instructions executable on the processor, and the programs or instructions are executed by the processor to implement the steps of the method according to the first aspect.
[0015] In a fourth aspect, the embodiments of the present application further disclose a computer readable storage medium, the readable storage medium stores programs or instructions, and the programs or instructions are executed by a processor to implement the steps of the method according to the first aspect.
[0016] In summary, in the embodiment of the present application, the first network state evaluation value and the excellent degree of network state are negatively correlated, and therefore, the first management node corresponding to the minimum first network state evaluation value is the management node with the optimal network state among the plurality of management nodes. In actual application, the first network parameter between the information sending node and the management node, and the first information amount processed by the management node are usually dynamic quantities, and therefore, the first network state evaluation value obtained according to the first network parameter and the first information amount is also dynamically changed, and correspondingly, the first management node selected according to the first network state evaluation value is also dynamically changed. That is, the embodiment realizes dynamic optimization of the management node, and the first management node obtained based on the dynamic optimization can improve the sending efficiency and success rate of the information to be reported. In addition, because the first network evaluation parameter is related to the first information amount processed by the management node, the first management node obtained based on the first network evaluation parameter and the information to be reported is sent to the first management node, which can ensure that the information amount processed by the plurality of management nodes is in a balanced state. The present embodiment solves the problems of low success rate of information reporting and unbalanced information amount processed by different management nodes in the related art when information is reported based on a fixed management node. BRIEF DESCRIPTION OF DRAWINGS
[0017] In the drawings:
[0018] Figure 1 is a step flow chart of an information sending method provided by an embodiment of the present application;
[0019] Figure 2 is a distribution diagram of a plurality of nodes in a cluster provided by an embodiment of the present application;
[0020] Figure 3 is a step flow chart of another information sending method provided by an embodiment of the present application;
[0021] Figure 4 is a step flow chart of another information sending method provided by an embodiment of the present application;
[0022] Figure 5 is a block diagram of an information sending device provided by an embodiment of the present application;
[0023] Figure 6 is a block diagram of an electronic device of an embodiment provided by an embodiment of the present application;
[0024] Figure 7 is a block diagram of an electronic device of another embodiment provided by an embodiment of the present application. DETAILED DESCRIPTION
[0025] With reference to the drawings, the technical solutions in the embodiments of the present application will be clearly and completely described below. Obviously, the described embodiments are only some of the embodiments of the present application, but not all of them. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts should fall within the scope of the present application.
[0026] The terms "first", "second", and the like in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than that illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally a category and do not limit the number of objects, for example, the first object can be one or more. In addition, "and / or" in the specification and claims indicates at least one of the connected objects, and the character " / ", generally indicates that the objects before and after are in an "or" relationship.
[0027] The information sending method provided by the embodiments of the present application will be described in detail below with reference to the drawings and specific embodiments.
[0028] Some nouns or terms appearing in the present application are applicable to the following explanations:
[0029] Network delay refers to the time required for a data packet to be transmitted from a sending end to a receiving end.
[0030] Packet Loss Rate refers to the ratio of the number of lost data packets to the number of data packets sent from the sending end to the receiving end during the process of sending data packets from the sending end to the receiving end.
[0031] Network Jitter is used to reflect the fluctuation degree of the time required for a data packet to be transmitted from a sending end to a receiving end.
[0032] The information sending method of the present embodiment will be further exemplarily described below.
[0033] Figure 1 is a step flow chart of a to-be-reported information sending method provided by the embodiments of the present application, as shown in the figure, the method can include the following steps: Figure 1
[0034] Step 101, for each management node, obtaining a first network parameter between the information sending node and the management node, and a first information amount handled by the management node.
[0035] The first network parameter comprises at least one of network delay, packet loss rate and network jitter level.
[0036] The method of the embodiment is applied to an information sending node in a cluster, and the cluster can further comprise a plurality of management nodes. Figure 2 is a schematic diagram of node distribution in a cluster provided by an embodiment of the present application. Referring to Figure 2 The cluster comprises a plurality of ordinary nodes and management nodes, and the ordinary nodes and the management nodes are in communication connection. The ordinary nodes are configured to acquire information related to the cluster, and when the information meets a preset reporting rule, the ordinary nodes are configured to send the information as to-be-reported information to the management nodes. The management nodes are configured to receive and store the to-be-reported information sent by the ordinary nodes, and to synchronize the to-be-reported information to other management nodes.
[0037] For example, the ordinary nodes are configured to detect the running state of other nodes (such as virtual machines) in the cluster, and when it is identified that the running state of the node is a fault state, the ordinary nodes are configured to generate an alarm information and report the alarm information to the management nodes, so that the management nodes receive the alarm information and output the alarm information to relevant operation and maintenance personnel, so that the operation and maintenance personnel can timely process the alarm information. In this case, the ordinary node that reports the alarm information is the information sending node in this step.
[0038] For example, a network diagnosis tool can be used to send a network diagnosis request from each management node to the ordinary nodes, and the ordinary nodes are configured to send data to the management nodes in response to the network diagnosis request, so that the management nodes acquire network parameters according to the data transmission condition and synchronize the network parameters to each ordinary node and management node. The information sending node is a node in the plurality of ordinary nodes that is configured to send to-be-reported information to the management nodes, and the network parameters synchronized by the management nodes to each ordinary node comprise network parameters between the information sending node and the management nodes (i.e., the first network parameters). Therefore, after the management nodes synchronize the network parameters to each ordinary node and management node, the information sending node can acquire the first network parameters sent by the management nodes.
[0039] The first network parameter comprises at least one of network delay, packet loss rate and network jitter level. For example, the network delay can be acquired according to the time from sending data to receiving the data by the management node, the packet loss rate can be acquired according to the number of sent data packets and lost data packets, and the network jitter level can be acquired according to the fluctuation degree of the time from sending a data packet to receiving the data packet by the management node.
[0040] For example, the management nodes are configured to read a first information amount of information processed by the management nodes respectively, and to synchronize the first information amount to each ordinary node and management node. The information sending node is a node in the plurality of ordinary nodes that is configured to send to-be-reported information to the management nodes, and therefore, after the management nodes synchronize the first information amount to each ordinary node, the information sending node can also receive the first information amount.
[0041] In step 102, for each management node, a first network state evaluation value between the information sending node and the management node is obtained according to the first network parameter and the first information amount.
[0042] The first network state evaluation value is negatively correlated with the good degree of the network state. That is, the greater the first network state evaluation value, the smaller the network state, and the greater the first network state evaluation value, the better the network state.
[0043] In an example, the first network parameter is normalized to obtain a first processing value, the first information amount is normalized to obtain a second processing value, and the product of the first processing value and the second processing value is determined as the first network state evaluation value.
[0044] The first network parameter is at least one of network delay, packet loss rate, and network jitter level. Further, the network delay is the time required for a data packet to be transmitted from a sending end to a receiving end, and the network delay can reflect the real-time performance of data transmission. The network delay is negatively correlated with the real-time performance of data transmission. The packet loss rate is the ratio of lost data packets to the number of data packets sent from the sending end, and can reflect the reliability of data transmission. The packet loss rate is negatively correlated with the reliability. The network jitter level reflects the fluctuation degree of the time required for a data packet to be transmitted from the sending end to the receiving end, and the network jitter can reflect the stability of data transmission. The higher the network jitter level, the more obvious the network jitter, and therefore, the network jitter level is negatively correlated with the stability of data transmission. These first network parameters are all negatively correlated with the good degree of the network state.
[0045] The greater the first information amount processed by the management node, the more likely it is to cause an imbalance in the amount of information processed between different management nodes when continuing to report information to the management node. The greater the first information amount, the greater the load of the management node in processing information. Sending the to-be-reported information to the management node will further increase the load of the management node and affect the real-time performance of the management node in processing the to-be-reported information. It can also cause the problem of failure to receive the to-be-reported information due to excessive load of the management node. Therefore, the first information amount is also negatively correlated with the good degree of the network state.
[0046] The first network parameter and the first information amount are both negatively correlated with the good degree of the network state. Therefore, the first network state evaluation value determined according to the first network parameter and the first information amount is also negatively correlated with the good degree of the network state.
[0047] In step 103, a first management node corresponding to the minimum first network state evaluation value is obtained from the plurality of management nodes, and the to-be-reported information is sent to the first management node for receiving the to-be-reported information by the first management node and synchronizing the to-be-reported information to other management nodes.
[0048] For each management node, the method of steps 101 to 102 is processed to obtain a first network state evaluation value corresponding to each management node respectively. In this way, a plurality of network state evaluation values can be obtained, and the network state evaluation value is one-to-one corresponding to the management node.
[0049] For example, the communication connection between different management nodes is established, and the information synchronization mechanism is arranged in the management node. After the first management node receives the to-be-reported information, the information synchronization mechanism can be used to synchronize the to-be-reported information to other management nodes.
[0050] In summary, in the embodiment of the present application, the first network state evaluation value is obtained according to the first network parameter between the information sending node and the management node and the first information amount of the management node processing the information. The first management node corresponding to the minimum first network state evaluation value is obtained from the plurality of management nodes, and the to-be-reported information is sent to the first management node. The first network state evaluation value is negatively related to the degree of network state, so the first management node corresponding to the minimum first network state evaluation value is the management node with the best network state in the plurality of management nodes. In actual application, the first network parameter between the information sending node and the management node and the first information amount of the management node processing the information are usually dynamic quantities, so the first network state evaluation value obtained by the method of the embodiment is also dynamic, and the first management node selected according to the first network state evaluation value is also dynamic. The embodiment realizes dynamic optimization of the management node, which can avoid the problem of loss or failure of to-be-reported information caused by management node failure or other network node failure between the management node and the information sending node when the to-be-reported information is reported according to the fixed management node in the related technology. The embodiment improves the information reporting efficiency and success rate in the large-scale distributed storage cluster.
[0051] In addition, in the related technology, the to-be-reported information can be sent to each management node by traversing the management node. Although this method can reduce the loss of reported information to some extent, it increases the network transmission burden and causes waste of network resources, which affects the reporting efficiency of the to-be-reported information, because the to-be-reported information needs to be sent to all management nodes. For example, when the to-be-reported information is alarm information, the method based on the related technology will cause long time consumption of alarm information reporting, and further cause the alarm information to be unable to be reported to the management node in time. Compared with the method of sending the to-be-reported information by traversal in the related technology, the embodiment synchronizes the to-be-reported information to other management nodes by the first management node after sending the to-be-reported information to the first management node, which improves the information sending efficiency and reduces the information processing pressure of each node in the cluster.
[0052] Further, the first network state evaluation value is obtained according to the first network parameter and the first information quantity of the information processed in the management node, and the first network state value can reflect the information quantity of the information processed in the management node. Compared with the method in the related art in which the information sending node sends the to-be-reported information to the fixed management node, the embodiment can avoid sending the to-be-reported information to the management node with a larger first information quantity, and can balance the processing quantity of the to-be-reported information among the management nodes. The embodiment solves the problem that the information quantity to be processed among the management nodes is unbalanced when the to-be-reported information is sent to the fixed management node in the related art.
[0053] Figure 3 is a step flowchart of another to-be-reported information sending method provided by the embodiment of the application. Referring to Figure 3 , the method can include the following steps:
[0054] In step 201, for each management node, the first network parameter between the information sending node and the management node is obtained, and the first information quantity of the information processed in the management node is obtained.
[0055] The first network parameter includes at least one of the network delay, the packet loss rate, and the network jitter level.
[0056] The method in this step has been described in the foregoing step 101, and will not be repeated here.
[0057] In step 202, the first network parameter is normalized to obtain a first processing value.
[0058] In the case where there are multiple first network parameters, each first network parameter is normalized.
[0059] In one embodiment, step 202 can include the following sub-steps:
[0060] In sub-step 2021, the first network parameter is linearly normalized to obtain a third processing value.
[0061] By linearly normalizing the first network parameter, the first network parameter with a dimension can be transformed into a dimensionless value, and the problem that different parameters cannot be comprehensively processed due to different physical meanings and dimensions can be solved. For example, if the first network parameter includes multiple parameters, the physical meanings and dimensions of the multiple first network parameters are different, and if the first network parameter is not normalized, the multiple first network parameters cannot be comprehensively analyzed.
[0062] In sub-step 2022, the third processing value is nonlinearly normalized to obtain the first processing value.
[0063] According to the foregoing analysis, the first network parameter is linearly normalized to obtain a third processing value which is a dimensionless value. The third processing value is non-linearly normalized, so that the third processing values of different first network parameters are converted into values of the same order of magnitude, thereby improving the usability of the first network state evaluation value obtained according to the third processing value.
[0064] For example, when the network parameter is network delay and packet loss rate, the network parameter is sequentially linearly normalized and non-linearly normalized, but when the network parameter is network jitter, the network parameter can only be linearly normalized.
[0065] For example, step 2022 can include the following sub-steps (sub-step A1 to sub-step A2):
[0066] Sub-step A1, in the case of a first network parameter being network delay, the third processing value of the network delay is non-linearly normalized using a tangent function to obtain a first processing value of the network delay.
[0067] The smaller the network delay, the smaller the impact on the transmission performance of the to-be-reported information. Non-linearly normalizing the third processing value of the network delay using the tangent function can reduce the impact of small network delay on the transmission performance of the to-be-reported information and amplify the impact of large network delay on the transmission performance of the to-be-reported information. When the first network state evaluation value is obtained according to the normalized first processing value, the first network evaluation value can accurately reflect the impact of the network delay on the network state.
[0068] Sub-step A2, in the case of a first network parameter being packet loss rate, the third processing value of the packet loss rate is non-linearly normalized using an inverse tangent function to obtain a first processing value of the packet loss rate.
[0069] Packet loss rate has a significant impact on the quality and stability of network communication. Packet loss rate affects the success rate of reporting the to-be-reported information. Non-linearly normalizing the third processing value of the packet loss rate using the inverse tangent function can amplify the impact of the packet loss rate on the first network state evaluation value and improve the usability of the first network state evaluation value. When the first network state evaluation value is obtained according to the normalized first processing value, the first network evaluation value can accurately reflect the impact of the packet loss rate on the network state.
[0070] Step 203, normalizing the first information quantity to obtain a second processing value.
[0071] For example, the first information quantity can be normalized using a logarithmic function.
[0072] For example, step 203 can include the following sub-steps:
[0073] Sub-step 2031, performing nonlinear normalization processing on the first information quantity to obtain a second processing value.
[0074] For example, the first information quantity is processed by a logarithmic function for nonlinear normalization. Specifically, the first information quantity of each management node is obtained, and the maximum information quantity and the minimum information quantity are obtained therefrom. The difference between the first information quantity and the minimum information quantity is taken as the true number of the logarithmic function, and the difference between the maximum information quantity and the minimum information quantity is taken as the base number of the logarithmic function. The logarithmic function is solved, and the obtained logarithmic value is determined as the second processing value.
[0075] The first processing value obtained by linear normalization processing on the first network parameter is a dimensionless quantity, and the second processing value obtained by nonlinear normalization processing on the first information quantity is also a dimensionless quantity. Both of the two processing values are dimensionless values, so the first processing value and the second processing value can be multiplied to obtain the first network state evaluation value. Further, through nonlinear normalization processing, the first network parameter and the first information quantity can be normalized to the same order of magnitude, and the first network state evaluation value obtained from the first processing value of the first network parameter and the second processing value of the first information quantity can accurately reflect the influence of the network parameter and the information quantity on the network state.
[0076] Further, sub-step 2031 can include the following sub-step (sub-step B1):
[0077] Sub-step B1, using a logarithmic function to perform nonlinear normalization processing on the first information quantity of the management node processing information to obtain a second processing value.
[0078] Step 204, determining the product of the first processing value and the second processing value as the first network state evaluation value.
[0079] In the case where there are multiple network parameters, step 204 can include the following sub-steps:
[0080] Sub-step 2041, performing weighted summation processing on the multiple first processing values of the multiple network parameters to obtain a weighted summation value.
[0081] The first network parameter and the first processing value correspond to each other.
[0082] Through the weighted summation processing, the first performance evaluation value reflecting the influence degree of each first network parameter on the network state can be obtained.
[0083] Sub-step 2042, determining the product of the weighted summation value and the second processing value as the first network state evaluation value.
[0084] In the embodiment, the weighted sum value is a parameter value obtained by performing weighted sum processing on a plurality of first processing values of network parameters, and the second processing value is a parameter value obtained by performing normalization processing on the first information amount. The second product of the weighted sum value and the second processing value is determined as the first network state evaluation value. The first network state evaluation value can comprehensively reflect the plurality of first network parameters, the first information amount of the management node processing information, and the influence of the network state between the information sending node and the management node. Based on the method of the embodiment, the availability of the first network state evaluation value is improved, and the availability of the first management node selected according to the first network state evaluation value is further improved.
[0085] In step 205, the first management node corresponding to the minimum first network state evaluation value is obtained from the plurality of management nodes, and the information to be reported is sent to the first management node, so that the first management node stores the information to be reported and synchronizes the information to be reported to other management nodes.
[0086] The method of the present step has been described in the foregoing step 103, and will not be repeated here.
[0087] In the embodiment, the first network parameter between the information sending node and the management node and the first information amount of the management node processing information are obtained, the first network parameter is normalized to obtain a first processing value, the first information amount is normalized to obtain a second processing value, and the product of the first processing value and the second processing value is determined as the first network state evaluation value. By normalizing the first network parameter and the first information amount, the first network state evaluation value reflecting the influence of the first network parameter and the first information amount on the network state can be obtained. The first network state evaluation value can accurately reflect the network state between the information sending node and the management node. Based on the method of the embodiment, the availability of the first network state evaluation value is improved, and the availability of the first management node selected according to the first network state evaluation value is further improved. The information to be reported is sent to the first management node, which improves the efficiency and success rate of sending the information to be reported.
[0088] In one embodiment, after step 205, the following steps can also be included:
[0089] In step 206, for each management node, the network state between the information sending node and the management node is retested to obtain a second network parameter, and the information processing of the management node is re-detected to obtain a second information amount.
[0090] In one embodiment, step 206 can include the following steps:
[0091] In substep 2061, a performance detection instruction is sent to the network detection node, so that the network detection node re-detects the network state between the information sending node and the management node, and the processing data of the management node, and feeds back the detected second network parameter and second information quantity to the information sending node.
[0092] The network detection node can be a node in the cluster or outside the cluster, and can be a normal node or a management node. Further, the network detection node is equipped with a network diagnosis tool, which re-detects the network state between the information sending node and the management node, and the processing data of the management node, and sends the detected second network parameter and second information quantity to the information sending node.
[0093] In step 207, for each management node, a second network state evaluation value between the information sending node and the management node is obtained according to the second network parameter and the second information quantity.
[0094] The second network parameter is the same type as the first network parameter, but is obtained at a different time. Therefore, the method of this step can refer to the description of steps 202 to 204, which will not be repeated here.
[0095] In step 208, a second management node corresponding to the minimum second network state evaluation value is obtained from the plurality of management nodes.
[0096] The method of this step can refer to the description of step 205, which will not be repeated here.
[0097] In step 209, if it is identified that the first management node and the second management node are different, it is determined whether the first management node has received the to-be-reported information.
[0098] For example, the IP addresses of the first management node and the second management node can be compared. If the IP addresses of the first management node and the second management node are the same, it is determined that the first management node and the second management node are the same, otherwise it is determined that they are different.
[0099] If it is identified that the first management node and the second management node are different, it means that the network parameters between the information sending node and each management node, and / or the information quantity of the information processed in the management node, have undergone a large fluctuation, which also means that the network of the cluster is in an unstable state.
[0100] In the unstable state of the network, the probability of failure of sending the to-be-reported information is high. Therefore, in this case, it is necessary to determine whether the first management node used to receive the to-be-reported information has received the to-be-reported information in the previous information sending process.
[0101] In one embodiment, step 209 can include the following sub-steps:
[0102] Sub-step 2091, sending an information detection instruction to the first management node, so that the first management node detects whether the to-be-reported information is stored in the first management node, and feeds back the detection result to the information sending node.
[0103] For example, the to-be-reported information has an information identifier, which can be an information name, an information number, or other identifiers that can uniquely identify information.
[0104] After the first management node receives the information detection instruction, it compares the information identifier of the stored information in the information library with the information identifier carried in the information detection instruction. If the information identifier carried in the information detection instruction exists in the information identifier of the stored information, it indicates that the first management node stores the to-be-reported information, and the first management node successfully receives the to-be-reported information. If the information identifier carried in the information detection instruction does not exist in the information identifier of the stored information, it indicates that the first management node does not store the to-be-reported information, and the first management node does not successfully receive the to-be-reported information.
[0105] Sub-step 2092, in the case where the detection result is that the first management node stores the to-be-reported information, it is determined that the first management node has received the to-be-reported information.
[0106] If the first management node has received the to-be-reported information, it will store the to-be-reported information. Therefore, in the case where it is detected that the first management node stores the to-be-reported information, it can be determined that the first management node has received the to-be-reported information, indicating that the to-be-reported information has been successfully reported. That is, in this case, it indicates that although the network state of the cluster is unstable, the to-be-reported information has been successfully reported, and therefore, it is not necessary to repeatedly report the to-be-reported information.
[0107] Sub-step 2093, in the case where the detection result is that the first management node does not store the to-be-reported information, it is determined that the first management node has not received the to-be-reported information.
[0108] In this case, it indicates that the network state of the cluster is unstable, and this instability results in the failure of the to-be-reported information to be sent, and therefore, it is not necessary to repeatedly report the to-be-reported information.
[0109] Step 210, in the case where the first management node has not received the to-be-reported information, entering a step of obtaining, for each management node, a first network parameter between the information sending node and the management node, and a first information amount handled by the management node.
[0110] The step of obtaining the first network parameter between the information sending node and the management node and the first information amount handled by the management node for each management node is step 201. In the case that the first management node does not receive the to-be-reported information, step 201 is entered, and the network state optimal management node for sending the to-be-reported information is reacquired according to steps 201 to 205, and the network state of the new management node is verified according to steps 206 to 210, and whether the to-be-reported information needs to be re-sent is determined according to the verification result.
[0111] In addition, in the case that the first management node and the second management node are identified as the same, it is considered that the network in the cluster is in a normal state, and it is considered that the to-be-reported information is successfully sent to the first management node, and it is not necessary to further determine whether the to-be-reported information is contained in the first management node.
[0112] In the related art, the common node reports the to-be-reported information to each management node through the traversal manner, and whether the current network state of the cluster is abnormal, each management node needs to be detected whether the to-be-reported information is received. And in the case that the management node does not receive the to-be-reported information, the to-be-reported information is sent to the management node again through the traversal manner. Although this method can reduce the loss of the to-be-reported information to a certain extent, as long as the to-be-reported information is sent, whether the network state is normal, each management node needs to be detected whether the to-be-reported information is received. If the information amount of the to-be-reported information is large, this method will cause the waste of network resources in the cluster, and will increase the load pressure of the cluster, and will affect the performance of the cluster. And the traversal sending manner is time-consuming, the information reporting efficiency is low, and the real-time performance is poor.
[0113] In the embodiment, after the to-be-reported information is sent to the first management node selected, a second management node is selected from the plurality of management nodes, and it is determined whether the first management node and the second management node are the same. If not, it is considered that the network in the cluster may be abnormal, and the network abnormality may cause the sending of the to-be-reported information to fail. In the case that the first management node and the second management node are not the same, it is determined whether the first management node has received the to-be-reported information. In the case that it is determined that the first management node has not received the to-be-reported information, it is considered that the detection result of whether the first management node receives the to-be-reported information is not passed. Therefore, the step of obtaining the first network parameter between the information sending node and the management node and the first information amount handled by the management node for each management node is entered. Thus, in the case that it is determined that the first management node has not received the to-be-reported information, a new optimal management node can be selected, the to-be-reported information is sent to the optimal management node, and the to-be-reported information is received by the optimal management node and is synchronized to other management nodes.
[0114] That is, in the present embodiment, when it is determined that there is a network anomaly in the cluster, detection is performed on whether the to-be-reported information is successfully sent, and it is determined whether the to-be-reported information needs to be repeatedly sent according to a detection result. Compared with the method in the related art that needs to detect whether each management node receives the to-be-reported information regardless of whether the current network state of the cluster is abnormal, the present embodiment reduces the number of repeated reporting of the to-be-reported information, reduces the information processing amount of the management node, saves network resources, improves the anti-interference ability of the cluster, improves the stability of the cluster, and solves the problem of waste of network resources in the cluster in the related art.
[0115] In addition, compared with the method in the related art that re-sends the to-be-reported information to each management node by traversing each management node when the network is abnormal, the present embodiment re-selects an optimal management node to send the to-be-reported information when it is determined that the first management node does not receive the to-be-reported information, which can avoid the situation that the to-be-reported information fails to be sent when the network of the cluster is abnormal, and improves the sending efficiency of the to-be-reported information on the basis of ensuring that the to-be-reported information is successfully reported.
[0116] In one embodiment, after step 209, the following steps can also be included:
[0117] Step 211, in the case that the first management node does not receive the to-be-reported information, the to-be-reported information is sent to a second management node for receiving by the second management node and synchronizing to other management nodes.
[0118] The second management node is a management node that is newly selected after the to-be-reported information is sent to the first management node. Sending the to-be-reported information to the second management node can improve the sending efficiency and success rate of the to-be-reported information.
[0119] In the case that the first management node does not receive the to-be-reported information, the to-be-reported information is sent to the second management node, which saves the step of newly selecting a management node and sending the to-be-reported information to the newly selected management node, and improves the sending efficiency of the to-be-reported information.
[0120] Step 212, the second management node is determined as a new first management node, and the step of re-testing the network state between the information sending node and the management node for each management node, obtaining a second network parameter, and re-detecting the information amount of the management node processing information, and obtaining a second information amount is entered.
[0121] The second management node is determined as a new first management node, and the step of reacquiring the second network parameter and the second information quantity in step 206 is entered, so that the management node can be reselected, and it is determined whether the reselected management node and the second management node are the same, and if not, it is determined whether the second associated node receives the information to be reported. Therefore, the successful sending of the information to be reported can be ensured, and the sending efficiency of the information to be reported is improved.
[0122] In one embodiment, there are multiple network parameters; accordingly, after step 201, the following steps can be included:
[0123] In step 213, for each network parameter, the maximum network parameter and the minimum network parameter are acquired from the first network parameter corresponding to each management node and each information sending node.
[0124] For example, the first network parameter is recorded in a network state table, and the network state table further includes the first information quantity of the data stored by each management node. The network state table can be acquired by a network diagnosis tool, and the network state table is synchronized to all information sending nodes and management nodes.
[0125] In one embodiment, there are three management nodes and M ordinary nodes, and the network state table including the first network parameter and the first information quantity is shown in Table 1:
[0126] Table 1
[0127]
[0128] In Table 1, a1, a2, and a3 are the first information quantities of the management node manage_1, the management node manage_2, and the management node manage_3, respectively.
[0129] d 11 , p 11 , j 11 are the network delay, packet loss rate, and network jitter level between the ordinary node node_1 and the management node manage_1, respectively. 1M , p 1M , j 1M are the network delay, packet loss rate, and network jitter level between the ordinary node node_M and the management node manage_1, respectively. 21 , p 21 , j 21 are the network delay, packet loss rate, and network jitter level between the ordinary node node_1 and the management node manage_2, respectively. 2M , p 2M , j 2MNetwork delay, packet loss rate and network jitter level between the normal node node_M and the management node manage_2, respectively.d 31 , p 31 , j 31 Network delay, packet loss rate and network jitter level between the normal node node_1 and the management node manage_3, respectively.d 3M , p 3M , j 3M Network delay, packet loss rate and network jitter level between the normal node node_M and the management node manage_3, respectively.
[0130] If the normal node node_1 needs to send the information to be reported to the management node, the normal node node_1 is the information sending node in the embodiment. For example, referring to Table 1, in the case of network delay as the network parameter, the network delays between the information sending node and each management node are d 11 , d 21 and d 31 , by comparing the three values, the maximum network delay d max and the minimum network delay d min can be obtained.
[0131] In step 214, for each management node, the first network parameter between the information sending node and the management node is linearly normalized to obtain a fourth processing value according to the maximum network parameter and the minimum network parameter.
[0132] Further, a fifth difference value between the network parameter and the minimum network parameter and a sixth difference value between the maximum network parameter and the minimum network parameter are obtained; a ratio of the fifth difference value and the sixth difference value is obtained, and the ratio is determined as the fourth processing value obtained by linearly normalizing the network parameter.
[0133] For example, if the network parameter is network delay, the fourth processing value of the network delay is as follows:
[0134]
[0135] d ni is the network delay between the information sending node i and the management node n, d imin and d imin are the maximum network delay value and the minimum network delay value between the information sending node i and each management node, respectively.
[0136] For example, if the network parameter is packet loss rate, the fourth processing value of the packet loss rate is as follows:
[0137]
[0138] p in is the packet loss rate between the information sending node i and the management node n, p imin and p imin are the maximum packet loss rate and the minimum packet loss rate between the information sending node i and each management node, respectively.
[0139] For example, the network parameter is network jitter level, the fourth processing value of the network jitter level is determined as the fifth processing value.
[0140]
[0141] wherein j ni is the network jitter level between the information sending node i and the management node n, j imin and j imin are the maximum network jitter level and the minimum network jitter level between the information sending node i and each management node, respectively.
[0142] Step 215, in the case that the first network parameter is network delay or packet loss rate, performing nonlinear normalization processing on the fourth processing value of the first network parameter to obtain a fifth processing value.
[0143] For example, in the case that the first network parameter is network delay, using the tangent function to perform nonlinear normalization processing on the fourth processing value of the network delay to obtain the fifth processing value of the network delay.
[0144] For example, in the case that the first network parameter is packet loss rate, using the inverse tangent function to perform nonlinear normalization processing on the fourth processing value of the packet loss rate to obtain the fifth processing value of the packet loss rate.
[0145] Step 216, in the case that the first network parameter is network jitter level, determining the fourth processing value as the fifth processing value.
[0146] That is, in the case that the first network parameter is network jitter level, no other processing (such as nonlinear normalization processing) is performed on the fourth processing value of the network jitter level, and the fourth processing value is directly determined as the fifth processing value of the network jitter level.
[0147] Step 217, according to the weight value corresponding to each first network parameter respectively, and the fifth processing value of each first network parameter respectively, obtaining a weighted sum value of the plurality of first network parameters.
[0148] Further, the network delay is the time required for a data packet to be sent from a sending end to a receiving end, mainly affecting the real-time performance of data transmission. The packet loss rate refers to the ratio of the number of lost data packets to the number of sent data packets in the test, mainly affecting the reliability of data transmission. The network jitter level refers to the degree of uncertainty of the time required for a data packet to be sent from a source end to a destination end, which mainly affects the stability of data transmission.
[0149] Therefore, when the importance of the reported information is high or the reported information is large, the weight value of the network packet loss rate can be set to be larger. When the reported information is small, the weight value of the network delay can be set to be larger. When the importance of the reported information is low, the weight value of the network jitter can be set to be larger. Based on this, the weight values of the first network parameters are adjusted.
[0150] According to the weight values corresponding to each first network parameter respectively and the fifth processing values of each network parameter respectively, a weighted sum value of the plurality of network parameters can be obtained.
[0151] In step 218, the maximum information amount and the minimum information amount are obtained from the first information amounts of the processing information of the plurality of management nodes respectively.
[0152] For example, referring to Table 1, the first information amounts of the management node manage_1, the management node manage_2 and the management node manage_3 are a1, a2 and a3 respectively. By comparing the three values, the maximum information amount a max and the minimum information amount a min can be obtained.
[0153] In step 219, for each management node, a first difference value between the first information amount and the minimum information amount of the management node and a second difference value between the maximum information amount and the minimum information amount are obtained.
[0154] The second difference value between the maximum information amount and the minimum information amount is: max a min .
[0155] In step 220, the first difference value is taken as the true number of the logarithmic function, and the second difference value is taken as the base number of the logarithmic function, to obtain a logarithmic value of the logarithmic function.
[0156] The logarithmic value of the logarithmic function with the first difference value as the true number and the second difference value as the base number can be expressed as: wherein a n is the first information amount of the nth management node.
[0157] In step 221, the product of the weighted sum value and the logarithmic value is determined as the first network state evaluation value between the information sending node and the management node.
[0158] In the case that the function for nonlinear normalization processing of the network delay is a tangent function, and the function for nonlinear normalization processing of the packet loss rate is an inverse tangent function, the first network state evaluation value S ni between the information sending node i and the management node n is:
[0159]
[0160] A, B, and C are weight values of the network delay, the packet loss rate, and the network jitter level, respectively. When the reported information is important or the reported information is large, the weight value A of the network packet loss rate can be set to be larger. When the reported information is small, the weight value B of the network delay can be set to be larger. When the importance of the reported information is low, the weight value C of the network jitter level can be set to be larger.
[0161] According to the actual situation, the first network parameters are adaptively processed, so that the weight values are adapted to the size, type, and importance of the corresponding first network parameters. By setting the weight values corresponding to the first network parameters, the influence of the first network parameters on the first network state evaluation value can be adaptively adjusted, and the first network state evaluation value can accurately reflect the influence of the first network parameters on the network state, thereby improving the usability of the first network state evaluation value.
[0162] For example, in the case that the maximum information amount a max and the minimum information amount a min are equal, the first network state evaluation value S ni between the i-th information sending node and the n-th management node can be calculated using the following formula:
[0163]
[0164] wherein k is a preset proportion coefficient, and k>1, so that the base number (k·a max -a min ) of the logarithmic function is greater than zero, to avoid the problem that the base number of the logarithmic function is equal to zero.
[0165] The above formula for calculating the first network state evaluation value S ni is an evaluation function for evaluating the network state between the information sending node and the management node. Through the evaluation function, the first network state evaluation value S ni can be obtained.
[0166] The smaller S ni is, the better the network state between the information sending node i and the management node n is, and the larger S niThe greater, the worse the network state between the information sending node i and the management node n.
[0167] In this embodiment, the first network parameter is normalized to obtain a normalized fifth processing value. In the case where the first network parameter has multiple values, the fifth processing values are weighted and summed according to the weight values. The product of the weighted and summed value and the logarithmic value after the nonlinear normalization of the first information amount is determined as the first network state evaluation value.
[0168] Figure 4 is another information sending method provided by the embodiment of the application, referring to Figure 4 , the method can include the following steps:
[0169] Step S1, obtaining a first network state table; wherein the first network state table includes a first network parameter and a first information amount.
[0170] The first network state table is shown in Table 1, which includes the network parameter between each normal node and the management node and the first information amount of each management node. The information sending node in the normal node which needs to send the to-be-reported information can extract the first network parameter (including at least one of network delay, packet loss rate and network jitter level) and the first information amount of the management node from the first network state table according to the node identifier (such as node name) to obtain the first network state evaluation value according to the first network parameter and the first information amount, to select the first management node according to the first network state evaluation value, and to send the to-be-reported information to the selected first management node.
[0171] Step S2, obtaining a first network state evaluation value according to the first network parameter and the first information amount in the network state table.
[0172] The method of this embodiment can refer to the foregoing step 102, which will not be described here.
[0173] Step S3, sequentially selecting a first management node from a plurality of management nodes according to the first network state evaluation value.
[0174] Specifically, the plurality of first network state evaluation values are sorted to obtain the smallest first network state evaluation value, and the corresponding management node is determined as the first management node.
[0175] Step S4, re-detecting the network parameter and the information amount to obtain a second network state table; the second network state table includes a second network parameter and a second information amount.
[0176] The method of this step can refer to the description of the foregoing step 206, which will not be described here.
[0177] Step S5, obtaining a second network state evaluation value according to the second network parameter and the second information amount.
[0178] The method of this step can refer to the description of step 207.
[0179] Step S6, sequentially selecting a second management node from the plurality of management nodes according to the second network state evaluation value.
[0180] The method of this step can refer to the description of step 208.
[0181] Step S7, determining whether the first management node and the second management node are the same. If yes, go to step S9, otherwise go to step S8.
[0182] For example, the IP addresses of the first management node and the second management node can be compared. If the IP addresses of the first management node and the second management node are the same, it is determined that the first management node and the second management node are the same, otherwise it is determined that the first management node and the second management node are different.
[0183] Step S8, sending an information detection instruction to the first management node, so that the first management node checks whether the to-be-reported information is successfully received. If yes, go to step S9; otherwise, return to step S1.
[0184] The method of this step can refer to the description of step 209.
[0185] Step S9, ending the reporting.
[0186] In this embodiment, the first management node and the second management node respectively preferred before and after the to-be-reported information is sent are compared. If the IP addresses of the two preferred management nodes are different, it indicates that the cluster network is unstable, and this reporting is a high-risk reporting, and the to-be-reported information is easy to lose. Therefore, it is necessary to further verify whether the to-be-reported information is sent successfully. Specifically, it is determined whether the first management node contains the to-be-reported information. If yes, it indicates that the to-be-reported information has been sent successfully, and it is not necessary to repeat uploading; if not, the reporting process of this embodiment repeats sending the to-be-reported information. The method of this embodiment can avoid the problem of loss of to-be-reported information caused by network fluctuation in the reporting process, and can avoid the problem of large network load and processing load of the cluster caused by frequent detection of whether the to-be-reported information is sent successfully.
[0187] Reference Figure 5 It shows an information sending device 30 provided by an embodiment of the application. The device is located in an information sending node in a cluster, and the cluster further includes a plurality of management nodes. The device 30 includes:
[0188] The first obtaining module 301 is configured to obtain, for each management node, a first network parameter between the information sending node and the management node and a first information quantity of information processed by the management node, wherein the first network parameter comprises at least one of a network delay, a packet loss rate and a network jitter level.
[0189] The second obtaining module 302 is configured to obtain, for each management node, a first network state evaluation value between the information sending node and the management node according to the first network parameter and the first information quantity, wherein the first network state evaluation value is negatively correlated with the good degree of the network state.
[0190] The third obtaining module 303 is configured to obtain, from the plurality of management nodes, a first management node corresponding to a minimum first network state evaluation value, and send the to-be-reported information to the first management node, so that the first management node receives the to-be-reported information and synchronizes the to-be-reported information to other management nodes.
[0191] Optionally, the second obtaining module 302 can comprise: a first obtaining sub-module configured to perform normalization processing on the first network parameter to obtain a first processing value; a second obtaining sub-module configured to perform normalization processing on the first information quantity to obtain a second processing value; and a third obtaining sub-module configured to determine the product of the first processing value and the second processing value as the first network state evaluation value.
[0192] Optionally, the first obtaining sub-module can comprise: a first obtaining unit configured to perform linear normalization processing on the first network parameter to obtain a third processing value; and a second obtaining unit configured to perform nonlinear normalization processing on the third processing value to obtain the first processing value; and the second obtaining sub-module can comprise: a third obtaining unit configured to perform nonlinear normalization processing on the first information quantity to obtain the second processing value.
[0193] Optionally, the second obtaining unit can comprise: a first obtaining sub-unit configured to perform nonlinear normalization processing on the third processing value of the network delay using a tangent function to obtain the first processing value of the network delay when the first network parameter is the network delay; a second obtaining sub-unit configured to perform nonlinear normalization processing on the third processing value of the packet loss rate using an inverse tangent function to obtain the first processing value of the packet loss rate when the first network parameter is the packet loss rate; and the third obtaining unit can comprise: a third obtaining sub-unit configured to perform nonlinear normalization processing on the first information quantity using a logarithmic function to obtain the second processing value.
[0194] Optionally, the third obtaining sub-module can comprise: a fourth obtaining unit configured to perform weighted summation processing on a plurality of first processing values of a plurality of first network parameters to obtain a weighted summation value, wherein the first network parameter and the first processing value are in one-to-one correspondence; and a fifth obtaining unit configured to determine the product of the weighted summation value and the second processing value as the first network state evaluation value.
[0195] Optionally, the apparatus 30 further comprises: a fourth obtaining module, configured to, after sending the to-be-reported information to the first management node, for each management node, retest the network state between the information sending node and the management node, obtain a second network parameter, and re-detect the processing information of the management node, to obtain a second information amount; a fifth obtaining module, configured to, for each management node, obtain a second network state evaluation value between the information sending node and the management node according to the second network parameter and the second information amount; a sixth obtaining module, configured to, from the plurality of management nodes, obtain a second management node corresponding to a minimum second network state evaluation value; a judging module, configured to, in a case where it is identified that the first management node and the second management node are different, judge whether the first management node has received the to-be-reported information; and a re-executing module, configured to, in a case where the first management node has not received the to-be-reported information, enter the step of, for each management node, obtaining the first network parameter between the information sending node and the management node, and the first information amount of the processing information of the management node.
[0196] Optionally, the judging module can comprise: a first sending sub-module, configured to send an information detection instruction to the first management node, so that the first management node detects whether the to-be-reported information is stored in the first management node, and feeds back a detection result to the information sending node; and a first determining sub-module, configured to, in a case where the detection result is that the to-be-reported information is not stored in the first management node, determine that the first management node has not received the to-be-reported information.
[0197] Optionally, the network parameters are multiple; the second obtaining module 302 can comprise: a fourth obtaining sub-module, configured to obtain a maximum network parameter and a minimum network parameter from the first network parameters corresponding to the information sending node and each management node respectively; a fifth obtaining sub-module, configured to perform linear normalization processing on the first network parameter to obtain a fourth processing value, according to the first network parameter between the information sending node and the management node, the maximum network parameter and the minimum network parameter, for each management node; a sixth obtaining sub-module, configured to perform nonlinear normalization processing on the fourth processing value of the first network parameter to obtain a fifth processing value, in a case where the first network parameter is network delay or packet loss rate; a seventh obtaining sub-module, configured to determine the fourth processing value as the fifth processing value, in a case where the first network parameter is network jitter level; an eighth obtaining sub-module, configured to obtain a weighted sum value of the multiple first network parameters, according to the weight value corresponding to each first network parameter respectively, and the fifth processing value of each first network parameter respectively; a ninth obtaining sub-module, configured to obtain a maximum information amount and a minimum information amount from the first information amounts corresponding to the multiple management nodes respectively; a tenth obtaining sub-module, configured to obtain a first difference value between the first information amount of the management node and the minimum information amount, and a second difference value between the maximum information amount and the minimum information amount, for each management node; an eleventh obtaining sub-module, configured to obtain a logarithm value of a logarithm function, by taking the first difference value as the true number of the logarithm function and taking the second difference value as the base number of the logarithm function; and a twelfth obtaining sub-module, configured to determine the product of the weighted sum value and the logarithm value as the first network state evaluation value between the information sending node and the management node.
[0198] In the embodiment of the present application, the first network parameters between the information sending node and the management node, and the first information amount of the management node processing information are generally dynamic quantities, therefore, the first network state evaluation value obtained according to the method of the embodiment is also dynamic, and the first management node preferably selected according to the first network state evaluation value is also dynamic. The embodiment realizes dynamic optimization of the management node, and can avoid the problems of loss of information to be reported or failure of sending information to be reported caused by management node failure or failure of other network nodes between the management node and the information sending node when information is reported according to a fixed management node in the related art, and improves the information reporting efficiency and success rate in a large-scale distributed storage cluster.
[0199] Referring to Figure 6 The electronic device 500 can include one or more of the following components: a processing component 502, a memory 504, a power supply component 506, a multimedia component 508, an audio component 510, an input / output (I / O) interface 512, a sensor component 514, and a communication component 516.
[0200] The processing component 502 generally controls the overall operations of the electronic device 500, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 502 can include one or more processors 520 to execute instructions and to complete the steps of the methods described above, in whole or in part. Moreover, the processing component 502 can include one or more modules to facilitate the interaction between the processing component 502 and other components. For example, the processing component 502 can include a multimedia module to facilitate the interaction between the multimedia component 508 and the processing component 502.
[0201] The memory 504 is used to store various types of data to support operations of the electronic device 500. Examples of these data include instructions for any application or method operating on the electronic device 500, contact data, phonebook data, messages, pictures, multimedia, and the like. The memory 504 can be implemented by any type of volatile or non-volatile storage devices or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable programmable read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0202] The power component 506 provides power to the various components of the electronic device 500. The power component 506 can include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 500.
[0203] The multimedia component 508 includes an interface for outputting various types of media content to a user. In some embodiments, the interface can include a liquid crystal display (LCD) and a touch panel (TP). If the interface includes the touch panel, the interface can be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, swiping, and gestures on the touch panel. The touch sensors can not only sense the boundary of a touch or swipe action, but also detect duration and pressure associated with the touch or swipe action. In some embodiments, the multimedia component 508 includes a front-facing camera and / or a rear-facing camera. The front-facing camera and / or the rear-facing camera can receive external multimedia data when the electronic device 500 is in an operation mode, such as a shooting mode or a multimedia mode. Each of the front-facing camera and the rear-facing camera can be a fixed optical lens system or have a focal length and optical zoom capability.
[0204] The audio component 510 is configured to output and / or input audio signals. For example, the audio component 510 includes a microphone (MIC) for receiving an external audio signal when the electronic device 500 is in a particular mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 504 or transmitted via the communication component 516. In some embodiments, the audio component 510 further includes a speaker for outputting audio signals.
[0205] The input / output (I / O) interface 512 provides an interface between the processing component 502 and peripheral interface modules, which can include a keypad, a click wheel, buttons, and so on. The buttons can include, but are not limited to, a home button, a volume button, a start button, and a lock button.
[0206] The sensor component 514 includes one or more sensors for providing status assessments of various aspects of the electronic device 500. For example, the sensor component 514 can detect an open / closed position of the electronic device 500, relative positioning of components, such as a display and a keypad of the electronic device 500, a change of position of the electronic device 500 or a component of the electronic device 500, presence or absence of user contact with the electronic device 500, orientation or acceleration / deceleration of the electronic device 500, and temperature changes of the electronic device 500. The sensor component 514 can include an orientation sensor, an acceleration sensor, a proximity sensor, a gesture sensor, a biometric sensor, a temperature / humidity sensor, an illumination sensor, and / or an interaction sensor. The sensor component 514 can further include an electronic component, for example, a camera, a microphone, and / or a user input interface.
[0207] The communication component 516 facilitates wired or wireless communication between the electronic device 500 and other devices. The electronic device 500 can access a wireless network based on a corresponding communication standard, such as WiFi, Bluetooth®, operator network (e.g., 2G, 3G, 4G, or 5G), or a combination thereof. In an example embodiment, the communication component 516 receives a broadcast signal or a broadcast-related information from an external broadcasting management system via a broadcast channel. In an example embodiment, the communication component 516 further includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technology.
[0208] In an exemplary embodiment, the electronic device 500 can be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, micro-controllers, microprocessors, or other electronic elements for implementing a method for transmitting information according to embodiments of the present application. In an exemplary embodiment, a non-transitory computer readable storage medium, such as the memory 504 including instructions, is also provided, which can be executed by the processor 520 of the electronic device 500 to complete the above method. For example, the non-transitory storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disc, and an optical data storage device, etc.
[0209] Figure 7 FIG. 6 is a block diagram of an electronic device 600 according to another embodiment of the present application. For example, the electronic device 600 can be provided as a remote management device. Referring to FIG. 6, Figure 7 The electronic device 600 includes a processing component 622, which further includes one or more processors, and a memory resource represented by a memory 632 for storing instructions, such as application programs, executable by the processing component 622. The application programs stored in the memory 632 can include one or more modules each corresponding to a set of instructions. In addition, the processing component 622 is configured to execute the instructions to perform a method for transmitting information according to embodiments of the present application.
[0210] The electronic device 600 can further include a power supply component 626 configured to perform power management of the electronic device 600, a wired or wireless network interface 650 configured to connect the electronic device 600 to a network, and an input / output (I / O) interface 658. The electronic device 600 can operate based on an operating system stored in the memory 632, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or the like.
[0211] Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. It is intended that the present application cover any and all variations of the application that come within the scope of the claims and their equivalents. It is intended that the specification and examples be considered exemplary only, with the true scope and spirit of the application indicated by the following claims.
[0212] It is to be understood that the application is not limited to the precise construction already described above and shown in the drawings, and that various modifications and changes can be made by those skilled in the art without departing from the scope of the application. The scope of the application should only be limited by the claims appended hereto.
Claims
1. A method for sending information, characterized in that, The method is applied to information sending nodes in a cluster, which also includes multiple management nodes; the method includes: For each of the management nodes, a first network parameter between the information sending node and the management node is obtained, as well as a first information quantity of the information processed by the management node; the first network parameter includes at least one of network latency, packet loss rate, and network jitter level; For each management node, a first network status evaluation value is obtained between the information sending node and the management node based on the first network parameters and the first information quantity; the first network status evaluation value is negatively correlated with the quality of the network status. From the plurality of management nodes, the first management node corresponding to the minimum first network state evaluation value is obtained, and the information to be reported is sent to the first management node so that the first management node can receive the information to be reported and synchronize the information to be reported to other management nodes; When there are multiple network parameters, obtaining a first network status evaluation value between the information sending node and the management node based on the first network parameter and the first information quantity includes: When the first network parameter is network latency or packet loss rate, the fourth processing value of the first network parameter is nonlinearly normalized to obtain the fifth processing value. The fourth processing value is obtained by linearly normalizing the first network parameter for each management node based on the first network parameter between the information sending node and the management node, and the maximum and minimum network parameters of the first network parameter corresponding to each information sending node and each management node. When the first network parameter is the network jitter level, the fourth processing value is determined as the fifth processing value; Based on the weight value corresponding to each first network parameter and the fifth processing value of each first network parameter, obtain the weighted sum of multiple first network parameters; For each management node, obtain the first difference between the first information quantity and the minimum information quantity, and the second difference between the maximum information quantity and the minimum information quantity. Use the first difference as the argument of the logarithmic function and the second difference as the base of the logarithmic function to obtain the logarithmic value of the logarithmic function. The maximum information quantity and the minimum information quantity are the maximum and minimum values of the first information quantity corresponding to each of the multiple management nodes, respectively. The product of the weighted sum and the logarithmic value is determined as the first network state evaluation value between the information sending node and the management node.
2. The method according to claim 1, characterized in that, The step of obtaining a first network status evaluation value between the information sending node and the management node based on the first network parameters and the first information quantity includes: The first network parameters are normalized to obtain the first processed value; The first information quantity is normalized to obtain the second processed value; The product of the first processed value and the second processed value is determined as the first network state evaluation value.
3. The method according to claim 2, characterized in that, The normalization process for the first network parameters to obtain the first processed value includes: The first network parameters are linearly normalized to obtain the third processed value; The third processed value is subjected to nonlinear normalization to obtain the first processed value; The normalization process for the first information quantity to obtain the second processed value includes: The first information value is subjected to nonlinear normalization to obtain the second processed value.
4. The method according to claim 3, characterized in that, The third processed value is subjected to nonlinear normalization to obtain the first processed value, including: When the first network parameter is network latency, the third processed value of the network latency is non-linearly normalized using the tangent function to obtain the first processed value of the network latency. When the first network parameter is the packet loss rate, the third processed value of the packet loss rate is nonlinearly normalized using the arctangent function to obtain the first processed value of the packet loss rate. The first information quantity is subjected to nonlinear normalization to obtain a second processed value, including: The first information value is non-linearly normalized using a logarithmic function to obtain the second processed value.
5. The method according to claim 2, characterized in that, When there are multiple first network parameters, the product of the first processed value and the second processed value is determined as the first network state evaluation value, including: A weighted summation is performed on multiple first processing values of multiple first network parameters to obtain a weighted summation value; there is a one-to-one correspondence between the first network parameters and the first processing values; The product of the weighted sum and the second processed value is determined as the first network state evaluation value.
6. The method according to claim 1, characterized in that, After sending the information to be reported to the first management node, the process also includes: For each of the management nodes, the network status between the information sending node and the management node is retested to obtain the second network parameters, and the processing information of the management node is re-detected to obtain the second information quantity; For each management node, a second network status evaluation value between the information sending node and the management node is obtained based on the second network parameters and the second information quantity; From multiple management nodes, obtain the second management node corresponding to the minimum second network state evaluation value; If the first management node and the second management node are found to be different, determine whether the first management node has received the information to be reported; If the first management node does not receive the information to be reported, the process proceeds to the step of obtaining, for each management node, the first network parameters between the information sending node and the management node, and the first information quantity of the information processed by the management node.
7. The method according to claim 6, characterized in that, The step of determining whether the first management node has received the information to be reported includes: Send an information detection command to the first management node so that the first management node can detect whether the information to be reported is stored in the first management node and feed back the detection result to the information sending node; If the detection result indicates that the information to be reported is not stored in the first management node, it is determined that the first management node has not received the information to be reported.
8. An information transmission method apparatus, characterized in that, The device is located at an information sending node in a cluster, which also includes multiple management nodes; the device includes: The first acquisition module is used to acquire, for each of the management nodes, a first network parameter between the information sending node and the management node, and a first information quantity of the information processed by the management node; the first network parameter includes at least one of network latency, packet loss rate, and network jitter level; The second acquisition module is used to acquire, for each management node, a first network status evaluation value between the information sending node and the management node based on the first network parameters and the first information quantity; the first network status evaluation value is negatively correlated with the quality of the network status. The third acquisition module is used to acquire the first management node corresponding to the minimum first network state evaluation value from the multiple management nodes, and send the information to be reported to the first management node so that the first management node can receive the information to be reported and synchronize the information to be reported to other management nodes. When there are multiple network parameters, the second acquisition module is further configured to: When the first network parameter is network latency or packet loss rate, the fourth processing value of the first network parameter is nonlinearly normalized to obtain the fifth processing value. The fourth processing value is obtained by linearly normalizing the first network parameter for each management node based on the first network parameter between the information sending node and the management node, and the maximum and minimum network parameters of the first network parameter corresponding to each information sending node and each management node. When the first network parameter is the network jitter level, the fourth processing value is determined as the fifth processing value; Based on the weight value corresponding to each first network parameter and the fifth processing value of each first network parameter, obtain the weighted sum of multiple first network parameters; For each management node, obtain the first difference between the first information quantity and the minimum information quantity, and the second difference between the maximum information quantity and the minimum information quantity. Use the first difference as the argument of the logarithmic function and the second difference as the base of the logarithmic function to obtain the logarithmic value of the logarithmic function. The maximum information quantity and the minimum information quantity are the maximum and minimum values of the first information quantity corresponding to each of the multiple management nodes, respectively. The product of the weighted sum and the logarithmic value is determined as the first network state evaluation value between the information sending node and the management node.
9. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is enabled to perform the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Method and device for realizing high availability of management nodes of big data platform
CN112003721A
Method and device for selecting management node, equipment and storage medium thereof
CN112311585A