Heartbeat mechanism adjustment method and device, electronic equipment and storage medium
By monitoring vehicle status and network information and dynamically adjusting the heartbeat mechanism cycle, the problems of slow network failure recovery or power waste in the traditional heartbeat mechanism are solved, achieving a balance between power saving and network stability.
Patent Information
- Application Number
- CN202410362849.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-27
- Publication Date
- 2025-09-30
AI Technical Summary
In the heartbeat mechanism between traditional vehicle clients and servers, the heartbeat packet period is fixed, resulting in an inability to quickly recover from network failures or wasting battery power when the client is offline.
By monitoring the length of time the vehicle is powered on and stationary, the current time, the success rate of the vehicle executing control commands, and the stability of the network signal connection are obtained, and the cycle of the heartbeat mechanism is dynamically adjusted to meet different adjustment conditions and realize dynamic adjustment of the heartbeat cycle.
A balance is struck between maintaining network stability and saving battery power, improving network failure recovery speed and reducing power consumption.
Smart Images

Figure CN120729930A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of vehicle technology, and in particular to a heartbeat mechanism adjustment method and device, an electronic device, and a storage medium. Background Art
[0002] When the vehicle is in sleep mode, the traditional heartbeat mechanism between the vehicle client and the server is as follows: the period for the client to send heartbeat packets to the server is fixed. If the period for sending heartbeat packets is set too long, the network failure cannot be quickly recovered when the client is offline. If the period for sending heartbeat packets is set too short, it will result in a large waste of vehicle battery power. Summary of the Invention
[0003] The present disclosure provides a heartbeat mechanism adjustment method and device, electronic device, and storage medium. Its primary purpose is to address the problem of a traditional heartbeat mechanism in which the client sends heartbeat packets at a fixed period from the server to the client. If the heartbeat packet transmission period is set too long, network failures cannot be quickly recovered when the client is disconnected. If the heartbeat packet transmission period is set too short, a large amount of vehicle battery power is wasted.
[0004] According to a first aspect of the present disclosure, a heartbeat mechanism adjustment method is provided, comprising:
[0005] Monitoring whether a first duration during which the vehicle is powered on and stationary is greater than a second duration during which the heartbeat mechanism is activated;
[0006] If it is determined that the first duration is greater than the second duration, obtaining the current time of the vehicle, the success rate of the vehicle executing the control command, and the connection stability information of the vehicle network signal;
[0007] Among the preset multiple adjustment conditions, searching for the current time, the success rate of the vehicle executing the control command, and the connection stability information of the vehicle network signal, and finding the adjustment conditions that all meet the requirements as target conditions;
[0008] According to the target heartbeat period corresponding to the target condition, the regular heartbeat period of the heartbeat mechanism is dynamically adjusted.
[0009] Optionally, searching, among the preset multiple adjustment conditions, for an adjustment condition that satisfies the current time, the success rate of the vehicle executing the control command, and the connection stability information of the vehicle network signal as a target condition includes:
[0010] Among the preset multiple adjustment conditions, searching for a first adjustment condition in which the current time is within a target time period, the success rate of the vehicle executing the control command meets a preset success rate, and the connection stability information of the vehicle network signal meets a preset stability threshold;
[0011] The first adjustment condition is determined as the first target condition; accordingly,
[0012] The dynamically adjusting the regular heartbeat period of the heartbeat mechanism according to the target heartbeat period corresponding to the target condition includes:
[0013] Determining a first target heartbeat cycle corresponding to the first target condition;
[0014] The conventional heartbeat mechanism is shortened according to the first target heartbeat period.
[0015] Optionally, searching, among the preset multiple adjustment conditions, for an adjustment condition that satisfies the current time, the success rate of the vehicle executing the control command, and the connection stability information of the vehicle network signal as a target condition further includes:
[0016] Among the preset multiple adjustment conditions, searching for a second adjustment condition in which the current time is within a target time period, a success rate of the vehicle executing the control command does not meet a preset success rate, and connection stability information of the vehicle network signal does not meet a preset stability threshold;
[0017] The second adjustment condition is determined as the second target condition; accordingly,
[0018] The step of dynamically adjusting the conventional heartbeat period of the heartbeat mechanism according to the target heartbeat period corresponding to the target condition further includes:
[0019] Determining a second target heartbeat cycle corresponding to the second target condition;
[0020] The conventional heartbeat mechanism is shortened according to the second target heartbeat cycle, wherein the second heartbeat cycle is shorter than the first heartbeat cycle.
[0021] Optionally, searching, among the preset multiple adjustment conditions, for an adjustment condition that satisfies the current time, the success rate of the vehicle executing the control command, and the connection stability information of the vehicle network signal as a target condition further includes:
[0022] Among the preset multiple adjustment conditions, searching for a third adjustment condition: the current time is not within the target time period, the success rate of the vehicle executing the control command meets a preset success rate, and the connection stability information of the vehicle network signal meets a preset stability threshold;
[0023] The third adjustment condition is determined as the third target condition; accordingly,
[0024] The step of dynamically adjusting the conventional heartbeat period of the heartbeat mechanism according to the target heartbeat period corresponding to the target condition further includes:
[0025] Determining a third target heartbeat cycle corresponding to the third target condition;
[0026] The conventional heartbeat mechanism is lengthened according to the third target heartbeat period.
[0027] Optionally, after dynamically adjusting the heartbeat period of the heartbeat mechanism, the method further includes:
[0028] If among the preset multiple adjustment conditions, the current time, the success rate of the vehicle executing the control command, and the connection stability information of the vehicle network signal are not found to meet the adjustment conditions, then the first target heartbeat cycle, the second target heartbeat cycle, or the third target heartbeat cycle will be adjusted back to the regular heartbeat cycle.
[0029] Optionally, before obtaining the current time of the vehicle, the success rate of the vehicle executing the control command, and the connection stability information of the vehicle network signal, the method further includes:
[0030] Determining, from historical data of the vehicle, a first time and a second time when the vehicle receives a control command in a dormant state within a preset time period, where the first time is the time when the vehicle receives the first control command, and the second time is the time when the vehicle receives the last control command;
[0031] A time period from the first time to the second time is determined as a target time period.
[0032] According to a second aspect of the present disclosure, a heartbeat mechanism adjustment device is provided, comprising:
[0033] A monitoring unit, configured to monitor whether a first time period during which the vehicle is powered on and stationary is greater than a second time period during which the heartbeat mechanism is activated;
[0034] an acquiring unit, configured to acquire, if it is determined that the first duration is greater than the second duration, the current time of the vehicle, a success rate of the vehicle executing the control command, and connection stability information of the vehicle network signal;
[0035] a search unit, configured to search, from among a plurality of preset adjustment conditions, an adjustment condition that the current time, the success rate of the vehicle executing the control command, and the connection stability information of the vehicle network signal all meet as a target condition;
[0036] The adjusting unit is used to dynamically adjust the regular heartbeat period of the heartbeat mechanism according to the target heartbeat period corresponding to the target condition.
[0037] Optionally, the search unit includes:
[0038] a first search module, configured to search, from among a plurality of preset adjustment conditions, for a first adjustment condition in which the current time is within a target time period, a success rate of the vehicle executing the control command satisfies a preset success rate, and connection stability information of the vehicle network signal satisfies a preset stability threshold;
[0039] a first determining module, configured to determine the first adjustment condition as a first target condition;
[0040] Accordingly, the adjustment unit includes:
[0041] A second determining module, configured to determine a first target heartbeat cycle corresponding to the first target condition;
[0042] The first adjustment module is configured to shorten the conventional heartbeat mechanism according to the first target heartbeat period.
[0043] Optionally, the search unit further includes:
[0044] a second search module, configured to search, from among a plurality of preset adjustment conditions, for a second adjustment condition, namely, that the current time is within a target time period, that the success rate of the vehicle executing the control command does not meet a preset success rate, and that the connection stability information of the vehicle network signal does not meet a preset stability threshold;
[0045] a third determining module, configured to determine the second adjustment condition as a second target condition;
[0046] Accordingly, the adjustment unit further includes:
[0047] a fourth determining module, configured to determine a second target heartbeat cycle corresponding to the second target condition;
[0048] The second adjustment module is configured to shorten the conventional heartbeat mechanism according to the second target heartbeat cycle, wherein the second heartbeat cycle is shorter than the first heartbeat cycle.
[0049] Optionally, the search unit further includes:
[0050] a third search module, configured to search, from among a plurality of preset adjustment conditions, for a third adjustment condition, namely, that the current time is not within a target time period, that the success rate of the vehicle executing the control command satisfies a preset success rate, and that the connection stability information of the vehicle network signal satisfies a preset stability threshold;
[0051] a fifth determining module, configured to determine the third adjustment condition as a third target condition;
[0052] Accordingly, the adjustment unit further includes:
[0053] a sixth determining module, configured to determine a third target heartbeat cycle corresponding to the third target condition;
[0054] The third adjustment module is used to adjust the length of the conventional heartbeat mechanism according to the third target heartbeat period.
[0055] Optionally, the adjustment unit is further configured to:
[0056] If among the preset multiple adjustment conditions, the current time, the success rate of the vehicle executing the control command, and the connection stability information of the vehicle network signal are not found to meet the adjustment conditions, then the first target heartbeat cycle, the second target heartbeat cycle, or the third target heartbeat cycle will be adjusted back to the regular heartbeat cycle.
[0057] Optionally, the apparatus further includes a determining unit, wherein the determining unit includes:
[0058] a seventh determining module, configured to determine, from historical data of the vehicle, a first time and a second time when the vehicle received a control command while in a dormant state within a preset time period, before obtaining the current time of the vehicle, the success rate of the vehicle executing the control command, and the connection stability information of the vehicle network signal, wherein the first time is the time when the vehicle received the first control command, and the second time is the time when the vehicle received the last control command;
[0059] An eighth determining module is configured to determine a time period from the first time to the second time as a target time period.
[0060] According to a third aspect of the present disclosure, there is provided an electronic device, including:
[0061] at least one processor; and
[0062] a memory communicatively connected to the at least one processor; wherein,
[0063] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect.
[0064] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described in the first aspect.
[0065] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method as described in the first aspect above.
[0066] The heartbeat mechanism adjustment method and device, electronic device and storage medium provided by the present disclosure monitor whether the first time length when the vehicle is powered on and stationary is greater than the second time length when the heartbeat mechanism is activated; if it is determined that the first time length is greater than the second time length, the current time of the vehicle, the success rate of the vehicle executing control instructions, and the connection stability information of the vehicle network signal are obtained; among the preset multiple adjustment conditions, the adjustment condition that the current time, the success rate of the vehicle executing control instructions, and the connection stability information of the vehicle network signal all meet is searched as the target condition; according to the target heartbeat period corresponding to the target condition, the regular heartbeat period of the heartbeat mechanism is dynamically adjusted. Compared with other related technologies, the heartbeat mechanism adjustment method provided by the present disclosure dynamically adjusts the heartbeat period of the heartbeat mechanism by monitoring the current time of the vehicle, the success rate of the vehicle executing control instructions, and the connection stability information of the vehicle network signal, so that the heartbeat mechanism achieves a balance between maintaining the remaining battery power of the vehicle and maintaining network stability.
[0067] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present disclosure.
[0069] Figure 1 A flowchart of a heartbeat mechanism adjustment method provided by an embodiment of the present disclosure;
[0070] Figure 2 A schematic structural diagram of a heartbeat mechanism adjustment device provided in an embodiment of the present disclosure;
[0071] Figure 3 A schematic structural diagram of another heartbeat mechanism adjustment device provided in an embodiment of the present disclosure;
[0072] Figure 4 A schematic block diagram of an exemplary electronic device 300 provided in accordance with an embodiment of the present disclosure. DETAILED DESCRIPTION
[0073] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0074] The prefixes such as "first" and "second" in the embodiments of the present disclosure are only used to distinguish different description objects and do not constitute any restrictions on the position, order, priority, quantity or content of the description objects. For the statement of the description objects, please refer to the description in the context of the claims or embodiments, and no unnecessary restrictions should be constituted due to the use of prefixes.
[0075] The following describes the heartbeat mechanism adjustment method and device, electronic device, and storage medium according to embodiments of the present disclosure with reference to the accompanying drawings.
[0076] Figure 1 This is a flow chart of a heartbeat mechanism adjustment method provided by an embodiment of the present disclosure. The method is applied in a vehicle. The control method can be executed by a control device or equipment for information prompts. The device or equipment can be configured in a server, a processor or a main control chip. For example, it can be deployed on the vehicle's vehicle side, domain controller side, etc. Figure 1 As shown, the method comprises the following steps:
[0077] Step 101 , monitoring whether a first time duration during which the vehicle is powered on and stationary is greater than a second time duration during which the heartbeat mechanism is activated.
[0078] In one embodiment provided by the present disclosure, the heartbeat mechanism is a mechanism for maintaining a communication connection state, whereby the client periodically sends heartbeat packets to the server to confirm the reliability and activity of the communication. In network communications, the heartbeat mechanism can be used to detect whether the connection between the client and the server is disconnected, determine whether the client is online, and monitor the quality of communication. For example, the client sends a heartbeat packet to the server every 5 minutes to confirm that the client is online. The heartbeat mechanism is widely used in scenarios such as distributed systems, network communications, and server monitoring. It can ensure the stability and reliability of the system, promptly detect and handle connection anomalies or failures, and improve system availability.
[0079] In one embodiment provided by the present disclosure, when the vehicle is powered on and stationary, in order to determine whether to dynamically adjust the heartbeat cycle of the heartbeat mechanism, it can be adopted, but not limited to, to use a preset timer to time the first time period that the vehicle is powered on and stationary, and when it is monitored that the first time period is greater than the second time period for the heartbeat mechanism to be activated, the heartbeat mechanism is activated, wherein the second time period is an empirical value and can be flexibly set according to user habits, historical data, user needs, etc., such as 5 minutes, 10 minutes, or other values. For example, if the second time period is set to 5 minutes, when it is monitored that the preset timer has counted for 5 minutes and the vehicle is still powered on and stationary, it is determined that the second time period is greater than the first time period.
[0080] Step 102: If it is determined that the first time duration is greater than the second time duration, the current time of the vehicle, the success rate of the vehicle executing the control command, and the connection stability information of the vehicle network signal are obtained.
[0081] In one embodiment provided by the present disclosure, in order to determine how to adjust the heartbeat period of the heartbeat mechanism, it is necessary to obtain the current time of the vehicle, the success rate of the vehicle executing the control instruction, and the connection stability information of the vehicle network signal. Among them, the success rate of the vehicle executing the control instruction is an estimated value, which is used to estimate the success probability of the vehicle executing the control instruction in the current scenario. The connection stability information of the network signal is used to reflect the stability of the network connection between the client and the server. The connection stability information of the network signal includes but is not limited to: the average value and fluctuation of the Reference Signal Receiving Power (RSRP) within a preset time, the average value and fluctuation of the Signal Noise Ratio (SNR), the physical uplink channel packet loss rate, the physical downlink channel packet loss rate, the total packet loss rate and other information.
[0082] Step 103 , among the preset multiple adjustment conditions, searching for an adjustment condition that the current time, the success rate of the vehicle executing the control command, and the connection stability information of the vehicle network signal all meet as a target condition.
[0083] In one embodiment provided by the present disclosure, the preset multiple adjustment conditions include but are not limited to the following three conditions:
[0084] Condition 1: The current time is within the target time period, the connection stability information of the vehicle network signal meets the preset stability threshold, and the success rate of the vehicle executing the control command meets the preset success rate.
[0085] Condition 2: The current time is within the target time period, the connection stability information of the vehicle network signal does not meet the preset stability threshold, and the success rate of the vehicle executing the control command does not meet the preset success rate.
[0086] Condition 3: The current time is not within the target time period, the connection stability information of the vehicle network signal meets the preset stability threshold, and the success rate of the vehicle executing the control command meets the preset success rate.
[0087] It should be noted that the embodiments of the present application do not limit the parameters of the preset multiple adjustment conditions, nor do they limit the number of the preset multiple adjustment conditions. The parameters and number of the preset multiple adjustment conditions can be updated or adjusted according to actual conditions.
[0088] The above three adjustment conditions correspond to different heartbeat cycles respectively. After obtaining the current time, the success rate of the vehicle executing the control instruction, and the connection stability information of the vehicle network signal, the adjustment conditions that the current time, the success rate of the vehicle executing the control instruction, and the connection stability information of the vehicle network signal meet are searched among the above preset multiple adjustment conditions, and the adjustment conditions are determined as target adjustment conditions. For example, if it is determined that the current time is within the target time period, the success rate of the vehicle executing the control instruction meets the preset success rate, and the connection stability information of the vehicle network signal meets the preset stability threshold, that is, it meets condition one of the above three adjustment conditions, then the above condition one is determined as the first target condition. If it is determined that the current time is within the target time period, the success rate of the vehicle executing the control instruction does not meet the preset success rate, and the connection stability information of the vehicle network signal does not meet the preset stability threshold, that is, it meets condition two of the above three adjustment conditions, then the condition two is determined as the second target condition.
[0089] The target time period is the time period during which the vehicle receives control commands in a dormant state as determined in historical data. For example, if the vehicle's historical data indicates that the vehicle typically receives control commands between 13:00 and 17:00 daily, then 13:00 to 17:00 daily is determined as the target time period for the disclosed embodiment. Based on historical data, users frequently request vehicle use during the target time period. Therefore, the regular heartbeat cycle needs to be shortened during the target time period to facilitate timely receipt of control commands and enhance user experience.
[0090] Since the connection stability information of the network signal includes but is not limited to the average value and fluctuation of the Reference Signal Receiving Power (RSRP) within a preset time, the average value and fluctuation of the Signal Noise Ratio (SNR), the physical uplink channel packet loss rate, the physical downlink channel packet loss rate, the total packet loss rate and other information, therefore, when judging whether the connection stability information of the vehicle network signal meets the preset stability threshold, it is necessary to compare each parameter in the connection stability information of the network signal separately. For example, based on the connection stability information of the network signal, the preset stability threshold can be set as: within 10 seconds, the average RSRP>75db, RSRP fluctuation<3db, the average SNR>20db, SNR fluctuation<3db, the physical uplink channel packet loss rate<1%, the physical downlink channel packet loss rate<1%, the kernel uplink total packet loss rate<1%, the kernel downlink total packet loss rate<1%, and the heartbeat packet round-trip delay<1.8 seconds. Only when all parameters in the stability information of the network signal meet the above-mentioned preset stability threshold can the stability of the network signal be determined to meet the preset stability threshold. If it is determined that the stability of the network signal meets the preset stability threshold, it means that the network connection between the current client and the server is relatively stable.
[0091] In an embodiment provided in the present disclosure, the preset success rate can be flexibly set according to demand. For example, the preset success rate can be set to 90% or 85%. Specifically, this embodiment of the application does not limit this.
[0092] Step 104: Dynamically adjust the regular heartbeat period of the heartbeat mechanism according to the target heartbeat period corresponding to the target condition.
[0093] In an embodiment provided by the present disclosure, each of the adjustment conditions corresponds to a target heartbeat period. In order to better understand the target heartbeat period corresponding to the target condition and the regular heartbeat period of the heartbeat mechanism that is dynamically adjusted, the three adjustment conditions provided in step 103 above are taken as an example: assuming that the first target heartbeat period corresponding to condition one is 1 minute, the second target heartbeat period corresponding to condition two is 10 seconds, and the third target heartbeat period corresponding to condition three is 1 hour. The regular heartbeat period of the heartbeat mechanism is usually set to 5 minutes. When the current time, the success rate of the vehicle executing the control instruction, and the connection stability information of the vehicle network signal all meet condition one, since the first target heartbeat period corresponding to condition one is 1 minute, which is less than 5 minutes, the regular heartbeat period of the heartbeat mechanism is shortened, and the heartbeat period of the heartbeat mechanism is adjusted to once every 1 minute. Similarly, when the current time, the success rate of the vehicle executing the control command, and the connection stability information of the vehicle network signal all meet condition three, since the third target heartbeat period corresponding to condition three is 1 hour, which is greater than 5 minutes, the regular heartbeat period of the heartbeat mechanism needs to be lengthened and the heartbeat period of the heartbeat mechanism is adjusted to once an hour to save battery power.
[0094] The heartbeat mechanism adjustment method provided by the present disclosure monitors whether the first time duration when the vehicle is powered on and stationary is greater than the second time duration when the heartbeat mechanism is activated; if it is determined that the first time duration is greater than the second time duration, the current time of the vehicle, the success rate of the vehicle executing control instructions, and the connection stability information of the vehicle network signal are obtained; among the preset multiple adjustment conditions, the adjustment condition that the current time, the success rate of the vehicle executing control instructions, and the connection stability information of the vehicle network signal all meet is searched as the target condition; according to the target heartbeat period corresponding to the target condition, the regular heartbeat period of the heartbeat mechanism is dynamically adjusted. Compared with other related technologies, the heartbeat mechanism adjustment method provided by the present disclosure dynamically adjusts the heartbeat period of the heartbeat mechanism by monitoring the current time of the vehicle, the success rate of the vehicle executing control instructions, and the connection stability information of the vehicle network signal, so that the heartbeat mechanism achieves a balance between maintaining the remaining battery power of the vehicle and maintaining network stability.
[0095] In some embodiments, in order to better understand the regular heartbeat period of the dynamically adjusted heartbeat mechanism, the following method may be used but is not limited to: when the current time, the success rate of the vehicle executing the control instruction, and the connection stability information of the vehicle network signal are determined to meet the condition one listed in the above step 103, the regular heartbeat period of the heartbeat mechanism is shortened to obtain a first target heartbeat period. For example, if the regular heartbeat period is set to 5 minutes, when the current time, the success rate of the vehicle executing the control instruction, and the connection stability information of the vehicle network signal are determined to meet the condition one, the heartbeat period is adjusted to 1 minute. Compared with the regular heartbeat period, the first target heartbeat period is shorter, which plays a role in balancing the saving of residual power and maintaining the stability of the network connection.
[0096] In actual applications, sometimes we encounter situations where the network signal connection stability is poor. When it is monitored that the current time is within the target time period, the user has a greater demand for the use of the vehicle. If it is also monitored that the connection stability information of the vehicle network signal does not meet the preset stability threshold, and the success rate of the vehicle executing the control instruction does not meet the preset success rate, in order to prevent the failure to receive the control instruction in time and meet the user's needs in time, thereby reducing the user experience, it is necessary to shorten the conventional heartbeat period and adjust it to the second target heartbeat period. The shorter the heartbeat time of the heartbeat mechanism, the faster the network failure recovery. Since it is necessary to quickly restore the connection between the client and the server, the second target heartbeat period will be shorter than the first target heartbeat period. For example, the second target heartbeat period can be set to 10 seconds, or 5 seconds, and the specific embodiments of the present application are not limited thereto.
[0097] In some embodiments, when the current time is not within the target time period, the user has less demand for the use of the vehicle. At this time, if it is monitored that the success rate of the vehicle executing the control command meets the preset success rate, and it is determined that the connection stability information of the vehicle network signal meets the preset stability threshold, in order to save the remaining power of the vehicle and prevent power consumption due to the heartbeat cycle of the heartbeat mechanism being too short, the regular heartbeat cycle of the heartbeat mechanism is lengthened to obtain a third target heartbeat cycle. For example, the regular heartbeat cycle can be adjusted from 5 minutes to 1 hour. The longer the heartbeat cycle, the less battery power the vehicle consumes, achieving the effect of significantly reducing the battery power of small vehicles.
[0098] The method for dynamically adjusting the heartbeat mechanism provided by the above embodiment realizes automatic adjustment of the heartbeat period of the heartbeat mechanism, achieving a balance between saving vehicle battery power and maintaining network stability.
[0099] In the embodiment of the present disclosure, since the current time, the success rate of the vehicle executing the control instruction, and the connection stability information of the vehicle network signal are parameters that change continuously with the current scene, when it is monitored that the current time, the success rate of the vehicle executing the control instruction, and the connection stability information of the vehicle network signal have changed, the current time, the success rate of the vehicle executing the control instruction, and the connection stability information of the vehicle network signal are obtained again. If the adjustment conditions that the current time, the success rate of the vehicle executing the control instruction, and the connection stability information of the vehicle network signal all meet are not found among the preset multiple adjustment conditions, that is, one of the three adjustment conditions listed in the above step 103 is not met, the heartbeat cycle currently used by the heartbeat mechanism, that is, the first target heartbeat cycle, or the second target heartbeat cycle, or the third target heartbeat cycle is adjusted back to the regular heartbeat cycle.
[0100] In some embodiments, to determine the target time period, before obtaining the current time of the vehicle, the success rate of the vehicle executing control commands, and the connection stability information of the vehicle network signal, the first time and second time when the vehicle receives a control command in a dormant state within a preset time period are determined from the vehicle's historical data, where the first time is the time when the vehicle receives the first control command, and the second time is the time when the vehicle receives the last control command. The time period from the first time to the second time is determined as the target time period. For example, if the first time the first control command is received is 6:00 a.m., and the time the last control command is received is 6:00 p.m. each day, then the time period from 6:00 a.m. to 6:00 p.m. is determined as the target time period.
[0101] In summary, the embodiments of the present disclosure can achieve the following effects:
[0102] The heartbeat period of the heartbeat mechanism is dynamically adjusted based on the current time, the success rate of the vehicle executing control commands, and the connection stability information of the vehicle network signal, achieving a balance between saving vehicle battery power and maintaining network stability.
[0103] Corresponding to the above-mentioned heartbeat mechanism adjustment method, the present invention also provides a heartbeat mechanism adjustment device. Since the device embodiment of the present invention corresponds to the above-mentioned method embodiment, details not disclosed in the device embodiment can be referred to the above-mentioned method embodiment and will not be repeated in this invention.
[0104] Figure 2 A schematic diagram of the structure of a heartbeat mechanism adjustment device provided in an embodiment of the present disclosure is shown in FIG. Figure 2 As shown, it includes: a monitoring unit 21, an acquisition unit 22, a search unit 23 and an adjustment unit 24.
[0105] A monitoring unit 21 is configured to monitor whether a first time period during which the vehicle is powered on and stationary is greater than a second time period during which the heartbeat mechanism is activated;
[0106] an acquiring unit 22 for acquiring, if it is determined that the first duration is greater than the second duration, the current time of the vehicle, the success rate of the vehicle executing the control command, and the connection stability information of the vehicle network signal;
[0107] a search unit 23 for searching, from among a plurality of preset adjustment conditions, an adjustment condition that the current time, the success rate of the vehicle executing the control command, and the connection stability information of the vehicle network signal all meet as a target condition;
[0108] The adjusting unit 24 is configured to dynamically adjust the regular heartbeat period of the heartbeat mechanism according to the target heartbeat period corresponding to the target condition.
[0109] The heartbeat mechanism adjustment device provided by the present disclosure monitors whether the first time duration when the vehicle is powered on and stationary is greater than the second time duration when the heartbeat mechanism is activated; if it is determined that the first time duration is greater than the second time duration, the current time of the vehicle, the success rate of the vehicle executing control instructions, and the connection stability information of the vehicle network signal are obtained; among the preset multiple adjustment conditions, the adjustment condition that the current time, the success rate of the vehicle executing control instructions, and the connection stability information of the vehicle network signal all meet is searched as the target condition; according to the target heartbeat period corresponding to the target condition, the regular heartbeat period of the heartbeat mechanism is dynamically adjusted. Compared with other related technologies, the heartbeat mechanism adjustment method provided by the present disclosure dynamically adjusts the heartbeat period of the heartbeat mechanism by monitoring the current time of the vehicle, the success rate of the vehicle executing control instructions, and the connection stability information of the vehicle network signal, so that the heartbeat mechanism achieves a balance between maintaining the remaining battery power of the vehicle and maintaining network stability.
[0110] Furthermore, in a possible implementation of this embodiment, as Figure 3 As shown, the search unit 23 includes:
[0111] A first search module 231 is configured to search, from among a plurality of preset adjustment conditions, for a first adjustment condition in which the current time is within a target time period, the success rate of the vehicle executing the control command satisfies a preset success rate, and the connection stability information of the vehicle network signal satisfies a preset stability threshold;
[0112] A first determining module 232, configured to determine the first adjustment condition as a first target condition;
[0113] Accordingly, the adjustment unit 24 includes:
[0114] A second determining module 241 is configured to determine a first target heartbeat cycle corresponding to the first target condition;
[0115] The first adjusting module 242 is configured to shorten the conventional heartbeat mechanism according to the first target heartbeat period.
[0116] Optionally, the searching unit 23 further includes:
[0117] A second search module 233 is configured to search, from among a plurality of preset adjustment conditions, for a second adjustment condition, namely, the current time is within a target time period, the success rate of the vehicle executing the control command does not meet a preset success rate, and the connection stability information of the vehicle network signal does not meet a preset stability threshold;
[0118] A third determining module 234 determines the second adjustment condition as a second target condition;
[0119] Accordingly, the adjustment unit 24 further includes:
[0120] A fourth determining module 243 is configured to determine a second target heartbeat cycle corresponding to the second target condition;
[0121] The second adjusting module 244 is configured to shorten the conventional heartbeat mechanism according to the second target heartbeat cycle, wherein the second heartbeat cycle is shorter than the first heartbeat cycle.
[0122] Optionally, the searching unit 23 further includes:
[0123] A third search module 235 is configured to search, from among a plurality of preset adjustment conditions, for a third adjustment condition, namely, that the current time is not within a target time period, that the success rate of the vehicle executing the control command satisfies a preset success rate, and that the connection stability information of the vehicle network signal satisfies a preset stability threshold;
[0124] a fifth determining module 236, configured to determine the third adjustment condition as a third target condition;
[0125] Accordingly, the adjustment unit 24 further includes:
[0126] A sixth determining module 245 is configured to determine a third target heartbeat cycle corresponding to the third target condition;
[0127] The third adjustment module 246 is configured to adjust the length of the conventional heartbeat mechanism according to the third target heartbeat period.
[0128] Furthermore, in a possible implementation of this embodiment, as Figure 3 As shown, the adjustment unit 24 is further used for:
[0129] If among the preset multiple adjustment conditions, the current time, the success rate of the vehicle executing the control command, and the connection stability information of the vehicle network signal are not found to meet the adjustment conditions, then the first target heartbeat cycle, the second target heartbeat cycle, or the third target heartbeat cycle will be adjusted back to the regular heartbeat cycle.
[0130] Furthermore, in a possible implementation of this embodiment, as Figure 3 As shown, the device further includes a determining unit 25, and the determining unit 25 includes:
[0131] a seventh determining module 251 configured to determine, from historical data of the vehicle, a first time and a second time when the vehicle received a control command in a dormant state within a preset time period, before obtaining the current time of the vehicle, the success rate of the vehicle executing the control command, and the connection stability information of the vehicle network signal, where the first time is the time when the vehicle received the first control command, and the second time is the time when the vehicle received the last control command;
[0132] The eighth determining module 252 is configured to determine a time period from the first time to the second time as a target time period.
[0133] It should be noted that the above explanation of the method embodiment is also applicable to the device of this embodiment, and the principles are the same, which is not limited in this embodiment.
[0134] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0135] Figure 4 A schematic block diagram of an example electronic device 300 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are provided as examples only and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0136] like Figure 4As shown, the device 300 includes a computing unit 301, which can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 302 or a computer program loaded from a storage unit 308 into a RAM (Random Access Memory) 303. Various programs and data required for the operation of the device 300 can also be stored in the RAM 303. The computing unit 301, ROM 302, and RAM 303 are connected to each other via a bus 304. An I / O (Input / Output) interface 305 is also connected to the bus 304.
[0137] Various components in device 300 are connected to I / O interface 305, including: an input unit 306, such as a keyboard, mouse, etc.; an output unit 307, such as various types of displays, speakers, etc.; a storage unit 308, such as a magnetic disk, optical disk, etc.; and a communication unit 309, such as a network card, modem, wireless communication transceiver, etc. The communication unit 309 allows device 300 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0138] The computing unit 301 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Unit), various specialized AI (Artificial Intelligence) computing chips, various computing units that run machine learning model algorithms, a DSP (Digital Signal Processor), and any suitable processor, controller, microcontroller, etc. The computing unit 301 performs the various methods and processes described above, such as the heartbeat mechanism adjustment method. For example, in some embodiments, the heartbeat mechanism adjustment method can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 308. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 300 via the ROM 302 and / or the communication unit 309. When the computer program is loaded into the RAM 303 and executed by the computing unit 301, one or more steps of the method described above can be performed. Alternatively, in other embodiments, the computing unit 301 may be configured to execute the aforementioned heartbeat mechanism adjustment method in any other appropriate manner (for example, by means of firmware).
[0139] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application Specific Standard Products), SOCs (System on Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0140] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0141] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or apparatus. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more wires, a portable computer disk, a hard disk, RAM, ROM, EPROM (Electrically Programmable Read-Only-Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0142] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0143] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., as an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network), WAN (Wide Area Network), the Internet, and blockchain networks.
[0144] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact via a communication network. This client-server relationship is established by computer programs running on the respective computers and establishing a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This is a host product within a cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosts and VPS services ("Virtual Private Servers" or simply "VPS"). The server may also be a distributed system server or a server integrated with blockchain.
[0145] It's important to note that artificial intelligence (AI) is the study of how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). This encompasses both hardware and software technologies. AI hardware technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, and big data processing. AI software technologies primarily encompass computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graphs.
[0146] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not limited herein.
[0147] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.
Claims
1. A heartbeat mechanism adjustment method, characterized in that: include: Monitoring whether a first duration during which the vehicle is powered on and stationary is greater than a second duration during which the heartbeat mechanism is activated; If it is determined that the first duration is greater than the second duration, obtaining the current time of the vehicle, the success rate of the vehicle executing the control command, and the connection stability information of the vehicle network signal; Among the preset multiple adjustment conditions, searching for an adjustment condition that the current time, the success rate of the vehicle executing the control command, and the connection stability information of the vehicle network signal all meet as a target condition; According to the target heartbeat period corresponding to the target condition, the regular heartbeat period of the heartbeat mechanism is dynamically adjusted.
2. The method according to claim 1, characterized in that The step of searching, among the preset multiple adjustment conditions, for an adjustment condition that satisfies the current time, the success rate of the vehicle executing the control command, and the connection stability information of the vehicle network signal as a target condition includes: Among the preset multiple adjustment conditions, searching for a first adjustment condition in which the current time is within a target time period, the success rate of the vehicle executing the control command meets a preset success rate, and the connection stability information of the vehicle network signal meets a preset stability threshold; The first adjustment condition is determined as the first target condition; accordingly, The dynamically adjusting the regular heartbeat period of the heartbeat mechanism according to the target heartbeat period corresponding to the target condition includes: Determining a first target heartbeat cycle corresponding to the first target condition; The conventional heartbeat mechanism is shortened according to the first target heartbeat period.
3. The method according to claim 2, characterized in that Among the preset multiple adjustment conditions, searching for an adjustment condition that meets the current time, the success rate of the vehicle executing the control command, and the connection stability information of the vehicle network signal as a target condition also includes: Among the preset multiple adjustment conditions, searching for a second adjustment condition in which the current time is within a target time period, a success rate of the vehicle executing the control command does not meet a preset success rate, and connection stability information of the vehicle network signal does not meet a preset stability threshold; The second adjustment condition is determined as the second target condition; accordingly, The step of dynamically adjusting the conventional heartbeat period of the heartbeat mechanism according to the target heartbeat period corresponding to the target condition further includes: Determining a second target heartbeat cycle corresponding to the second target condition; The conventional heartbeat mechanism is shortened according to the second target heartbeat cycle, wherein the second heartbeat cycle is shorter than the first heartbeat cycle.
4. The method according to claim 1, wherein Among the preset multiple adjustment conditions, searching for an adjustment condition that meets the current time, the success rate of the vehicle executing the control command, and the connection stability information of the vehicle network signal as a target condition also includes: Among the preset multiple adjustment conditions, searching for a third adjustment condition: the current time is not within the target time period, the success rate of the vehicle executing the control command meets a preset success rate, and the connection stability information of the vehicle network signal meets a preset stability threshold; The third adjustment condition is determined as the third target condition; accordingly, The step of dynamically adjusting the conventional heartbeat period of the heartbeat mechanism according to the target heartbeat period corresponding to the target condition further includes: Determining a third target heartbeat cycle corresponding to the third target condition; The conventional heartbeat mechanism is lengthened according to the third target heartbeat period.
5. The method according to any one of claims 1 to 4, characterized in that After dynamically adjusting the heartbeat period of the heartbeat mechanism, the method further includes: If among the preset multiple adjustment conditions, the current time, the success rate of the vehicle executing the control command, and the connection stability information of the vehicle network signal are not found to meet the adjustment conditions, then the first target heartbeat cycle, the second target heartbeat cycle, or the third target heartbeat cycle will be adjusted back to the regular heartbeat cycle.
6. The method according to any one of claims 1 to 5, characterized in that Before obtaining the current time of the vehicle, the success rate of the vehicle executing the control command, and the connection stability information of the vehicle network signal, the method further includes: Determining, from historical data of the vehicle, a first time and a second time when the vehicle receives a control command in a dormant state within a preset time period, where the first time is the time when the vehicle receives the first control command, and the second time is the time when the vehicle receives the last control command; A time period from the first time to the second time is determined as a target time period.
7. A heartbeat mechanism adjustment device, characterized in that: include: A monitoring unit, configured to monitor whether a first time period during which the vehicle is powered on and stationary is greater than a second time period during which the heartbeat mechanism is activated; an acquiring unit, configured to acquire, if it is determined that the first duration is greater than the second duration, the current time of the vehicle, a success rate of the vehicle executing the control command, and connection stability information of the vehicle network signal; a search unit configured to search, among a plurality of preset adjustment conditions, for an adjustment condition that is satisfied by the current time, the success rate of the vehicle executing the control command, and the connection stability information of the vehicle network signal as a target condition; The adjusting unit is used to dynamically adjust the regular heartbeat period of the heartbeat mechanism according to the target heartbeat period corresponding to the target condition.
8. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 6.
10. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method, device and system for implementing heartbeat keeping
CN107517136A
Method and device for adjusting heartbeat period of communication between communication device and server
CN108574981A
A method and system for maintaining a connected heartbeat
CN109150670A
Heartbeat duration self-adaption method and device, electronic equipment and storage medium
CN115720205A