Disclosure of Invention
The embodiment of the invention discloses a method and a device for adjusting a version detection period, which are used for reducing the version detection period.
The first aspect of the embodiments of the present invention discloses a method for adjusting a version detection period, including:
acquiring an operation record aiming at the version;
when the operation record comprises a target operation record, reducing the current detection period of the version.
With reference to the first aspect of the embodiment of the present invention, in a first possible implementation manner of the first aspect of the embodiment of the present invention, the method further includes:
when the operation record does not comprise a target operation record, increasing the current detection period of the version; or,
when the operation record does not comprise the target operation record, keeping the current detection period of the version unchanged.
With reference to the first aspect of the embodiment of the present invention or the first possible implementation manner of the first aspect of the embodiment of the present invention, in a second possible implementation manner of the first aspect of the embodiment of the present invention, the obtaining an operation record for a version includes:
acquiring an operation record of a user for a version; or,
and acquiring the operation record for the version stored on the server.
With reference to the second possible implementation manner of the first aspect of the embodiment of the present invention, in a third possible implementation manner of the first aspect of the embodiment of the present invention, the operation record of the user for the version includes:
the number of times that the user detects the new version in the current detection period;
the target operation record comprises:
the number of times that the user detects the new version in the current detection period is larger than or equal to the preset number of times.
With reference to the second possible implementation manner of the first aspect of the embodiment of the present invention, in a fourth possible implementation manner of the first aspect of the embodiment of the present invention, the operation record of the user for the version includes:
the number of target detection periods, wherein the target detection periods are detection periods in which the number of times that a user detects a new version in the target detection periods is greater than zero;
the target operation record comprises:
the number of the target detection periods is greater than or equal to the number of preset target detection periods.
With reference to the second possible implementation manner of the first aspect of the embodiment of the present invention, in a fifth possible implementation manner of the first aspect of the embodiment of the present invention, the operation record of the user for the version includes:
the version number of the version after the user upgrades the new version;
the target operation record comprises:
the version number of the version after upgrading is updated relative to the version number of the version before upgrading.
With reference to the second possible implementation manner of the first aspect of the embodiment of the present invention, in a sixth possible implementation manner of the first aspect of the embodiment of the present invention, the operation record of the server for the version includes:
the version number of the version uploaded by the third party and stored on the server;
the target operation record comprises:
the version number of the version on the server is updated relative to the version number of the version on the terminal device.
A second aspect of the embodiments of the present invention discloses a version detection period adjustment device, including:
an acquisition unit configured to acquire an operation record for a version;
and the period adjusting unit is used for reducing the current detection period of the version when the operation record acquired by the acquiring unit comprises a target operation record.
With reference to the second aspect of the embodiment of the present invention, in a first possible implementation manner of the second aspect of the embodiment of the present invention, the period adjusting unit is further configured to increase a current detection period of the version or keep the current detection period of the version unchanged when the operation record acquired by the acquiring unit does not include a target operation record.
With reference to the second aspect of the embodiment of the present invention or the first possible implementation manner of the second aspect of the embodiment of the present invention, in a second possible implementation manner of the second aspect of the embodiment of the present invention, the obtaining unit is specifically configured to obtain an operation record for a version of a user, or obtain an operation record for a version stored on a server.
With reference to the second possible implementation manner of the second aspect of the embodiment of the present invention, in a third possible implementation manner of the second aspect of the embodiment of the present invention, the obtaining unit is specifically configured to obtain the number of times that the user detects the new version in the current detection period;
the target operation record comprises:
the number of times that the user detects the new version in the current detection period is larger than or equal to the preset number of times.
With reference to the second possible implementation manner of the second aspect of the embodiment of the present invention, in a fourth possible implementation manner of the second aspect of the present invention, the obtaining unit is specifically configured to obtain the number of target detection periods, where the target detection period is a detection period in which the number of times that a user detects a new version in the target detection period is greater than zero;
the target operation record comprises:
the number of the target detection periods is greater than or equal to the number of preset target detection periods.
With reference to the second possible implementation manner of the second aspect of the embodiment of the present invention, in a fifth possible implementation manner of the second aspect of the embodiment of the present invention, the obtaining unit is specifically configured to obtain a version number of a version after a user upgrades a new version;
the target operation record comprises:
the version number of the version after upgrading is updated relative to the version number of the version before upgrading.
With reference to the second possible implementation manner of the second aspect of the embodiment of the present invention, in a sixth possible implementation manner of the second aspect of the embodiment of the present invention, the obtaining unit is specifically configured to obtain a version number of the version uploaded by a third party, where the version number is stored on a server;
the target operation record comprises:
the version number of the version on the server is updated relative to the version number of the version on the terminal device.
A third aspect of the embodiments of the present invention discloses a version detection cycle adjustment apparatus, including: a memory and a processor, wherein the memory stores a set of program codes therein, and the processor is configured to call the program codes stored in the memory to perform the following operations:
acquiring an operation record aiming at the version;
when the operation record comprises a target operation record, reducing the current detection period of the version.
With reference to the third aspect of the embodiment of the present invention, in a first possible implementation manner of the third aspect of the embodiment of the present invention, the processor further performs the following operations:
when the operation record does not comprise a target operation record, increasing the current detection period of the version; or,
when the operation record does not comprise the target operation record, keeping the current detection period of the version unchanged.
With reference to the third aspect of the embodiment of the present invention or the first possible implementation manner of the third aspect of the embodiment of the present invention, in a second possible implementation manner of the third aspect of the embodiment of the present invention, a manner of acquiring, by the processor, the operation record for the version is specifically:
acquiring an operation record of a user for a version; or,
and acquiring the operation record for the version stored on the server.
With reference to the second possible implementation manner of the third aspect of the embodiment of the present invention, in a third possible implementation manner of the third aspect of the embodiment of the present invention, a manner of acquiring, by the processor, the operation record of the version by the user is specifically:
acquiring the times of detecting the new version by the user in the current detection period;
the target operation record comprises:
the number of times that the user detects the new version in the current detection period is larger than or equal to the preset number of times.
With reference to the second possible implementation manner of the third aspect of the embodiment of the present invention, in a fourth possible implementation manner of the third aspect of the embodiment of the present invention, a manner of acquiring, by the processor, the operation record of the version by the user is specifically:
acquiring the number of target detection periods, wherein the target detection periods are detection periods in which the number of times of detecting a new version by a user in the target detection periods is greater than zero;
the target operation record comprises:
the number of the target detection periods is greater than or equal to the number of preset target detection periods.
With reference to the second possible implementation manner of the third aspect of the embodiment of the present invention, in a fifth possible implementation manner of the third aspect of the embodiment of the present invention, a manner of acquiring, by the processor, the operation record of the version by the user is specifically:
acquiring the version number of a version after a user upgrades a new version;
the target operation record comprises:
the version number of the version after upgrading is updated relative to the version number of the version before upgrading.
With reference to the second possible implementation manner of the third aspect of the embodiment of the present invention, in a sixth possible implementation manner of the third aspect of the embodiment of the present invention, a manner of acquiring, by the processor, the operation record of the server for the version is specifically:
acquiring the version number of the version uploaded by the third party and stored on the server;
the target operation record comprises:
the version number of the version on the server is updated relative to the version number of the version on the terminal device.
According to the method and the device for detecting the version of the mobile terminal, the operation record aiming at the version is obtained, and when the operation record comprises the target operation record, the current detection period of the version is shortened. Therefore, the version detection period can be reduced according to the operation record aiming at the version, so that the new version of the version can be detected in time, and the user experience is improved.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention discloses a method and a device for adjusting a version detection period, which are used for reducing the version detection period. The following are detailed below.
Referring to fig. 1, fig. 1 is a flowchart illustrating a version detection period adjustment method according to an embodiment of the present invention. The version detection period adjustment method shown in fig. 1 is suitable for intelligent terminal devices such as mobile phones and tablet computers, and the embodiment of the present invention is not limited thereto. As shown in fig. 1, the version detection period adjustment method may include the following steps.
S101, obtaining an operation record aiming at the version.
In this embodiment, the operation record for the version is first acquired, so that the version detection period is adjusted according to the operation record for the version. The version may be a system version, a Kernel version, a firmware parameter, etc., and this embodiment is not limited as long as the versions can be upgraded by an Over The Air (OTA) technology.
And S102, when the operation record comprises the target operation record, reducing the current detection period of the version.
In this embodiment, after the operation record for the version is acquired, it is determined whether the acquired operation record includes the target operation record, and when the operation record includes the target operation record, the current detection period of the version is reduced, and the new version detection period may be reduced by one detection period step length on the basis of the current version detection period, where the detection period step length may be several hours, several days, or the like, and this embodiment is not limited. If the version detection period is too short, unnecessary detection is frequently performed, which directly causes large power consumption of the terminal device and waste of data traffic, so that a preset minimum detection period can be preset, and the reduced version detection period is greater than or equal to the preset minimum detection period. The preset minimum detection period may be set as required, and may be several hours or several days, which is not limited in this embodiment.
In the version detection period adjustment method described in fig. 1, the version detection period may be reduced according to the target operation record for the version, so as to detect a new version of the version in time and improve user experience.
In one embodiment of the invention, when the operation record does not include the target operation record, the current detection period of the version is increased or kept unchanged.
In this embodiment, when the operation record does not include the target operation record, the current detection period of the version may be increased, or the detection period of the version may be kept unchanged as the current version detection period, which is not limited in this embodiment. When the operation record does not comprise the target operation record, the current detection period of the version is increased, so that the power consumption of the terminal equipment can be reduced and the data flow can be saved; the current detection period of the version is kept unchanged, and excessive variation of the version detection period can be reduced.
Referring to fig. 2, fig. 2 is a flowchart illustrating another version detection period adjustment method according to an embodiment of the present invention. The version detection period adjustment method shown in fig. 2 is suitable for intelligent terminal devices such as mobile phones and tablet computers, and the embodiment of the present invention is not limited thereto. In addition, the version check period adjustment method shown in fig. 2 is based on the number of times that the user checks the new version in the current check period as the check period of whether to change the version. As shown in fig. 2, the version detection period adjustment method may include the following steps.
S201, obtaining the times of detecting the new version by the user in the current detection period.
In this embodiment, a version detection period is defined from the last time of automatic detection to the current time of automatic detection. After each automatic detection is completed, the times of detecting the new version by the user in the current version detection period are obtained; the user may detect the new version by clicking, sliding, and the like, which is not limited in this embodiment. The version may be a system version, a Kernel version, a firmware parameter, and the like, and this embodiment is not limited as long as the versions can be upgraded by an OTA technology. And counting the times of detecting the new version by the user in the current detection period.
For example, when the current version detection period starts, the number of times that the user detects the new version may be set to zero, in the current version detection period, the number of times that the user detects the new version will be increased by one every time the user detects the new version, and when the current version detection period ends, the number of times that the user detects the new version is the number of times that the user detects the new version in the current version detection period.
S202, when the number of times of detecting the new version by the user in the current detection period is larger than or equal to the preset number of times, the current detection period of the version is reduced.
In this embodiment, after the number of times that the user detects the new version in the current detection period is obtained, it is determined whether the number of times that the user detects the new version in the current detection period is greater than or equal to a preset number of times, and when the number of times that the user detects the new version in the current detection period is greater than or equal to the preset number of times, it indicates that the user has a desire to upgrade the version, and the current detection period of the version is reduced. If the version detection period is too short, unnecessary detection is frequently performed, which directly causes large power consumption of the terminal device and waste of data traffic, so that a preset minimum detection period can be preset, and the reduced version detection period is greater than or equal to the preset minimum detection period. The preset minimum detection period may be set as required, and may be several hours or several days, which is not limited in this embodiment.
As a possible implementation manner, when the number of times that the user detects the new version in the current detection period is less than the preset number of times, the current detection period of the version is increased, or the current detection period of the version is kept unchanged.
In this embodiment, when the number of times that the user detects the new version in the current detection period is less than the preset number of times, the current detection period of the version may be increased, and the detection period of the version may also be kept unchanged as the current version detection period, which is not limited in this embodiment.
In the version detection period adjustment method described in fig. 2, the number of times that the user detects the new version in the current detection period is obtained, and when the number of times that the user detects the new version in the current detection period is greater than or equal to the preset number of times, the current detection period of the version is reduced. Therefore, the detection period of the version can be changed according to the number of times that the user detects the new version in the current detection period, and the user experience is improved.
Referring to fig. 3, fig. 3 is a flowchart illustrating another version detection period adjustment method according to an embodiment of the present invention. The version detection period adjustment method shown in fig. 3 is suitable for intelligent terminal devices such as mobile phones and tablet computers, and the embodiment of the present invention is not limited thereto. In addition, the version detection period adjustment method shown in fig. 3 is based on whether the number of detection periods in which the number of times that the user detects the new version in the detection period is greater than zero is used for changing the detection period. As shown in fig. 3, the version detection period adjustment method may include the following steps.
S301, acquiring the number of target detection periods, wherein the target detection periods are detection periods in which the number of times of detecting the new version by the user in the target detection periods is greater than zero.
As a possible implementation, obtaining the number of target detection cycles may include the following steps.
3011. And judging whether the number of times of detecting the new version by the user in the current detection period is greater than zero.
In this embodiment, a version detection period is defined from the last time of automatic detection to the current time of automatic detection. After each automatic detection is finished, whether the number of times that the user detects the new version in the current version detection period is greater than zero is judged; the user may detect the new version by clicking, sliding, and the like, which is not limited in this embodiment. The version may be a system version, a Kernel version, a firmware parameter, and the like, and this embodiment is not limited as long as the versions can be upgraded by an OTA technology. And counting the times of detecting the new version by the user in the current detection period.
For example, when the current version detection period starts, the flag bit for the user to detect the new version may be set to F, and in the current version detection period, when the number of times that the user detects the new version is greater than zero, the flag bit for the user to detect the new version is changed from F to T. Therefore, whether the number of times that the user detects the new version in the current detection period is greater than zero is judged, that is, whether the flag bit of the new version detected by the user is F or T is judged.
3012. And if the number of times that the user detects the new version in the current detection period is greater than zero, adding one to the number of the target detection period.
In this embodiment, if the number of times that the user detects the new version in the current detection period is greater than zero, the number of the target detection period is incremented by one. For example, if the number of target detection cycles is zero when the last automatic detection is completed, and the number of times that the user detects a new version in the current detection cycle is greater than zero, the number of target detection cycles is one after the current automatic detection is completed; and when the number of times of detecting the new version by the user is more than zero from the completion of the automatic detection to the completion of the next automatic detection, the number of target detection periods is two after the next automatic detection is completed.
In this embodiment, when the number of the target detection periods is increased by one, the number of the detection periods in which the number of times that the user detects the new version in the detection period is equal to zero may be kept unchanged or set to zero. When the number of the detection period in which the number of times of detecting the new version by the user in the detection period is equal to zero is set to zero, the number of the detection periods in which the number of times of detecting the new version by the user in the detection period is equal to zero is continuous; when the number of detection cycles in which the number of times of detecting the new version by the user in the detection cycle is equal to zero is kept unchanged, the number of detection cycles in which the number of times of detecting the new version by the user in the detection cycle is equal to zero is discontinuous; the number of detection cycles in which the number of times that the user detects the new version in the detection cycle is equal to zero is continuous or discontinuous, and is set by a developer, which is not limited in this embodiment.
For example, assuming that the number of detection cycles in which the number of times that the user detects the new version in the detection cycle is equal to zero before the last detection cycle is zero, when the number of times that the user detects the new version in the last detection cycle is equal to zero, after the last automatic detection is finished, the number of detection periods that the number of times of detecting the new version by the user in the detection period is equal to zero is one, when the number of times of detecting the new version by the user in the current detection period is more than zero, after the automatic detection is finished, the number of detection periods that the number of times of detecting the new version by the user in the detection period is equal to zero is one, when the number of times of detecting the new version by the user in the next detection period is equal to zero, after the next automatic detection is finished, the number of detection cycles in which the number of times of detecting the new version by the user in the detection cycle is equal to zero is two, at this time, the number of detection periods in which the number of times of detecting the new version by the user in the detection period is equal to zero is discontinuous; when the number of times of detecting the new version by the user in the last detection period is equal to zero, the number of detection periods in which the number of times of detecting the new version by the user in the detection period is equal to zero is one after the last automatic detection is completed, and when the number of times of detecting the new version by the user in the current detection period is greater than zero, the number of detection periods in which the number of times of detecting the new version by the user in the detection period is equal to zero is zero after the automatic detection is completed, and at this time, the number of detection periods in which the number of times of detecting the new version by the user in the detection period is equal to zero is continuous.
Correspondingly, if the number of times that the user detects the new version in the current detection period is equal to zero, adding one to the number of detection periods that the number of times that the user detects the new version in the detection period is equal to zero, keeping the number of target detection periods constant or setting the number of target detection periods to zero, and judging whether the number of detection periods that the number of times that the user detects the new version in the detection period is equal to zero is greater than or equal to the number of preset undetected periods or not; and when the number of the detection periods that the number of times of detecting the new version by the user in the detection period is equal to zero is less than the number of the preset undetected periods, keeping the detection period of the version as the current version detection period. The preset maximum detection period may be set as required, and may be several days or several tens of days, which is not limited in this embodiment. When the number of the target detection periods is set to zero, the number of the target detection periods is continuous; when the number of the target detection periods is kept unchanged, the number of the target detection periods is discontinuous; the number of target detection cycles is continuous or discontinuous, and is set by the developer, which is not limited in this embodiment.
3013. And judging whether the number of the target detection periods is greater than or equal to the number of the preset target detection periods.
And S302, when the number of the target detection periods is greater than or equal to the number of the preset target detection periods, reducing the current detection period of the version.
In this embodiment, when the number of the target detection periods is greater than or equal to the number of the preset target detection periods, it indicates that the user has a desire to upgrade the version, and reduces the current detection period of the version, and the new version detection period may be reduced by one detection period step length on the basis of the current version detection period, where the detection period step length may be several hours or several days, and the like, which is not limited in this embodiment. If the version detection period is too short, unnecessary detection is frequently performed, which directly causes large power consumption of the terminal device and waste of data traffic, so that a preset minimum detection period can be preset, and the reduced version detection period is greater than or equal to the preset minimum detection period. The preset minimum detection period may be set as required, and may be several hours or several days, which is not limited in this embodiment.
Correspondingly, when the number of the target detection periods is smaller than the number of the preset target detection periods, the user does not wish to upgrade the version, and the version detection period is kept unchanged as the current version detection period.
In the version detection period adjustment method described in fig. 3, the number of detection periods is obtained, where the detection period is that the number of times that a user detects a new version in the detection period is greater than zero, and when the number of detection periods is greater than or equal to a preset number, the current detection period of the version is reduced. Therefore, the detection period of the version can be changed according to the number of the detection periods that the number of times of detecting the new version in the detection period is larger than zero, and the user experience is improved.
Referring to fig. 4, fig. 4 is a flowchart illustrating another version detection period adjustment method according to an embodiment of the present invention. The version detection period adjustment method shown in fig. 4 is suitable for intelligent terminal devices such as mobile phones and tablet computers, and the embodiment of the present invention is not limited thereto. In addition, the version detection period adjustment method shown in fig. 4 is based on the version number of the version after the user upgrades the new version as the detection period of whether to change the version. As shown in fig. 4, the version detection period adjustment method may include the following steps.
S401, obtaining the version number of the version after the user upgrades the new version.
In the embodiment, after the user upgrades the version every time, the version number of the upgraded version is obtained; the user may update the new version by clicking, sliding, and the like, which is not limited in this embodiment. The version may be a system version, a Kernel version, a firmware parameter, and the like, and this embodiment is not limited as long as the versions can be upgraded by an OTA technology.
S402, when the version number of the upgraded version is updated relative to the version number of the version before upgrading, the current detection period of the version is reduced.
In this embodiment, when the version number of the upgraded version is updated relative to the version number of the version before the upgrade, the current detection period of the version is reduced, the new version detection period may be reduced by one detection period step length on the basis of the current version detection period, the detection period step length may be several hours or several days, and the like, which is not limited in this embodiment. The version number of the upgraded version may be higher than the version number of the version before upgrading, or may be lower than the version number of the version before upgrading, which is not limited in this embodiment. If the version detection period is too short, unnecessary detection is frequently performed, which directly causes large power consumption of the terminal and waste of data traffic, so that a preset minimum detection period can be preset, and the reduced version detection period is greater than or equal to the preset minimum detection period. The preset minimum detection period may be set as required, and may be several hours or several days, which is not limited in this embodiment. The version detection period is stored in a Secure Digital (SD) card, and when the detection period is adjusted, the stored detection period is obtained from the SD card, and after the adjustment is completed, a new detection period is stored in the SD card again, where the SD card may be an internal SD card or an external SD card, and this embodiment is not limited.
Correspondingly, when the version number of the upgraded version is not updated relative to the version number of the version before upgrading, that is, the version number of the upgraded version is consistent with the version number of the version before upgrading, the version detection period may be kept unchanged as the current version detection period, or the version detection period may be increased based on the current version detection period, which is not limited in this embodiment.
In the version detection period adjustment method described in fig. 4, the version number of the version after the user upgrades the new version is obtained, and when the version number of the upgraded version is updated relative to the version number of the version before the upgrade, the current detection period of the version is reduced. Therefore, the detection period of the version can be changed according to the version number of the version after the user upgrades the new version, and the user experience is improved.
Referring to fig. 5, fig. 5 is a flowchart illustrating another version detection period adjustment method according to an embodiment of the present invention. The version detection period adjustment method shown in fig. 5 is suitable for intelligent terminal devices such as mobile phones and tablet computers, and the embodiment of the present invention is not limited thereto. In addition, the version detection period adjustment method shown in fig. 5 is based on the version number of the version uploaded by the third party stored on the server as the detection period of whether to change the version. As shown in fig. 5, the version detection period adjustment method may include the following steps.
S501, obtaining the version number of the version uploaded by the third party and stored on the server.
In this embodiment, each time the automatic detection is started, the version number of the version uploaded by the third party stored on the server is obtained. The terminal equipment can actively request to acquire the version number of the version from the server, and then the server sends the version number of the version to the terminal equipment; or the server may actively push the version number of the version to the terminal device, which is not limited in this embodiment. The version may be a system version, a Kernel version, a firmware parameter, and the like, and this embodiment is not limited as long as the versions can be upgraded by an OTA technology. Here, the third party is a third party other than the terminal and the server, and may be a version developer of the version or a consumer who improves the version, and the embodiment of the present invention is not limited thereto.
S502, when the version number of the version on the server is updated relative to the version number of the version on the terminal device, the current detection period of the version is reduced.
In this embodiment, when the version number of the version on the server is higher than the version number of the version on the terminal device, it indicates that the version number of the version on the server is updated relative to the version number of the version on the terminal device, and determines whether a detection period field on the server is filled, and if the detection period field on the server is not filled, the current detection period of the version is reduced, and the new version detection period may be reduced by one detection period step length on the basis of the current version detection period, where the detection period step length may be several hours or several days, and the embodiment is not limited. If the version detection period is too short, unnecessary detection is frequently performed, which wastes data traffic, so that a preset minimum detection period can be preset, and the reduced version detection period is greater than or equal to the preset minimum detection period. The preset minimum detection period may be set as required, and may be several hours or several days, which is not limited in this embodiment. If the detection period field on the server is filled, judging whether the detection period of the current version is greater than the detection period of the detection period field, and if the detection period of the current version is less than or equal to the detection period of the detection period field, reducing the current detection period of the version according to the mode; if the current version detection period is greater than the detection period of the detection period field, updating the version detection period according to the detection period of the detection period field, and enabling the updated version detection period to be greater than or equal to the preset minimum detection period.
Correspondingly, when the version number of the version on the server is not updated relative to the version number of the version on the terminal device, that is, the version number of the version on the server is consistent with the version number of the version on the terminal device, the version detection period may be kept unchanged as the current version detection period, or the version detection period may be increased based on the current version detection period, which is not limited in this embodiment.
In the version detection period adjustment method described in fig. 5, the version number of the version on the server is obtained, and when the version number of the version on the server is updated relative to the version number of the version on the terminal device, the current detection period of the version is reduced. Therefore, the detection period of the version can be changed according to the version number of the version on the server, and the user experience is improved.
Referring to fig. 6, fig. 6 is a structural diagram of a version detection period adjusting device according to an embodiment of the present invention. The version detection period adjusting device shown in fig. 6 is suitable for an intelligent terminal device such as a mobile phone and a tablet computer, and the embodiment of the present invention is not limited thereto. As shown in fig. 6, the version detection period adjustment apparatus 600 may include:
an acquisition unit 601 configured to acquire an operation record for a version;
a period adjusting unit 602, configured to reduce the current detection period of the version when the operation record acquired by the acquiring unit 601 includes the target operation record.
In the present embodiment, the acquisition unit 601 first acquires the operation record for the version so as to adjust the version detection cycle according to the operation record for the version. The version may be a system version, a Kernel version, a firmware parameter, etc., and this embodiment is not limited as long as the versions can be upgraded by an Over The Air (OTA) technology.
In this embodiment, after the obtaining unit 601 obtains the operation record for the version, the period adjusting unit 602 determines whether the operation record obtained by the obtaining unit 601 includes the target operation record, and when the operation record includes the target operation record, reduces the current detection period of the version. If the version detection period is too short, unnecessary detection is frequently performed, which wastes data traffic, so that a preset minimum detection period can be preset, and the reduced version detection period is greater than or equal to the preset minimum detection period. The preset minimum detection period may be set as required, and may be several hours or several days, which is not limited in this embodiment.
As a possible implementation manner, the period adjusting unit 602 is further configured to increase the current detection period of the version or keep the current detection period of the version unchanged when the operation record acquired by the acquiring unit 601 does not include the target operation record.
In this embodiment, when the operation record acquired by the acquiring unit 601 does not include the target operation record, the period adjusting unit 602 may increase the current detection period of the version, or may keep the detection period of the version unchanged as the current version detection period, which is not limited in this embodiment.
As a possible implementation manner, the obtaining unit 601 is specifically configured to obtain an operation record for a version of a user, or obtain an operation record for a version stored on a server.
In this embodiment, the obtained operation record may be an operation record of the user for the version, or an operation record of the server for the version, which is not limited in this embodiment.
As a possible implementation manner, the obtaining unit 601 is specifically configured to obtain the number of times that the user detects the new version in the current detection period;
the target operation record comprises:
the number of times that the user detects the new version in the current detection period is larger than or equal to the preset number of times.
In this embodiment, a version detection period is defined from the last time of automatic detection to the current time of automatic detection. After each automatic detection, the obtaining unit 601 obtains the number of times that the user detects the new version in the current version detection period, and then the period adjusting unit 602 determines whether the number of times that the user detects the new version in the current detection period is greater than or equal to the preset number of times, and when the number of times that the user detects the new version in the current detection period is greater than or equal to the preset number of times, it indicates that the user has a desire to upgrade the version, and the current detection period of the version is reduced.
As a possible implementation manner, the obtaining unit 601 is specifically configured to obtain the number of target detection cycles, where a target detection cycle is a detection cycle in which the number of times that a user detects a new version in a target detection cycle is greater than zero;
the target operation record comprises:
the number of the target detection periods is greater than or equal to the number of the preset target detection periods.
In this embodiment, after each automatic detection is completed, the obtaining unit 601 obtains the number of target detection cycles, and then the cycle adjusting unit 602 determines whether the number of target detection cycles is greater than or equal to the number of preset target detection cycles, and when the number of target detection cycles is greater than or equal to the preset target detection cycles, it indicates that the user has a desire to upgrade the version, and reduces the current detection cycle of the version.
As a possible implementation manner, the obtaining unit 601 is specifically configured to obtain a version number of a version after a user upgrades a new version;
the target operation record comprises:
the version number of the upgraded version is updated relative to the version number of the version before upgrading.
In this embodiment, after the user upgrades the version each time, the obtaining unit 601 obtains the version number of the upgraded version, and then the period adjusting unit 602 determines whether the version number of the upgraded version is updated relative to the version number of the pre-upgraded version, and when the version number of the upgraded version is updated relative to the version number of the pre-upgraded version, the current detection period of the version is reduced.
As a possible implementation manner, the obtaining unit 601 is specifically configured to obtain a version number of a version uploaded by a third party stored on the server;
the target operation record comprises:
the version number of the version on the server is updated relative to the version number of the version on the terminal device.
In this embodiment, during each automatic detection, the obtaining unit 601 obtains the version number of the version uploaded by the third party stored in the server, and then the period adjusting unit 602 determines whether the version number of the version on the server is updated relative to the version number of the version on the terminal device, and when the version number of the version on the server is updated relative to the version number of the version on the terminal device, the current detection period of the version is reduced.
In the version detection period adjustment apparatus described in fig. 6, the version detection period may be reduced according to the operation record for the version, so as to detect a new version of the version in time, and improve user experience.
Referring to fig. 7, fig. 7 is a structural diagram of another version detection period adjustment apparatus according to an embodiment of the disclosure. The version detection period adjusting device shown in fig. 7 is suitable for an intelligent terminal device such as a mobile phone and a tablet computer, and the embodiment of the present invention is not limited thereto. As shown in fig. 7, the version detection period adjustment apparatus 700 may include a memory 701 and a processor 702, wherein the memory 701 stores a set of program codes, and the processor 702 is configured to call the program codes stored in the memory 701 to perform the following operations:
acquiring an operation record aiming at the version;
when the operation record includes the target operation record, the current detection period of the version is reduced.
As one possible implementation, the processor 702 further performs the following operations:
when the operation record does not comprise the target operation record, increasing the current detection period of the version; or,
when the operation record does not include the target operation record, the current detection period of the version is kept unchanged.
As a possible implementation manner, the way for the processor 702 to obtain the operation record for the version is specifically:
acquiring an operation record of a user for a version; or,
and acquiring the operation record for the version stored on the server.
As a possible implementation manner, the manner for the processor 702 to obtain the operation record of the user for the version is specifically:
the number of times that the user detects the new version in the current detection period;
the target operation record comprises:
the number of times that the user detects the new version in the current detection period is larger than or equal to the preset number of times.
As a possible implementation manner, the manner for the processor 702 to obtain the operation record of the user for the version is specifically:
the number of target detection periods, wherein the target detection period is a detection period in which the number of times that a user detects a new version in the target detection period is greater than zero;
the target operation record comprises:
the number of the target detection periods is greater than or equal to the number of the preset target detection periods.
As a possible implementation manner, the manner for the processor 702 to obtain the operation record of the user for the version is specifically:
the version number of the version after the user upgrades the new version;
the target operation record comprises:
the version number of the upgraded version is updated relative to the version number of the version before upgrading.
As a possible implementation manner, the way for the processor 702 to obtain the operation record of the server for the version is specifically:
the version number of the version uploaded by the third party and stored on the server;
the target operation record comprises:
the version number of the version on the server is updated relative to the version number of the version on the terminal device.
In the version detection period adjustment apparatus described in fig. 7, the detection period of the version may be changed according to the operation record for the version, thereby improving the user experience.
In one embodiment, the embodiment of the present invention further discloses a computer storage medium, in which a computer program is stored, and when the computer program in the computer storage medium is read to a computer, the computer is enabled to complete all the steps of the version detection period adjustment method disclosed in the embodiment of the present invention.
It should be noted that, for simplicity of description, the above-mentioned embodiments of the method are described as a series of acts or combinations, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The method and the device for adjusting the version detection period provided by the embodiment of the invention are described in detail, a specific example is applied in the text to explain the principle and the embodiment of the invention, and the description of the embodiment is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.