CN115640034A - Data storage method and device - Google Patents

Data storage method and device Download PDF

Info

Publication number
CN115640034A
CN115640034A CN202211495842.XA CN202211495842A CN115640034A CN 115640034 A CN115640034 A CN 115640034A CN 202211495842 A CN202211495842 A CN 202211495842A CN 115640034 A CN115640034 A CN 115640034A
Authority
CN
China
Prior art keywords
state
application
setting
switch item
switch
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211495842.XA
Other languages
Chinese (zh)
Other versions
CN115640034B (en
Inventor
冯雨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202211495842.XA priority Critical patent/CN115640034B/en
Publication of CN115640034A publication Critical patent/CN115640034A/en
Application granted granted Critical
Publication of CN115640034B publication Critical patent/CN115640034B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Stored Programmes (AREA)

Abstract

The present application relates to the field of data storage technologies, and in particular, to a data storage method and device. The method comprises the following steps: when detecting that a first switch item of a software updating application is set to a second state from a first state, storing setting data of the first switch item in a first database of a setting application; and when the software updating application entering the setting interface is detected, displaying the first switch item as the second state according to the setting data of the first database. According to the scheme of the embodiment of the application, the setting data of the first switch item of the software updating application cannot be deleted when the data of the software updating application is deleted, so that the first switch item of the software updating application can keep the state set by a user.

Description

Data storage method and device
Technical Field
The present application relates to the field of data storage technologies, and in particular, to a data storage method and device.
Background
Electronic devices are often integrated with a settings application. The setting application is an application program for performing personalized setting and rights management on the electronic device. The setting application includes setting options such as system and update, application management, and the like. Wherein a jump to a software update application can be made by setting the "system and update" setting options of the application. The software update application contains a switch item for turning on the automatic downloading of updates to the software. If the user wants to automatically update the application software in the electronic equipment, the user can set the switch item in the software updating application to be in an on state; if the user does not want the application software in the electronic device to be automatically updated, the user can set the switch item in the software updating application to the off state. However, if the user deletes the data related to the software update application, the setting data of the switch item for turning on the automatic download update of the software is also deleted. This results in: the user closes the automatic downloading and updating of the software, but the electronic equipment still automatically downloads the updated software, so that the use experience of the user is reduced.
Disclosure of Invention
The application provides a data storage method and equipment, which can not delete the setting data of a first switch item of a software updating application when deleting the data of the software updating application, thereby enabling the first switch item of the software updating application to keep the state set by a user.
In a first aspect, an embodiment of the present invention provides a data storage method. The method comprises the following steps: when the first switch item of the software updating application is detected to be set from the first state to the second state, the setting data of the first switch item is stored in a first database of the setting application. That is, the embodiment of the present invention stores the setting data of the first switch item of the software update application in the first database of the setting application. The first database of the settings application stores the latest status values set by the user for the software updating application. Alternatively, the first database of the settings application may be a settings database. Optionally, when entering the setting interface of the software update application, the software update application may display the first switch item in the second state according to the setting data of the first database of the setting application. Alternatively, when the software updating application needs to execute the function associated with the first switch item, the software updating application may determine the latest setting state of the first switch item according to the setting data of the first database, thereby deciding whether to execute the function associated with the first switch item. For example, when the first switch item is in the off state, the function associated with the first switch item is not executed; when the first switch item is in an opening state, the function of the first switch item is executed.
In the embodiment of the invention, because the setting data of the first switch item is stored in the first database of the setting application, when the user deletes the data of the software updating application, only the database associated with the software updating application is deleted, and the data in the first database of the setting application is not deleted. Therefore, when the user deletes the data of the software updating application, the software updating application can still acquire the setting state of the first switch item through the first database of the setting application, and the state of the switch item set by the user cannot be lost/changed because the user deletes the data of the software updating application.
Optionally, the first switch item is a switch item automatically downloaded under the WLAN and/or a switch item installed at night.
In some embodiments, the setting of the first switch item of the software update application from the first state to the second state comprises: the first switch item of the software updating application is set to be in a non-default state from a default state; alternatively, the first switch item of the software updating application is set to the default state from the non-default state.
In some embodiments, it is assumed that the user modifies the first switch item of the software update application from a default state to a non-default state. If the electronic equipment executes the method of the embodiment of the invention, the first switch item is still displayed in a non-default state when the user deletes the data of the software updating application and then enters the setting interface of the software updating application again. If the electronic equipment does not execute the method of the embodiment of the invention, the first switch item is still displayed in a default state when the user deletes the data of the software updating application and then enters the setting interface of the software updating application again. Therefore, the method of the embodiment of the invention can keep the first switch item of the software updating application in the state set by the user, and can not lose/change the state set by the user because the user deletes data.
In some embodiments, the default state of the first switch item is an on state and the non-default state is an off state. Of course, the default state of the first switch item may also be an off state, and the non-default state is an on state.
In some embodiments, the software update application is provided with a first memory variable. The software update application may listen to a first database of the setup application through a first memory variable. And when the software updating application detects that the setting data of the first switch item stored in the first database is changed from a first state to a second state, assigning the first memory variable to the second state.
In the above embodiment, the software update application may store the latest setting state of the first switch item through the first memory variable. And the first memory variable is a variable of the software updating application, and the value of the first memory variable cannot be deleted when the data of the software updating application is deleted. When the software update application needs to execute the function of the first switch item, the software update application may determine the latest setting state of the first switch item according to the first memory variable. When a user enters a setting interface of the software updating application, the software updating application can read the value of the first memory variable, and the first switch item is displayed as the second state on the setting interface of the software updating application according to the value of the first memory variable. By the method, the software updating application can acquire the setting state of the first switch item according to the first memory variable, and does not need to access the first database of the setting application every time when the function of the first switch item needs to be executed or every time when the software updating application enters the setting interface of the software updating application, so that the system overhead can be saved.
In some embodiments, after the displaying the first switch item as the second state according to the setting data of the first database when the entering of the setting interface of the software update application is detected, the method further includes: and if the second state is not the preset specified state, displaying first prompt information, wherein the first prompt information is used for prompting whether the first switch item is set to be the preset specified state or not. Alternatively, the preset designated state may be, for example, an on state. Of course, the preset designated state may of course be the off state.
Optionally, if the second state of the first switch item displayed on the software update interface is not the preset designated state, in addition to displaying the first prompt information, an option for setting the number of times of prompting by the first prompt information is also displayed. Optionally, the options for setting the number of times of prompting the first prompt message may include, for example: the first prompt information is only prompted once, and prompt is carried out each time when a setting interface of the software updating application is entered.
And if the selection operation of the user on the options is detected, determining a prompting time threshold of the first prompting information according to the selection operation, wherein the prompting time threshold is used for determining the display time of the first prompting information. For example, if the user selects the first prompt message to prompt only once, the threshold of the number of times of prompting associated with the first prompt message is one. And when the user reenters the setting interface of the software updating application next time, if the state of the first switch item is still not the preset specified state, the first prompt message is not displayed any more.
In a second aspect, an electronic device according to an embodiment of the present invention is characterized by including: the electronic device comprises a memory for storing program instructions and a processor for executing the program instructions, wherein the program instructions, when executed by the processor, trigger the electronic device to perform the method according to the first aspect or any of the first aspects.
In a third aspect, the present invention provides a computer-readable storage medium, in which a computer program is stored, which, when run on an electronic device, causes the electronic device to perform the method according to the first aspect or any one of the first aspects.
It should be understood that the second to third aspects of the embodiments of the present invention are consistent with the technical solution of the first aspect of the present application, and the beneficial effects obtained by the aspects and the corresponding possible implementation are similar, and are not described again.
Drawings
FIG. 1 is a diagram illustrating an embodiment of a software update application entered from a setup application;
fig. 2 is a schematic diagram illustrating a setting of a switch item on a setting interface of a software update application according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating entry into application management from a setup application according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating deletion of data of a software update application according to an embodiment of the present invention;
fig. 5 is a flowchart of a data storage method according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a setup interface of a software update application according to an embodiment of the present invention;
FIG. 7 is a schematic comparison of a setup interface after deleting data of a software update application of a first electronic device;
FIG. 8 is a schematic comparison of a setup interface after deleting data of a software update application of a second electronic device;
FIG. 9 is a schematic diagram illustrating a comparison of the setup interface after deleting the setup data of the second application of the first electronic device;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The terminology used in the description of the embodiments section of the present application is for the purpose of describing particular embodiments of the present application only and is not intended to be limiting of the present application.
Referring to fig. 1, a schematic diagram of entering a software update application from a setup application according to an embodiment of the present invention is provided.
As shown in fig. 1 (a), an icon of a setting application is displayed on a screen interface of an electronic device. After the electronic equipment detects the clicking operation acting on the setting application icon, the electronic equipment jumps to a setting option interface of the setting application.
As shown in fig. 1 (b), the setting option interface of the setting application includes several setting options, such as "system and update" setting option, setting option 2, setting option 3 \8230; \8230, setting option 7. And after detecting the clicking operation acting on the system and update setting option, the electronic equipment jumps to a system and update setting option interface.
As shown in fig. 1 (c), the "system and update" setting option is cascaded with several sub-setting options, such as "software update" setting option, setting option 12, setting option 13 \8230; \8230, setting option 17, etc. After the electronic device detects the click operation acting on the software update setting option, the electronic device jumps to the main interface of the software update application.
Referring to fig. 2, a schematic diagram of setting a switch item on a setting interface of a software update application according to an embodiment of the present invention is provided.
As shown in fig. 2 (a), a set function button is displayed on the main interface of the software updating application. And after detecting the clicking operation acting on the setting function button, the electronic equipment jumps to a setting interface of the software updating application.
As shown in (b) of fig. 2, the setting interface of the software update application displays a switch item for turning on the automatic download update of the software. In some embodiments, the switch item for turning on the automatic downloading of the software update may be implemented as one switch item. When the switch item is set to be in the on state, the electronic equipment can automatically download and update corresponding software installed on the electronic equipment when detecting application software of a new version. In some embodiments, the switch item for turning on the software automatic download update may be implemented as two switch items, one for turning on the software automatic download and the other for performing the software installation based on the downloaded software. As shown in (b) of fig. 2, the switch item for turning on the automatic download update of the software may be implemented as an automatic download switch item under WLAN and a night-time installed switch item. When the switch item automatically downloaded under the WLAN is kept on, the electronic equipment can automatically download the upgrade package or the update application of the application software installed on the electronic equipment when the WLAN is connected. When the night-time installation switch item is kept on, the electronic device can automatically install and restart the downloaded upgrade package at 2.
In some embodiments, if the user does not want the electronic device to automatically download under the WLAN, the automatically downloaded switch item under the WLAN may be set to the off state. If the user does not want the electronic device to automatically install the software package, the night-time installed switch item may be set to the off state.
In some embodiments, the default state of the WLAN automatic download and night time install switch items is the on state and the non-default state is the off state. In some embodiments, the default state of the WLAN automatic download and night time install switch items is the off state and the non-default state is the on state. Optionally, the default state of the automatic download and night installation switch item under the WLAN refers to a state of the automatic download and night installation switch item under the WLAN when the electronic device is first powered on or is first powered on after formatting.
As shown in fig. 2 (b), the default state of the WLAN down automatic download and night installation switch items is the on state. If the user does not want the electronic device to automatically download under the WLAN and does not want to install the automatically downloaded software at night, the user can set the switch items of the automatic download under the WLAN and the night installation to the off state. As shown in (b) of fig. 2, when the electronic apparatus detects a left-sliding motion of the WLAN under automatic download and night-time installed switch item, the WLAN under automatic download and night-time installed switch item is set from the on state to the off state, as shown in (c) of fig. 2. Accordingly, in the state shown in fig. 2 (c), when the electronic apparatus detects a right-slide motion of the switch items for automatic download under WLAN and night installation, the switch items for automatic download under WLAN and night installation are set from the off state to the on state.
In some embodiments, when the electronic device detects that the switch item for automatic download under the WLAN and night installation is set to the off state from the on state, or the electronic device detects that the switch item for automatic download under the WLAN and night installation is set to the on state from the off state, the electronic device stores setting data of the switch item in the database of the software update application.
Referring to fig. 3, a schematic diagram of entering application management from a setup application according to an embodiment of the present invention is provided.
As shown in (a) of fig. 3, the setting options of the setting application include an "application" setting option. After the electronic device detects the click operation acting on the application setting option, the electronic device jumps to the application setting option interface.
As shown in fig. 3 (B), the "application" setting option has several sub-setting options cascaded, such as "application management" setting option, setting option a, setting option B \8230, setting option F, and the like. After the electronic equipment detects the click operation acting on the application management setting option, the electronic equipment jumps to an interface of application management setting option cascade.
As shown in (c) of fig. 3, the interface of the "application management" setting option cascade displays a list of applications installed by the electronic device. Such as including: the method comprises the following steps of software updating application, application 1, application 2, 8230, 8230and application 6. When the electronic equipment detects the click operation acting on the software update option, the electronic equipment jumps to the application information interface schematic diagram of the software update application.
Referring to fig. 4, a schematic diagram of deleting data of a software update application according to an embodiment of the present invention is provided. As shown in fig. 4 (a), information such as notification management, authority, traffic usage, storage, and memory of the software update application is displayed on the application information interface of the "software update" application. When the electronic equipment detects the click operation on the storage option, the electronic equipment jumps to a storage information interface of the software updating application.
As shown in (b) of fig. 4, how much memory space the application and the data of the software update application occupy respectively, and how much memory space the application and the data of the software update application occupy in total can be displayed on the storage information interface of the software update application. Optionally, the information storage interface of the software update application is further provided with a "delete data" function button. And when the electronic equipment detects the clicking operation of the 'delete data' function button, the electronic equipment jumps to a prompt interface for deleting the software updating application data.
As shown in fig. 4 (c), a prompt message indicating whether to delete the selected application data is displayed on the prompt interface. And if the electronic equipment detects the clicking operation of the determined button, deleting the data of the software updating application by the electronic equipment. Optionally, the electronic device deletes all files, settings, accounts, and databases of the software update application. In which, in conjunction with the descriptions of (a) to (c) in fig. 2, the setting data of the switching items automatically downloaded under the WLAN and installed at night is stored in the database of the software updating application. If the data deletion is performed for the software update application, the setting data of the switch items automatically downloaded under the WLAN and installed at night are also deleted. Accordingly, the switch items automatically downloaded under the WLAN and installed at night are also restored to the default state. That is, if the switch items for automatic download under WLAN and night installation are set from default on to non-default off state, the switch items for automatic download under WLAN and night installation are restored to on state after deleting data of the software updating application. Then, when the electronic device connects to the WLAN, the electronic device will still automatically download the upgrade package or update application of the application software installed by the electronic device. When the upgrade package is in the range of 2. Therefore, after the user closes the automatic downloading and night installation under the WLAN, the electronic equipment still can automatically download and install the software updating package, and the user experience is reduced.
To avoid this situation, an embodiment of the present invention provides a data storage method. The method of the embodiment of the invention stores the data of the relevant switch items of the software updating application in the database of the setting application. When the user deletes the data of the software updating application, the setting data of the relevant switch item of the software updating application is not deleted, thereby making it possible to maintain the switch item of the software updating application in the state set by the user.
Referring to fig. 5, a flowchart of a data storage method according to an embodiment of the present invention is provided. The method shown in fig. 5 is applied to an electronic device. The electronic device is installed with a setting application and a software updating application. More specifically, the software update application is used to execute the method of the embodiment of the present invention. The method shown in fig. 5 comprises:
201, when a first switch item of the software updating application is set from a first state to a second state, setting data of the first switch item is stored in a first database of the setting application. Optionally, the first switch item includes a switch item automatically downloaded under WLAN and/or a switch item installed at night. In some embodiments, the first switch entry includes an auto download under WLAN switch entry and a night install switch entry.
In some embodiments, setting the first switch item of the software update application from the first state to the second state comprises: setting a first switch item of the software updating application from a default state to a non-default state; alternatively, the first switch item of the software update application is set from a non-default state to a default state.
In some embodiments, the default state of the first switch item is an on state, and the non-default state is an off state; or the default state of the first switch item is the off state, and the non-default state is the on state.
In some embodiments, the first database of the application is set to the settings database.
202, when entering the setting interface of the software updating application again, the software updating application displays the first switch item as the second state according to the setting data of the first database.
In the embodiment of the present invention, the setting data of the first switch item of the software update application is stored in the settings database of the setting application. The software updating application performs the function of the first switch item according to the setting data of the settings database of the settings application. When the user enters the setting interface of the software updating application, the software updating application displays the setting state of the first switch item according to the setting data of the settings database. In some scenarios, if the user deletes the data of the software update application, the setting data of the first switch item of the software update application may not be deleted because the setting data of the first switch item is stored in the database of the setting application. Therefore, the software update application still performs the function of the first switch item according to the state set by the user. When the user enters the setting interface of the software updating application again, the display state of the first switch item remains the setting state of the user.
In some embodiments, the software update application is provided with a first memory variable. The software update application may listen to a first database of the setup application through a first memory variable. And when the software updating application detects that the setting data of the first switch item stored in the first database is changed from the first state to the second state, assigning the first memory variable to the second state. Because the first memory variable is a variable applied by the software updating, the value of the first memory variable cannot be deleted when the data applied by the software updating is deleted. Therefore, even if the data of the software update application is deleted, the software update application can still acquire the setting state of the first switch item through the first memory variable. When the software updating application needs to execute the function of the first switch item, the software updating application may determine the latest setting state of the first switch item according to the first memory variable. And when the software updating application detects that the software updating application enters the setting interface of the software updating application, the software updating application displays the state of the first switch item according to the first memory variable. In this way, the software updating application can obtain the latest setting state of the first switch item based on the first memory variable, and does not need to access the first database of the setting application every time the function of the first switch item needs to be executed or every time the software updating application enters the setting interface of the software updating application, so that the system overhead can be saved.
In some embodiments, the first switch item is displayed in the second state when a settings interface of the software update application is entered. And if the second state is not the preset specified state, displaying first prompt information on a setting interface of the software updating application, wherein the first prompt information is used for prompting whether the first switch item is set to be the preset specified state or not. Optionally, the preset designated state may be set as needed. For example, the predetermined designated state is an on state. Or presetting the designated state as the default state of the first switch item. By the method, the user can be reminded to set the first switch item to be in the preset specified state in time.
In some embodiments, if the second state displayed by the first switch item is not the preset designated state, an option for setting the number of times of prompting by the first prompt information is also displayed in addition to the first prompt information on the setting interface of the software update application. Optionally, the options for setting the number of times of prompting the first prompt message may include, for example: the first prompt information is only prompted once, and prompt is carried out each time when a setting interface of the software updating application is entered.
And if the selection operation of the user on the options is detected, determining a prompting time threshold of the first prompting information according to the selection operation, wherein the prompting time threshold is used for determining the display time of the first prompting information. For example, if the user selects the first prompt message to prompt only once, the threshold of the number of times of prompting associated with the first prompt message is one. And when the user enters the setting interface of the software updating application next time, if the state of the first switch item is not the preset specified state, the first prompt message is not displayed any more. By the method, the influence on user experience caused by frequently displaying the first prompt information can be avoided.
In some embodiments, the first switching item includes: auto download and night install switch items under WLAN. The default states of automatic download and night installation under WLAN are on states. Assume that the user sets the WLAN down auto download and night install switch items from default on to off state. And when the user enters the setting interface of the software updating application again, displaying the first prompt message. As shown in fig. 6, the first prompt message may be, for example: whether to set the automatic download under WLAN and night installation to on state. In some embodiments, the settings interface of the software update application may display an option of "whether the reminder is to be reminded only once" in addition to the first reminder information. If the user has selected the reminder only once, the software update application sets the threshold number of reminders to 1. Then, when the user enters the setting interface of the software updating application again, if the switch items automatically downloaded under the WLAN and installed at night are still in the closed state, determining whether the prompting times of the first prompting information exceed the threshold of the prompting times; if yes, no first prompt message is displayed; and if not, displaying the first prompt message.
The data storage method of the present invention will be described below with reference to specific embodiments. In the following specific embodiment, the first switch item of the software update application includes: and automatically downloading and installing switch items at night under the WLAN. The default state for automatic download and night installation under WLAN is on state.
Example 1
The software update application of the first electronic device performs the data storage method of the embodiment of the invention. Referring to fig. 7, a schematic diagram of a comparison of the interface set after the data of the software update application of the first electronic device is deleted.
The first electronic device displays the interface shown in (a) in fig. 7 based on the steps shown in (a) in fig. 1 to (b) in fig. 2. Fig. 7 (a) is a setting interface of the software update application of the first electronic device. The setting interface of the software updating application displays the switching items of automatic downloading and night installation under the WLAN. If the user does not modify the switch items for automatic downloading under the WLAN and night installation, the switch items for automatic downloading under the WLAN and night installation of the first electronic equipment default to the on state. When the first electronic device detects an operation of setting the switch items of the automatic download under the WLAN and the night installation to the off state by the user, the first electronic device displays an interface shown in (b) of fig. 7. As shown in (b) of fig. 7, the first electronic device responds to an operation of setting the switching items of the automatic download under WLAN and the night installation to the off state. The method specifically comprises the following steps: and displaying the switch items of the WLAN automatic downloading and night installation on the setting interface of the software updating application of the first electronic equipment as a closed state. The first electronic device no longer performs operations of automatic downloading and night installation of the software upgrade package under the WLAN. Further comprising: the first electronic device stores setting data in which the switch items automatically downloaded under the WLAN and installed at night are in the off state in a settings database of the setting application. Optionally, the software update application is provided with a first memory variable. When the software updating application detects that the setting data of the switch items automatically downloaded under the WLAN and installed at night in the settings database is changed, the changed setting data is assigned to the first memory variable. In the example given in fig. 7 (b), the software update application assigns the switch items for automatic download under WLAN and night installation to the first memory variable in the off state. And then, when the first electronic equipment is connected with the WLAN, determining that the switch item automatically downloaded under the WLAN is in a closed state according to the first memory variable, and not executing the operation of automatically downloading the upgrade package or updating the application under the WLAN. At night 02.
Based on the steps shown in fig. 3 (a) to fig. 4 (c), the first electronic device enters the interface shown in fig. 7 (c). Fig. 7 (c) is a data prompt interface for the first electronic device to delete the software update application. As shown in fig. 7 (c), when the first electronic device detects an operation of deleting data of the software update application, the data of the related file and the database of the software update application is deleted. Optionally, the deleting operation does not delete the operation of setting the first database of the application, and does not delete the first memory variable of the software update application. After the data of the software updating application is deleted, when the first electronic device is connected with the WLAN again, the switch item automatically downloaded under the WLAN is determined to be in the closed state according to the first memory variable, and then the first electronic device does not execute the operation of automatically downloading the upgrade package or updating the application under the WLAN any more. At night time 02.
As shown in fig. 7 (d), after the data of the software update application is deleted, when the setting interface of the software update application of the first electronic device is entered again, the software update application reads the value of the first memory variable. And the value of the first memory variable is that the switch items of automatic downloading under the WLAN and night installation are both in an off state. And according to the value of the first memory variable, displaying the switch items which are automatically downloaded under the WLAN and installed at night in the setting interface of the software updating application as the closed state.
As shown in fig. 7 (d), when the first electronic device enters the setting interface of the software update application again after deleting the data of the software update application, the setting interface of the software update application may further display first prompt information. The first prompt message includes: whether to set automatic download under WLAN and night installation to on state. Optionally, the setting interface of the software update application may further set an option of "whether the reminder is to be reminded only once". If the user does not check the option, when entering the setting interface of the software updating application next time, the setting interface of the software updating application displays the first prompt information and the option of 'whether the prompt is only prompted once' again. If the user clicks the option, the setting interface of the software updating application does not display the first prompt information any more when entering the setting interface of the software updating application next time, and the switch items of the WLAN automatic downloading and night installation setting are still displayed in the closed state.
Therefore, based on the method provided by the embodiment of the invention, the setting data of the switch item of the software updating application cannot be deleted when the data of the software updating application is deleted, so that the switch item of the software updating application can keep the state set by the user.
It should be noted that, if the first electronic device detects that the data of the setting application is deleted, the first electronic device may filter the data in the first database of the setting application. If the data of the application is set, deleting the data; if the data of the application itself is not set, the data is not deleted. For example, the first database of the setting application stores setting data of the above-described switch item of the software updating application, and the deletion is not performed if the setting data is not data of the setting application itself. By the method, the switch item data of the software updating application can be prevented from being deleted when the data of the setting application is deleted.
Example two
The software update application of the second electronic device does not perform the data storage method of the embodiments of the present invention. Referring to fig. 8, a schematic diagram of a comparison of the interface after deleting the data of the software update application of the second electronic device is set.
The second electronic device displays the interface shown in (a) of fig. 8 based on the steps shown in (a) of fig. 1 to (b) of fig. 2. Fig. 8 (a) is a setting interface of the software update application of the second electronic device. The setting interface of the software updating application displays the switching items of automatic downloading and night installation under the WLAN. And if the user does not modify the switch items of the WLAN automatic download and night installation, the switch items of the WLAN automatic download and night installation of the second electronic equipment default to the on state. When the second electronic device detects an operation of setting the switch items of the automatic download under the WLAN and the night installation to the off state by the user, the second electronic device displays an interface shown in (b) in fig. 8. As shown in (b) of fig. 8, the second electronic device responds to an operation of setting the switching items of the automatic download under WLAN and the night installation to the off state. The method specifically comprises the following steps: and the switch items of the WLAN automatic downloading and night installation on the setting interface of the software updating application of the second electronic equipment are displayed in the closed state. The second electronic device stores the setting data of the switch items that are automatically downloaded under the WLAN and installed at night in the off state in a database of the software update application, which is called a second database. And then, when the second electronic equipment is connected with the WLAN, determining that the switch item automatically downloaded under the WLAN is in a closed state according to the second database, and not executing the operation of automatically downloading the upgrade package or updating the application under the WLAN. At night 02.
Based on the steps shown in fig. 3 (a) -4 (c), the second electronic device enters the interface shown in fig. 8 (c). Fig. 8 (c) is a data prompt interface for the second electronic device to delete the software update application. As shown in fig. 8 (c), when the second electronic device detects an operation of deleting data of the software update application, the data of the related file and the database of the software update application is deleted. Optionally, the deleting operation deletes the setting data of the second database, that is, deletes the setting data of the WLAN automatic download and night installation switch items. The setting states of the automatic download and night installation switch items under the WLAN are restored to default states. Optionally, the setting states of the automatic download and night installation switch items under the WLAN are restored to the on state.
As shown in (d) of fig. 8, when the data of the software update application is deleted and the setting interface of the software update application of the second electronic device is entered again, the software update application determines that the switch items of the automatic download under the WLAN and the night installation are in the on state according to the second database. Accordingly, as shown in (d) of fig. 8, the switch items of the WLAN down automatic download and the night installation in the software update application setting interface are also displayed in the on state. Optionally, after the data of the software update application is deleted, when the second electronic device connects to the WLAN again, the switch item automatically downloaded under the WLAN is determined to be in the on state according to the second database, and then the second electronic device executes an operation of automatically downloading the upgrade package or updating the application under the WLAN. At night time 02.
It can be seen that, when the software update application of the second electronic device does not execute the method according to the embodiment of the present invention, if the data of the software update application is deleted, the setting data of the user to the software update application switch item is correspondingly deleted. The associated switch entry of the software update application will revert to the default state. It may happen that the user makes some settings for the software updating application, but the software updating application autonomously returns to the default state, thereby affecting the user experience.
Example three
The second application of the first electronic device does not execute the data storage method of the embodiment of the present invention. The second application is a different application than the software update application. Referring to fig. 9, a schematic diagram of a comparison of the setting interface after deleting the setting data of the second application of the first electronic device is shown. Fig. 9 (a) is a font size setting interface for the second application of the first electronic device. The font size setting interface of the second application displays a slide bar for adjusting the font size. Optionally, the sliding bar is provided with font scales, and different font scales correspond to different font sizes. Optionally, a font adjusting control is arranged on the sliding bar. The position of the font adjustment control at the sliding bar is used for indicating the font size currently set by the second application. As shown in fig. 9 (a), the font size of the second application defaults to the standard size. The font adjustment control is located on a font scale of the standard font size. When the first electronic equipment detects that the user slides the font adjusting control to the right, the font displayed by the second application is increased; and when the first electronic equipment detects that the font adjusting control is slid leftwards by the user, the font displayed by the second application is reduced. As shown in fig. 9 (b), when the first electronic device detects that the user slides the font adjustment control to the right to a certain font scale, the font displayed by the second application is changed from the standard font to the font size indicated by the font scale. Optionally, the currently set font size of the second application is stored in a database of the second application.
As shown in (c) of fig. 9, if the user deletes the setting data of the second application, the font size set by the second application is deleted accordingly. The font size displayed by the second application is restored to the standard font size. When the font size setting interface of the second application is entered again, the font adjustment control remains on the standard font size font scale, as shown in fig. 9 (d).
It can be seen that, when the second application of the first electronic device does not execute the method according to the embodiment of the present invention, if the data of the second application is deleted, the setting data of the user for the second application is correspondingly deleted, and the second application is restored to the default state. It may happen that the user makes some settings for the second application, but the second application autonomously reverts to the default state, thereby affecting the user experience.
Fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. As shown in fig. 10, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identification Module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, or the like.
It is to be understood that the illustrated structure of the embodiment of the present invention does not specifically limit the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or combine certain components, or split certain components, or arrange different components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processor (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), among others. The different processing units may be separate devices or may be integrated into one or more processors.
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may be a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), or the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, the external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capability of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in the external memory card.
In some embodiments, the internal memory 121 may be used to store computer-executable program code, which includes instructions. The internal memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The storage data area may store data (such as audio data, phone book, etc.) created during use of the electronic device 100, and the like. In addition, the internal memory 121 may include a high speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a Universal Flash Storage (UFS), and the like. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor. In the embodiment of the present invention, the processor 110 may implement the data storage method of the embodiment of the present invention by executing instructions stored in the internal memory 121, and/or instructions stored in a memory provided in the processor.
The embodiment of the invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, and when the instructions are run on a computer, the instructions enable the computer to execute the data storage method of the embodiment of the invention.
Embodiments of the present invention further provide a computer program product containing instructions, which when executed on a computer or any at least one processor, causes the computer to perform the steps of the data storage method according to embodiments of the present invention.
The embodiment of the present invention further provides a chip, which includes a processor and a data interface, where the processor reads an instruction stored in a memory through the data interface to execute corresponding operations and/or processes of the method according to the embodiment of the present invention.
Optionally, the chip further comprises a memory, the memory is connected with the processor through a circuit or an electric wire, and the processor is used for reading and executing the computer program in the memory. Further optionally, the chip further comprises a communication interface, and the processor is connected to the communication interface. The communication interface is used for receiving data and/or information needing to be processed, and the processor acquires the data and/or information from the communication interface and processes the data and/or information. The communication interface may be an input output interface.
The memory may be a read-only memory (ROM), other types of static storage devices that may store static information and instructions, a Random Access Memory (RAM), or other types of dynamic storage devices that may store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, blu-ray disc, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, etc.
The electronic device, the computer storage medium, or the computer program product provided in the embodiments of the present application are all configured to execute the corresponding method provided above, and therefore, the beneficial effects achieved by the electronic device, the computer storage medium, or the computer program product may refer to the beneficial effects in the corresponding method provided above, and are not described herein again.
In the embodiments of the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, and indicates that three relationships may exist, for example, a and/or B, and may indicate that a exists alone, a and B exist simultaneously, and B exists alone. Wherein A and B can be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" and the like, refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c may represent: a, b, c, a and b, a and c, b and c or a and b and c, wherein a, b and c can be single or multiple.
Those of ordinary skill in the art will appreciate that the various elements and algorithm steps described in connection with the embodiments disclosed herein can be implemented as electronic hardware, computer software, or combinations of electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It can be clearly understood by those skilled in the art that, for convenience and simplicity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, any function, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present disclosure, and all the changes or substitutions should be covered by the protection scope of the present application. The protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method of storing data, comprising:
when detecting that a first switch item of a software updating application is set to a second state from a first state, storing setting data of the first switch item in a first database of a setting application;
and when the software updating application entering the setting interface is detected, displaying the first switch item as the second state according to the setting data of the first database.
2. The method of claim 1, wherein the first switching item is set from a first state to a second state, comprising:
the first switch item is set to be in a non-default state from a default state; or,
the first switch item is set to be in a default state from a non-default state.
3. The method of claim 2, wherein the default state of the first switch item is an on state, and the non-default state is an off state; or,
the default state of the first switch item is a closed state, and the non-default state is an open state.
4. The method of any of claims 1 to 3, wherein the first switching term comprises:
and the switch items are automatically downloaded under the WLAN and/or installed at night.
5. The method of claim 1, further comprising:
setting a first memory variable;
and when the setting data of the first switch item stored in the first database is detected to be changed from a first state to a second state, assigning the first memory variable to the second state.
6. The method of claim 5, wherein displaying the first switch item in the second state according to the setting data of the first database when the entry into the setting interface of the software update application is detected comprises:
when the software updating application entering a setting interface is detected, reading the value of the first memory variable;
and displaying the first switch item as the second state on a setting interface of a software updating application according to the value of the first memory variable.
7. The method of claim 1, wherein after displaying the first switch item in the second state according to the setting data of the first database upon detecting entry into a setting interface of a software update application, the method further comprises:
and if the second state is not the preset specified state, displaying first prompt information, wherein the first prompt information is used for prompting whether the first switch item is set to be the preset specified state or not.
8. The method of claim 7, wherein if the second state is not a predetermined designated state, in addition to displaying the first prompt message, the method further comprises:
displaying options for setting the prompting times of the first prompt message;
and if the selection operation of the user on the option is detected, determining a prompt frequency threshold of the first prompt message according to the selection operation, wherein the prompt frequency threshold is used for determining the display frequency of the first prompt message.
9. An electronic device, comprising: the electronic device comprises a memory for storing program instructions and a processor for executing the program instructions, wherein the program instructions, when executed by the processor, trigger the electronic device to perform the method according to any of the claims 1-8.
10. A computer-readable storage medium, in which a computer program is stored which, when run on an electronic device, causes the electronic device to perform the method according to any one of claims 1-8.
CN202211495842.XA 2022-11-28 2022-11-28 Data storage method and device Active CN115640034B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211495842.XA CN115640034B (en) 2022-11-28 2022-11-28 Data storage method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211495842.XA CN115640034B (en) 2022-11-28 2022-11-28 Data storage method and device

Publications (2)

Publication Number Publication Date
CN115640034A true CN115640034A (en) 2023-01-24
CN115640034B CN115640034B (en) 2023-06-02

Family

ID=84948288

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211495842.XA Active CN115640034B (en) 2022-11-28 2022-11-28 Data storage method and device

Country Status (1)

Country Link
CN (1) CN115640034B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116954782A (en) * 2023-03-31 2023-10-27 荣耀终端有限公司 Software inspection state display method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110055278A1 (en) * 2009-08-31 2011-03-03 Lenovo (Singapore) Pte. Ltd. Setting Information Database Management
CN102696014A (en) * 2009-08-10 2012-09-26 赛门铁克公司 System and method for updating a software product
CN102830995A (en) * 2012-08-03 2012-12-19 广东欧珀移动通信有限公司 Method for upgrading Android platform software with user data reserved
CN109614161A (en) * 2018-10-15 2019-04-12 平安科技(深圳)有限公司 Functional switch state switching method, device, medium and computer equipment
CN111632375A (en) * 2020-05-28 2020-09-08 腾讯科技(深圳)有限公司 Interactive object display method and device, storage medium and electronic device
CN112379948A (en) * 2020-12-02 2021-02-19 腾讯科技(深圳)有限公司 Program configuration management method and device, storage medium and electronic equipment
CN112988213A (en) * 2021-04-13 2021-06-18 荣耀终端有限公司 Program data updating method, electronic equipment and computer storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102696014A (en) * 2009-08-10 2012-09-26 赛门铁克公司 System and method for updating a software product
US20110055278A1 (en) * 2009-08-31 2011-03-03 Lenovo (Singapore) Pte. Ltd. Setting Information Database Management
CN102830995A (en) * 2012-08-03 2012-12-19 广东欧珀移动通信有限公司 Method for upgrading Android platform software with user data reserved
CN109614161A (en) * 2018-10-15 2019-04-12 平安科技(深圳)有限公司 Functional switch state switching method, device, medium and computer equipment
CN111632375A (en) * 2020-05-28 2020-09-08 腾讯科技(深圳)有限公司 Interactive object display method and device, storage medium and electronic device
CN112379948A (en) * 2020-12-02 2021-02-19 腾讯科技(深圳)有限公司 Program configuration management method and device, storage medium and electronic equipment
CN112988213A (en) * 2021-04-13 2021-06-18 荣耀终端有限公司 Program data updating method, electronic equipment and computer storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116954782A (en) * 2023-03-31 2023-10-27 荣耀终端有限公司 Software inspection state display method and device

Also Published As

Publication number Publication date
CN115640034B (en) 2023-06-02

Similar Documents

Publication Publication Date Title
KR102255952B1 (en) Method And Apparatus For Updating Application
US9052927B2 (en) Mobile terminal and method of setting an application indicator therein
EP2506116A1 (en) Reduced power consumption notification system, terminal device, method, and program
US11429256B2 (en) Electronic device for controlling application program and control method thereof
US8910077B2 (en) Information processing device and computer readable medium
US10186244B2 (en) Sound effect processing method and device, plug-in unit manager and sound effect plug-in unit
EP2328062A2 (en) Flexible home page layout for mobile devices
RU2615682C2 (en) Method, device, server and terminal for visitting web pages
KR100679413B1 (en) Selective recovery method and apparatus of data in mobile communication terminal
JP4768735B2 (en) Portable wireless communication device and method for updating software
CN108279861B (en) Volume adjusting method and device and storage medium
CN106775903B (en) Security policy file updating method and device
CN115640034B (en) Data storage method and device
KR102354016B1 (en) Method for changing the size of contents displayed on display and electronic device thereof
CN110888688B (en) Setting restoration method of electronic equipment and electronic equipment
US8661445B2 (en) Information-processing device and program
JP7244231B2 (en) ELECTRONIC DEVICE, CONTROL PROGRAM AND DISPLAY CONTROL METHOD
JP2006268160A (en) Portable information processor, and installation method
JP4902713B2 (en) Information processing method, information processing apparatus, and program
KR20160147459A (en) Application Operating Method and electronic device using the same
JP2011099977A (en) Display controller and program therefor
CN115098128A (en) Software updating method, device, equipment and storage medium
JP5464801B2 (en) Electronics
CN108334263B (en) Display control device and display control method
CN113589745A (en) Vehicle remote control method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant