Context-Aware Adaptive Link Switching Method, System, Device, and Medium

Through the context-aware adaptive link switching method, the LSTM prediction model and improved fuzzy comprehensive evaluation are used to solve the problems of inaccurate and delayed link switching in the power Internet of Things, and fast and accurate link quality evaluation and handover are achieved.

CN116842440BActive Publication Date: 2025-07-25STATE GRID HUNAN ELECTRIC POWER COMPANY LIMITED +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310680714.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-08
Publication Date
2025-07-25
Estimated Expiration
2043-06-08

AI Technical Summary

Technical Problem

The existing link switching methods cannot accurately switch to high-quality links in the power Internet of Things and have a long switching time delay, so they cannot cope with network instability in complex power system environments.

Method used

Adaptive link switching method based on situational awareness is adopted to predict the link quality of edge devices through the LSTM prediction model, and the link quality is evaluated using an improved fuzzy comprehensive evaluation method, and a nonlinear membership function is formulated for single-factor evaluation, and finally quickly switch to the target link in the event of a link failure.

Benefits of technology

Improves link handover speed and accuracy, ensures handover to link with the best link quality, and reduces link handover time delay.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116842440B_ABST
    Figure CN116842440B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system, device, and medium for adaptive link switching based on context awareness. The method uses an LSTM prediction model to predict future context awareness prediction data based on the current context awareness data of edge devices, and uses an improved fuzzy comprehensive evaluation method to evaluate link quality based on the prediction data. The link with the optimal link quality evaluation is taken as the target link. After the current link of a certain edge device fails, it can be quickly switched to the target link, so that the link quality for a period of time after can be predicted by sensing the context information of the edge device, enabling the edge device to have sufficient time to prepare for link switching, thus greatly improving the speed of link switching. Moreover, when performing fuzzy comprehensive evaluation, a non-linear membership function is formulated for each factor for single-factor evaluation, and the link quality evaluation result is more accurate and comprehensive, thereby ensuring that the link with the optimal link quality can be accurately switched to.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power link switching, and in particular, to a context-aware adaptive link switching method and system, an electronic device, and a computer-readable storage medium. Background Art

[0002] With the continuous development of the power Internet of Things, more and more edge devices are widely used in power systems, such as smart meters, smart cable terminals, smart distribution boxes, etc. These devices usually need to access the Internet of Things management platform through a wireless network to achieve functions such as monitoring, control, and fault diagnosis. However, due to the complexity of the power system environment, these devices often face problems such as insufficient signal coverage, signal interference, and network congestion, resulting in a decline in communication quality and even communication interruption. Network link switching technology has been widely used to solve the problem of unstable Internet network links, but there is a lack of relevant technical methods in the power Internet of Things. Generally speaking, network link switching technology monitors the network status and switches to the optimal communication link in real time, thereby improving communication quality and stability. Traditional network link switching methods usually rely on set thresholds and automatically switch the link when the quality of the link is lower than the threshold. However, in the power Internet of Things, as the environment where the device is located becomes more complex and there are more optional links, traditional solutions often cannot accurately switch to high-quality links. In addition, traditional solutions often adopt a post-treatment strategy and switch the link only after the link quality has significantly decreased, resulting in a long delay in link switching time and the quality of the switched link is not necessarily guaranteed. Summary of the Invention

[0003] The present invention provides a context-aware adaptive link switching method and system, an electronic device, and a computer-readable storage medium to solve the technical problems that the existing link switching method cannot accurately switch to a high-quality link and the link switching time delay is long.

[0004] According to one aspect of the present invention, a context-aware adaptive link switching method is provided, including the following:

[0005] Obtain the context-aware data of the edge device, where the context-aware data includes link type, signal strength, packet loss rate, and transmission delay;

[0006] Input the context-aware data of the edge device into the LSTM prediction model for prediction, and output the context-aware prediction data;

[0007] The link quality of each link is evaluated by using an improved fuzzy comprehensive evaluation method based on context-aware prediction data. During the process of fuzzy comprehensive evaluation, the factor set adopted includes three factors: signal strength, packet loss rate, and transmission delay. The evaluation set adopted includes four levels: very poor, average, good, and excellent. A non-linear membership function is formulated for each factor to conduct single-factor evaluation, obtaining a 3×4 evaluation matrix, and the link quality of each link is evaluated based on the evaluation matrix. Among them, the expression of the non-linear membership function is:

[0008]

[0009]

[0010] In the formula, γ represents the correction parameter, y1 and y2 represent the boundaries of the function, y1 > y2, and the values of y1 and y2 are two consecutive parameters among u1, u2, u3, u4, where u1 > u2 > u3 > u4;

[0011] The link with the optimal link quality evaluation is used as the target link, and the target link is switched to after the current link fails.

[0012] Furthermore, the calculation process of the parameters u1, u2, u3, u4 is as follows:

[0013] Collect the parameter setting vectors of N experts and set the initial weight of each expert to obtain the parameter setting vector set and the initial weight vector. Among them, each parameter setting vector represents the values of the parameters u1, u2, u3, u4;

[0014] Perform Max-Min normalization processing on the parameter setting vector set;

[0015] Calculate the scheme similarity between different parameter setting vectors and the social similarity between different experts;

[0016] Combine the scheme similarity and the social similarity to calculate the recommendation credibility of each parameter setting vector, and update the initial weight of the expert based on the recommendation credibility to obtain the updated expert weight vector;

[0017] Determine the values of the parameters u1, u2, u3, u4 based on the parameter setting vector set and the updated expert weight vector.

[0018] Furthermore, the recommendation credibility of each parameter setting vector is calculated based on the following formula:

[0019]

[0020] Among them, S m,n represents the recommendation credibility of expert m for the parameter setting vector proposed by expert n, Denotes the scheme similarity between the parameter setting vectors of expert m and expert n. Denotes the social similarity between expert m and expert n, where a and b are constants, and c represents a translation parameter.

[0021] The initial weight of the expert is updated based on the following formula:

[0022]

[0023] where, w n and respectively denote the initial weight and the updated weight of expert n, λ1∈[0,1] represents the initial weight parameter, w i and w m respectively denote the initial weights of expert i and expert m, and α m denotes the weight coefficient of expert m.

[0024] Furthermore, the process of evaluating the link quality of each link based on the evaluation matrix is specifically as follows:

[0025] Obtain the initial factor weight vector and the evaluation vector of each factor. Among them, the initial factor weight vector includes the initial factor weights of three factors.

[0026] Calculate the corresponding real-time entropy value based on the evaluation vector of each factor.

[0027] Calculate the adaptive factor weight based on the real-time entropy value and the initial factor weight of each factor to obtain the adaptive factor weight vector.

[0028] Evaluate the link quality of each link based on the adaptive factor weight vector and the evaluation matrix.

[0029] Furthermore, the adaptive factor weight is calculated based on the following formula:

[0030]

[0031] where, ψ i and ψ′ i respectively denote the initial factor weight and the adaptive factor weight of factor i, λ2 represents the adaptive weight coefficient, and H i denotes the real-time entropy value of factor i.

[0032] Furthermore, the process of evaluating the link quality of each link based on the adaptive factor weight vector and the evaluation matrix is specifically as follows:

[0033] Let Q = {Q1, Q2,..., Q L} represents the set of link quality evaluation scores calculated based on the L situational awareness prediction data output by the LSTM prediction model. The weighted average link quality evaluation score of each link is calculated according to the following formula:

[0034]

[0035]

[0036] R = ψ′·M

[0037] Where, represents the weighted average link quality evaluation score, p i represents the weighting coefficient, p i ∈[0, 1], and when i < g, p i < p g , Q i represents the link quality evaluation score calculated by the improved fuzzy comprehensive evaluation method based on the i-th situational awareness prediction data output by the LSTM prediction model, represents the score of the link quality evaluation level ν j The higher the link quality evaluation level, the higher the score. R j represents the membership degree of the link quality to the evaluation level ν j . ψ′ represents the adaptive factor weight vector, M represents the evaluation matrix, and · represents matrix multiplication.

[0038] Furthermore, when selecting the target link, the link with the highest weighted average link quality evaluation score in the same-server links is preferentially selected as the target link. Only when the weighted average link quality evaluation scores of all links in the same-server links are less than the preset threshold, the link with the highest weighted average link quality evaluation score in the cross-server links is selected as the target link.

[0039] In addition, the present invention also provides an adaptive link switching system based on situational awareness, which adopts the above-mentioned adaptive link switching method, including:

[0040] A situational awareness module for obtaining the situational awareness data of the edge device, where the situational awareness data includes link type, signal strength, packet loss rate, and transmission delay;

[0041] A data prediction module for inputting the situational awareness data of the edge device into the LSTM prediction model for prediction and outputting situational awareness prediction data;

[0042] The fuzzy comprehensive evaluation module is used to evaluate the link quality of each link based on the situation awareness prediction data by using an improved fuzzy comprehensive evaluation method. During the fuzzy comprehensive evaluation process, the factor set adopted includes three factors: signal strength, packet loss rate, and transmission delay. The evaluation set adopted includes four levels: very poor, average, good, and excellent. Nonlinear membership functions are formulated for each factor for single-factor evaluation to obtain a 3×4 evaluation matrix, and the link quality of each link is evaluated based on the evaluation matrix. Among them, the expression of the nonlinear membership function is:

[0043]

[0044]

[0045] In the formula, γ represents the correction parameter, y1 and y2 represent the boundaries of the function, y1>y2, and the values of y1 and y2 are two consecutive parameters among u1, u2, u3, and u4, where u1>u2>u3>u4;

[0046] The link switching module is used to take the link with the best evaluated link quality as the target link and switch to the target link after the current link fails.

[0047] In addition, the present invention also provides an electronic device, including a processor and a memory. A computer program is stored in the memory, and the processor is used to execute the steps of the above-mentioned method by calling the computer program stored in the memory.

[0048] In addition, the present invention also provides a computer-readable storage medium for storing a computer program for adaptive link switching based on situation awareness. When the computer program runs on a computer, it executes the steps of the above-mentioned method.

[0049] The present invention has the following effects:

[0050] The adaptive link switching method based on situation awareness of the present invention uses an LSTM prediction model to predict future situation awareness prediction data based on the current situation awareness data of edge devices, and uses an improved fuzzy comprehensive evaluation method to evaluate the link quality of each link based on the situation awareness prediction data. The link with the best evaluated link quality is taken as the target link, and after the current link of a certain edge device fails, it can be quickly switched to the target link. Thus, it is possible to predict the link quality for a period of time after sensing the situation information of the edge device, enabling the edge device to have sufficient time to prepare for link switching, thereby greatly improving the speed of link switching. Moreover, when performing fuzzy comprehensive evaluation, nonlinear membership functions are formulated for each factor for single-factor evaluation, and the link quality evaluation results are more accurate and comprehensive, thus ensuring that the link with the best link quality can be accurately switched to.

[0051] In addition, the context-aware adaptive link switching system of the present invention also has the above advantages.

[0052] In addition to the purposes, features, and advantages described above, the present invention has other purposes, features, and advantages. The present invention will be further described in detail below with reference to the drawings. Brief Description of the Drawings

[0053] The drawings forming a part of this application are used to provide a further understanding of the present invention. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0054] Figure 1 is a schematic flowchart of the context-aware adaptive link switching method according to a preferred embodiment of the present invention.

[0055] Figure 2 is a schematic curve diagram of the non-linear membership function according to a preferred embodiment of the present invention.

[0056] Figure 3 is a schematic flowchart of the parameter value-taking process of the non-linear membership function according to a preferred embodiment of the present invention.

[0057] Figure 4 is a schematic flowchart of the process of evaluating the link quality of each link based on the evaluation matrix according to a preferred embodiment of the present invention.

[0058] Figure 5 is a schematic module structure diagram of the context-aware adaptive link switching system according to another embodiment of the present invention. Detailed Description of the Preferred Embodiments

[0059] The embodiments of the present invention will be described in detail below with reference to the drawings, but the present invention can be implemented in many different ways defined and covered by the following.

[0060] It can be understood that, as Figure 1 shown, a preferred embodiment of the present invention provides a context-aware adaptive link switching method, including the following:

[0061] Step S1: Obtain the context-aware data of the edge device, where the context-aware data includes link type, signal strength, packet loss rate, and transmission delay;

[0062] Step S2: Input the context-aware data of the edge device into the LSTM prediction model for prediction, and output the context-aware prediction data;

[0063] Step S3: Use an improved fuzzy comprehensive evaluation method to evaluate the link quality of each link based on the situation awareness prediction data. During the fuzzy comprehensive evaluation process, the factor set used includes three factors: signal strength, packet loss rate, and transmission delay. The evaluation set used includes four levels: very poor, average, good, and excellent. A non-linear membership function is formulated for each factor to perform single-factor evaluation, obtaining a 3×4 evaluation matrix, and the link quality of each link is evaluated based on the evaluation matrix. Among them, the expression of the non-linear membership function is:

[0064]

[0065]

[0066] In the formula, γ represents the correction parameter, y1 and y2 represent the boundaries of the function, y1 > y2, and the values of y1 and y2 are two consecutive parameters among u1, u2, u3, u4, where u1 > u2 > u3 > u4;

[0067] Step S4: Take the link with the optimal link quality evaluation as the target link, and switch to the target link after the current link fails.

[0068] It can be understood that the situation awareness-based adaptive link switching method in this embodiment uses an LSTM prediction model to predict future situation awareness prediction data based on the current situation awareness data of the edge device, and uses an improved fuzzy comprehensive evaluation method to evaluate the link quality of each link based on the situation awareness prediction data. The link with the optimal link quality evaluation is taken as the target link, and it can be quickly switched to the target link after the current link of a certain edge device fails. Thus, the link quality for a period of time after can be predicted by sensing the situation information of the edge device, enabling the edge device to have sufficient time to prepare for link switching, thereby greatly improving the speed of link switching. Moreover, when performing fuzzy comprehensive evaluation, a non-linear membership function is formulated for each factor to perform single-factor evaluation, and the link quality evaluation result is more accurate and comprehensive, thus ensuring that the link with the optimal link quality can be accurately switched to.

[0069] It can be understood that in the step S1, the context awareness data of the edge device is obtained. The context awareness data includes four types of context information data: link type, signal strength, packet loss rate, and transmission delay. Among them, the link type includes 4G, 5G, wireless private network, etc. When the communication state of the device is disconnected, that is, after the link is disconnected due to a poor network environment, the device sets the packet loss rate at this time to 100%, and the transmission delay is set to a relatively large value. In addition, the context awareness data can also include the operation state data of the edge device itself, such as memory usage rate, CPU occupancy rate, etc., so as to provide data support for other applications. When collecting data, the platform issues a data collection instruction, and the edge device reports the perceived context information data to the platform until the amount of data is sufficient. A piece of context awareness data can be represented as x t ={x t,1 ,x t,2 ,x t,3 ,x t,4}, where x t,m , m ∈ {1, 2, 3, 4} represents the data value of the m-th type of context information at time t.

[0070] It can be understood that in the step S2, the LSTM prediction model is a prediction model with multiple parallel inputs and multiple-step outputs implemented based on the LSTM deep neural network, that is, based on K consecutive data, the subsequent L data can be predicted. Optionally, the LSTM prediction model is a unidirectional LSTM model. Among the key parameters of the model, the number of layers of the hidden layer of the LSTM model is N layer , the input dimension is 4, the input length (size) is K, the output length (size) is L, the output dimension is the same as the input dimension, which is 4, and the feature dimension of the hidden layer is N h , in order to reduce the complexity of the model, N layer and N h should be as small as possible on the premise of ensuring performance requirements. Optionally, the LSTM prediction model includes a unidirectional LSTM and a fully connected network. The unidirectional LSTM acts as an encoder to encode K consecutive data, and then, the data is decoded through four fully connected layers of the fully connected network to predict the subsequent L consecutive data. Among them, the input feature dimension of the fully connected network is the same as the feature dimension output by the unidirectional LSTM, and the output feature dimension is L, that is, the four fully connected layers respectively predict four types of context information data.

[0071] In addition, in the model training stage, Adam is used as the optimization method and MSE is used as the loss function to train the model. Of course, the optimization method and loss function can also be adjusted based on specific situations. Based on the structure of the model, the training data is preprocessed so that a piece of training data includes K consecutive context awareness data, that is, a piece of training data can be represented as {x t ,x(t+1) , …, x (t+K)} where x t is a perception data vector of dimension 4, then the label data corresponding to the training data is {x (t+K+1) , x (t+K+2) , …, x (t+K+L)}. After processing the data, the model can be trained. If the prediction error of the model on the training set is lower than a certain threshold or reaches the maximum number of iterations, the training stops. It can be understood that during the training phase, various hyperparameters also need to be adjusted to enable the model to meet the preset prediction accuracy requirements. The specific process of hyperparameter adjustment belongs to the prior art and will not be elaborated here.

[0072] It can be understood that in step S3, an improved fuzzy comprehensive evaluation method is used to evaluate the link quality of each edge device based on the L context awareness data output by the LSTM prediction model. Among them, the L context awareness data output by the LSTM prediction model can be expressed as X = {X1, X2, ..., X L}, where X l = {X l,1 , X l,2 , X l,3 , X l,4} represents four types of context information data at time l in sequence. Since there are differences in the evaluation criteria for the link quality of different terminals, there is a certain degree of ambiguity in the evaluation of the link quality. For example, if the link quality is divided into three levels: good, fair, and poor, then there is ambiguity in evaluating the link quality as good from the perspective of wireless signal strength, that is, there is a certain degree of ambiguity about how much wireless signal strength represents good link quality. Similarly, there is ambiguity in evaluating the link quality from the aspects of packet loss rate and transmission delay. Therefore, the present invention designs an improved fuzzy comprehensive evaluation method to evaluate the link quality. Compared with quantitative quality evaluation, the advantage of fuzzy comprehensive evaluation is that it can better handle problems that are difficult to quantify with precise data. It can take various different factors into account and thus give a more comprehensive and objective evaluation result.

[0073] It can be understood that the first context information data among the four types of context information data marks the link type. When the present invention conducts fuzzy comprehensive evaluation, only signal strength, packet loss rate, and transmission delay are selected as the factor set, and the evaluation set includes four evaluation levels: very poor, average, good, and excellent. For the wireless signal strength, the larger its value, the better the link quality. And for the packet loss rate and transmission delay, the smaller their values, the better the link quality. To unify the goal, the packet loss rate and transmission delay are converted through the following formula so that both of these two goals are converted into the better the link quality when the target value is larger. The specific conversion formula is:

[0074]

[0075]

[0076] Among them, X l,3 and X l,4 respectively represent the packet loss rate and transmission delay at time l, and respectively represent the converted packet loss rate and transmission delay, and τ represents the bias constant.

[0077] Obviously, when performing fuzzy comprehensive evaluation, the size of the factor set is 3, and the size of the evaluation set is 4. In order to accurately comprehensively evaluate the link quality, the present invention formulates a non-linear membership function for each factor to perform single-factor evaluation. It can be understood that compared with the traditional triangular membership function, the non-linear membership function can simulate the non-linear change of uncertainty and can more accurately evaluate the link quality. After completing the single-factor evaluation, an evaluation vector of dimension 4 can be obtained. Thus, after performing fuzzy evaluation on the three factors, a 3×4 evaluation matrix can be finally obtained, and then the link quality of each link can be evaluated based on the evaluation matrix. Among them, the expression of the non-linear membership function is:

[0078]

[0079]

[0080] In the formula, γ represents the correction parameter, y1 and y2 represent the boundaries of the function, y1>y2, and the values of y1 and y2 are two consecutive parameters among u1, u2, u3, u4, where u1>u2>u3>u4. It can be seen from the above formula that the above non-linear membership function is composed of several piecewise functions, and its curve schematic diagram is as shown in Figure 2 shown. It can be understood that in order to make the function curves of f1 and f2 fit the curve trend in Figure 2 , that is, the function curves should approach 1 at the boundaries, then the value of the correction parameter γ needs to meet certain conditions. Specifically, since f1 and f2 are symmetric functions, it is only necessary to satisfy f1(y2; y1, y2)≥h, where h is a constant approaching 1. Solving the inequality shows that γ should satisfy the following conditions: Therefore, only by formulating the value of h and taking the case where the correction parameter γ takes the equal sign, the value of the correction parameter γ can be adaptively generated. For example, when h is taken as 0.99, it can be obtained that the correction parameter γ should not be less than 9.19 to meet the requirements, so the value of the correction parameter γ is 9.19.

[0081] In addition, regarding the membership function, for different factors, the values of parameters u1 to u4 are inconsistent. Moreover, in the membership function of the same factor for different terminal types, the values of parameters u1 to u4 may also be different. This is because different terminals have different requirements for network quality, and thus different standards for network quality. For example, for real-time tasks, the transmission delay needs to be low. Therefore, the terminal has strict requirements for transmission delay. However, for non-real-time tasks, the terminal has a higher tolerance for transmission delay. Therefore, the boundary for considering the link quality to be better is higher at this time. This means that in different situations, the boundaries for the uncertainty of network quality by the terminal are different. However, the parameter values of the existing membership functions are often obtained based on expert experience. Among them, some schemes only set parameters based on a single expert or simply perform weighted averaging by comprehensively combining the parameter values of multiple experts. Obviously, these schemes ignore the professional ability gaps among different experts, the correlations between the value-taking schemes of different experts, and the influence of the social relationships among experts on the value-taking schemes, resulting in inaccurate parameter values of the membership function and thus poor accuracy of the fuzzy evaluation results.

[0082] Therefore, the present invention also improves the method for obtaining parameter values of the non-linear membership function, taking into account the professional abilities of different experts, the correlations between the value-taking schemes of different experts, and the social relationships among experts, making the calculated parameter value-taking scheme more accurate after weighting, thereby improving the accuracy of the fuzzy evaluation results. Among them, as Figure 3 shown, in step S3, the calculation process of parameters u1, u2, u3, and u4 is as follows:

[0083] Step S31: Collect the parameter setting vectors of N experts and set the initial weight of each expert to obtain a parameter setting vector set and an initial weight vector, where each parameter setting vector represents the values of parameters u1, u2, u3, and u4;

[0084] Step S32: Perform Max-Min normalization processing on the parameter setting vector set;

[0085] Step S33: Calculate the scheme similarity between different parameter setting vectors and the social similarity between different experts;

[0086] Step S34: Calculate the recommended credibility of each parameter setting vector by combining the scheme similarity and the social similarity, and update the initial weight of the expert based on the recommended credibility to obtain an updated expert weight vector;

[0087] Step S35: Determine the values of parameters u1, u2, u3, and u4 based on the parameter setting vector set and the updated expert weight vector.

[0088] Specifically, assume S N×4={x1, x2,..., x N} represents the set of parameter setting vectors of N experts collected, where x n represents the parameter setting vector of expert n, and each parameter setting vector represents the values of parameters u1, u2, u3, and u4. A parameter setting vector is a value-taking scheme. At the same time, the initial weight vectors of N experts are set, which can be expressed as w = {w1, w2,..., w N}, w n represents the initial weight of expert n, which is a quantitative value of the expert's professional ability and reflects the basic credibility of the expert. Among them, the initial weight of each expert can be set manually according to the expert's professional ability, or an existing weight distribution scheme can be adopted.

[0089] Then, the parameter setting vector set S N×4 is subjected to Max-Min normalization processing so that the value range of each element in the set S N×4 is [0, 1].

[0090] Then, the scheme similarity between different parameter setting vectors is calculated. Specifically, the cosine similarity algorithm or the Euclidean distance algorithm can be used to calculate the scheme similarity. The scheme similarity reflects the correlation between the value-taking schemes of different experts. The larger the value of the scheme similarity, the higher the similarity between the value-taking schemes of different experts. Among them, the calculation formulas of the cosine similarity algorithm and the Euclidean distance algorithm are prior arts, so they will not be elaborated here. Let represent the scheme similarity between the value-taking scheme of expert m and the value-taking scheme of expert n. Obviously, if a value-taking scheme has a high similarity with multiple value-taking schemes, it indicates that multiple experts have a high degree of recognition of this value-taking scheme, and then the credibility of this value-taking scheme is greater. On the contrary, if the similarity between the other value-taking schemes and this value-taking scheme is low, the credibility of this value-taking scheme is small. At the same time, the present invention takes into account that the social relationships between different experts will inevitably affect the value-taking schemes. For example, if the relationship between experts is close, then there may be a possibility of reference in the value-taking schemes. Another example is that if the experts are colleagues, then their engineering experiences may be similar, which will affect each other's value-taking schemes. Therefore, in order to further obtain accurate parameter value-taking schemes, the value-taking schemes of different experts should be as independent as possible. The present invention evaluates the mutual independence between different value-taking schemes by calculating the social similarity between different experts to reduce the influence of social relationships on the fuzzy evaluation results. Let Denote the social similarity between expert m and expert n. The calculation method of social similarity is the same as that of solution similarity, so it will not be elaborated here. Specifically, the social similarity can be calculated by constructing the social information vector of each expert and then based on the social information vector. Among them, the elements in the social information vector can include information such as the working location, job position, and common friends of the expert. For example, collect the information of the expert, and count the working location attributes of the two experts (1 if the working locations are the same, 0 otherwise), job positions (1 if the same, 0 if different), the distance between working locations (using the Euclidean distance), and the number of common friends obtained through the attention of the social network. Thus, the social information vector of any two experts can be obtained, and then the social similarity between the two experts can be calculated based on the cosine formula. Of course, on the premise of respecting personal privacy and obtaining personal consent, collecting as much social information as possible can help calculate a more accurate social similarity, which can be implemented according to specific circumstances.

[0091] Then, combine the solution similarity and social similarity to calculate the recommendation credibility of each parameter setting vector (i.e., the value-taking solution). The specific calculation formula is:

[0092]

[0093] Among them, S m,n Denote the recommendation credibility of expert m for the parameter setting vector proposed by expert n. Denote the solution similarity between the parameter setting vectors of expert m and expert n. Denote the social similarity between expert m and expert n. a is a proportionality coefficient, which is a constant. b is a very small constant used to avoid the denominator being 0. c represents a translation parameter, c ≥ 4, so that the value range of S m,n Approximately satisfies [0, 1]. If there is no translation parameter c, the value range of S m,n Is [0.5, 1]. Therefore, the specific values of a, b, and c can be set according to actual needs. It can be seen from the above formula that the more similar the two value-taking solutions are and the weaker the social relationship between the proposers of the solutions is, the higher the comprehensive recommendation credibility is.

[0094] Next, update the initial weight of the expert based on the recommendation credibility. The specific calculation formula is:

[0095]

[0096] Among them, w n And Respectively denote the initial weight and the updated weight of expert n. λ1 ∈ [0, 1] represents the initial weight parameter, and the specific value is set manually. w i And w m Respectively denote the initial weights of expert i and expert m. αm Denote the weight coefficient of expert \(m\). Through weighting in the present invention it is such that the larger the initial weight of an expert, the greater the impact on the updated weight, that is, the recognition of a solution by an expert with stronger professional ability has a greater impact on the weight than that of an expert with weaker professional ability. Thus, it is possible to reduce, to a certain extent, the collusion among experts with lower basic credibility, which affects the accuracy of the fuzzy evaluation result. After updating the initial weight of each expert, the updated expert weight vector can be obtained

[0097] Finally, based on the parameter setting vector set \(S\) N×4 and the updated expert weight vector determine the values of parameters \(u_1\), \(u_2\), \(u_3\), and \(u_4\). The specific calculation formulas are as follows:

[0098]

[0099] where \(maxval\) and \(minval\) respectively represent the parameter maximum value vector and the parameter minimum value vector stored when performing Max - Min normalization on \(S\) N×4

[0100] It can be understood that after determining the values of the parameters \(u_1\), \(u_2\), \(u_3\), and \(u_4\) of the non - linear membership function, single - factor evaluation can be performed on each factor based on the non - linear membership function to obtain an evaluation vector of dimension 4. Thus, after performing fuzzy evaluation on all factors, an evaluation matrix \(M\) of \(3×4\) can be obtained. Let \(m\) ij \(\in M\) represent the membership degree of factor \(i\) to the link quality evaluation level \(\nu\) j , where \(i = 1, 2, 3\) respectively represent signal strength, packet loss rate, and transmission delay, \(j = 1, 2, 3, 4\), and \(\nu_1\sim\nu_4\) respectively represent four evaluation levels: poor, general, good, and excellent. As Figure 4 shown, in the step \(S3\), the process of evaluating the link quality of each link based on the evaluation matrix is specifically as follows:

[0101] Step \(S301\): Obtain the initial factor weight vector and the evaluation vector of each factor, where the initial factor weight vector includes the initial factor weights of three factors;

[0102] Step \(S302\): Calculate the corresponding real - time entropy value based on the evaluation vector of each factor;

[0103] Step \(S303\): Calculate its adaptive factor weight based on the real - time entropy value and the initial factor weight of each factor to obtain the adaptive factor weight vector;

[0104] Step \(S304\): Evaluate the link quality of each link based on the adaptive factor weight vector and the evaluation matrix.​

[0105] Specifically, an initial factor weight vector and an evaluation vector for each factor are obtained. Among them, the initial factor weight vector includes the initial factor weights of three factors, and the initial factor weight vector can be specifically expressed as ψ = {ψ1, ψ2, ψ3}, and the evaluation vector for each factor can be expressed as V i ={V i,1 , V i,2 , V i,3 , V i,4}, Among them, the specific values of the initial factor weight vector ψ can be set based on expert knowledge or updated based on a similarity algorithm on the basis of the initial values. Among them, the specific update algorithm is the same as the weight update algorithm of the above parameters u1, u2, u3, u4, and will not be elaborated here. In addition, the initial factor weight vectors of different types of edge terminals are different because edge devices with high real-time requirements pay more attention to transmission delay, while some edge devices care more about packet loss rate.

[0106] In order to improve the accuracy of the factor weight vector, the present invention also uses the entropy weight method to adaptively update the factor weight vector. Specifically, the corresponding real-time entropy value is calculated based on the evaluation vector of each factor, and the calculation formula is: H i represents the real-time entropy value of factor i, and V i,k represents the kth value of the evaluation vector of factor i. According to the definition of entropy, the lower the entropy value, the smaller the difference of the index, the lower the uncertainty of the index. At this time, the weight value of this index should be larger to make the comprehensive result more accurate. However, the entropy weight method ignores the importance of the factor itself. For example, devices with high real-time requirements pay more attention to transmission delay, while some devices care more about packet loss rate. Therefore, a more reasonable solution is to consider the initial weights of different terminals and adaptively update the factor weight vector according to the actual situation.

[0107] Therefore, the present invention calculates its adaptive factor weight based on the real-time entropy value and the initial factor weight of each factor to obtain an adaptive factor weight vector. The specific calculation formula is:

[0108]

[0109] Among them, ψ i and ψ′ i respectively represent the initial factor weight and the adaptive factor weight of factor i, λ2 represents the adaptive weight coefficient, λ2 ∈ [0, 1], and can be set as needed. The above formula makes the weight value of the factor with a larger entropy value smaller, and the weight value of the factor with a smaller entropy value larger. At the same time, the initial factor weight is introduced and multiplied by the entropy value, that is If the weights determined by the entropy weight method are associated with the initial weights, then the result of the adaptive update of the weights will not be a simple weighted mean, which can effectively control the change range of the weights and avoid large fluctuations in the weight vector. For example, if the entropy value of a certain factor is very low, then based on the traditional weighted calculation method, it is very likely that the updated weight of this factor will fluctuate greatly after weighting.

[0110] After obtaining the adaptive factor weight vector ψ′, the fuzzy comprehensive evaluation result at the current moment can be expressed as: R = ψ′·M, where · represents matrix multiplication and M represents the evaluation matrix. Then, by normalizing R so that the sum of the set R is 1, the link quality evaluation score can be calculated based on the following formula:

[0111]

[0112] where, Q i represents the link quality evaluation score calculated through the improved fuzzy comprehensive evaluation method based on the i-th situation awareness prediction data output by the LSTM prediction model. represents the grade score of the link quality evaluation level ν j The higher the link quality evaluation level, the higher the grade score. The feasible values of j are 30, 60, 80, 100, and R j represents the membership degree of the link quality to the evaluation level ν

[0113] In addition, according to the above improved fuzzy comprehensive evaluation method, the link quality evaluation score Q i at time i can be calculated. Obviously, the larger the value of Q i , the better the comprehensive evaluation result of the link. However, since the link quality changes at all times, it is unreliable and inaccurate to evaluate only based on the link quality at one moment. A more feasible way is to predict the change trend of the link quality. If the link quality shows a downward trend and the average quality is lower than the threshold, it indicates that the possibility of the link failing soon is relatively high, and link switching needs to be prepared in advance. Therefore, the present invention also makes improvements when calculating the link quality evaluation score. Specifically, let Q = {Q1, Q2,..., Q L} represent the set of link quality evaluation scores calculated based on L situation awareness prediction data output by the LSTM prediction model, and calculate the weighted average link quality evaluation score of each link based on the following formula:

[0114]

[0115] where, represents the weighted average link quality evaluation score, and p i represents the weighting coefficient, p i ∈[0,1]. and when i < g, p i < p g , Q i represents the i-th situation awareness prediction data output by the LSTM prediction model, and the link quality evaluation score calculated by the improved fuzzy comprehensive evaluation method, that is, the link quality evaluation score at time i. Among them, the specific value of p i can be randomly generated to obtain a set of data, and then a set of weight vectors can be obtained through sorting; or, it can be set based on human experience. It can be seen that the above formula makes the weight of the link quality evaluation score result closer to the end higher, so as to capture the change trend of the link. For example, if the quality of the predicted link is in a downward trend, the weighted average link quality can increase the influence of the subsequent link quality on the average value, and then capture the trend that the link is about to deteriorate, further improving the accuracy of the fuzzy comprehensive evaluation result. After calculating the weighted average link quality evaluation score , if is lower than the preset threshold, it is determined that the link is likely to fail within a certain period of time in the future. At this time, the device starts the link switching process. Once the subsequent link does fail, it can be immediately switched to a high-quality link. If is not less than the preset threshold, it is determined that the link quality in the future period of time is good and there will be no failure, and new situation awareness data is collected again to predict the link quality.

[0116] It can be understood that the present invention evaluates the comprehensive link quality through the improved fuzzy comprehensive evaluation method, then combines the weighted algorithm to capture the change trend of the link quality, and the evaluation result is more accurate and comprehensive. Finally, after the link actually fails, it can be quickly and adaptively switched to the optimal link.

[0117] It can be understood that in step S4, when selecting the target link, the link with the highest weighted average link quality evaluation score in the same-server links is preferentially selected as the target link. At this time, the weighted average link quality evaluation score of at least one network link in the same-server links is greater than the preset threshold. Only when the weighted average link quality evaluation scores of all links in the same-server links are less than the preset threshold, the link with the highest weighted average link quality evaluation score in the cross-server links is selected as the target link. Among them, the same-server link switch means that the server connected by the device remains unchanged, and only the wireless network is switched. For example, switching from a 4G network link to a 5G network link, but the server connected by the device is still the original server. The cross-server link switch means that the server connected by the device changes. Generally, such link switches occur due to reasons such as server downtime or excessive server congestion, resulting in serious delays in all optional links of the device. At this time, it is necessary to switch to another server to ensure the stability of the data transmission link. Since the same-server link switch has a lower cost and is more efficient, the present invention preferentially considers the same-server link switch mode. Only when none of the links in the same server meet the conditions, the cross-server link switch mode is considered. Of course, in other embodiments of the present invention, it is also possible to directly switch to the link with the highest weighted average link quality evaluation score among all links, regardless of whether they are in the same server. Optionally, in order to avoid overly frequent link switches, the time interval between two link switches shall not exceed the preset interval value. In addition, since the predicted time length is L moments, if no link anomaly occurs within β × L time, no link switch is performed. β represents the time weight coefficient, and its value range is [0, 1].

[0118] In addition, as Figure 5 shown, another embodiment of the present invention also provides a context-aware adaptive link switching system, preferably adopting the above-mentioned adaptive link switching method. The system includes:

[0119] A context awareness module for obtaining context awareness data of the edge device. Among them, the context awareness data includes link type, signal strength, packet loss rate, and transmission delay;

[0120] A data prediction module for inputting the context awareness data of the edge device into the LSTM prediction model for prediction and outputting context awareness prediction data;

[0121] The fuzzy comprehensive evaluation module is used to evaluate the link quality of each link based on the situation awareness prediction data by using an improved fuzzy comprehensive evaluation method. During the fuzzy comprehensive evaluation process, the factor set adopted includes three factors: signal strength, packet loss rate, and transmission delay. The evaluation set adopted includes four levels: very poor, average, good, and excellent. A non-linear membership function is formulated for each factor to conduct single-factor evaluation, obtaining a 3×4 evaluation matrix, and the link quality of each link is evaluated based on the evaluation matrix. Among them, the expression of the non-linear membership function is:

[0122]

[0123]

[0124] In the formula, γ represents the correction parameter, y1 and y2 represent the boundaries of the function, y1 > y2, and the values of y1 and y2 are two consecutive parameters among u1, u2, u3, and u4, where u1 > u2 > u3 > u4;

[0125] The link switching module is used to take the link with the best link quality evaluation as the target link and switch to the target link after the current link fails.

[0126] It can be understood that the situation awareness-based adaptive link switching system in this embodiment uses an LSTM prediction model to predict future situation awareness prediction data based on the current situation awareness data of edge devices, and uses an improved fuzzy comprehensive evaluation method to evaluate the link quality of each link based on the situation awareness prediction data. The link with the best link quality evaluation is taken as the target link, and it can be quickly switched to the target link after the current link of a certain edge device fails. Thus, it is possible to predict the link quality for a period of time after by sensing the situation information of edge devices, enabling edge devices to have sufficient time to prepare for link switching, thereby greatly improving the speed of link switching. Moreover, when conducting fuzzy comprehensive evaluation, a non-linear membership function is formulated for each factor to conduct single-factor evaluation, and the link quality evaluation result is more accurate and comprehensive, thus ensuring that the link with the best link quality can be accurately switched to.

[0127] In addition, another embodiment of the present invention further provides an electronic device, including a processor and a memory. A computer program is stored in the memory, and the processor is used to execute the steps of the method as described above by calling the computer program stored in the memory.

[0128] In addition, another embodiment of the present invention further provides a computer-readable storage medium for storing a computer program for adaptive link switching based on situation awareness. When the computer program runs on a computer, it executes the steps of the method as described above.

[0129] The forms of common computer-readable storage media include: floppy disks, flexible disks, hard disks, magnetic tapes, any other magnetic media, CD-ROMs, any other optical media, punch cards, paper tapes, any other physical media with a pattern of holes, random access memories (RAMs), programmable read-only memories (PROMs), erasable programmable read-only memories (EPROMs), flash erasable programmable read-only memories (FLASH-EPROMs), any other memory chips or cartridges, or any other media readable by a computer. Instructions can further be transmitted or received by a transmission medium. The term transmission medium can include any tangible or intangible medium that can be used to store, encode, or carry instructions for execution by a machine, and includes digital or analog communication signals or other intangible media that facilitate the communication of the above instructions. The transmission medium includes coaxial cables, copper wires, and optical fibers, which include the wires of a bus used to transmit a computer data signal.

[0130] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, various changes and modifications can be made to the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

[0131] Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program code. The solutions in the embodiments of the present application can be implemented in various computer languages. For example, object-oriented programming languages such as Java and interpreted scripting languages such as JavaScript.

[0132] The present application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processors of general-purpose computers, special-purpose computers, embedded processors, or other programmable data processing devices to generate a machine, such that the instructions executed by the processors of the computer or other programmable data processing devices generate for implementation in the process Figure 1one or more processes and / or blocks Figure 1 means for the functions specified in one or more blocks

[0133] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to operate in a particular manner, such that the instructions stored in the computer-readable memory produce a manufacture including an instruction means that implements the functions in the process Figure 1 one or more processes and / or blocks Figure 1 specified in one or more blocks

[0134] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, such that a series of operational steps are performed on the computer or other programmable apparatus to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable apparatus provide steps for implementing the functions specified in the process Figure 1 one or more processes and / or blocks Figure 1 specified in one or more blocks

[0135] Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications once they learn the basic creative concepts. Therefore, the appended claims are intended to be construed to include the preferred embodiments as well as all changes and modifications falling within the scope of the present application

[0136] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations

Claims

1. An adaptive link switching method based on context awareness, characterized in that, It includes the following contents: Obtain the context awareness data of the edge device, where the context awareness data includes link type, signal strength, packet loss rate, and transmission delay; Input the context awareness data of the edge device into the LSTM prediction model for prediction, and output the context awareness prediction data; Adopt an improved fuzzy comprehensive evaluation method to evaluate the link quality of each link based on the context awareness prediction data. In the process of fuzzy comprehensive evaluation, the factor set adopted includes three factors: signal strength, packet loss rate, and transmission delay, and the evaluation set adopted includes four levels: very poor, average, good, and excellent. A non-linear membership function is formulated for each factor to conduct single-factor evaluation, obtaining a 3×4 evaluation matrix, and the link quality of each link is evaluated based on the evaluation matrix. The expression of the non-linear membership function is: In the formula, γ represents the correction parameter, y1 and y2 represent the boundaries of the function, y1 > y2, and the values of y1 and y2 are two consecutive parameters among u1, u2, u3, u4, where u1 > u2 > u3 > u4; Take the link with the best link quality evaluation as the target link, and switch to the target link after the current link fails; The calculation process of parameters u1, u2, u3, u4 is as follows: Collect the parameter setting vectors of N experts and set the initial weight of each expert to obtain the parameter setting vector set and the initial weight vector, where each parameter setting vector represents the values of parameters u1, u2, u3, u4; Perform Max-Min normalization processing on the parameter setting vector set; Calculate the scheme similarity between different parameter setting vectors and the social similarity between different experts; Combine the scheme similarity and the social similarity to calculate the recommendation credibility of each parameter setting vector, and update the initial weight of the expert based on the recommendation credibility to obtain the updated expert weight vector; Determine the values of parameters u1, u2, u3, u4 based on the parameter setting vector set and the updated expert weight vector.

2. The context-aware based adaptive link switching method according to claim 1, wherein, Calculate the recommendation credibility of each parameter setting vector based on the following formula: Among them, S m,n represents the recommended credibility of expert m for the parameter setting vector proposed by expert n, represents the solution similarity between the parameter setting vectors of expert m and expert n, represents the social similarity between expert m and expert n, where a and b are constants, and c represents the translation parameter; Update the initial weight of the expert based on the following formula: where, w n and represent the initial weight and the updated weight of expert n respectively, λ1 ∈ [0, 1] represents the initial weight parameter, w i and w m represent the initial weights of expert i and expert m respectively, α m represents the weight coefficient of expert m, 3. The context-aware based adaptive link switching method according to claim 1, wherein The process of evaluating the link quality of each link based on the evaluation matrix is specifically as follows: Obtain the initial factor weight vector and the evaluation vector of each factor, where the initial factor weight vector includes the initial factor weights of the three factors; Calculate the corresponding real-time entropy value based on the evaluation vector of each factor; Calculate the adaptive factor weight based on the real-time entropy value and the initial factor weight of each factor to obtain the adaptive factor weight vector; Evaluate the link quality of each link based on the adaptive factor weight vector and the evaluation matrix.

4. The context-aware based adaptive link switching method according to claim 3, wherein Calculate the adaptive factor weight based on the following formula: Among them, ψ i and ψ i ' respectively represent the initial factor weight and the adaptive factor weight of factor i, λ2 represents the adaptive weight coefficient, and H i represents the real-time entropy value of factor i.

5. The context-aware based adaptive link switching method according to claim 3, wherein The process of evaluating the link quality of each link based on the adaptive factor weight vector and the evaluation matrix is specifically as follows: Let \(Q = \{Q_1, Q_2, \ldots, Q L \}\) represent the set of link quality evaluation scores calculated from \(L\) pieces of context-aware prediction data output by the LSTM prediction model. The weighted average link quality evaluation score of each link is calculated according to the following formula: R = ψ′·M Among them, represents the weighted average link quality assessment score, p i represents the weighting coefficient, p i ∈[0,1], and when i < g, p i < p g , Q i represents the i-th context-aware prediction data output by the LSTM prediction model, and the link quality assessment score calculated by the improved fuzzy comprehensive evaluation method, represents the grade score of the link quality evaluation level ν j . The higher the link quality evaluation level, the higher the grade score. R j represents the membership degree of the link quality to the evaluation level ν j . ψ′ represents the adaptive factor weight vector, M represents the evaluation matrix, and · represents matrix multiplication.

6. The context-aware based adaptive link switching method according to claim 5, wherein When selecting the target link, preferentially select the link with the highest weighted average link quality evaluation score among the same-server links as the target link. Only when the weighted average link quality evaluation scores of all links in the same-server links are less than the preset threshold, select the link with the highest weighted average link quality evaluation score among the cross-server links as the target link.

7. An adaptive link switching system based on context awareness, which adopts the adaptive link switching method according to any one of claims 1 to 6, is characterized in that It includes: A situation awareness module, configured to obtain situation awareness data of an edge device, where the situation awareness data includes link type, signal strength, packet loss rate, and transmission delay; A data prediction module, configured to input the situation awareness data of the edge device into an LSTM prediction model for prediction, and output situation awareness prediction data; A fuzzy comprehensive evaluation module, configured to evaluate the link quality of each link based on the situation awareness prediction data by using an improved fuzzy comprehensive evaluation method. In the process of fuzzy comprehensive evaluation, the factor set used includes three factors: signal strength, packet loss rate, and transmission delay, and the evaluation set used includes four levels: very poor, average, good, and excellent. A non-linear membership function is formulated for each factor to perform single-factor evaluation, obtaining a 3×4 evaluation matrix, and evaluating the link quality of each link based on the evaluation matrix. The expression of the non-linear membership function is: In the formula, γ represents a correction parameter, y1 and y2 represent the boundaries of the function, y1>y2, and the values of y1 and y2 are two consecutive parameters among u1, u2, u3, and u4, where u1>u2>u3>u4; A link switching module, configured to use the link with the best evaluated link quality as the target link, and switch to the target link after the current link fails.

8. An electronic device, characterized in that, It includes a processor and a memory. A computer program is stored in the memory. The processor is configured to execute the steps of the method according to any one of claims 1 to 6 by calling the computer program stored in the memory.

9. A computer-readable storage medium for storing a computer program for adaptively switching a link based on context awareness, characterized in that, When the computer program runs on a computer, it executes the steps of the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method for comprehensively evaluating link quality by using over-limit learning machine

    CN107302768A

  • Fuzzy comprehensive evaluation method for health state of digital power transformer

    CN113591402A