An implementation method and device for long link push recovery

By introducing feedback adjustment of multiple factors in the calculation of long link reconnect interval time, the problem of failure to fully consider user role and system activity in traditional methods is solved, and better user experience and system pressure management are achieved.

CN116032999BActive Publication Date: 2025-07-01HANGZHOU MAGIC SQUARE ARTIFICIAL INTELLIGENCE FOUNDATION RES CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the traditional long link reconnection method, the calculation of the reconnection interval time only depends on the system environment, and fails to fully consider the user role and system activity, resulting in poor user experience.

Method used

By introducing feedback adjustment of multiple factors in the calculation of reconnection interval time, the reconnection interval time is dynamically adjusted by taking into account the system environment, user role and user activity.

Benefits of technology

It realizes that while ensuring that the system is under too much pressure, it optimizes the user experience and ensures that users with frequent interactions get shorter retry time, thereby improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116032999B_ABST
    Figure CN116032999B_ABST
Patent Text Reader

Abstract

The present invention relates to a method and apparatus for implementing long - link push recovery. The present invention calculates the reconnection interval time by adding feedback regulation of multiple factors, and adopts feedback regulation to achieve time control of long - link recovery. Compared with traditional long - link reconnection technologies, the background management personnel can adjust the expected reconnection time according to the current system pressure, all users or a specific user group, realizing flexible control of the long - link reconnection interval time; the present invention not only retains the advantages of exponential back - off, avoids too many extra requests to the system, evenly disperses the pressure and the node global timer, but also ensures that users with more interactions and more attention to the current system will be treated more preferentially, and the expected value of their delayed retry time is shorter, so as to obtain a better experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of machine learning training, and particularly to a method and device for implementing long - link push recovery. Background Art

[0002] With the development of artificial intelligence technology, deep - learning machine training can solve many problems that could not be solved by traditional machine - learning algorithms in the past. The deep - learning model depends on the training of large - scale samples and the support of computer hardware. With the increase in business volume and the continuous improvement of model complexity, it is necessary to use a large - scale computer cluster in the computer room to provide computing power for numerous model trainings. In this process, real - time monitoring of the computer cluster performing machine - learning training tasks has become a key point of concern. Machine - learning R & D personnel and relevant operation and maintenance personnel need to support high - performance and low - latency while monitoring a large amount of cluster device data and experimental task status in order to discover problems in a timely manner. It is necessary to use long - links to enable the client to maintain its effective connection state with the server for a long time. When the client and the server are disconnected due to reasons such as cluster upgrade and network problems, reconnection is required to achieve the restoration of the long - link push state. Traditional long - link reconnection attempts usually adopt an exponential back - off algorithm, that is, doubling the potential delay before attempting to transmit again. After the initial failure, the sender will randomly re - transmit after one or two rounds. After the second failure, it will try again after 1 - 4 rounds. The third failure will mean waiting for 1 - 8 rounds, and so on. This simple method enables the network to accommodate various potential competing signals. Because the maximum delay lengths (2, 4, 8, 16...) show an exponential increase. Therefore, if the previous several retry attempts are not successful, the retry intervals in the later stage are probabilistically longer and are independent of the specific user scenario, that is, the expected value of the user's waiting is the same, regardless of the user role and the state. This greatly affects the user experience. Summary of the Invention

[0003] In order to overcome the above - mentioned deficiencies, the present invention aims to provide a method and device for implementing long - link push recovery. The present invention calculates the reconnection interval time by adding a feedback adjustment of multiple factors, taking into account multiple factors such as the system environment, user role, and the current activity level of the user in the system, ensuring that the cluster pressure is not too high while also guaranteeing the user experience.

[0004] The present invention achieves the above object through the following technical solutions: A method for implementing long - link push recovery, comprising the following steps:

[0005] (1) Confirm that the long - link is disconnected and start entering the reconnection loop;

[0006] (2) Initialize and assign the loop count before entering the loop for reconnection, and perform initial training assignment; let the loop count be i, and the initial assignment is i = 0;

[0007] (3) Determine whether the loop count exceeds the maximum reconnection times. If so, determine that the long connection push recovery fails, exit the loop and feedback the reconnection result; otherwise, proceed to step (4);

[0008] (4) Increment the loop count by 1 and then proceed to step (5);

[0009] (5) Send a reconnection request to the system based on the reconnection delay time of this time;

[0010] (6) Determine whether the reconnection of this time is successful. If so, exit the loop and feedback the long connection push recovery situation; otherwise, return to step (3), continue the loop until exiting the loop, and feedback the long connection push recovery situation.

[0011] Preferably, the long connection means that after establishing a connection once during data interaction between the execution entity and the peer end, multiple data packets can be continuously sent; the method for confirming the disconnection of the long connection is TCP disconnection or heartbeat disconnection.

[0012] Preferably, in step (3), define a maximum reconnection times M. When the reconnection times exceed M, no more retries are performed; when the loop count i is less than or equal to the maximum reconnection times M, the reconnection loop can be entered; otherwise, exit the reconnection loop and confirm the reconnection failure.

[0013] Preferably, in step (4), each time entering the reconnection loop, the training times need to be accumulated, that is, execute i += 1, and then proceed to step (5).

[0014] Preferably, in step (5), obtain the reconnection delay time delay, and send a reconnection request to the peer end of the system connection after delaying for delay seconds; the method for obtaining the reconnection delay time delay is as follows:

[0015] (5.1) Obtain the system operation parameters, which include the maximum reconnection times M, the pressure constant P, the sensitive time δT, the system working time interval β, the minimum reconnection time a, the exponential base b, and the progressive index c;

[0016] (5.2) Determine the reconnection time interval of this time, and the reconnection time interval of this time is determined by the following method: Let the reconnection time interval [begin, end] in this loop, begin = a + b^i, end = a + b^(i + 1);

[0017] (5.3) Obtain the reconnection feedback factor and its weight of this time;

[0018] (5.4) Determine the reconnect weight score for this time and normalize it. The weight score is calculated and normalized as follows: In the formula, S represents the array storing each score, which is the score calculated in real time; M represents the array storing each maximum score, which is pre-configured; the actual score is calculated by multiplying the score of each item by the weight and dividing by the highest score of each item multiplied by the weight, that is, calculating the actual score in percentage; the score value calculated this time is in the range of [0, 1].

[0019] (5.5) Obtain the reconnect delay time for this loop.

[0020] Preferably, the pressure constant P is a configurable trade-off point, and the value of P is between 0 and 10; the larger P is, the shorter the expected recovery time is, and at the same time, the greater the pressure on the system is. The smaller P is, the longer the expected recovery time is, and the smaller the pressure on the system is.

[0021] The sensitive time δT is used to represent the time considered forward when calculating the weight.

[0022] The system working time interval β refers to the time when the system can be responded to manually in time, and the value is [8, 24]; the minimum reconnect time a is defaulted to 3; the exponential base b is defaulted to 3; the progressive exponent c is defaulted to 0.5.

[0023] Preferably, the step (5.3) is specifically as follows: By adjusting this type of weight factor, the adjustment of long connection push recovery for a certain or a group of specific users can be realized: Factor F1, with a weight of 1, its value is 1 when the system is visible to the user and 0 when it is invisible; Factor F2, with a weight of 2, its value is 0 when there is no interaction within the δT time before the system recovers, 0.5 when there are 1 - 2 interaction behaviors, and 1 when there are more than 2 interaction behaviors; Factor F3, with a weight of 2, is recorded as 1 when the current time is within β and 0 when it is not within β; Factor F4, with a weight of 3, is recorded as 1 when there is an interaction behavior between two recovery intervals of the system and 0 when there is no interaction behavior; Factor F5, with a weight of 3, represents the weight of the system logged-in user, defaulted to 0; among them, each factor and its weight score can be stored in a relational database, or the factors can be dynamically configured using a rule system; for non-first loops, the scores of each item of F1 - F5 need to be re-obtained each time.

[0024] Preferably, in the step (5.5), the reconnect delay time for this loop is obtained as follows:

[0025] source = Rand(begin, end)

[0026] delay = begin+(source - begin)*(source - begin) / (end - begin)^(P + score)

[0027] delay = Min(end, delay)

[0028] In the formula, Rand represents a random function that randomly generates a value within (begin, end).

[0029] A device for long - link push recovery includes a long - link disconnection judgment module, a long - link reconnection delay time acquisition module, and a long - link push recovery module;

[0030] The long - link disconnection judgment module is used to judge whether the current long - link is disconnected. When TCP disconnection occurs or there is no response to the sent heartbeat packet, it is determined that the long - link is disconnected;

[0031] The long - link reconnection delay time acquisition module is used to obtain the long - link reconnection delay time for this reconnection;

[0032] The long - link push recovery module sends a reconnection request to the peer server according to the long - link reconnection delay time and feedbacks the result of whether the reconnection is successful.

[0033] Preferably, the long - link reconnection delay time acquisition module includes a system operation parameter acquisition unit, a reconnection time interval acquisition unit, a reconnection feedback factor acquisition unit, a weight score acquisition unit, and a delay time acquisition unit;

[0034] The system operation parameter acquisition unit is used to obtain system operation parameters; the system operation parameters include the aforementioned maximum reconnection times M, pressure constant P, sensitive time δT, system working time interval β, minimum reconnection time a, exponential base b, and progressive exponent c;

[0035] The reconnection time interval acquisition unit is used to determine the reconnection time interval for this time;

[0036] The reconnection feedback factor acquisition unit is used to obtain the reconnection feedback factor for this time and its weight; by adjusting this type of weight factor, the adjustment of long - link push recovery for a certain or a group of specific users can be achieved;

[0037] The weight score acquisition unit is used to obtain, calculate, and normalize the weight score;

[0038] The delay time acquisition unit obtains the reconnection delay time for this loop.

[0039] The beneficial effects of the present invention are as follows: (1) The present invention adopts feedback regulation to achieve time control for long connection restoration. Compared with traditional long connection reconnection technologies, the background management personnel can adjust the expected reconnection time according to the current system pressure for all users or a specific user group, realizing flexible control of the long connection reconnection interval time; (2) The present invention not only retains the advantages of exponential backoff, avoids too many extra requests to the system, and evenly disperses the pressure and node global timers, but also ensures that users with more interactions and greater concern for the current system will be treated more preferentially, and the expected values of their delayed retry times are shorter, so that they can obtain a better experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 is a schematic diagram of the method flow of the present invention;

[0041] Figure 2 is a schematic diagram of the method for obtaining the reconnection delay time in an embodiment of the present invention;

[0042] Figure 3 is a schematic diagram of the device structure of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0043] The present invention will be further described below in conjunction with specific embodiments, but the protection scope of the present invention is not limited thereto:

[0044] Embodiment: The embodiments described in the present invention are only a part of the embodiments of the present invention, rather than all embodiments. The components of the embodiments of the present invention described and illustrated herein can be arranged and designed in various different configurations. It should be noted that: Similar reference numerals and letters denote similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of the present invention, the terms "first", "second", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance. In the specification and claims, the terms "comprising" and "including" are used in an open-ended manner and are thus interpreted to mean "including, but not limited to...".

[0045] As Figure 1 shown, an embodiment of the present invention provides a method for realizing long connection push restoration, including:

[0046] S101, confirm that the long connection is disconnected and start entering the reconnection loop.

[0047] In one embodiment, each step of the present invention is applicable to the field of machine learning, especially for the server connection of a computing cluster operation monitoring system. Among them, the long connection interaction data can be the data information of the computing cluster operation status, and the execution entity can be the monitoring system client. The other end of the long connection can be the other end that conducts data interaction with the execution entity, usually the access layer of the cluster service. The back-end of the cluster training computer in the computer room realizes long connection information interaction and push through the cluster access layer, so that the status of each service can be effectively monitored. After the client subscribes to the monitoring data, it will regularly receive data packets pushed by the server containing cluster status monitoring information and running task information, and sequentially monitor a large amount of cluster device data and experimental task status in order to discover problems in a timely manner.

[0048] A long connection means that when the execution entity conducts data interaction with the other end, after establishing a connection once, multiple data packets can be continuously sent. In a specific implementation, the long connection adopts the wss protocol based on the tcp protocol, and the connection is maintained through heartbeat confirmation. There are usually two cases of disconnection: one is the tcp connection disconnection: for example, in the case of cluster upgrade, etc., it is normally disconnected. The other is the heartbeat disconnection: the heartbeat packet is sent but no response is received. For example, when the network condition is poor or the cluster fails, in fact, usually the tcp protocol is also disconnected at this time. The disconnection of the long connection can be judged through the above situations. After confirming the disconnection of the long connection, the reconnection loop for resuming the push starts.

[0049] S102, perform initial training assignment.

[0050] Before entering the loop reconnection, the number of loop times needs to be initialized. In a specific embodiment, let the number of loop times be i, and the initial assignment is i = 0.

[0051] S103, determine whether the number of loop times exceeds the maximum reconnection times. If so, it is judged that the long connection push recovery fails, exit the loop and feedback the reconnection result; if not, enter, and the number of loop times +1.

[0052] In a specific embodiment, a maximum reconnection times M is defined, and no retry is performed after exceeding M. Although technically, M has no interval limit, in a specific implementation, in order to save resource consumption in extreme cases, M is usually given a default value of 100. When the number of loop times i is less than or equal to the maximum reconnection times M, the reconnection loop can be entered. Otherwise, exit the reconnection loop and confirm the reconnection failure.

[0053] S104 The number of loop times +1.

[0054] In a specific embodiment, each time entering the reconnection loop, the training times need to be accumulated, that is, execute i += 1, and then enter the next step.

[0055] S105 sends a reconnection request to the system according to the current reconnection delay time.

[0056] Let the reconnection delay time be delay. In this step, it is necessary to obtain the reconnection delay time delay, and after this loop, send a reconnection request to the peer of the system connection after delaying for delay seconds. In a specific embodiment, the method for obtaining the reconnection delay time delay is as Figure 2 shown.

[0057] 501 Obtain the system operation parameters.

[0058] In a specific embodiment, this step needs to obtain the system operation parameters. The system operation parameters include the aforementioned maximum number of reconnections M, pressure constant P, sensitive time δT, system working time interval β, minimum reconnection time a, exponential base b, and progressive exponent c. Specifically, the pressure constant P, as a configurable trade-off point, affects the load of the system or the system's recovery speed. Preferably, P takes a value between 0 and 10. The larger P is, the shorter the expected recovery time, and at the same time, the greater the pressure on the system. The smaller P is, the longer the expected recovery time, and the smaller the pressure on the system. When P is 0 and there are no feedback factors, it is equivalent to exponential backoff without feedback regulation.

[0059] The sensitive time δT, δT is used to represent the time considered forward when calculating the weight.

[0060] The system working time interval β is the time when the system can be promptly responded to manually. Preferably, it takes a value of [8, 24]. Within this time, the recovery time will be shorter, so the reconnection time delay will be shorter. Preferably, the minimum reconnection time a defaults to 3; the exponential base b defaults to 3; the progressive exponent c defaults to 0.5.

[0061] The above system operation parameters can be adjusted according to the system pressure situation during the system operation. Specifically, when the system pressure is too high, the number of expected reconnection requests within a short period can be reduced by reducing P, increasing the base b and the exponent c; conversely, when the system pressure is acceptable and a better user experience is desired, the expected reconnection time can be reduced by increasing P and reducing the base b and c.

[0062] It should be noted that the adjustment of the system operation parameters takes effect for all system users. If you want to adjust for a certain or a group of system users, you can adjust the defined weight factor.

[0063] 502 Determine the current reconnection time interval.

[0064] In a specific embodiment, the time interval of the current reconnection is determined as follows: Let the time interval of reconnection in the current loop be [begin, end], where begin = a + b^i and end = a + b^(i + 1).

[0065] 503 Obtain the feedback factor and its weight of the current reconnection.

[0066] It is necessary to obtain the feedback factor and its weight of the current reconnection. By adjusting such weight factors, the adjustment of long - link push recovery for a certain or a group of specific users can be achieved. In a specific embodiment: Factor F1, with a weight of 1, its value is 1 when the system is visible to the user and 0 when it is not visible (such as minimized to the tray); Factor F2, with a weight of 2, its value is 0 when there is no interaction within δT time before the system recovery, 0.5 when there are 1 - 2 interaction behaviors, and 1 when there are more than 2 interaction behaviors; Factor F3, with a weight of 2, is recorded as 1 when the current time is within β and 0 when it is not within β; Factor F4, with a weight of 3, is recorded as 1 when there is an interaction behavior of the user within two recovery intervals and 0 when there is no interaction behavior; Factor F5, with a weight of 3, represents the weight of the system - logged - in user, with a default value of 0.

[0067] In a specific embodiment, each factor and its weight score can be stored in a relational database, or a rule system can be used to dynamically configure the factors.

[0068] Particularly, for non - first loops, the scores of some factors may change during the loop, and the scores of each item of F1 - F5 need to be re - obtained for each loop.

[0069] 504 Determine the weight score of the current reconnection and normalize it.

[0070] The weight score is calculated and normalized as follows: In the formula, S represents the array storing each score, which is the score calculated in real - time. M represents the array storing the maximum scores of each item, which is pre - configured. The score of each item * weight / the highest score of each item * weight is used to calculate the actual score obtained in percentage. The score value calculated this time is in the range of [0, 1].

[0071] 505 Obtain the reconnection delay time of the current loop

[0072] The reconnection delay time of the current loop is obtained as follows

[0073] source = Rand(begin, end)

[0074] delay = begin + (source - begin) * (source - begin) / (end - begin) ^ (P + score)

[0075] delay = Min(end, delay)

[0076] In the formula, Rand represents a random function that randomly generates a value within (begin, end).

[0077] S106 determines whether the current reconnection is successful. If it is, go to step S107, exit the loop and feedback the recovery situation of the long connection push. If it is not successful, return to step S103 and continue the loop.

[0078] S107, exit the loop and feedback the recovery situation of the long connection push.

[0079] Compared with the traditional long connection reconnection technology, in the present invention, the background management personnel can adjust the expected reconnection time for all users or a specific user group according to the current system pressure, realizing flexible control of the long connection reconnection interval time.

[0080] According to this method, for users who have interactions during the recovery stage, that is, users who are more concerned about this system, when P = 1 and other factors are all 0, their single - time expected reconnection time is 2 / 3 of that of users without interactions.

[0081] Therefore, this method not only retains the advantages of exponential back - off, avoids too many extra requests to the system, and evenly disperses the pressure and node global timers, but also ensures that users with more interactions and more concerned about the current system will be treated more preferentially, and their expected values of delayed retry times are shorter, so as to obtain a better experience.

[0082] The embodiment of the present invention also provides a device for long connection push recovery, as Figure 3 shown, including a long connection disconnection judgment module, a long connection reconnection delay time acquisition module, and a long connection push recovery module.

[0083] Among them, the long connection disconnection judgment module is used to judge whether the current long connection is disconnected. When a TCP disconnection occurs or there is no response to the sent heartbeat packet, it is determined that the long connection is disconnected.

[0084] The long connection reconnection delay time acquisition module is used to obtain the long connection reconnection delay time, that is, the delay time of this reconnection.

[0085] The long connection push recovery module sends a reconnection request to the peer server according to the long connection reconnection delay time and feedbacks the result of whether the reconnection is successful.

[0086] In a specific embodiment, the long link reconnection delay time acquisition module further includes a system operation parameter acquisition unit, a reconnection time interval acquisition unit, a reconnection feedback factor acquisition unit, a weight score acquisition unit, and a delay time acquisition unit.

[0087] Among them, the system operation parameter acquisition unit is used to acquire system operation parameters. The system operation parameters include the aforementioned maximum reconnection times M, pressure constant P, sensitive time δT, system working time interval β, minimum reconnection time a, exponential base b, and progressive exponent c.

[0088] The reconnection time interval acquisition unit is used to determine the time interval of this reconnection.

[0089] The reconnection feedback factor acquisition unit is used to acquire the reconnection feedback factor and its weight for this time. By adjusting such weight factors, the adjustment of long link push recovery for a certain or a group of specific users can be realized.

[0090] The weight score acquisition unit is used to acquire, calculate, and normalize the weight score.

[0091] The delay time acquisition unit acquires the reconnection delay time of this cycle.

[0092] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps including the above method embodiments; and the aforementioned storage medium includes various media such as ROM, RAM, magnetic disk, or optical disc that can store program codes.

[0093] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

[0094] The above are the specific embodiments of the present invention and the technical principles applied. If changes made according to the concept of the present invention do not exceed the spirit covered by the specification and the drawings in terms of their functions and effects, they should still fall within the protection scope of the present invention.

Claims

1. An implementation method for long link push recovery, characterized in that, It includes the following steps: (1) Confirm that the long connection is disconnected and start entering the reconnection loop; (2) Initialize and assign the loop count before entering the loop reconnection, and perform initial training assignment; Among them, set the loop count as i, and the initial assignment is i = 0; (3) Judge whether the loop count exceeds the maximum reconnection times. If so, judge that the long connection push recovery fails, exit the loop and feedback the reconnection result; otherwise, enter step (4); (4) Increment the loop count by 1 and then enter step (5); (5) Send a reconnection request to the system according to the reconnection delay time of this time; in step (5), obtain the reconnection delay time delay, and send a reconnection request to the opposite end of the system connection after delaying for delay seconds; the method for obtaining the reconnection delay time delay is as follows: (5.1) Obtain the system operation parameters, where the system operation parameters include the maximum reconnection times M, the pressure constant P, the sensitive time δT, the system working time interval β, the minimum reconnection time a, the exponential base b, and the progressive exponent c; (5.2) Determine the reconnection time interval of this time, where the reconnection time interval of this time is determined by the following method: set the reconnection time interval [begin, end] in this loop, begin = a + b^i, end = a + b^(i + 1); (5.3) Obtain the reconnection feedback factor and its weight F of this time; (5.4) Determine the weight score for this reconnection and normalize it, where the weight score is calculated and normalized as follows: In the formula, S represents the array storing each score, which is the score calculated in real time; M represents the array storing each maximum score, which is pre-configured; the score of each item * weight / the highest score of each item * weight, that is, the actual score is calculated in percentage; the score value calculated this time is in the range of [0, 1]; (5.5) Obtain the reconnection delay time of this loop; the reconnection delay time of this loop is obtained by the following method: source = Rand(begin, end) delay = begin + (source - begin) * (source - begin) / (end - begin)^(P + score) delay = Min(end, delay) In the formula, Rand represents a random function, which randomly generates a value within (begin, end); (6) Judge whether the reconnection of this time is successful. If so, exit the loop and feedback the long connection push recovery situation; otherwise, return to step (3), continue to loop until exiting the loop, and feedback the long connection push recovery situation.

2. The implementation method of long link push recovery according to claim 1, characterized in that: The long connection mentioned above refers to that after establishing a connection once during data interaction between the execution entity and the opposite end, multiple data packets can be continuously sent; the method for confirming the disconnection of the long connection is that the TCP is disconnected or the heartbeat is disconnected.

3. An implementation method for restoring long - link push according to any one of claims 1 - 2, characterized in that: In step (3) mentioned above, define a maximum reconnection times M. When the reconnection times exceed M, no more retries are performed; only when the loop count i is less than or equal to the maximum reconnection times M can the reconnection loop be entered; Otherwise, exit the reconnection loop and confirm the reconnection failure.

4. The implementation method of long link push recovery according to any one of claims 1-3, characterized in that: In step (4) mentioned above, each time entering the reconnection loop, the training times need to be accumulated, that is, execute i += 1, and then enter step (5).

5. The implementation method of long link push recovery according to claim 1, characterized in that: The pressure constant P is used as a configurable trade-off point, and the value of P is between 0 and 10; the larger P is, the shorter the expected recovery time is, and at the same time, the greater the pressure on the system is. The smaller P is, the longer the expected recovery time is, and the smaller the pressure on the system is; The sensitive time δT is used to represent the time considered forward when calculating the weight; The system working time interval β refers to the time when the system can be promptly responded to manually, with a value range of [8, 24]; the minimum reconnection time a has a default value of 3; the exponential base b has a default value of 3; the progressive exponent c has a default value of 0.

5.

6. The implementation method of long link push recovery according to claim 1, characterized in that: The specific steps of step (5.3) are as follows: By adjusting this type of weight factor, the adjustment of long - link push recovery for a certain or a group of specific users can be achieved: Factor F1 has a weight of 1, and its value is 1 when the system is visible to the user and 0 when it is not visible; Factor F2 has a weight of 2, and its value is 0 when there is no interaction within δT time before the system recovery, 0.5 when there are 1 - 2 interaction behaviors, and 1 when there are more than 2 interaction behaviors; Factor F3 has a weight of 2, and its value is 1 when the current time is within β and 0 when it is not within β; Factor F4 has a weight of 3, and its value is 1 when there is an interaction behavior between two recovery intervals of the system and 0 when there is no interaction behavior; Factor F5 has a weight of 3, representing the weight of the system - logged - in user, with a default value of 0; among them, each factor and its weight score can be stored in a relational database, or the factors can be dynamically configured using a rules system; for non - first - time loops, the scores of each item of F1 - F5 need to be re - obtained each time.

7. An apparatus for long link push recovery, characterized in that: It includes a long - link disconnection judgment module, a long - link reconnection delay time acquisition module, and a long - link push recovery module; The long - link disconnection judgment module is used to judge whether the current long - link is disconnected. When a TCP disconnection occurs or there is no response to the sent heartbeat packet, it is determined that the long - link is disconnected; The long - link reconnection delay time acquisition module is used to obtain the long - link reconnection delay time for this reconnection; The long - link push recovery module sends a reconnection request to the peer server according to the long - link reconnection delay time and feedbacks the result of whether the reconnection is successful; Among them, to obtain the reconnection delay time delay, a reconnection request is sent to the system connection peer after delaying for delay seconds; the method of obtaining the reconnection delay time delay is as follows: (I) Obtain the system operation parameters, which include the maximum number of reconnection attempts M, the pressure constant P, the sensitive time δT, the system working time interval β, the minimum reconnection time a, the exponential base b, and the progressive exponent c; (II) Determine the reconnection time interval for this time. The reconnection time interval for this time is determined in the following way: Let the reconnection time interval for this loop be [begin, end], where begin = a + b^i and end = a + b^(i + 1); (III) Obtain the reconnection feedback factor and its weight F for this time; (IV) Determine the weight score for this reconnection and normalize it, where the weight score is calculated and normalized in the following way: In the formula, S represents the array storing each score, which is the score calculated in real time; M represents the array storing each maximum score, which is pre-configured; the actual score is calculated by multiplying the score of each item by the weight and dividing by the highest score of each item multiplied by the weight, that is, calculating the actual score in percentage; the score value calculated this time is in the range of [0, 1]; (V) Obtain the reconnection delay time for this loop; the reconnection delay time for this loop is obtained in the following way: source = Rand(begin, end) delay = begin+(source - begin)*(source - begin) / (end - begin)^(P + score) delay = Min(end, delay) In the formula, Rand represents a random function that randomly generates a value within (begin, end).

8. The apparatus for restoring long link push according to claim 7, wherein: The long link reconnection delay time acquisition module described above includes a system operation parameter acquisition unit, a reconnection time interval acquisition unit, a reconnection feedback factor acquisition unit, a weight score acquisition unit, and a delay time acquisition unit; The system operation parameter acquisition unit is used to acquire system operation parameters; the system operation parameters include the maximum number of reconnections M, the pressure constant P, the sensitive time δT, the system working time interval β, the minimum reconnection time a, the exponential base b, and the progressive exponent c; The reconnection time interval acquisition unit is used to determine the time interval of this reconnection; The reconnection feedback factor acquisition unit is used to acquire the reconnection feedback factor and its weight for this time; by adjusting this type of weight factor, the adjustment of long link push recovery for a certain or a group of specific users can be achieved; The weight score acquisition unit is used to acquire, calculate, and normalize the weight score; The delay time acquisition unit acquires the reconnection delay time of this cycle.

Citation Information

Patent Citations

  • Webpage pushing method and device, electronic equipment and storage medium

    CN112351094A

  • Method for reconnecting H5 page to server, terminal and readable storage medium

    CN113746910A