Search

CN-122027528-A - Heartbeat interval adjusting method and device, storage medium and electronic equipment

CN122027528ACN 122027528 ACN122027528 ACN 122027528ACN-122027528-A

Abstract

The application discloses a heartbeat interval adjusting method and device, a storage medium and electronic equipment. The method comprises the steps of obtaining multiple groups of network state parameters, wherein each group of network state parameters is used for indicating a communication state between one or more terminals and a server, processing the multiple groups of network state parameters by using a first strategy and a second strategy to obtain a target parameter set, wherein the first strategy is used for adjusting model parameters of a prediction model according to the change amplitude and the change direction of the multiple groups of network state parameters, the second strategy is used for carrying out grouping processing on the multiple terminals according to the similarity between the multiple groups of network state parameters, the first strategy and the second strategy are associated with a target algorithm operated by the terminals, prediction is carried out on the basis of the target parameter set and the multiple groups of network state parameters through the prediction model, and the actual heartbeat interval between the terminals and the server is adjusted according to a prediction result. The problems of inefficiency and resource waste caused by periodic heartbeat of traditional equipment are solved.

Inventors

  • LI FANGFANG
  • YUAN YUCHEN
  • FANG YUEJIAN
  • MOU YU
  • PAN WU
  • WANG JIABIN
  • HE JUNTAO
  • WEI JIALONG
  • WANG HUI
  • LIU MENG

Assignees

  • 浙江大华技术股份有限公司

Dates

Publication Date
20260512
Application Date
20260130

Claims (10)

  1. 1. A method for adjusting a heartbeat interval, comprising: acquiring a plurality of groups of network state parameters, wherein each group of network state parameters is used for indicating the communication state between one or more terminals and a server; Processing the multiple groups of network state parameters by using a first strategy and a second strategy to obtain a target parameter set, wherein the first strategy is used for adjusting model parameters of a prediction model according to the change amplitude and the change direction of the multiple groups of network state parameters, the second strategy is used for grouping multiple terminals according to the similarity among the multiple groups of network state parameters, and the first strategy and the second strategy are associated with a target algorithm operated by the terminals; And predicting the target parameter set and the multiple groups of network state parameters through the prediction model, and adjusting the actual heartbeat interval between the terminal and the server according to a prediction result.
  2. 2. The method of claim 1, wherein processing the plurality of sets of network state parameters using the first policy and the second policy to obtain a set of target parameters comprises: performing first processing on the multiple groups of network state parameters by using a first strategy to obtain a first target parameter subset; performing second processing on the multiple groups of network state parameters by using a second strategy to obtain a second target parameter subset; and determining the target parameter set according to the first target parameter subset and the second target parameter subset.
  3. 3. The method of claim 2, wherein performing a second process on the plurality of sets of network state parameters using a second policy to obtain a second subset of target parameters comprises: Calculating the similarity between any two groups of network state parameters in the multiple groups of network state parameters to obtain multiple similarity values; Grouping the terminals corresponding to the multiple groups of network state parameters based on the multiple similarity values and a preset similarity threshold value; And determining the model parameter with the largest contribution degree to heartbeat interval prediction in the prediction model according to the grouping processing result, and obtaining the second target parameter subset.
  4. 4. The method of claim 3, wherein grouping the terminals corresponding to the plurality of sets of network state parameters based on the plurality of similarity values and a preset similarity threshold comprises: Determining a first magnitude relation between the similarity values and the preset similarity threshold value; and screening the target group network state parameters with similarity values larger than the preset similarity threshold in the first size relationship, and dividing terminals corresponding to the target group network state parameters into a group.
  5. 5. The method according to claim 1, wherein predicting, by the prediction model, based on the target parameter set and the plurality of sets of network state parameters, and adjusting an actual heartbeat interval between the terminal and the server according to a prediction result includes: predicting the target parameter set and the multiple groups of network state parameters by using a prediction model to obtain a prediction result; determining a target heartbeat interval contained in the prediction result and an actual heartbeat interval used by different terminals, and calculating a difference value of the target heartbeat interval and the actual heartbeat interval; and determining a second magnitude relation between the difference value and a preset difference threshold value, and determining whether to adjust the actual heartbeat interval based on the second magnitude relation.
  6. 6. The method of claim 5, wherein determining a second magnitude relation of the variance value to a preset variance threshold and determining whether to adjust the actual heartbeat interval based on the second magnitude relation comprises: Determining to adjust the actual heartbeat interval when the second magnitude relation indicates that the difference value is greater than the preset difference threshold; and if the second magnitude relation indicates that the difference value is smaller than or equal to the preset difference threshold value, determining that the heartbeat interval is not adjusted.
  7. 7. The method of claim 6, wherein determining to adjust the actual heartbeat interval if the second magnitude relation indicates that the difference value is greater than the preset difference threshold value comprises: determining an adjustment amplitude and an adjustment direction of the actual heartbeat interval under the condition that the second magnitude relation indicates that the difference value is larger than the preset difference threshold value; and adjusting the actual heartbeat interval based on the adjustment amplitude and the adjustment direction, wherein the adjustment comprises at least one of updating the heartbeat sending frequency of the terminal and updating the size of a message sent by the terminal to the server.
  8. 8. An apparatus for adjusting a heartbeat interval, comprising: The system comprises an acquisition module, a server and a communication module, wherein the acquisition module is used for acquiring a plurality of groups of network state parameters, and each group of network state parameters is used for indicating the communication state between one or more terminals and the server; The processing module is used for processing the multiple groups of network state parameters by using a first strategy and a second strategy to obtain a target parameter set, wherein the first strategy is used for adjusting model parameters of a prediction model according to the change amplitude and the change direction of the multiple groups of network state parameters, the second strategy is used for grouping multiple terminals according to the similarity among the multiple groups of network state parameters, and the first strategy and the second strategy are associated with a target algorithm operated by the terminals; and the prediction module is used for predicting the target parameter set and the multiple groups of network state parameters through the prediction model, and adjusting the actual heartbeat interval between the terminal and the server according to a prediction result.
  9. 9. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored computer program, wherein the computer program is executable by an electronic device to perform the method of any one of claims 1 to 7.
  10. 10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method according to any of the claims 1 to 7 by means of the computer program.

Description

Heartbeat interval adjusting method and device, storage medium and electronic equipment Technical Field The present application relates to the field of communications technologies, and in particular, to a method and apparatus for adjusting a heartbeat interval, a storage medium, and an electronic device. Background In the management of devices in the internet of things, a traditional heartbeat mechanism generally adopts a heartbeat message with a fixed frequency to maintain network connection between the device and a server so as to ensure the real-time online state of the device. However, this method is inefficient in facing the dynamic changes of the network environment and the demands of device diversity, resulting in unnecessary resource waste. In particular, devices need to send heartbeat messages periodically, regardless of network conditions, which results in excessive consumption of bandwidth and power in a stable or low load network environment. Meanwhile, all devices follow the same heartbeat rule, so that the actual communication requirements and power management differences of different types of devices are ignored, and the non-optimal state of resource allocation is further aggravated. Therefore, in the related art, the problems of inefficiency and resource waste caused by periodic heartbeat of the conventional device have not yet been proposed as an effective solution. Disclosure of Invention The embodiment of the application provides a heartbeat interval adjusting method and device, a storage medium and electronic equipment, which are used for at least solving the technical problems of inefficiency and resource waste caused by periodic heartbeat of traditional equipment in the related technology. According to one aspect of the embodiment of the application, a heartbeat interval adjusting method is provided, which comprises the steps of obtaining multiple groups of network state parameters, wherein each group of network state parameters is used for indicating a communication state between one or more terminals and a server, processing the multiple groups of network state parameters by using a first strategy and a second strategy to obtain a target parameter set, wherein the first strategy is used for adjusting model parameters of a prediction model according to the change amplitude and the change direction of the multiple groups of network state parameters, the second strategy is used for carrying out grouping processing on the multiple terminals according to the similarity between the multiple groups of network state parameters, the first strategy and the second strategy are associated with a target algorithm operated by the terminals, predicting the target parameter set and the multiple groups of network state parameters through the prediction model, and adjusting the actual heartbeat interval between the terminals and the server according to a prediction result. In an exemplary embodiment, processing the plurality of sets of network state parameters using the first policy and the second policy to obtain a target parameter set includes performing a first process on the plurality of sets of network state parameters using the first policy to obtain a first target parameter subset, performing a second process on the plurality of sets of network state parameters using the second policy to obtain a second target parameter subset, and determining the target parameter set based on the first target parameter subset and the second target parameter subset. In an exemplary embodiment, a second policy is used to perform a second process on multiple groups of network state parameters to obtain a second target parameter subset, where the second process includes calculating similarities between any two groups of network state parameters in the multiple groups of network state parameters to obtain multiple similarity values, performing grouping process on terminals corresponding to the multiple groups of network state parameters based on the multiple similarity values and a preset similarity threshold, and determining a model parameter with the largest contribution to heartbeat interval prediction in a prediction model according to a grouping process result to obtain the second target parameter subset. In an exemplary embodiment, grouping terminals corresponding to a plurality of sets of network state parameters based on a plurality of similarity values and a preset similarity threshold includes determining a first size relationship between the plurality of similarity values and the preset similarity threshold, screening target sets of network state parameters in the first size relationship, wherein the similarity values of the target sets of network state parameters are greater than the preset similarity threshold, and dividing the terminals corresponding to the target sets of network state parameters into one set. In an exemplary embodiment, predicting based on the target parameter set and the plurality o