Heartbeat signal-based network connection enhancement method and system
By dynamically adjusting the heartbeat signal parameters and transmission intervals in the distribution automation network, combined with federal algorithms and the adaptive mechanism of reinforcement learning, the problem of connection stability of distribution automation networks in complex network environments is solved, and efficient and robust network communication is achieved.
Patent Information
- Application Number
- CN202411701076.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-07
AI Technical Summary
The prior art is difficult to effectively deal with the stability of power distribution automation network connections in complex network environments, especially under the influence of packet loss, delay and jitter, which leads to abnormal sending and receiving of heartbeat messages and the channel is forced to be offline.
By creating a heartbeat package parameter pool and multi-concurrent worker threads, combining parameter selection optimization model, dynamically adjusting the parameters and transmission interval of the heartbeat signal, evaluating the worker thread status in real time, timely discovering and handling network abnormalities, and using federated algorithms and reinforcement learning to perform adaptive learning and decision-making.
It improves the stability and efficiency of network connections, enhances the robustness and adaptability of the system, can maintain stable communication connections in complex and changeable network environments, reduces unnecessary resource consumption, and improves the efficiency of overall network communication.
Smart Images

Figure CN119583623A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of network communication, and in particular relates to a method and system for enhancing network connection based on heartbeat signals. Background Art
[0002] There are a large number of distribution automation terminals in the distribution automation network. Due to the high cost of fiber optic communication construction, most terminals use wireless networks for transmission. Each front-end needs to connect to thousands of terminals. Due to the professional characteristics of the three remote services of distribution automation, the channel of each terminal needs to be kept online 24 hours a day. In the actual operation and maintenance process, the network connection is often affected by problems such as packet loss, delay and jitter, resulting in abnormal transmission and reception of heartbeat messages to maintain the activation status of the channel, so that the channel is forced to go offline. Most existing solutions use static configuration or dynamic adjustment based on simple thresholds, which is difficult to effectively cope with complex network environments.
[0003] For example, a Chinese patent with authorization announcement number CN103209099B discloses an automatic switching protection method for network communication lines between nodes. The method automatically controls the soft switch line switching of the main line, backup line, and network direct state by detecting the status of the line, actively detecting the loss and recovery of the heartbeat signal or control signal of the network device, and receiving the switching command initiated by the controller in real time.
[0004] For example, a Chinese patent with authorization announcement number CN103744723B discloses a thread pool management method and management system, the management system includes a working thread creation unit, a detection thread creation unit, a working thread calling unit, a heartbeat signal detection unit and a suspended thread processing unit, the management method includes: creating a working thread and sending the working thread to a thread pool queue; creating a detection thread; calling the working thread in the thread pool queue to perform a task; detecting whether the heartbeat signal of each working thread is received within the heartbeat cycle through the detection thread; setting the working thread that has not received the heartbeat signal within the heartbeat cycle to a suspended state through the detection thread, releasing all its resources, and notifying the user of the error location through the user interface.
[0005] The above prior art has the following problems: the prior art still has some deficiencies in how to optimize and enhance the stability of network connection through heartbeat signals and transmission intervals. In order to solve the above problems, the present invention provides a network connection enhancement method and system based on heartbeat signals. Summary of the invention
[0006] In view of the deficiencies in the prior art, the present invention proposes a network connection enhancement method and system based on a heartbeat signal. The method comprises creating a heartbeat packet parameter pool and multiple concurrent working threads, a parameter selection optimization model is built into the parameter pool, the optimal heartbeat parameters are selected by obtaining the initial state data sequence of the multiple concurrent working threads, and a heartbeat packet set is constructed and allocated to the corresponding threads; the dynamic transmission interval of the heartbeat packet is calculated by a dynamic interval search model; an evaluation score threshold is set, the working thread status is evaluated in real time, and when the scores of all threads are higher than the threshold, the current status is maintained and the evaluation score and parameters are updated to the parameter pool; when there is a working thread with a score lower than the threshold, the abnormal status is distinguished by an abnormal discrimination model, and the feedback is fed back to the parameter selection optimization model to optimize the heartbeat packet parameters; the present invention improves the stability and efficiency of the network connection by dynamically adjusting the parameters and the transmission interval of the heartbeat signal.
[0007] To achieve the above object, the present invention provides the following technical solutions:
[0008] The network connection enhancement method based on the heartbeat signal includes:
[0009] S1. Create a heartbeat packet parameter pool and multiple concurrent worker threads, set up a built-in parameter selection optimization model in the parameter pool, and obtain the initial state data sequence of multiple concurrent worker threads;
[0010] S2. Input the obtained initial state data sequence into the built-in parameter selection optimization model to obtain the heartbeat parameter space of multiple concurrent working threads, and use the heartbeat parameter space of multiple concurrent working threads to construct a heartbeat package set, and at the same time, build the constructed heartbeat package set into the corresponding working thread;
[0011] S3, build and train a dynamic interval search model, input the obtained initial state data sequence and heartbeat parameter space into the dynamic interval search model, obtain the dynamic transmission interval of the heartbeat packet of the corresponding working thread, and build the obtained dynamic transmission interval into the corresponding working thread;
[0012] S4. Set an evaluation score threshold, start multiple concurrent working threads, perform real-time evaluation on the working status of multiple concurrent working threads through the constructed evaluation model, obtain the real-time evaluation score sequence of multiple concurrent working threads, and when the real-time evaluation score sequence is greater than the evaluation score threshold, keep the current working status, and update the corresponding evaluation score and heartbeat packet parameters to the heartbeat packet parameter pool;
[0013] S5. When at least one real-time evaluation score in the real-time evaluation score sequence is less than or equal to the evaluation score threshold, obtain the working state data and heartbeat packet parameters of the corresponding working thread that is less than or equal to the evaluation score threshold;
[0014] S6. Build an abnormality discrimination model, input the working status data and heartbeat packet parameters of the working thread obtained in S5 into the abnormality discrimination model to distinguish the abnormality type, and feed back the abnormality type discrimination result and the corresponding working status data and heartbeat packet parameters to the parameter selection optimization model to optimize the corresponding working thread heartbeat packet parameters in real time, so that the real-time evaluation score sequences of multiple concurrent working threads are all greater than the evaluation score threshold in real time.
[0015] Specifically, the steps of constructing the S1 center jump packet parameter pool include:
[0016] S101, obtain the historical working state sequence of multiple concurrent working threads (x1…x i …x n ) and the corresponding heartbeat packet parameter set sequence (y1…y i …y n ) and the transmission interval sequence (t1…t i …t n ), and preprocess the acquired data, where x i Represents the working status data of the i-th working thread, y i Indicates the heartbeat packet parameter set corresponding to the i-th worker thread, t i represents the emission interval corresponding to the i-th worker thread, and n represents the total number of concurrent worker threads;
[0017] S102, constructing an evaluation model based on a comprehensive fuzzy algorithm, inputting the preprocessed historical working state sequence of multiple concurrent working threads and the corresponding heartbeat packet parameter set sequence and transmission interval sequence into the evaluation model, and obtaining an evaluation score sequence corresponding to n working threads;
[0018] S103, create a parameter list, according to the evaluation score threshold value set in S4, if the evaluation score of the i-th worker thread is greater than the evaluation score threshold value, then save the working state corresponding to the i-th worker thread and the corresponding heartbeat packet parameter set and transmission interval into the parameter list;
[0019] S104, repeat the process of S103, save the working status and heartbeat packet parameter set and transmission interval corresponding to all working threads that meet the evaluation score threshold into the parameter list, and obtain the heartbeat packet parameter pool;
[0020] S105, setting a parameter selection threshold. If the number of times a parameter in the heartbeat packet parameter pool is selected in a single working cycle of multiple concurrent working threads is less than the parameter selection threshold, the corresponding heartbeat packet parameter is eliminated from the heartbeat packet parameter pool, otherwise it is retained.
[0021] Specifically, the specific steps of parameter selection optimization model construction include:
[0022] S111, construct a heartbeat packet parameter matching pair sequence using the real-time acquired multiple concurrent working thread initial state data sequence and the working state sequence stored in the heartbeat packet parameter pool [(z j , x1)…(z j , x i )…(z j , x n )], where z j Represents the initial state data of the jth real-time working thread;
[0023] S112, building a matching sub-model based on random forest, inputting the heartbeat packet parameter matching pair sequence into the matching sub-model, and obtaining a matching score sequence between the j-th real-time working thread and the parameters stored in the heartbeat packet parameter pool;
[0024] S113, arranging the matching score sequence in descending order, obtaining the historical heartbeat packet parameter set with the largest matching score corresponding to the j-th real-time working thread, and using the obtained heartbeat packet parameter set as the initial parameters of the heartbeat packet corresponding to the j-th real-time working thread;
[0025] S114. Repeat the process of S113 to obtain the initial parameter space of the heartbeat packets corresponding to all real-time working threads.
[0026] Specifically, the specific steps of parameter selection optimization model construction also include:
[0027] S115, using the initial parameter space, real-time evaluation score and abnormal state of the acquired heartbeat packet to construct the current input state of multiple concurrent working threads in, represents the current input state at time t corresponding to the jth real-time worker thread, X j represents the initial parameters of the heartbeat packet corresponding to the jth real-time working thread, f j represents the real-time evaluation score corresponding to the j-th real-time worker thread, f h represents the real-time evaluation score threshold corresponding to the worker thread, d j represents the exception type corresponding to the jth real-time working thread; m represents the total number of real-time multi-concurrent working threads; T j Indicates the transmission interval of the heartbeat packet corresponding to the j-th real-time working thread; represents the probability of packet loss of the j-th real-time worker thread at the current time t;
[0028] S116, based on the current input state of the construction Construct the trigger adjustment information corresponding to the j-th real-time working thread, including:
[0029] When satisfied f j >f hWhen the first execution information is triggered, the current working state is maintained and the execution information of the heartbeat packet parameter pool is updated;
[0030] When satisfied f j ≤f h When the second execution information is triggered, the abnormality discrimination model is called to discriminate the abnormality type and update the execution information of the heartbeat packet parameters;
[0031] When the heartbeat packet parameters are updated, the real-time evaluation scores of multiple concurrent worker threads still meet the requirements. f j ≤f h When the third execution information is triggered, the dynamic interval search model is called to adjust T j Execution information;
[0032] S117: Constructing multiple concurrent work threads to execute actions at the current moment based on the trigger adjustment information in Indicates the current action executed by the jth real-time worker thread. Indicates the action to be executed when the jth real-time worker thread triggers the first execution information. Indicates the corresponding action to be executed when the j-th real-time working thread triggers the second execution information; Indicates that the j-th real-time working thread triggers the action executed corresponding to the third execution information;
[0033] S118: Construct a reward function R based on the actions currently executed by multiple concurrent worker threads t ,include:
[0034]
[0035] where rt j represents the reward function corresponding to the jth real-time worker thread, w j represents the weighted coefficient of the reward function corresponding to the jth real-time worker thread, d′ j Indicates d j The corresponding abnormality type rating, when executed When d′ j =1, when executing When d′ j = 0 and every time the level of the exception type increases by 1, d′ j Add 1 to the current level score; k1, k2, k3, k4 are the gain coefficients of the corresponding rewards.
[0036] Specifically, the specific steps of parameter selection optimization model construction also include:
[0037] S119, build a federated reinforcement sub-model based on federated algorithm and reinforcement learning. and r tj Input them into the m corresponding reinforcement layers in the federated reinforcement sub-model in sequence, and at the same time R t The input is input into the reinforcement main layer of the federated reinforcement sub-model for training, and the training parameters of each reinforcement layer are shared to the reinforcement main layer to obtain the trained federated reinforcement sub-model;
[0038] S120, embedding the m reinforcement layers in the trained federated reinforcement sub-model into corresponding real-time working threads among the m real-time working threads, and embedding the reinforcement main layer into the control ports of the m real-time working threads;
[0039] S121, according to the real-time acquisition of the j-th real-time working thread working status data, through the built-in enhanced layering, real-time control is performed, when all real-time working threads trigger the first execution information, the corresponding execution
[0040] S122. When at least one of all the real-time work threads triggers the second execution information, the exception type corresponding to the real-time work thread that triggers the second execution information is uploaded to the enhanced main layer, and the enhanced main layer calls the matching sub-model to evaluate the evaluation score of the abnormal real-time work thread at the current moment and the real-time work thread that continuously triggers the first execution information;
[0041] S123, by strengthening the main layer, sharing the heartbeat packet parameters corresponding to the real-time working thread with the largest evaluation score with the abnormal real-time working thread corresponding to the current moment, and using the evaluation model to evaluate the real-time evaluation score of the abnormal real-time working thread after sharing;
[0042] S124, when the real-time evaluation score of the abnormal real-time working thread after sharing triggers the first execution information, the current state is maintained. When the real-time evaluation score of the abnormal real-time working thread after sharing triggers the second execution information, the heartbeat packet parameter pool is called by the enhanced main layer to adjust the parameter information, and the real-time evaluation score of the abnormal real-time working thread after adjustment is evaluated. If the first execution information is triggered, the current state is maintained. If the second execution information is triggered, the third execution information is triggered, and execution is performed.
[0043] S125. Repeat S122-S124 until all real-time working threads trigger the first execution information.
[0044] Specifically, the steps of constructing the dynamic interval search model include:
[0045] S301, let (T h1 …T hj …Thm ) is the target emission interval of m worker threads, and the heartbeat search interval [T min , T max ], where T hj represents the target emission interval corresponding to the jth real-time worker thread, T min and T max Represent the lower and upper limits of the heartbeat search interval respectively;
[0046] S302, constructing a transmission interval prediction sub-model based on a BP neural network, and training the constructed transmission interval prediction sub-model using the historical working state sequence and the corresponding heartbeat packet parameter set sequence and transmission interval sequence saved in the heartbeat packet parameter pool, to obtain a trained transmission interval prediction sub-model;
[0047] S303: When the j-th real-time working thread triggers the third execution information, obtain the current working state data of the j-th real-time working thread and the corresponding execution The updated heartbeat packet data is input into the transmission interval prediction sub-model to predict the transmission interval t corresponding to the jth real-time working thread. j , and build the obtained emission interval into the jth real-time working thread, and perform test evaluation to obtain evaluation score three. If the evaluation score three is greater than the evaluation score threshold, then make t j As the target transmission interval T hj .
[0048] Specifically, the steps of constructing the dynamic interval search model also include:
[0049] S304: If the evaluation score 3 is less than or equal to the evaluation score threshold, determine t j Does it belong to [T min , T max ], if t j ∈[T min , T max ], then t j Starting from [T min , T max ] to perform a two-way symmetric search and obtain a symmetric transmission interval t 1j and t 2j ;
[0050] S305: The obtained symmetrical transmission interval t 1j and t 2j The jth real-time working thread is built in sequence, and the test evaluation is performed to obtain the corresponding evaluation scores, and the obtained evaluation scores are compared with the evaluation score threshold in sequence. If only one corresponding evaluation score is greater than the evaluation score threshold, the corresponding launch interval is used as the target launch interval T hj, if both evaluation scores are greater than the evaluation score threshold, the one with the larger evaluation score is selected as the target transmission interval T hj ;
[0051] S306: If all are smaller than the evaluation score threshold, continue searching until the evaluation score corresponding to at least one transmission interval in the symmetrical transmission interval is larger than the evaluation score threshold;
[0052] S307, if Then take the midpoint of the heartbeat search interval as the starting point in [T min , T max ] and repeat the processes S305 and S306 until the evaluation score corresponding to at least one transmission interval in the symmetrical transmission interval is greater than the evaluation score threshold;
[0053] S308. Repeat the process of S303-S306 until the evaluation scores corresponding to all real-time working threads are greater than the evaluation score threshold.
[0054] The network connection enhancement system based on the heartbeat signal includes: a parameter selection module, a heartbeat packet module, a dynamic interval search module, and a test and optimization module;
[0055] The parameter selection module includes a parameter pool unit and a parameter selection unit;
[0056] A parameter pool unit is used to obtain the heartbeat packet parameters and transmission interval data of the historical working threads corresponding to the evaluation scores greater than the evaluation score threshold according to the obtained historical multi-concurrent working thread working status data through an evaluation algorithm, and to construct a heartbeat packet parameter pool using the obtained heartbeat packet parameters and transmission interval data;
[0057] A parameter selection unit, used to obtain a heartbeat parameter space of multiple concurrent working threads by optimizing a model through parameter selection according to the initial state data sequence of multiple concurrent working threads at the current moment;
[0058] The heartbeat packet module is used to construct a heartbeat packet set using the heartbeat parameter space of multiple concurrent working threads, and at the same time, the constructed heartbeat packet set is built into the corresponding thread.
[0059] Specifically, the dynamic interval search module includes a model building unit and an interval acquisition unit;
[0060] A model building unit is used to build a dynamic interval search model through a teaching and learning optimization algorithm and a BP neural network, and train the dynamic interval search model using the acquired historical working state sequence of multiple concurrent working threads and the corresponding heartbeat packet parameter set sequence and transmission interval sequence to obtain a trained dynamic interval search model;
[0061] An interval acquisition unit is used to acquire the dynamic transmission interval of the heartbeat packet of the corresponding working thread through a dynamic interval search model according to the acquired initial state data sequence and heartbeat parameter space, and embed the acquired dynamic transmission interval into the corresponding working thread;
[0062] The test and optimization module includes a test unit, an evaluation unit, an evaluation judgment unit, and an abnormality monitoring unit;
[0063] The test unit is used to test multiple concurrent worker threads with built-in heartbeat packets and dynamic transmission intervals, and obtain the working status data of multiple concurrent worker threads;
[0064] An evaluation unit, used to evaluate the working status of multiple concurrent working threads in real time through an evaluation model according to the acquired working status data of multiple concurrent working threads, and obtain a real-time evaluation score sequence of the multiple concurrent working threads;
[0065] An evaluation judgment unit is used to compare the acquired real-time evaluation score sequences of multiple concurrent working threads with the set evaluation score threshold. If the real-time evaluation score sequences are all greater than the evaluation score threshold, the current working state is maintained. If at least one real-time evaluation score is less than or equal to the evaluation score threshold, the working state data and heartbeat packet parameters of the corresponding working threads less than or equal to the evaluation score threshold are obtained.
[0066] The abnormality monitoring unit is used to identify the abnormal state of the corresponding working thread through an abnormality identification model according to the working state data and heartbeat packet parameters of the corresponding working thread that are less than or equal to the evaluation score threshold, and obtain the abnormal state result of the corresponding working thread and the corresponding working state data and heartbeat packet parameters.
[0067] A computer-readable storage medium stores computer instructions, which, when executed, execute a method for enhancing network connection based on a heartbeat signal.
[0068] Compared with the prior art, the present invention has the following beneficial effects:
[0069] In view of the deficiencies in the prior art, the present invention realizes effective management and dynamic adjustment of heartbeat packet parameters by constructing a heartbeat packet parameter pool and multiple concurrent working threads, and combines a parameter selection optimization model to ensure that each working thread can run in an optimal state; secondly, by introducing a real-time evaluation score and an abnormal discrimination model, network abnormalities can be discovered and processed in a timely manner, communication interruptions caused by abnormal states can be avoided, and the robustness of the system is improved; in addition, a federated reinforcement sub-model constructed in a manner combining a federated algorithm and reinforcement learning can perform adaptive learning and decision-making according to the state of the real-time working thread, which not only improves the adaptability of the system to a complex network environment, but also can realize resource sharing and collaborative work across working threads; finally, a dynamic interval search model can accurately determine the heartbeat packet transmission interval of each working thread through the training and optimization of a BP neural network, thereby reducing unnecessary resource consumption and improving the efficiency of overall network communication. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 This is a flow chart of a method for enhancing network connection based on heartbeat signals according to Embodiment 1 of the present invention;
[0071] Figure 2 This is a module diagram of a network connection enhancement system based on heartbeat signals according to Embodiment 2 of the present invention. DETAILED DESCRIPTION
[0072] Example 1
[0073] See also Figure 1 , an embodiment of the present invention provides: a method for enhancing network connection based on heartbeat signal, comprising the following steps:
[0074] S1. Create a heartbeat packet parameter pool and multiple concurrent worker threads, set up a built-in parameter selection optimization model in the parameter pool, and obtain the initial state data sequence of multiple concurrent worker threads;
[0075] Furthermore, the multiple concurrent working threads in this embodiment are constructed between the distribution automation terminal and the processing server based on the distribution automation network;
[0076] Furthermore, in this embodiment, the step of constructing the S1 center jump packet parameter pool includes:
[0077] S101, obtain the historical working state sequence of multiple concurrent working threads (x1…x i …x n ) and the corresponding heartbeat packet parameter set sequence (y1…y i …y n ) and the transmission interval sequence (t1…t i …t n ), and preprocess the acquired data, where xi Represents the working status data of the i-th working thread, y i Indicates the heartbeat packet parameter set corresponding to the i-th worker thread, t i represents the emission interval corresponding to the i-th worker thread, and n represents the total number of concurrent worker threads;
[0078] Furthermore, the historical working status of the working thread in this embodiment includes: packet loss rate, delay, throughput, CPU usage, memory usage, network bandwidth usage and heartbeat packet response time; the heartbeat packet parameter set includes: heartbeat packet size, heartbeat packet type, heartbeat packet interval, heartbeat packet content, heartbeat packet retransmission mechanism and heartbeat packet timeout;
[0079] S102, constructing an evaluation model based on a comprehensive fuzzy algorithm, inputting the preprocessed historical working state sequence of multiple concurrent working threads and the corresponding heartbeat packet parameter set sequence and transmission interval sequence into the evaluation model, and obtaining an evaluation score sequence corresponding to n working threads;
[0080] S103, create a parameter list, according to the evaluation score threshold value set in S4, if the evaluation score of the i-th worker thread is greater than the evaluation score threshold value, then save the working state corresponding to the i-th worker thread and the corresponding heartbeat packet parameter set and transmission interval into the parameter list;
[0081] S104, repeat the process of S103, save the working status and heartbeat packet parameter set and transmission interval corresponding to all working threads that meet the evaluation score threshold into the parameter list, and obtain the heartbeat packet parameter pool;
[0082] S105, setting a parameter selection threshold, if the number of times a parameter in the heartbeat packet parameter pool is selected in a single working cycle of multiple concurrent working threads is less than the parameter selection threshold, the corresponding heartbeat packet parameter is eliminated from the heartbeat packet parameter pool, otherwise it is retained;
[0083] This process constructs a heartbeat packet parameter pool by performing a comprehensive fuzzy algorithm evaluation on the historical working status and heartbeat packet parameters of multiple concurrent working threads, effectively improving the communication efficiency and stability between the distribution automation terminal and the processing server in the distribution automation network; it can accurately evaluate the communication quality of each working thread by pre-collecting and analyzing the historical working status sequence of the working thread and the corresponding heartbeat packet parameter set sequence and transmission interval sequence. In addition, by setting the evaluation score threshold, the parameter combination with excellent performance is saved in the parameter pool, and the parameters with poor performance are regularly eliminated, ensuring that the heartbeat packet parameter pool always contains the optimal configuration, thereby improving the stability of the network connection and the communication efficiency, enabling the system to automatically adjust the heartbeat packet parameters according to changes in network conditions, and effectively cope with various complex network environments;
[0084] Furthermore, the specific steps of constructing the parameter selection optimization model in this embodiment include:
[0085] S111, construct a heartbeat packet parameter matching pair sequence using the real-time acquired multiple concurrent working thread initial state data sequence and the working state sequence stored in the heartbeat packet parameter pool [(z j , x1)…(z j , x i )…(z j , x n )], where z j Represents the initial state data of the jth real-time working thread;
[0086] S112, building a matching sub-model based on random forest, inputting the heartbeat packet parameter matching pair sequence into the matching sub-model, and obtaining a matching score sequence between the j-th real-time working thread and the parameters stored in the heartbeat packet parameter pool;
[0087] S113, arranging the matching score sequence in descending order, obtaining the historical heartbeat packet parameter set with the largest matching score corresponding to the j-th real-time working thread, and using the obtained heartbeat packet parameter set as the initial parameters of the heartbeat packet corresponding to the j-th real-time working thread;
[0088] S114, repeating the process of S113 to obtain the initial parameter space of the heartbeat packets corresponding to all real-time working threads;
[0089] S115, using the initial parameter space, real-time evaluation score and abnormal state of the acquired heartbeat packet to construct the current input state of multiple concurrent working threads in, represents the current input state at time t corresponding to the jth real-time worker thread, X j represents the initial parameters of the heartbeat packet corresponding to the jth real-time working thread, f j represents the real-time evaluation score corresponding to the j-th real-time worker thread, f h represents the real-time evaluation score threshold corresponding to the worker thread, d j represents the exception type corresponding to the jth real-time working thread; m represents the total number of real-time multi-concurrent working threads; T j Indicates the transmission interval of the heartbeat packet corresponding to the j-th real-time working thread; represents the probability of packet loss of the j-th real-time working thread at the current time t; further, in this embodiment, the abnormal types include packet loss, disconnection and restart;
[0090] S116, based on the current input state of the construction Construct the trigger adjustment information corresponding to the j-th real-time working thread, including:
[0091] When satisfied fj >f h When the first execution information is triggered, the current working state is maintained and the execution information of the heartbeat packet parameter pool is updated;
[0092] When satisfied f j ≤f h When the second execution information is triggered, the abnormality discrimination model is called to discriminate the abnormality type and update the execution information of the heartbeat packet parameters;
[0093] When the heartbeat packet parameters are updated, the real-time evaluation scores of multiple concurrent worker threads still meet the requirements. f j ≤f h When the third execution information is triggered, the dynamic interval search model is called to adjust T j Execution information;
[0094] S117: Constructing multiple concurrent work threads to execute actions at the current moment based on the trigger adjustment information in Indicates the current action executed by the jth real-time worker thread. Indicates the action to be executed when the jth real-time worker thread triggers the first execution information. Indicates the corresponding action to be executed when the j-th real-time working thread triggers the second execution information; Indicates that the j-th real-time working thread triggers the action executed corresponding to the third execution information;
[0095] S118: Construct a reward function R based on the actions currently executed by multiple concurrent worker threads t ,include:
[0096]
[0097] where r tj represents the reward function corresponding to the jth real-time worker thread, w j represents the weighted coefficient of the reward function corresponding to the jth real-time worker thread, d′ j Indicates d j The corresponding abnormality type rating, when executed When d′ j =1, when executing When d′ j = 0 and every time the level of the exception type increases by 1, d′ j Add 1 to the current level score; k1, k2, k3, k4 are the corresponding reward gain coefficients;
[0098] S119, build a federated reinforcement sub-model based on federated algorithm and reinforcement learning. and r tj Input them into the m corresponding reinforcement layers in the federated reinforcement sub-model in sequence, and at the same time R t The input is input into the reinforcement main layer in the federated reinforcement sub-model for training, and the training parameters of each reinforcement layer are shared to the reinforcement main layer to obtain a trained federated reinforcement sub-model; further, in this embodiment, reinforcement learning includes a deep gradient strategy algorithm and a SAC algorithm;
[0099] S120, embedding the m reinforcement layers in the trained federated reinforcement sub-model into corresponding real-time working threads among the m real-time working threads, and embedding the reinforcement main layer into the control ports of the m real-time working threads;
[0100] S121, according to the real-time acquisition of the j-th real-time working thread working status data, through the built-in enhanced layering, real-time control is performed, when all real-time working threads trigger the first execution information, the corresponding execution
[0101] S122. When at least one of all the real-time work threads triggers the second execution information, the exception type corresponding to the real-time work thread that triggers the second execution information is uploaded to the enhanced main layer, and the enhanced main layer calls the matching sub-model to evaluate the evaluation score of the abnormal real-time work thread at the current moment and the real-time work thread that continuously triggers the first execution information;
[0102] S123, by strengthening the main layer, sharing the heartbeat packet parameters corresponding to the real-time working thread with the largest evaluation score with the abnormal real-time working thread corresponding to the current moment, and using the evaluation model to evaluate the real-time evaluation score of the abnormal real-time working thread after sharing;
[0103] S124, when the real-time evaluation score of the abnormal real-time working thread after sharing triggers the first execution information, the current state is maintained. When the real-time evaluation score of the abnormal real-time working thread after sharing triggers the second execution information, the heartbeat packet parameter pool is called by the enhanced main layer to adjust the parameter information, and the real-time evaluation score of the abnormal real-time working thread after adjustment is evaluated. If the first execution information is triggered, the current state is maintained. If the second execution information is triggered, the third execution information is triggered, and execution is performed.
[0104] S125. Repeat S122-S124 until all real-time working threads trigger the first execution information.
[0105] The process obtains the initial state data of the real-time working thread and matches it with the historical data in the heartbeat packet parameter pool to construct a heartbeat packet parameter matching pair sequence, and then uses the random forest algorithm to obtain the matching score sequence of each working thread and the historical parameters, and selects the optimal heartbeat packet initial parameters for each working thread; This parameter selection mechanism based on real-time status can quickly respond to changes in network conditions. Secondly, through real-time evaluation scores and abnormal status monitoring, the system can timely identify abnormal situations and take corresponding measures, such as maintaining the current state, abnormal identification, or dynamically adjusting the heartbeat packet transmission interval. This dynamic adjustment mechanism based on real-time status greatly enhances the robustness and adaptability of the system, and can maintain stable communication connections in complex and changing network environments; Finally, the federated reinforcement sub-model constructed by the federated algorithm and reinforcement learning realizes knowledge sharing and collaborative optimization across working threads, ensuring that each working thread can make the best decision based on the real-time status. When an abnormality is detected, it can quickly take measures to restore communication, and continuously optimize the heartbeat packet parameters through reinforcement learning to improve the communication efficiency of the overall network;
[0106] S2. Input the obtained initial state data sequence into the built-in parameter selection optimization model to obtain the heartbeat parameter space of multiple concurrent working threads, and use the heartbeat parameter space of multiple concurrent working threads to construct a heartbeat package set, and at the same time, build the constructed heartbeat package set into the corresponding working thread;
[0107] S3, build and train a dynamic interval search model, input the obtained initial state data sequence and heartbeat parameter space into the dynamic interval search model, obtain the dynamic transmission interval of the heartbeat packet of the corresponding working thread, and build the obtained dynamic transmission interval into the corresponding working thread;
[0108] Furthermore, the steps of constructing the dynamic interval search model in this embodiment include:
[0109] S301, let (T h1 …T hj …T hm ) is the target emission interval of m worker threads, and the heartbeat search interval [T min , T max ], where T hj represents the target emission interval corresponding to the jth real-time worker thread, T min and T max represents the lower limit and upper limit of the heartbeat search interval respectively; further, in this embodiment, T min and T max The setting is performed by those skilled in the art according to the corresponding network type used and the standard heartbeat search interval corresponding to the network type, and the network type includes a mobile network, a telecommunications network, and a Unicom network;
[0110] S302, constructing a transmission interval prediction sub-model based on a BP neural network, and training the constructed transmission interval prediction sub-model using the historical working state sequence and the corresponding heartbeat packet parameter set sequence and transmission interval sequence saved in the heartbeat packet parameter pool, to obtain a trained transmission interval prediction sub-model;
[0111] S303: When the j-th real-time working thread triggers the third execution information, obtain the current working state data of the j-th real-time working thread and the corresponding execution The updated heartbeat packet data is input into the transmission interval prediction sub-model to predict the transmission interval t corresponding to the jth real-time working thread. j , and build the obtained emission interval into the jth real-time working thread, and perform test evaluation to obtain evaluation score three. If the evaluation score three is greater than the evaluation score threshold, then make t j As the target transmission interval T hj ;
[0112] S304: If the evaluation score 3 is less than or equal to the evaluation score threshold, determine t j Does it belong to [T min , T max ], if t j ∈[T min , T max ], then t j Starting from [T min , T max ] to perform a two-way symmetric search and obtain a symmetric transmission interval t 1j and t 2j ; Further, in this embodiment, the bidirectional symmetric search is implemented by the actual verification process through the binary search algorithm, Newton's method and simulated annealing method;
[0113] S305: The obtained symmetrical transmission interval t 1j and t 2j The jth real-time working thread is built in sequence, and the test evaluation is performed to obtain the corresponding evaluation scores, and the obtained evaluation scores are compared with the evaluation score threshold in sequence. If only one corresponding evaluation score is greater than the evaluation score threshold, the corresponding launch interval is used as the target launch interval T hj , if both evaluation scores are greater than the evaluation score threshold, the one with the larger evaluation score is selected as the target transmission interval T hj ;
[0114] S306: If all are smaller than the evaluation score threshold, continue searching until the evaluation score corresponding to at least one transmission interval in the symmetrical transmission interval is larger than the evaluation score threshold;
[0115] S307, if Then take the midpoint of the heartbeat search interval as the starting point in [T min , T max ] and repeat the processes S305 and S306 until the evaluation score corresponding to at least one transmission interval in the symmetrical transmission interval is greater than the evaluation score threshold;
[0116] S308. Repeat the process of S303-S306 until the evaluation scores corresponding to all real-time working threads are greater than the evaluation score threshold.
[0117] By constructing and training a transmission interval prediction sub-model, the process can predict the optimal transmission interval based on the working status data of the real-time working thread. When the evaluation score corresponding to the predicted transmission interval is higher than the threshold, the interval is directly used as the target transmission interval. When the evaluation score is lower than the threshold, the model can perform a two-way symmetric search through a binary search algorithm to gradually optimize the transmission interval until the optimal solution is found. This dynamic adjustment mechanism based on real-time data feedback ensures that the transmission interval of the heartbeat packet can meet the requirements of stable system operation and effectively avoid resource waste, significantly improving the overall performance of multiple concurrent working threads.
[0118] S4. Set an evaluation score threshold, start multiple concurrent working threads, perform real-time evaluation on the working status of multiple concurrent working threads through the constructed evaluation model, obtain the real-time evaluation score sequence of multiple concurrent working threads, and when the real-time evaluation score sequence is greater than the evaluation score threshold, keep the current working status, and update the corresponding evaluation score and heartbeat packet parameters to the heartbeat packet parameter pool;
[0119] S5. When at least one real-time evaluation score in the real-time evaluation score sequence is less than or equal to the evaluation score threshold, obtain the working state data and heartbeat packet parameters of the corresponding working thread that is less than or equal to the evaluation score threshold;
[0120] S6, construct an abnormality discrimination model, input the working thread working status data and heartbeat packet parameters obtained in S5 into the abnormality discrimination model to discriminate the abnormality type, and feed back the abnormality type discrimination result and the corresponding working status data and heartbeat packet parameters to the parameter selection optimization model to optimize the corresponding working thread heartbeat packet parameters in real time, so that the real-time evaluation score sequences of multiple concurrent working threads are all greater than the evaluation score threshold in real time;
[0121] Furthermore, the specific steps of constructing the abnormality discrimination model include:
[0122] S601, obtaining historical abnormal state data in multiple concurrent working threads, and annotating the obtained historical abnormal state data with abnormal type and abnormal degree score to obtain an abnormal training set; further, the abnormal types in this embodiment include abnormal heartbeat packet response, corresponding indicators are prolonged heartbeat packet response time and heartbeat packet loss; software error, corresponding indicators are program crash, abnormal exit, and increased error logs; hardware failure, corresponding indicators are abnormally high CPU usage, abnormally high memory usage, and disk read and write abnormalities;
[0123] S602: construct an abnormality discrimination model based on a support vector machine, input the abnormality training set into the abnormality discrimination model for training, and obtain a trained abnormality discrimination model;
[0124] S603, integrating the trained abnormality discrimination model into m real-time working threads, and when the second execution information is triggered, performing abnormality type discrimination according to the acquired working status data of the real-time working thread, and obtaining the abnormality type and abnormality degree score of the real-time working thread corresponding to the triggering second execution information;
[0125] S604: Feedback the acquired abnormality type and abnormality degree score to the parameter selection optimization model to perform abnormality processing and heartbeat packet parameter optimization.
[0126] Example 2
[0127] See also Figure 2 ,Another embodiment provided by the present invention: A network connection enhancement system based on a heartbeat signal, comprising: a parameter selection module, a heartbeat packet module, a dynamic interval search module, and a test and optimization module;
[0128] A parameter selection module is used for constructing multiple concurrent working threads and selecting parameters of heartbeat packets; the parameter selection module includes a parameter pool unit and a parameter selection unit;
[0129] A parameter pool unit is used to obtain the heartbeat packet parameters and transmission interval data of the historical working threads corresponding to the evaluation scores greater than the evaluation score threshold according to the obtained historical multi-concurrent working thread working status data through an evaluation algorithm, and to construct a heartbeat packet parameter pool using the obtained heartbeat packet parameters and transmission interval data;
[0130] A parameter selection unit, used to obtain a heartbeat parameter space of multiple concurrent working threads by optimizing a model through parameter selection according to the initial state data sequence of multiple concurrent working threads at the current moment;
[0131] The heartbeat packet module is used to construct a heartbeat packet set using the heartbeat parameter space of multiple concurrent worker threads, and at the same time, the constructed heartbeat packet set is built into the corresponding thread;
[0132] A dynamic interval search module is used to search for the optimal heartbeat packet transmission interval of multiple concurrent working threads and set the interval to the corresponding working thread; the dynamic interval search module includes a model building unit and an interval acquisition unit;
[0133] A model building unit is used to build a dynamic interval search model through a teaching and learning optimization algorithm and a BP neural network, and train the dynamic interval search model using the acquired historical working state sequence of multiple concurrent working threads and the corresponding heartbeat packet parameter set sequence and transmission interval sequence to obtain a trained dynamic interval search model;
[0134] An interval acquisition unit is used to acquire the dynamic transmission interval of the heartbeat packet of the corresponding working thread through a dynamic interval search model according to the acquired initial state data sequence and heartbeat parameter space, and embed the acquired dynamic transmission interval into the corresponding working thread;
[0135] The testing and optimization module is used to test multiple concurrent working threads and perform real-time evaluation and optimization on multiple concurrent working threads; the testing and optimization module includes a testing unit, an evaluation unit, an evaluation judgment unit, an abnormality monitoring unit, and a feedback adjustment unit;
[0136] The test unit is used to test multiple concurrent worker threads with built-in heartbeat packets and dynamic transmission intervals, and obtain the working status data of multiple concurrent worker threads;
[0137] An evaluation unit, used to evaluate the working status of multiple concurrent working threads in real time through an evaluation model according to the acquired working status data of multiple concurrent working threads, and obtain a real-time evaluation score sequence of the multiple concurrent working threads;
[0138] An evaluation judgment unit is used to compare the acquired real-time evaluation score sequences of multiple concurrent working threads with the set evaluation score threshold. If the real-time evaluation score sequences are all greater than the evaluation score threshold, the current working state is maintained. If at least one real-time evaluation score is less than or equal to the evaluation score threshold, the working state data and heartbeat packet parameters of the corresponding working threads less than or equal to the evaluation score threshold are obtained.
[0139] An abnormality monitoring unit is used to identify the abnormal state of the corresponding working thread through an abnormality identification model according to the working state data and heartbeat packet parameters of the corresponding working thread that are less than or equal to the evaluation score threshold, and obtain the abnormal state result of the corresponding working thread and the corresponding working state data and heartbeat packet parameters;
[0140] The feedback adjustment unit is used to feed back the abnormal state results of the corresponding working threads, the corresponding working state data and the heartbeat packet parameters to the parameter selection optimization model to optimize the heartbeat packet parameters of the corresponding working threads in real time, so that the real-time evaluation score sequences of multiple concurrent working threads are all greater than the evaluation score threshold in real time.
[0141] Example 3
[0142] A computer-readable storage medium stores computer instructions, which, when executed, execute a method for enhancing network connection based on a heartbeat signal.
[0143] An electronic device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements a network connection enhancement method based on a heartbeat signal when executing the computer program.
[0144] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in the field may also change, modify, replace and modify the above-mentioned embodiments without departing from the scope of protection of the purpose of the present invention and the claims, and all of these are within the protection of the present invention.
[0145] If the disclosed technical solution involves personal information, the product using the disclosed technical solution has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing the personal information. If the disclosed technical solution involves sensitive personal information, the product using the disclosed technical solution has obtained the individual's separate consent before processing the sensitive personal information, and at the same time meets the "explicit consent" requirement. For example, on personal information collection devices such as cameras, clear and prominent signs are set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that he or she agrees to the collection of his or her personal information; or on the device that processes personal information, when the personal information processing rules are notified by obvious signs / information, the individual's authorization is obtained through pop-up information or by asking the individual to upload his or her personal information; among them, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the type of personal information processed.
Claims
1. A network connection enhancement method based on heartbeat signal, characterized in that: include: S1. Create a heartbeat packet parameter pool and multiple concurrent worker threads, set up a built-in parameter selection optimization model in the parameter pool, and obtain the initial state data sequence of multiple concurrent worker threads; S2. Input the obtained initial state data sequence into the built-in parameter selection optimization model to obtain the heartbeat parameter space of multiple concurrent working threads, and use the heartbeat parameter space of multiple concurrent working threads to construct a heartbeat package set, and at the same time, build the constructed heartbeat package set into the corresponding working thread; S3, build and train a dynamic interval search model, input the obtained initial state data sequence and heartbeat parameter space into the dynamic interval search model, obtain the dynamic transmission interval of the heartbeat packet of the corresponding working thread, and build the obtained dynamic transmission interval into the corresponding working thread; S4. Set an evaluation score threshold, start multiple concurrent working threads, perform real-time evaluation on the working status of multiple concurrent working threads through the constructed evaluation model, obtain the real-time evaluation score sequence of multiple concurrent working threads, and when the real-time evaluation score sequence is greater than the evaluation score threshold, keep the current working status, and update the corresponding evaluation score and heartbeat packet parameters to the heartbeat packet parameter pool; S5. When at least one real-time evaluation score in the real-time evaluation score sequence is less than or equal to the evaluation score threshold, obtain the working state data and heartbeat packet parameters of the corresponding working thread that is less than or equal to the evaluation score threshold; S6. Build an abnormality discrimination model, input the working status data and heartbeat packet parameters of the working thread obtained in S5 into the abnormality discrimination model to distinguish the abnormality type, and feed back the abnormality type discrimination result and the corresponding working status data and heartbeat packet parameters to the parameter selection optimization model to optimize the corresponding working thread heartbeat packet parameters in real time, so that the real-time evaluation score sequences of multiple concurrent working threads are all greater than the evaluation score threshold in real time.
2. The method for enhancing network connection based on heartbeat signal according to claim 1, characterized in that: The steps of constructing the S1 center jump packet parameter pool include: S101, obtain multiple concurrent working thread historical working state sequences (x1...xi...xn) and corresponding heartbeat packet parameter set sequences (y1...yi...yn) and transmission interval sequences (t1...ti...tn), and pre-process the obtained data, wherein xi represents the working state data of the i-th working thread, yi represents the heartbeat packet parameter set corresponding to the i-th working thread, ti represents the transmission interval corresponding to the i-th working thread, and n represents the total number of threads of multiple concurrent working threads; S102, constructing an evaluation model based on a comprehensive fuzzy algorithm, inputting the preprocessed historical working state sequence of multiple concurrent working threads and the corresponding heartbeat packet parameter set sequence and transmission interval sequence into the evaluation model, and obtaining an evaluation score sequence corresponding to n working threads; S103, create a parameter list, according to the evaluation score threshold value set in S4, if the evaluation score of the i-th worker thread is greater than the evaluation score threshold value, then save the working state corresponding to the i-th worker thread and the corresponding heartbeat packet parameter set and transmission interval into the parameter list; S104, repeat the process of S103, save the working status and heartbeat packet parameter set and transmission interval corresponding to all working threads that meet the evaluation score threshold into the parameter list, and obtain the heartbeat packet parameter pool; S105, setting a parameter selection threshold. If the number of times a parameter in the heartbeat packet parameter pool is selected in a single working cycle of multiple concurrent working threads is less than the parameter selection threshold, the corresponding heartbeat packet parameter is eliminated from the heartbeat packet parameter pool, otherwise it is retained.
3. The method for enhancing network connection based on heartbeat signal according to claim 2, characterized in that: The specific steps of constructing the parameter selection optimization model include: S111, constructing a heartbeat packet parameter matching pair sequence [(zj, x1) ... (zj, xi) ... (zj, xn)] using the initial state data sequence of multiple concurrent working threads obtained in real time and the working state sequence stored in the heartbeat packet parameter pool, where zj represents the initial state data of the j-th real-time working thread; S112, building a matching sub-model based on random forest, inputting the heartbeat packet parameter matching pair sequence into the matching sub-model, and obtaining a matching score sequence between the j-th real-time working thread and the parameters stored in the heartbeat packet parameter pool; S113, arranging the matching score sequence in descending order, obtaining the historical heartbeat packet parameter set with the largest matching score corresponding to the j-th real-time working thread, and using the obtained heartbeat packet parameter set as the initial parameters of the heartbeat packet corresponding to the j-th real-time working thread; S114. Repeat the process of S113 to obtain the initial parameter space of the heartbeat packets corresponding to all real-time working threads.
4. The method for enhancing network connection based on heartbeat signal according to claim 3, characterized in that: The specific steps of constructing the parameter selection optimization model also include: S115, using the initial parameter space, real-time evaluation score and abnormal state of the acquired heartbeat packet to construct the current input state of multiple concurrent working threads in, represents the current input state of the j-th real-time work thread at time t, Xj represents the initial parameters of the heartbeat packet corresponding to the j-th real-time work thread, fj represents the real-time evaluation score corresponding to the j-th real-time work thread, fh represents the real-time evaluation score threshold corresponding to the work thread, dj represents the abnormal type corresponding to the j-th real-time work thread; m represents the total number of real-time multi-concurrent work threads; Tj represents the transmission interval of the heartbeat packet corresponding to the j-th real-time work thread; represents the probability of packet loss of the j-th real-time worker thread at the current time t; S116, based on the current input state of the construction Construct the trigger adjustment information corresponding to the j-th real-time working thread, including: When satisfied When the first execution information is triggered, the current working state is maintained and the execution information of the heartbeat packet parameter pool is updated; When satisfied When the second execution information is triggered, the abnormality discrimination model is called to discriminate the abnormality type and update the execution information of the heartbeat packet parameters; When the heartbeat packet parameters are updated, the real-time evaluation scores of multiple concurrent worker threads still meet the requirements. When , the third execution information is triggered, and the dynamic interval search model is called to adjust the execution information of Tj; S117: Constructing multiple concurrent work threads to execute actions at the current moment based on the trigger adjustment information in Indicates the current action executed by the jth real-time worker thread. Indicates the action to be executed when the jth real-time worker thread triggers the first execution information. Indicates the corresponding action to be executed when the j-th real-time working thread triggers the second execution information; Indicates that the j-th real-time working thread triggers the action executed corresponding to the third execution information; S118, constructing a reward function Rt based on the actions currently executed by multiple concurrent working threads, including: Where rtj represents the reward function corresponding to the j-th real-time worker thread, wj represents the weighted coefficient of the reward function corresponding to the j-th real-time worker thread, and d'j represents the grade score of the abnormal type corresponding to dj. When d'j=1, when executing , dj=0 and every time the level of the abnormal type increases by 1, dj increases by 1 based on the current level score; k1, k2, k3, k4 are the gain coefficients of the corresponding rewards.
5. The method for enhancing network connection based on heartbeat signal according to claim 4, characterized in that: The specific steps of constructing the parameter selection optimization model also include: S119, build a federated reinforcement sub-model based on federated algorithm and reinforcement learning. and rtj are sequentially input into the m corresponding reinforcement layers in the federated reinforcement sub-model, and Rt is input into the reinforcement main layer in the federated reinforcement sub-model for training, and the training parameters of each reinforcement layer are shared to the reinforcement main layer to obtain the trained federated reinforcement sub-model; S120, embedding the m reinforcement layers in the trained federated reinforcement sub-model into corresponding real-time working threads among the m real-time working threads, and embedding the reinforcement main layer into the control ports of the m real-time working threads; S121, according to the real-time acquisition of the j-th real-time working thread working status data, through the built-in enhanced layering, real-time control is performed, when all real-time working threads trigger the first execution information, the corresponding execution S122. When at least one of all the real-time work threads triggers the second execution information, the exception type corresponding to the real-time work thread that triggers the second execution information is uploaded to the enhanced main layer, and the enhanced main layer calls the matching sub-model to evaluate the evaluation score of the abnormal real-time work thread at the current moment and the real-time work thread that continuously triggers the first execution information; S123, by strengthening the main layer, sharing the heartbeat packet parameters corresponding to the real-time working thread with the largest evaluation score with the abnormal real-time working thread corresponding to the current moment, and using the evaluation model to evaluate the real-time evaluation score of the abnormal real-time working thread after sharing; S124, when the real-time evaluation score of the abnormal real-time working thread after sharing triggers the first execution information, the current state is maintained. When the real-time evaluation score of the abnormal real-time working thread after sharing triggers the second execution information, the heartbeat packet parameter pool is called by the enhanced main layer to adjust the parameter information, and the real-time evaluation score of the abnormal real-time working thread after adjustment is evaluated. If the first execution information is triggered, the current state is maintained. If the second execution information is triggered, the third execution information is triggered, and execution is performed. S125. Repeat S122-S124 until all real-time working threads trigger the first execution information.
6. The method for enhancing network connection based on heartbeat signal according to claim 5, characterized in that: The steps of constructing the dynamic interval search model include: S301, assuming (Th1...Thj...Thm) as the target transmission interval of m working threads, set the heartbeat search interval [Tmin, Tmax], where Thj represents the target transmission interval corresponding to the j-th real-time working thread, and Tmin and Tmax represent the lower limit and upper limit of the heartbeat search interval respectively; S302, constructing a transmission interval prediction sub-model based on a BP neural network, and training the constructed transmission interval prediction sub-model using the historical working state sequence and the corresponding heartbeat packet parameter set sequence and transmission interval sequence saved in the heartbeat packet parameter pool, to obtain a trained transmission interval prediction sub-model; S303: When the j-th real-time working thread triggers the third execution information, obtain the current working state data of the j-th real-time working thread and the corresponding execution The updated heartbeat packet data is input into the transmission interval prediction sub-model to predict the transmission interval tj corresponding to the j-th real-time working thread, and the obtained transmission interval is built into the j-th real-time working thread, and a test evaluation is performed to obtain the evaluation score three. If the evaluation score three is greater than the evaluation score threshold, tj is used as the target transmission interval Thj.
7. The method for enhancing network connection based on heartbeat signal according to claim 6, characterized in that: The step of constructing the dynamic interval search model also includes: S304: If the evaluation score 3 is less than or equal to the evaluation score threshold, determine whether tj belongs to [Tmin, Tmax]. tj∈[Tmin, Tmax], then take tj as the starting point and perform a bidirectional symmetric search within [Tmin, Tmax] to obtain symmetric transmission intervals t1j and t2j; S305, sequentially embed the obtained symmetric transmission intervals t1j and t2j into the jth real-time working thread, and perform test evaluation to obtain corresponding evaluation scores respectively, and compare the obtained evaluation scores with the evaluation score thresholds in turn. If only one corresponding evaluation score is greater than the evaluation score threshold, the corresponding transmission interval is used as the target transmission interval Thj. If both evaluation scores are greater than the evaluation score threshold, the one with the larger evaluation score is selected as the target transmission interval Thj. S306: If all are smaller than the evaluation score threshold, continue searching until the evaluation score corresponding to at least one transmission interval in the symmetrical transmission interval is larger than the evaluation score threshold; S307, if Then, a bidirectional symmetric search is performed within [Tmin, Tmax] with the midpoint value of the heartbeat search interval as the starting point, and the processes S305 and S306 are repeated until the evaluation score corresponding to at least one transmission interval in the symmetric transmission interval is greater than the evaluation score threshold; S308. Repeat the process of S303-S306 until the evaluation scores corresponding to all real-time working threads are greater than the evaluation score threshold.
8. A network connection enhancement system based on a heartbeat signal, used to implement the network connection enhancement method based on a heartbeat signal according to any one of claims 1 to 7, characterized in that: include: Parameter selection module, heartbeat packet module, dynamic interval search module, test and optimization module; The parameter selection module includes a parameter pool unit and a parameter selection unit; The parameter pool unit is used to obtain the heartbeat packet parameters and transmission interval data of the historical working threads corresponding to the evaluation scores greater than the evaluation score threshold through an evaluation algorithm according to the acquired historical multi-concurrent working thread working status data, and to construct a heartbeat packet parameter pool using the acquired heartbeat packet parameters and transmission interval data; The parameter selection unit is used to obtain the heartbeat parameter space of multiple concurrent working threads through the parameter selection optimization model according to the initial state data sequence of multiple concurrent working threads at the current moment; The heartbeat packet module is used to construct a heartbeat packet set using the heartbeat parameter space of multiple concurrent working threads, and at the same time, the constructed heartbeat packet set is built into the corresponding thread.
9. The network connection enhancement system based on heartbeat signal as claimed in claim 8, characterized in that: The dynamic interval search module includes a model building unit and an interval acquisition unit; The model building unit is used to build a dynamic interval search model through a teaching and learning optimization algorithm and a BP neural network, and train the dynamic interval search model using the acquired historical working state sequence of multiple concurrent working threads and the corresponding heartbeat packet parameter set sequence and transmission interval sequence to obtain a trained dynamic interval search model; The interval acquisition unit is used to acquire the dynamic transmission interval of the heartbeat packet of the corresponding working thread through the dynamic interval search model according to the acquired initial state data sequence and the heartbeat parameter space, and embed the acquired dynamic transmission interval into the corresponding working thread; The testing and optimization module includes a testing unit, an evaluation unit, an evaluation and judgment unit, and an abnormality monitoring unit; The test unit is used to test multiple concurrent working threads with built-in heartbeat packets and dynamic transmission intervals, and obtain working status data of the multiple concurrent working threads; The evaluation unit is used to evaluate the working status of multiple concurrent working threads in real time through an evaluation model according to the acquired working status data of multiple concurrent working threads, and obtain a real-time evaluation score sequence of the multiple concurrent working threads; The evaluation judgment unit is used to compare the acquired real-time evaluation score sequences of multiple concurrent working threads with the set evaluation score threshold. If the real-time evaluation score sequences are all greater than the evaluation score threshold, the current working state is maintained. If at least one real-time evaluation score is less than or equal to the evaluation score threshold, the working state data and heartbeat packet parameters of the corresponding working threads less than or equal to the evaluation score threshold are obtained. The abnormality monitoring unit is used to perform abnormal state discrimination of the corresponding working thread through an abnormality discrimination model according to the working state data and heartbeat packet parameters of the corresponding working thread that are less than or equal to the evaluation score threshold, and obtain the abnormal state result of the corresponding working thread and the corresponding working state data and heartbeat packet parameters.
10. A computer-readable storage medium, characterized in that: Computer instructions are stored thereon, and when the computer instructions are executed, the network connection enhancement method based on heartbeat signals described in any one of claims 1 to 7 is executed.
Citation Information
Patent Citations
A method for automatic switching protection of network communication lines between nodes
CN103209099B
A thread pool management method and system
CN103744723B