CN109298934B - Heartbeat period adjusting method, device and system - Google Patents

Heartbeat period adjusting method, device and system Download PDF

Info

Publication number
CN109298934B
CN109298934B CN201811039291.XA CN201811039291A CN109298934B CN 109298934 B CN109298934 B CN 109298934B CN 201811039291 A CN201811039291 A CN 201811039291A CN 109298934 B CN109298934 B CN 109298934B
Authority
CN
China
Prior art keywords
client
heartbeat cycle
heartbeat
adjusted
dimension
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811039291.XA
Other languages
Chinese (zh)
Other versions
CN109298934A (en
Inventor
贾克明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Comba Network Systems Co Ltd
Original Assignee
Comba Telecom Systems China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Comba Telecom Systems China Ltd filed Critical Comba Telecom Systems China Ltd
Priority to CN201811039291.XA priority Critical patent/CN109298934B/en
Publication of CN109298934A publication Critical patent/CN109298934A/en
Application granted granted Critical
Publication of CN109298934B publication Critical patent/CN109298934B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Measuring Pulse, Heart Rate, Blood Pressure Or Blood Flow (AREA)
  • Medical Treatment And Welfare Office Work (AREA)

Abstract

The invention relates to a method, a device and a system for adjusting a heartbeat cycle, wherein the method comprises the following steps: obtaining cache data of a corresponding client group of a client to be adjusted in each dimension; respectively multiplying the benchmark heartbeat cycle data and the historical bit rate data of the corresponding client group under each dimension to obtain a product corresponding to each dimension; accumulating the products corresponding to the dimensions to obtain an initial heartbeat cycle of the client to be adjusted; and adding the initial heartbeat period to a preset minimum heartbeat period to obtain an optimal heartbeat period, and updating the current heartbeat period of the client to be adjusted to the optimal heartbeat period. The embodiment of the invention can dynamically adjust the heartbeat cycle according to the characteristics and the actual running condition of the client, so that the heartbeat detection resources can be concentrated to the client with the most requirement, the resource utilization rate and the heartbeat cycle selection precision are improved, and the optimal balance between the resource consumption and the detection effect is achieved.

Description

Heartbeat period adjusting method, device and system
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, and a system for adjusting a heartbeat cycle.
Background
In a network system, the client presence detection is generally implemented by a heartbeat detection technique. For example, in a network system composed of a server and a plurality of clients, a heartbeat message is usually acquired at a certain heartbeat cycle to determine whether the client is in place.
In the implementation process, the inventor finds that at least the following problems exist in the conventional technology: in the traditional heartbeat detection, the accuracy of selecting the heartbeat period is low, and the consumption of computing resources is large.
Disclosure of Invention
Therefore, it is necessary to provide a heartbeat cycle adjusting method, device and system for solving the problems of low accuracy of selecting heartbeat cycles and high consumption of computing resources in the conventional heartbeat detection.
In order to achieve the above object, an embodiment of the present invention provides a method for adjusting a heartbeat cycle, including the following steps:
obtaining cache data of a corresponding client group of a client to be adjusted in each dimension; the cache data comprises reference heartbeat cycle data and historical bit rate data; each dimension includes one or more client groups;
respectively multiplying the benchmark heartbeat cycle data and the historical bit rate data of the corresponding client group under each dimension to obtain a product corresponding to each dimension; accumulating the products corresponding to the dimensions to obtain an initial heartbeat cycle of the client to be adjusted;
and adding the initial heartbeat period to a preset minimum heartbeat period to obtain an optimal heartbeat period, and updating the current heartbeat period of the client to be adjusted to the optimal heartbeat period.
In one embodiment, the step of adding the initial heartbeat cycle to a preset minimum heartbeat cycle to obtain an optimal heartbeat cycle includes:
based on the following formula, the optimal heartbeat cycle is obtained:
Figure BDA0001791709250000021
t is the optimal heartbeat period, N is the total dimensionality of the multi-dimensional client group heartbeat period database, TiReference heartbeat cycle data, K, of the client group corresponding to the client in the ith dimension for the client to be adjustediHistorical bit rate data of a client group corresponding to the client to be adjusted in the ith dimension; a is a preset minimum heartbeat period.
In one embodiment, the step of updating the current heartbeat cycle of the client to be adjusted to the optimal heartbeat cycle includes:
when the change amplitude value is larger than a preset threshold amplitude value, updating the current heartbeat cycle of the client to be adjusted to be the optimal heartbeat cycle; the variation amplitude value is a value of the variation amplitude of the optimal heartbeat cycle relative to the current heartbeat cycle.
In one embodiment, the step of obtaining the cache data of the corresponding client group of the client to be adjusted in each dimension includes:
inquiring a multidimensional grouping heartbeat cycle database to obtain corresponding client groups of the clients to be adjusted under each dimension; the multidimensional grouping heartbeat cycle database is used for storing cache data of each client group under each dimension;
the dimensions include any one or any combination of the following: device type, deployment area, and monitoring level.
In one embodiment, the method further comprises the following steps:
acquiring historical bit rate data of each client in a client group;
and carrying out average value processing on the historical bit rate data of each client to obtain the historical bit rate data of the corresponding client group.
On the other hand, an embodiment of the present invention further provides a device for adjusting a heartbeat cycle, including:
the data acquisition unit is used for acquiring cache data of a corresponding client group of the client to be adjusted in each dimension; the cache data comprises reference heartbeat cycle data and historical bit rate data; each dimension includes one or more client groups;
the heartbeat cycle processing unit is used for multiplying the benchmark heartbeat cycle data and the historical bit rate data of the corresponding client group under each dimension respectively to obtain the product corresponding to each dimension; accumulating the products corresponding to the dimensions to obtain an initial heartbeat cycle of the client to be adjusted;
and the heartbeat cycle updating unit is used for adding the initial heartbeat cycle to a preset minimum heartbeat cycle to obtain an optimal heartbeat cycle, and updating the current heartbeat cycle of the client to be adjusted to the optimal heartbeat cycle.
On the other hand, the embodiment of the invention also provides a heartbeat cycle adjusting system, which comprises a server and all clients connected with the server;
the server is configured to perform the steps of the heartbeat cycle adjusting method described above.
In one embodiment, each client is respectively connected with the server through a communication interface;
the communication interface is an SPI interface, an I2C interface, a UART interface, a CANBUS interface or an Ethernet interface.
On the other hand, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a controller, implements the steps of any one of the above-mentioned heartbeat cycle adjusting methods.
One of the above technical solutions has the following advantages and beneficial effects:
obtaining cache data of a corresponding client group of a client to be adjusted in each dimension; the cache data comprises reference heartbeat cycle data and historical bit rate data; each dimension includes one or more client groups; respectively multiplying the benchmark heartbeat cycle data and the historical bit rate data of the corresponding client group under each dimension to obtain a product corresponding to each dimension; accumulating the products corresponding to the dimensions to obtain an initial heartbeat cycle of the client to be adjusted; and adding the initial heartbeat period to a preset minimum heartbeat period to obtain an optimal heartbeat period, and updating the current heartbeat period of the client to be adjusted to the optimal heartbeat period. . And then can come dynamic adjustment heartbeat cycle according to the characteristic and the actual running condition of client, make the heartbeat detect the resource can be concentrated to the most required client, improved resource utilization ratio and heartbeat cycle and selected the precision to reach the optimal balance between resource consumption and detection effect.
Drawings
FIG. 1 is a diagram of an exemplary embodiment of a method for adjusting a heartbeat cycle;
FIG. 2 is a first flowchart of a method for adjusting a heartbeat cycle according to an embodiment;
FIG. 3 is a flowchart illustrating the historical bitrate data acquisition step for a client group in one embodiment;
FIG. 4 is a second flowchart of a method for adjusting a heartbeat cycle according to an embodiment;
FIG. 5 is a third flowchart of a method for adjusting a heartbeat cycle according to an embodiment;
FIG. 6 is a diagram of a multidimensional client group for a method for adjusting a heartbeat cycle in one embodiment;
FIG. 7 is a diagram illustrating a reference period and historical bit rates of a multidimensional client group in a heartbeat period adjustment method in an embodiment;
FIG. 8 is a diagram illustrating matching of clients to be adjusted in a multi-dimensional client group according to an embodiment of a heartbeat cycle adjustment method;
FIG. 9 is a schematic diagram of a heartbeat cycle adjusting device in an embodiment;
fig. 10 is a schematic structural diagram of a heartbeat cycle adjusting system in an embodiment.
Detailed Description
To facilitate an understanding of the present application, the present application will now be described more fully with reference to the accompanying drawings. Preferred embodiments of the present application are shown in the drawings. This application may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
The traditional heartbeat detection technology mainly comprises the following steps: 1. presetting a fixed heartbeat cycle: the server and the client preset a fixed heartbeat cycle, and then perform heartbeat detection in the fixed heartbeat cycle. Or the position information of the client side is considered when the heartbeat period is preset, but the heartbeat detection is still carried out in a fixed heartbeat period after the heartbeat period is set, but the heartbeat detection can be carried out only in the fixed heartbeat period by adopting the first method, and the first method cannot be dynamically adjusted according to the attribute and the state of the client side; 2. presetting a plurality of different heartbeat cycles, and then selecting one heartbeat cycle as an optimal heartbeat cycle: the server or the client side is preset with a plurality of heartbeat cycles, after the operation is tried according to the plurality of heartbeat cycles, an optimal heartbeat cycle is selected according to an operation result, and then the optimal heartbeat cycle is used for carrying out heartbeat detection, but the second method is adopted to provide a plurality of heartbeat cycles for selection in advance, so that the accuracy is not enough, and the resource consumption is high; 3. adjusting the heartbeat cycle according to the CPU load and the network link congestion condition: the method mainly adjusts the heartbeat period dynamically through judging the conditions of CPU load and network link congestion, but the third method considers the conditions of CPU load and network resource utilization, and has low detection effectiveness and accuracy.
In the heartbeat cycle adjusting method of each embodiment of the invention, the heartbeat cycle can be dynamically adjusted according to the characteristics and the actual running condition of the client, so that heartbeat detection resources can be concentrated to the client which is most in need, the resource utilization rate and the heartbeat detection effectiveness are improved, and the optimal balance between resource consumption and detection effect is achieved.
The method for adjusting the heartbeat cycle provided by the present application may be applied to an application environment as shown in fig. 1, in which a server 102 is connected to each client 104. Where the server 102 may be used for signal processing, signal transmission, etc., and the client 104 may transmit a heartbeat status message to the server. The server 102 may be implemented as a stand-alone server or a server cluster composed of a plurality of servers.
In one embodiment, as shown in fig. 2, a method for adjusting a heartbeat cycle is provided, which is described by taking the method as an example applied to the server 102 in fig. 1, and includes the following steps:
step S210, obtaining cache data of a corresponding client group of the client to be adjusted in each dimension; the cache data comprises reference heartbeat cycle data and historical bit rate data; each dimension includes one or more client groups.
The reference heartbeat cycle data refers to a reference cycle of a client group to which the client to be adjusted belongs in the corresponding dimension. The reference heart cycle data may be preset based on historical experience. The historical bit rate data value is the bit rate data of the client group to which the client to be adjusted belongs under the corresponding dimension. The initial value of the historical bit rate data may be 1 (i.e., 100%), after which the historical bit rate data may be dynamically maintained and updated based on the actual in-place behavior of the client. The client group refers to the grouping of the corresponding clients to be adjusted in the corresponding dimension. A client group corresponds to a baseline heartbeat cycle data and a historical bit rate data. It should be noted that one or more dimensions may be included, one or more client groups may be included in the same dimension, and one client group may correspond to one or more clients. The clients to be adjusted have corresponding client groups in different dimensions. The client groups of clients to be tuned may be grouped according to the characteristics of the clients. For example, grouping is based on the similarity of the characteristics or categories of the clients in that dimension.
Specifically, according to the client group corresponding to the client to be adjusted in each dimension, the server may obtain the cache data (including the reference heartbeat cycle data and the historical bit rate data) of the client to be adjusted in each dimension.
Step S220, multiplying the benchmark heartbeat cycle data and the historical bit rate data of the corresponding client group under each dimension respectively to obtain the product corresponding to each dimension; and accumulating the products corresponding to the dimensions to obtain the initial heartbeat period of the client to be adjusted.
Wherein, the initial heartbeat cycle refers to intermediate result data obtained by calculating the optimal heartbeat cycle process.
Specifically, the reference heartbeat cycle data and the historical bit rate data of the corresponding client group of the client to be adjusted in each dimension are multiplied respectively to obtain the product corresponding to each dimension. And accumulating the products corresponding to the dimensions, so as to obtain the initial heartbeat period of the client to be adjusted.
And step S230, adding the initial heartbeat cycle to a preset minimum heartbeat cycle to obtain an optimal heartbeat cycle, and updating the current heartbeat cycle of the client to be adjusted to the optimal heartbeat cycle.
The minimum heartbeat cycle refers to a preset heartbeat cycle constant. The heartbeat period refers to a period of transmitting a heartbeat state message to the server by the client to be adjusted. The optimal heartbeat period refers to the optimal period for the client to be adjusted to transmit the heartbeat state message to the server.
Specifically, the server adds the intermediate heartbeat cycle to a preset minimum heartbeat cycle, so as to obtain an optimal heartbeat cycle of the client to be adjusted. And updating the current heartbeat cycle of the client to be adjusted to the optimal heartbeat cycle, thereby realizing the optimal adjustment of the heartbeat cycle of the client to be adjusted.
In a specific embodiment, the step of adding the initial heartbeat cycle to a preset minimum heartbeat cycle to obtain an optimal heartbeat cycle includes:
obtaining the optimal heartbeat cycle of the client to be adjusted based on the following formula:
Figure BDA0001791709250000071
t is the optimal heartbeat period, N is the total dimensionality of the multi-dimensional client group heartbeat period database, TiReference heartbeat cycle of client group corresponding to client to be adjusted in ith dimensionData, KiHistorical bit rate data of a client group corresponding to the client to be adjusted in the ith dimension; a is a preset minimum heartbeat period.
In a specific embodiment, as shown in fig. 3, the method further comprises the steps of:
step S310, historical bit rate data of each client in the client group is obtained.
Where the initial value of the client's historical bitrate data may be 1.0 (i.e., 100%).
Specifically, by acquiring the historical bit rate data of each client in the client group, the historical bit rate data of the client group can be dynamically maintained and updated according to the actual running in-place situation of the client.
Step S320, averaging the historical bit rate data of each client to obtain the historical bit rate data of the corresponding client group.
Specifically, the historical bit rate data of each client is accumulated and added to obtain the total of the historical bit rate data under the client group, and the total of the historical bit rate data is divided by the number of the clients to obtain the historical bit rate data corresponding to the client group. Through dynamic maintenance and updating of historical bit rate data of the client group in the corresponding dimension, the heartbeat cycle can be dynamically adjusted according to the actual running condition of the client, heartbeat detection resources can be concentrated to the client with the most need, and the resource utilization rate and the heartbeat detection effectiveness are improved.
In the above embodiment, cache data of a corresponding client group of the client to be adjusted in each dimension is obtained; the cache data comprises reference heartbeat cycle data and historical bit rate data; each dimension includes one or more client groups; respectively multiplying the benchmark heartbeat cycle data and the historical bit rate data of the corresponding client group under each dimension to obtain a product corresponding to each dimension; accumulating the products corresponding to the dimensions to obtain an initial heartbeat cycle of the client to be adjusted; and adding the initial heartbeat period to a preset minimum heartbeat period to obtain an optimal heartbeat period, and updating the current heartbeat period of the client to be adjusted to the optimal heartbeat period. . And then can come dynamic adjustment heartbeat cycle according to the characteristic and the actual running condition of client, make the heartbeat detect the resource can be concentrated to the most required client, improved resource utilization ratio and heartbeat cycle and selected the precision to reach the optimal balance between resource consumption and detection effect.
In one embodiment, as shown in fig. 4, a method for adjusting a heartbeat cycle is provided, which is described by taking the method as an example applied to the server 102 in fig. 1, and includes the following steps:
step S410, obtaining cache data of a corresponding client group of the client to be adjusted in each dimension; the cache data comprises reference heartbeat cycle data and historical bit rate data; each dimension includes one or more client groups.
The specific content process of step S410 may refer to the above content, and is not described herein again.
Step S420, multiplying the benchmark heartbeat cycle data and the historical bit rate data of the corresponding client group under each dimension respectively to obtain the product corresponding to each dimension; and accumulating the products corresponding to the dimensions to obtain the initial heartbeat period of the client to be adjusted.
The specific content process of step S420 may refer to the above content, and is not described herein again.
And step S430, adding the initial heartbeat cycle to a preset minimum heartbeat cycle to obtain an optimal heartbeat cycle.
The specific content process of step S430 may refer to the above content, and is not described herein again.
Step S440, when the change amplitude value is larger than a preset threshold amplitude value, updating the current heartbeat cycle of the client to be adjusted to the optimal heartbeat cycle; the variation amplitude value is a value of the variation amplitude of the optimal heartbeat cycle relative to the current heartbeat cycle.
Specifically, after the server obtains the optimal heartbeat cycle of the client to be adjusted, the server can calculate the variation amplitude of the optimal heartbeat cycle relative to the current heartbeat cycle, so as to obtain the variation amplitude value corresponding to the optimal heartbeat cycle. When the change amplitude value is larger than the preset threshold amplitude value, the server updates the current heartbeat cycle of the client to be adjusted to the optimal heartbeat cycle, so that the heartbeat cycle is prevented from being adjusted too frequently, the heartbeat cycle selection efficiency is improved, and the optimal balance between resource consumption and detection effect is achieved.
Further, a threshold amplitude value is set, when the optimal heartbeat period is larger than the change amplitude value of the current heartbeat period, the current heartbeat period of the client to be adjusted is updated to be the optimal heartbeat period, and otherwise, the current heartbeat period of the client to be adjusted is kept unchanged. For example, the threshold amplitude value may be set to 20%, assuming that the current heartbeat cycle of the client to be adjusted is 5s (seconds), if the calculated optimal heartbeat cycle is 5.5s, and the variation amplitude of 5.5s with respect to 5s is (5.5-5)/5 ═ 10%, which is less than the threshold amplitude value (20%), the heartbeat cycle of the client to be adjusted remains unchanged (still 5s), and no adjustment is made. And if the calculated optimal heartbeat cycle is 7s, and the variation amplitude of 7s relative to 5s is (7-5)/5-40%, and is greater than the threshold amplitude value (20%), updating the current heartbeat cycle of the client to be adjusted to the optimal heartbeat cycle (7 s).
Based on the embodiment, the optimal heartbeat cycle of the client to be adjusted is calculated in a combined mode according to the reference heartbeat cycle data and the historical bit rate data of the client groups with different dimensions and different client groups, the characteristic that the similar clients have similarity is fully utilized, and a more accurate heartbeat cycle is provided for the clients.
In one embodiment, as shown in fig. 5, a method for adjusting a heartbeat cycle is provided, which is described by taking the method as an example applied to the server 102 in fig. 1, and includes the following steps:
step S510, inquiring a multidimensional grouping heartbeat cycle database to obtain corresponding client groups of the clients to be adjusted under each dimension; the multidimensional grouping heartbeat cycle database is used for storing cache data of each client group under each dimension; the dimensions include any one or any combination of the following: device type, deployment area, and monitoring level.
The multi-dimensional grouping client group heartbeat cycle database refers to a heartbeat cycle database for grouping clients according to different dimensions and client characteristics. The heartbeat cycle database is respectively stored with reference heartbeat cycle data and historical bit rate data corresponding to the client group.
Specifically, the server may obtain, by querying a preset multidimensional packet heartbeat cycle database, a client group corresponding to the client to be adjusted in each dimension, and may further obtain reference heartbeat cycle data and historical bit rate data of the corresponding client group.
Further, each dimension may establish a particular number of groups. For example, the device type dimension: the type A client is a group, and the type B client is a group; deployment area dimension: client groups can be performed according to geographic positions, for example, a client placed in a certain building is a client group, and a client deployed in another building is a client group; monitoring level dimension: the monitoring level can be divided into three monitoring levels, namely a high monitoring level and a medium monitoring level.
Step S520, cache data of a corresponding client group of the client to be adjusted in each dimension are obtained; the cache data comprises reference heartbeat cycle data and historical bit rate data; each dimension includes one or more client groups.
The specific content process of step S520 may refer to the above content, and is not described herein again.
Step S530, the benchmark heartbeat cycle data and the historical bit rate data of the corresponding client group under each dimension are multiplied respectively to obtain the product corresponding to each dimension; and accumulating the products corresponding to the dimensions to obtain the initial heartbeat period of the client to be adjusted.
The specific content process of step S530 may refer to the above content, and is not described herein again.
Step S540, adding the initial heartbeat cycle to a preset minimum heartbeat cycle to obtain an optimal heartbeat cycle, and updating the current heart state cycle of the client to be adjusted to the optimal heartbeat cycle
The specific content process of step S540 may refer to the above content, and is not described herein again.
Based on the embodiment, the heartbeat cycle of the client is calculated by combining the benchmark heartbeat cycle data and the historical bit rate data of different client groups with different dimensions, the characteristics of similarity of similar clients are fully utilized, more accurate heartbeat cycle setting is provided for the client, the heartbeat cycle can be dynamically adjusted according to the actual running condition of the client, the heartbeat detection resources can be concentrated to the client with the most needs, and the resource utilization rate and the heartbeat detection effectiveness are improved.
In one embodiment, as shown in fig. 6, a diagram of a multidimensional client group for a heartbeat cycle adjustment method is shown. Each dimension may establish a particular number of groups. Contain 5 client groups as dimension 1 (G11, G12, G13, G14, and G15); dimension 2 contains 6 client groups (G21, G22, G23, G24, G25, and G26) and dimension 3 contains 3 client groups (G31, G32, and G33).
Specifically, heartbeat cycle reference data can be respectively established from dimensions such as a device type, a deployment area, a monitoring level and the like, each dimension can establish a specific number of groups, and different groups can set different reference heartbeat cycles. The initial value of the historical bit rate of different client groups can be set to 100%, and then the historical bit rate data is maintained and updated dynamically according to the actual running in-place situation of the client.
Taking three dimensions of the device type, the deployment area, and the monitoring level as examples, as shown in fig. 7, the device type is the 1 st dimension, the deployment area is the 2 nd dimension, and the monitoring level is the 3 rd dimension. The 1 st dimension device type is divided into 5 groups (G11, G12, G13, G14, G15), the 2 nd dimension deployment region is divided into 6 groups (G21, G22, G23, G24, G25, G26), and the 3 rd dimension monitoring level is divided into 3 groups (G31, G32, G33). The value of the reference period can be set according to the actual situation, the initial value of the historical bit rate can be set to 100%, and then the historical bit rate data is dynamically maintained and updated according to the actual running in-place situation of the client.
According to the characteristics of the client, matched client groups are distributed in different dimensions and stored in the database. E.g., a client to be tuned, which belongs to the G11 client group in the device type dimension; it belongs to the G23 client group in the deployment area dimension; at the monitoring levelThe other dimension belongs to the G33 client group, then its corresponding client groups are G11, G23, and G33, respectively, as shown in fig. 8. The reference period and the historical bit rate corresponding to the corresponding client group are respectively TG11、TG23、TG33、KG11、KG23And KG33. I.e. the client T to be tuned1=TG11,T2=TG23,T3=TG33,K1=KG11,K2=KG23And K3=KG33. The optimal heartbeat cycle of the client to be adjusted is as follows:
Figure BDA0001791709250000121
let A be 0.5s and the bit rate of the history at a certain time be KG11=0.55、KG23=0.95、KG33If it is 0.9, then the optimal heartbeat cycle of the client to be adjusted at this time is:
T=2*0.55+1.0*0.85+1.0*0.9+0.5=3.35s。
rounding off retains 1 bit after the decimal point (i.e., 0.1s precision), yielding 3.4 s.
Assuming that the current heartbeat cycle of the client to be adjusted is 3s, the variation amplitude of the optimal heartbeat cycle 3.4s relative to the current heartbeat cycle is (3.4-3)/13.3%, which is smaller than the threshold amplitude (20%), the heartbeat cycle is kept unchanged (still 5s), and no adjustment is needed.
After a period of time, the historical bit rate at a certain time is KG11=0.85、KG23=0.98、KG33When the heartbeat period of the ue is equal to 0.9, the optimal heartbeat period of the ue is then
T=TG11×KG11+TG23×KG23+TG33×KG33+A
=2*0.95+1.0*0.98+1.0*0.9+0.5=4.28s。
Rounding off retains 1 bit after the decimal point (i.e., precision of 0.1 s), yielding 4.3 s. The variation amplitude of the optimal heartbeat cycle 4.3s relative to the current heartbeat cycle is (4.3-3)/3 is 43%, and is greater than the threshold amplitude (20%), and the heartbeat cycle of the client to be adjusted is adjusted to be 4.3 s.
Based on the embodiment, the heartbeat cycle of the client is calculated by combining the benchmark heartbeat cycle data and the historical bit rate data of different client groups with different dimensions, the characteristics of similarity of similar clients are fully utilized, more accurate heartbeat cycle setting is provided for the client, the heartbeat cycle can be dynamically adjusted according to the actual running condition of the client, the heartbeat detection resources can be concentrated to the client with the most needs, and the resource utilization rate and the heartbeat detection effectiveness are improved.
It should be understood that, although the steps in the flowcharts of fig. 2 to 5 are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-5 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 9, there is provided a heart cycle adjusting apparatus including:
a data obtaining unit 910, configured to obtain cache data of a corresponding client group of a client to be adjusted in each dimension; the cache data comprises reference heartbeat cycle data and historical bit rate data; each dimension includes one or more client groups.
A heartbeat cycle processing unit 920, configured to multiply the reference heartbeat cycle data of the corresponding client group in each dimension with the historical bit rate data, respectively, to obtain a product corresponding to each dimension; and accumulating the products corresponding to the dimensions to obtain the initial heartbeat period of the client to be adjusted.
The heartbeat cycle updating unit 930 is configured to add the initial heartbeat cycle to a preset minimum heartbeat cycle to obtain an optimal heartbeat cycle, and update the current heartbeat cycle of the client to be adjusted to the optimal heartbeat cycle.
For the specific definition of the heart cycle adjusting device, reference may be made to the above definition of the heart cycle adjusting method, which is not described herein again. The modules in the above-mentioned heart cycle adjusting device can be wholly or partially implemented by software, hardware and their combination. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, as shown in fig. 10, there is provided a heartbeat cycle adjusting system, a server 110 and clients 120 connected to the server 110, where the server 110 is configured to perform the steps of the heartbeat cycle adjusting method of any one of the above methods:
obtaining cache data of a corresponding client group of a client to be adjusted in each dimension; the cache data comprises reference heartbeat cycle data and historical bit rate data; each dimension includes one or more client groups;
respectively multiplying the benchmark heartbeat cycle data and the historical bit rate data of the corresponding client group under each dimension to obtain a product corresponding to each dimension; accumulating the products corresponding to the dimensions to obtain an initial heartbeat cycle of the client to be adjusted;
and adding the initial heartbeat period to a preset minimum heartbeat period to obtain an optimal heartbeat period, and updating the current heartbeat period of the client to be adjusted to the optimal heartbeat period.
Further, the server 110 is further configured to implement the following steps:
when the change amplitude value is larger than a preset threshold amplitude value, updating the current heartbeat cycle of the client to be adjusted to be the optimal heartbeat cycle; the variation amplitude value is a value of the variation amplitude of the optimal heartbeat cycle relative to the current heartbeat cycle.
Further, the server 210 is further configured to implement the following steps:
inquiring a multidimensional grouping heartbeat cycle database to obtain corresponding client groups of the clients to be adjusted under each dimension; the multidimensional grouping heartbeat cycle database is used for storing cache data of each client group under each dimension;
the dimensions include any one or any combination of the following: device type, deployment area, and monitoring level.
Further, the server 210 is further configured to implement the following steps:
acquiring historical bit rate data of each client in a client group;
and carrying out average value processing on the historical bit rate data of each client to obtain the historical bit rate data of the corresponding client group.
In a specific embodiment, each client is respectively connected with the server through a communication interface; the communication Interface is an SPI (Serial Peripheral Interface), an I2C (Inter-Integrated Circuit) Interface, a UART (Universal Asynchronous Receiver/Transmitter) Interface, a CANBUS (Controller Area network-word Bus) Interface, or an ethernet Interface.
Specifically, the server and the client are connected through a communication link for interaction of heartbeat status messages. The communication link between the server and the client can be a TCP/IP network communication link, and can also be other communication links such as SPI, I2C, UART, CANBUS and the like. And establishing a multidimensional client group heartbeat cycle database (comprising reference heartbeat cycle data and historical bit rate data of different client groups with different dimensions) on the server according to different characteristics of the clients. The server acquires corresponding reference heartbeat period data and historical bit rate data from the multidimensional client group heartbeat period database based on the client group to which the client belongs, and obtains the optimal heartbeat period after calculation processing, so that the heartbeat period corresponding to the client is dynamically adjusted.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
obtaining cache data of a corresponding client group of a client to be adjusted in each dimension; the cache data comprises reference heartbeat cycle data and historical bit rate data; each dimension includes one or more client groups;
respectively multiplying the benchmark heartbeat cycle data and the historical bit rate data of the corresponding client group under each dimension to obtain a product corresponding to each dimension; accumulating the products corresponding to the dimensions to obtain an initial heartbeat cycle of the client to be adjusted;
and adding the initial heartbeat period to a preset minimum heartbeat period to obtain an optimal heartbeat period, and updating the current heartbeat period of the client to be adjusted to the optimal heartbeat period.
Further, the computer program when executed by the processor performs the steps of:
when the change amplitude value is larger than a preset threshold amplitude value, updating the current heartbeat cycle of the client to be adjusted to be the optimal heartbeat cycle; the variation amplitude value is a value of the variation amplitude of the optimal heartbeat cycle relative to the current heartbeat cycle.
Further, the computer program when executed by the processor performs the steps of:
inquiring a multidimensional grouping heartbeat cycle database to obtain corresponding client groups of the clients to be adjusted under each dimension; the multidimensional grouping heartbeat cycle database is used for storing cache data of each client group under each dimension;
the dimensions include any one or any combination of the following: device type, deployment area, and monitoring level.
Further, the computer program when executed by the processor performs the steps of:
acquiring historical bit rate data of each client in a client group;
and carrying out average value processing on the historical bit rate data of each client to obtain the historical bit rate data of the corresponding client group.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the division methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (9)

1. A method for adjusting a heartbeat cycle is characterized by comprising the following steps:
obtaining cache data of a corresponding client group of a client to be adjusted in each dimension; the cache data comprises reference heartbeat cycle data and historical bit rate data; each dimension includes one or more client groups; the client to be adjusted has corresponding different client groups under different dimensions, and the historical on-site rate data is dynamically updated according to the actual running on-site condition of the client groups;
multiplying the benchmark heartbeat cycle data and the historical bit rate data of the corresponding client group under each dimension respectively to obtain a product corresponding to each dimension; accumulating the products corresponding to the dimensions to obtain an initial heartbeat cycle of the client to be adjusted;
and adding the initial heartbeat period to a preset minimum heartbeat period to obtain an optimal heartbeat period, and updating the current heartbeat period of the client to be adjusted to the optimal heartbeat period.
2. A method for adjusting a heartbeat cycle as claimed in claim 1, wherein the step of adding the initial heartbeat cycle to a preset minimum heartbeat cycle to obtain an optimal heartbeat cycle comprises:
based on the following formula, the optimal heartbeat cycle is obtained:
Figure FDA0002744641060000011
t is the optimal heartbeat period, N is the total dimensionality of the multi-dimensional client group heartbeat period database, TiThe reference heartbeat cycle data, K, of the client group corresponding to the client to be adjusted in the ith dimensioniThe historical bit rate data of the client group corresponding to the client to be adjusted in the ith dimension is obtained; a is the preset minimum heartbeat period.
3. The method according to claim 1, wherein the step of updating the current heartbeat cycle of the client to be adjusted to the optimal heartbeat cycle comprises:
when the change amplitude value is larger than a preset threshold amplitude value, updating the current heartbeat cycle of the client to be adjusted to the optimal heartbeat cycle; the variation amplitude value is a variation amplitude value of the optimal heartbeat cycle relative to the current heartbeat cycle.
4. The method for adjusting the heartbeat cycle according to claim 1, wherein the step of obtaining the cache data of the client group corresponding to the client to be adjusted in each dimension comprises:
inquiring a multidimensional grouping heartbeat cycle database to obtain the corresponding client group of the client to be adjusted under each dimension; the multidimensional grouping heartbeat cycle database is used for storing cache data of each client group under each dimension;
the dimensions include any one or any combination of the following: device type, deployment area, and monitoring level.
5. The method for adjusting a heartbeat cycle according to any one of claims 1 to 4, further comprising the steps of:
acquiring historical bit rate data of each client in the client group;
and carrying out average value processing on the historical bit rate data of each client to obtain the historical bit rate data corresponding to the client group.
6. A heart cycle adjusting apparatus, comprising:
the data acquisition unit is used for acquiring cache data of a corresponding client group of the client to be adjusted in each dimension; the cache data comprises reference heartbeat cycle data and historical bit rate data; each dimension includes one or more client groups; the client to be adjusted has corresponding different client groups under different dimensions, and the historical on-site rate data is dynamically updated according to the actual running on-site condition of the client groups;
a heartbeat cycle processing unit, configured to multiply the reference heartbeat cycle data of the corresponding client group in each dimension with the historical bit rate data, respectively, to obtain a product corresponding to each dimension; accumulating the products corresponding to the dimensions to obtain an initial heartbeat cycle of the client to be adjusted;
and the heartbeat cycle updating unit is used for adding the initial heartbeat cycle to a preset minimum heartbeat cycle to obtain an optimal heartbeat cycle, and updating the current heartbeat cycle of the client to be adjusted to the optimal heartbeat cycle.
7. A heartbeat cycle adjusting system is characterized by comprising a server and various clients connected with the server;
the server is configured to perform the steps of the heartbeat cycle adjusting method of any one of claims 1 to 5.
8. The system according to claim 7, wherein each of the clients is connected to the server through a communication interface;
the communication interface is an SPI interface, an I2C interface, a UART interface, a CANBUS interface or an Ethernet interface.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a controller, carries out the steps of the heartbeat cycle adjusting method of any one of claims 1 to 5.
CN201811039291.XA 2018-09-06 2018-09-06 Heartbeat period adjusting method, device and system Active CN109298934B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811039291.XA CN109298934B (en) 2018-09-06 2018-09-06 Heartbeat period adjusting method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811039291.XA CN109298934B (en) 2018-09-06 2018-09-06 Heartbeat period adjusting method, device and system

Publications (2)

Publication Number Publication Date
CN109298934A CN109298934A (en) 2019-02-01
CN109298934B true CN109298934B (en) 2021-01-15

Family

ID=65166162

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811039291.XA Active CN109298934B (en) 2018-09-06 2018-09-06 Heartbeat period adjusting method, device and system

Country Status (1)

Country Link
CN (1) CN109298934B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114338389B (en) * 2021-12-28 2023-05-30 中国联合网络通信集团有限公司 Heartbeat packet sending method and device, electronic equipment and storage medium
CN117336213B (en) * 2023-12-01 2024-02-27 四川才子软件信息网络有限公司 Subsystem monitoring method, system and equipment

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070294600A1 (en) * 2006-05-08 2007-12-20 Inventec Corporation Method of detecting heartbeats and device thereof
US8489923B1 (en) * 2006-11-15 2013-07-16 Conviva Inc. Detecting problems in content distribution
CN102843250B (en) * 2011-06-21 2018-01-19 中兴通讯股份有限公司 The adaptive approach and device of a kind of heart beat cycle
CN103209089B (en) * 2012-01-17 2016-06-08 华为技术有限公司 The acquisition methods of heart beat cycle and terminal, server
CN104918267B (en) * 2014-03-12 2018-07-20 国家电网公司 A kind of heartbeat detecting method and device of wireless sensor network
CN105577507A (en) * 2014-11-10 2016-05-11 ***通信集团广东有限公司 Heartbeat packet transmission interval adjustment method, device and server
CN106506277A (en) * 2016-11-17 2017-03-15 广东美的暖通设备有限公司 Communication means, communicator and home appliance
CN107426003B (en) * 2017-05-02 2019-12-13 华为技术有限公司 Fault detection method and device

Also Published As

Publication number Publication date
CN109298934A (en) 2019-02-01

Similar Documents

Publication Publication Date Title
EP2562972B1 (en) Usable bandwidth measurement system, transmission device, usable bandwidth measurement method and recording medium
CN106385459B (en) Method and device for distributing connection request message
CN109298934B (en) Heartbeat period adjusting method, device and system
CN107404541B (en) Method and system for selecting neighbor node in peer-to-peer network transmission
US20150207877A1 (en) Time synchronization client, a system and a non-transitory computer readable medium
CN111726303A (en) Flow control method and device and computing equipment
CN109561403A (en) A kind of short message dispatching method, equipment and storage medium
US20110153828A1 (en) Load balancing apparatus and method for regulating load using the same
CN110311863B (en) Routing path determination method and device
CN110933136A (en) Service node selection method, device, equipment and readable storage medium
Capra et al. Autonomic trust prediction for pervasive systems
CN114500550A (en) Equipment heartbeat interval control method and device, Internet of things equipment and storage medium
CN107395734B (en) Method and device for controlling access terminal of Internet of things
CN108139930B (en) Resource scheduling method and device based on Q learning
CN112380011B (en) Dynamic adjustment method and device for service capacity
KR20230041031A (en) Power control method, device, communication node and storage medium
CN111815059B (en) Data processing method and device, electronic equipment and computer readable storage medium
CN117675866A (en) Data processing method, device, equipment and medium based on Bayesian inference
CN108900865B (en) Server, and scheduling method and execution method of transcoding task
CN113132162B (en) Method, device, equipment and medium for configuring Internet of things card
CN112019547B (en) Network traffic evaluation method, attack detection method, server, and storage medium
CN104168274A (en) Data obtaining request processing method, client sides and server
CN114513423B (en) Bandwidth adjustment method, device, equipment and storage medium
CN112187839B (en) Distribution method, server and storage medium
WO2016165471A1 (en) Method and apparatus for collecting index of hadoop trunking component

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200108

Address after: 510663 Shenzhou Road, Guangzhou Science City, Guangzhou economic and Technological Development Zone, Guangdong, 10

Applicant after: Jingxin Communication System (China) Co., Ltd.

Address before: 510663 Shenzhou Road 10, Guangzhou Science City, Guangzhou economic and Technological Development Zone, Guangzhou, Guangdong

Applicant before: Jingxin Communication System (China) Co., Ltd.

Applicant before: Jingxin Communication System (Guangzhou) Co., Ltd.

Applicant before: Jingxin Communication Technology (Guangzhou) Co., Ltd.

Applicant before: TIANJIN COMBA TELECOM SYSTEMS CO., LTD.

GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 510663 Shenzhou Road, Guangzhou Science City, Guangzhou economic and Technological Development Zone, Guangdong, 10

Patentee after: Jingxin Network System Co.,Ltd.

Address before: 510663 Shenzhou Road, Guangzhou Science City, Guangzhou economic and Technological Development Zone, Guangdong, 10

Patentee before: Comba Telecom System (China) Ltd.