CN115640034B - Data storage method and device - Google Patents

Data storage method and device Download PDF

Info

Publication number
CN115640034B
CN115640034B CN202211495842.XA CN202211495842A CN115640034B CN 115640034 B CN115640034 B CN 115640034B CN 202211495842 A CN202211495842 A CN 202211495842A CN 115640034 B CN115640034 B CN 115640034B
Authority
CN
China
Prior art keywords
state
application
setting
switch item
electronic device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211495842.XA
Other languages
Chinese (zh)
Other versions
CN115640034A (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 disclosure relates to the field of data storage technologies, and in particular, to a data storage method and apparatus. 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 the setting application; and when the setting interface of the software updating application is detected to be entered, displaying the first switch item to be in the second state according to the setting data of the first database. According to the embodiment of the application, the setting data of the first switch item of the software updating application is not 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 disclosure relates to the field of data storage technologies, and in particular, to a data storage method and apparatus.
Background
Electronic devices are typically integrated with a setup application. The setting application is an application program for personalized setting and rights management of the electronic device. The setup application contains system and update, application management, etc. setup options. Wherein the "system and update" settings option of the settings application may be jumped to the software update application. The software update application contains a switch item for opening an automatic download update of the software. If the user wishes to automatically update the application software in the electronic device, the user can set the switch item in the software update application to an on state; if the user does not wish to automatically update the application software in the electronic device, the user may set the switch item in the software update application to an off state. But if the user deletes the related data of the software update application, the setting data of the switch item for starting the automatic download update of the software is also deleted. This occurs as follows: the user closes the automatic download updating of the software, but the electronic equipment can automatically download the updated software, so that the use experience of the user is reduced.
Disclosure of Invention
The application provides a data storage method and device, wherein setting data of a first switch item of a software update application is not deleted when the data of the software update application is deleted, so that the first switch item of the software update application can keep a 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 to the second state from the first state, 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 setup application stores the latest state values set by the user for the software update application. Alternatively, the first database of the setup application may be a settings database. Alternatively, when entering the setting interface of the software update application, the software update application may display the first switching item in the second state according to the setting data of the first database of the setting application. Alternatively, when the software update application needs to perform the function associated with the first switch item, the software update 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 perform 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 on state, the function of the first switch item is executed.
In the embodiment of the invention, since 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 update application, the software update application can still acquire the setting state of the first switch item through the first database of the setting application, and the switch item state set by the user is not lost/changed because the user deletes the data of the software update application.
Optionally, the first switching item is a switching item automatically downloaded under the WLAN and/or a switching item installed at night.
In some embodiments, the first switch item of the software update application is set from a first state to a second state, comprising: the first switch item of the software updating application is set to a non-default state from a default state; alternatively, the first switch item of the software update application is set to a default state from a 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, when the user enters the setting interface of the software updating application again after deleting the data of the software updating application, the first switch item is still displayed in a non-default state. If the electronic equipment does not execute the method of the embodiment of the invention, the first switch item is still displayed as a default state when the user enters the setting interface of the software updating application again after deleting the data of the software updating application. Therefore, by the method, the first switch item of the software updating application can keep the state set by the user, and the state set by the user cannot be lost/changed due to the fact that the user deletes the 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 be an off state, and the non-default state may be an on state.
In some embodiments, the software update application is provided with a first memory variable. The software update application may monitor the first database of the setup application via the 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 is not deleted when the data of the software updating application is deleted. When the software update application needs to perform 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 according to the value of the first memory variable, the first switch item is displayed to be in the second state on the setting interface of the software updating application. By the method, the software updating application can acquire the setting state of the first switch item according to the first memory variable, and the first database of the setting application is not required to be accessed each time the function of the first switch item is required to be executed or each time the setting interface of the software updating application is entered, so that the system overhead can be saved.
In some embodiments, after the detecting that the setting interface of the software update application is entered, the method further includes, after displaying the first switch item to the second state according to the setting data of the first database: 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 in the preset specified state. Alternatively, the preset specified state may be, for example, an on state. Of course, the preset specified state may be an off state.
Optionally, if the second state of the first switch item displayed on the software update interface is not the preset specified state, an option for setting the number of prompts of the first prompt information is displayed in addition to the first prompt information. Optionally, the options for setting the number of first prompt messages may include: the first prompting information prompts only once, prompts each time a setting interface of the software update application is entered, and the like.
If the selected operation of the user on the options is detected, determining a prompting times threshold of the first prompting information according to the selected operation, wherein the prompting times threshold is used for determining the displaying times of the first prompting information. For example, when the user selects the first prompt information to prompt only once, the threshold of the prompting times associated with the first prompt information is once. 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 designated state, the first prompt message is not displayed any more.
In a second aspect, an embodiment of the present invention is an electronic device, 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 one of the first aspects described above.
In a third aspect, embodiments of the present invention provide a computer readable storage medium having a computer program stored therein, 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 solutions of the first aspect of the present application, and the beneficial effects obtained by each aspect and the corresponding possible implementation manner are similar, and are not repeated.
Drawings
FIG. 1 is a schematic diagram of a software update application entered from a setup application provided by an embodiment of the present invention;
FIG. 2 is a schematic diagram of setting a switching item in a setting interface of a software update application according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an embodiment of the present invention for entering application management from a setup application;
FIG. 4 is a schematic diagram of deleting 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 for a software update application according to an embodiment of the present invention;
FIG. 7 is a comparative schematic diagram of a setup interface after deleting data of a software update application of a first electronic device;
FIG. 8 is a comparative schematic diagram of a setup interface after deleting data of a software update application of a second electronic device;
FIG. 9 is a schematic diagram showing a comparison of the setting interface after deleting the setting 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 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 a software update application entering from a setup application is provided in an embodiment of the present invention.
As shown in (a) of fig. 1, an icon of the setting application is displayed on a screen interface of the electronic device. After the electronic equipment detects the clicking operation acted on the icon of the setting application, the electronic equipment jumps to the setting option interface of the setting application.
As shown in fig. 1 (b), the setup option interface of the setup application includes several setup options, such as "system and update" setup option, setup option 2, setup option 3 … …, setup option 7. After detecting the clicking operation on the setting options of the system and the update, the electronic equipment jumps to the setting option interface of the system and the update.
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 … … setting option 17, etc. After the electronic device detects a click operation 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 switching item in 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 update application. After detecting the clicking operation on the setting function button, the electronic equipment jumps to the setting interface of the software updating application.
As shown in (b) of fig. 2, the setup interface of the software update application displays a switch item for starting the automatic download update of the software. In some embodiments, the switch item for turning on the software auto-download update may be implemented as one switch item. When the switch item is set to be in an on state, the electronic equipment can automatically download and update corresponding software installed on the electronic equipment when detecting new version of application software. In some embodiments, the switch item for initiating the automatic download update of the software may be implemented as two switch items, one for initiating the automatic download of the software and the other for performing the installation of the software based on the downloaded software. As shown in (b) of fig. 2, the switching item for turning on the software auto-download update may be implemented as a switching item for automatic download under WLAN and a switching item for night installation. When the switch item automatically downloaded under the WLAN is kept on, the electronic equipment can automatically download an upgrade package or update application of application software installed by the electronic equipment when the WLAN is connected. When the switch item installed at night is kept on, the electronic device can automatically install and restart the downloaded upgrade package at 2:00-4:00.
In some embodiments, if the user does not wish the electronic device to download automatically under the WLAN, the automatically downloaded switch item under the WLAN may be set to an off state. If the user does not wish the electronic device to automatically install the software package, the night installed switch item may be set to an off state.
In some embodiments, the default state of the auto download and night install switch item under the WLAN is an on state and the non-default state is an off state. In some embodiments, the default state of the auto download and night install switch item under the WLAN is an off state and the non-default state is an on state. Optionally, the default state of the automatic download and night install switch item under the WLAN refers to the state of the automatic download and night install switch item under the WLAN when the electronic device is first powered on or first powered on after being formatted.
As shown in fig. 2 (b), the default state of the automatic download and night install switch item under the WLAN is the on state. If the user does not wish the electronic device to download automatically under the WLAN and does not wish to install the automatically downloaded software at night, the user may set the switch item for automatic download under the WLAN and night installation to an off state. When the electronic device detects a left-hand sliding motion of the automatically downloaded and night-installed switching item under the WLAN as shown in (b) of fig. 2, the automatically downloaded and night-installed switching item under the WLAN is set from an on state to an off state as shown in (c) of fig. 2. Accordingly, in the state shown in fig. 2 (c), when the electronic device detects a right-hand sliding motion of the switch item for automatic download and night installation under the WLAN, the switch item for automatic download and night installation under the WLAN is set from the off state to the on state.
In some embodiments, when the electronic device detects that the switch item automatically downloaded and installed at night under the WLAN is set to the off state from the on state, or when the electronic device detects that the switch item automatically downloaded and installed at night under the WLAN is set to the on state from the off state, the electronic device stores setting data of the switch item in a database of the software update application.
Referring to fig. 3, a schematic diagram of entering application management from a setting application is provided in an embodiment of the present invention.
As shown in (a) of fig. 3, the setting options of the setting application include an "application" setting option. After the electronic device detects a click operation on the "application" setting option, the electronic device jumps to the setting option interface of the "application".
As shown in (B) of fig. 3, the "application" setting option is cascaded with several sub-setting options, such as "application management" setting option, setting option a, setting option B … … setting option F, and so on. After the electronic equipment detects the clicking operation on the setting options of the application management, the electronic equipment jumps to the interface of the cascade of the setting options of the application management.
As shown in fig. 3 (c), the interface of the "application management" setting option cascade displays a list of applications installed by the electronic device. The method comprises the following steps: software update application, application 1, application 2 … … application 6. When the electronic equipment detects clicking operation acting on the 'software update' option, the electronic equipment jumps to an 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 is provided in an embodiment of the present invention. As shown in fig. 4 (a), information such as notification management, authority, traffic use, storage, memory, and the like of the software update application is displayed on the application information interface of the "software update" application. When the electronic equipment detects clicking operation on the storage option, the electronic equipment jumps to a storage information interface of the software updating application.
As shown in fig. 4 (b), it is possible to display how much storage space is occupied by the application and data of the software update application, respectively, and how much storage space is occupied in total, at the storage information interface of the software update application. Optionally, the stored information interface of the software update application is further provided with a "delete data" function button. When the electronic equipment detects clicking operation of the 'delete data' function button, the electronic equipment jumps to a prompt interface for deleting the software update 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. If the electronic device detects a click operation on the determination button, the electronic device deletes the data of the software update application. Optionally, the electronic device may delete all files, settings, accounts, databases, etc. of the software update application. Wherein, in connection with the descriptions of (a) to (c) in fig. 2, setting data of the switching items automatically downloaded and installed at night under the WLAN is stored in a database of the software update application. If the software update application is deleted, the setting data of the switch item automatically downloaded and installed at night under the WLAN is also deleted. Accordingly, the switching items automatically downloaded and installed at night under the WLAN are also restored to the default state. That is, if the switch item for automatic download and night installation under the WLAN is set from the default on state to the non-default off state, the switch item for automatic download and night installation under the WLAN is restored to the on state after deleting the data of the software update application. Then, when the electronic device connects to the WLAN, the electronic device will still automatically download an upgrade package or update the application of the application software installed by the electronic device. When the upgrade package is in the range of 2:00-4:00, the electronic equipment automatically installs and restarts the downloaded upgrade package. Therefore, after the user turns off the WLAN and automatically downloads and installs the software update package at night, the electronic device still can automatically download and install the software update package, and the use experience of the user is reduced.
To avoid this, an embodiment of the present invention provides a data storage method. The method of the embodiment of the invention stores the data of the related switch item of the software updating application in a database of the setting application. When the user deletes the data of the software update application, the setting data of the relevant switch item of the software update application is not deleted, whereby the switch item of the software update application can be kept 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 setup application and a software update application. More specifically, a software update application is used to perform the method of embodiments of the present invention. The method shown in fig. 5 comprises the following steps:
when the first switch item of the software update application is set from the first state to the second state, setting data of the first switch item is stored in a first database of the setting application 201. 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 switching item includes a switching item automatically downloaded under the WLAN and a switching 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 a non-default state from a default state; alternatively, the first switch item of the software update application is set to a default state from a non-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; alternatively, the default state of the first switch item is an off state, and the non-default state is an on state.
In some embodiments, the first database of the setting application is a settings database.
202, when the setting interface of the software updating application is re-entered, the software updating application displays the first switch item to be in the second state according to the setting data of the first database.
In the embodiment of the invention, the setting data of the first switch item of the software updating application is stored in a setting database of the setting application. The software update application performs the function of the first switch item according to the setting data of the settings database of the setting application. When the user enters a 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 is not deleted because the setting data of the first switch item is stored in the database of the setting application. Thus, 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 is still 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 monitor the first database of the setup application via the first memory variable. 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, the first memory variable is assigned to the second state. Because the first memory variable is a variable of the software updating application, the value of the first memory variable is not deleted when the data of the software updating application is deleted. Thus, 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 update application needs to perform 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 the software updating application detects that the setting interface of the software updating application is entered, 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 acquire the latest setting state of the first switch item based on the first memory variable, and access to the first database of the setting application is not required each time the function of the first switch item is required to be executed or each time the setting interface of the software updating application is entered, so that the system overhead can be saved.
In some embodiments, the first switch item is displayed in the second state when entering a setup interface of the software update application. 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 in the preset specified state. Alternatively, the preset specified state may be set as needed. For example, the preset specified state is an on state. Or the preset designated state is a default state of the first switch item. By the method, the user can be reminded of timely setting the first switch item to be in a preset appointed state.
In some embodiments, if the second state displayed by the first switch item is not the preset specified state, an option for setting the number of prompts of the first prompt information is 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 first prompt messages may include: the first prompting information prompts only once, prompts each time a setting interface of the software update application is entered, and the like.
If the selected operation of the user on the options is detected, determining a prompting times threshold of the first prompting information according to the selected operation, wherein the prompting times threshold is used for determining the displaying times of the first prompting information. For example, when the user selects the first prompt information to prompt only once, the threshold of the prompting times associated with the first prompt information is once. 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 designated state, the first prompt message is not displayed any more. By the method, the influence of the frequent display of the first prompt information on the user experience can be avoided.
In some embodiments, the first switching item includes: the WLAN downloads and installs switching items at night automatically. The default state of automatic download and night install under WLAN is on. Assume that the user sets the auto download and night install switch item under WLAN from a default on to an off state. And when the user reenters the setting interface of the software updating application, displaying the first prompt information. As shown in fig. 6, the first prompt information may be, for example: whether to set the WLAN download automatically and night install to on state. In some embodiments, the setup interface of the software update application may display an option of "whether the reminder is reminded only once" in addition to the first reminder information. If the user selects the reminder only once, the software update application sets the number of reminders threshold to 1. Then, when the user enters the setting interface of the software updating application again, if the switch item automatically downloaded under the WLAN and installed at night is still in a closed state, determining whether the prompting times of the first prompting information exceeds a prompting times threshold; if the first prompt information exceeds the first prompt information, the first prompt information is not displayed any more; if not, displaying the first prompt information.
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: the WLAN downloads and installs switching items at night automatically. The default state of automatic download and night install under WLAN is on.
Example one
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 comparison diagram of an interface is provided after deleting data of a software update application of a first electronic device.
The first electronic device displays the interface shown in fig. 7 (a) based on the steps shown in fig. 1 (a) -fig. 2 (b). Fig. 7 (a) is a setup interface of a software update application of the first electronic device. The setup interface of the software update application displays the switch items for automatic download and night install under WLAN. If the user does not modify the switch item automatically downloaded and installed at night under the WLAN, the switch item automatically downloaded and installed at night under the WLAN of the first electronic device defaults to an on state. When the first electronic device detects an operation of setting the switching item automatically downloaded and installed at night under the WLAN to the off state by the user, the first electronic device displays the 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 item of the automatic download and the night installation under the WLAN to the off state. Specifically, the method comprises the following steps: the switch item automatically downloaded and installed at night on the WLAN on the setup interface of the software update application of the first electronic device is displayed in an off state. The first electronic device no longer performs the operations of automatic download and night installation of the software upgrade package under the WLAN. Further comprises: the first electronic device stores setting data of which the switching item is in an off state and which is automatically downloaded and installed at night under the WLAN in a setting 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 item automatically downloaded and installed at night under the WLAN 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 a switch item for automatic download and night time installation under WLAN to a first memory variable as an off state. And then, when the first electronic equipment is connected with the WLAN, determining that the automatically downloaded switch item 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. And when the switch item installed at night is in the closed state according to the first memory variable in the time of 02:00-4:00, not executing the software installation operation.
Based on the steps shown in fig. 3 (a) -4 (c), the first electronic device enters the interface shown in fig. 7 (c). Fig. 7 (c) shows 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 the data of the software update application, the data of the database and the related files of the software update application are deleted. Optionally, the delete operation does not delete an operation to set the first database of the application and does not delete the first memory variable of the software update application. After deleting the data of the software updating application, when the first electronic equipment is connected with the WLAN again, determining that the automatically downloaded switch item under the WLAN is in a closed state according to the first memory variable, and then the first electronic equipment does not execute the operation of automatically downloading the upgrade package or updating the application under the WLAN. And when the first electronic equipment determines that the switch item installed at night is in the closed state according to the first memory variable at 02:00-4:00 at night, the software installation operation is not executed.
As shown in (d) of fig. 7, after deleting the data of the software update application, when the software update application reenters the setting interface of the software update application of the first electronic device, the software update application reads the value of the first memory variable. The value of the first memory variable is that the switch items of automatic downloading under WLAN and night installation are in a closed state. And according to the value of the first memory variable, the switch item automatically downloaded under WLAN and installed at night in the setting interface of the software updating application is displayed in a closed state.
As shown in (d) of fig. 7, after deleting the data of the software update application, when the first electronic device reenters the setting interface of the software update application, the setting interface of the software update application may further display the first prompt information. The first prompt message includes: whether to set the WLAN download automatically and night install to on state. Optionally, the setup interface of the software update application may also set an option of "whether the reminder reminds only once. If the user does not select the option, the next time the user enters the setup interface of the software update application, the setup interface of the software update application again displays the first prompt message and the option of "whether the reminder reminds only once". If the user selects the option, the next time the user enters the setting interface of the software updating application, the setting interface of the software updating application does not display the first prompt information any more, and the switch item of the automatic download and night installation setting under the WLAN is still displayed in a closed state.
Therefore, according to the method provided by the embodiment of the invention, the setting data of the switch item of the software updating application is not 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 a 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 itself is set, deleting; 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 update application, which is not data of the setting application itself, and deletion is not performed. In this way, it is possible to avoid deleting the switch item data of the software update application when deleting the data of the setting application.
Example two
The software update application of the second electronic device does not perform the data storage method of the embodiment of the invention. Referring to fig. 8, a comparison diagram of the interface is set after deleting the data of the software update application of the second electronic device.
The second electronic device displays the interface shown in fig. 8 (a) based on the steps shown in fig. 1 (a) -2 (b). Fig. 8 (a) is a setup interface of a software update application of the second electronic device. The setup interface of the software update application displays the switch items for automatic download and night install under WLAN. If the user does not modify the switch item automatically downloaded and installed at night under the WLAN, the switch item automatically downloaded and installed at night under the WLAN of the second electronic device defaults to an on state. When the second electronic device detects an operation of setting the switching item automatically downloaded and installed at night under the WLAN to the off state by the user, the second electronic device displays the interface shown in (b) of fig. 8. As shown in (b) of fig. 8, the second electronic device responds to an operation of setting the switching item of the automatic download and the night installation under the WLAN to the off state. Specifically, the method comprises the following steps: the switch item automatically downloaded and installed at night on the WLAN interface of the software update application of the second electronic device is displayed in an off state. The second electronic device stores setting data of the switch item in an off state, which is automatically downloaded and installed at night under the WLAN, in a database of the software update application, which is called a second database. And when the second electronic equipment is connected with the WLAN, determining that the automatically downloaded switch item 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. And when the switch item installed at night is in the closed state according to the second database in the time of 02:00-4:00, not executing the software installation operation.
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) shows a data prompt interface for deleting the software update application for the second electronic device. As shown in fig. 8 (c), when the second electronic device detects an operation of deleting the data of the software update application, the data of the database and the related files of the software update application are deleted. Optionally, the deletion operation deletes the setting data of the second database, that is, the setting data of the automatic download and night installation switch item under the WLAN. The setting state of the automatic download and night install switch item under WLAN is restored to the default state. Optionally, the setting state of the automatic download and night installation switch item under the WLAN is restored to the on state.
As shown in (d) of fig. 8, after deleting the data of the software update application, when the software update application reenters the setting interface of the software update application of the second electronic device, the software update application determines that the switching item automatically downloaded and installed at night under the WLAN is in an on state according to the second database. Accordingly, as shown in (d) of fig. 8, the switch item of the automatic download and night installation under the WLAN in the software update application setting interface is also displayed in an on state. Optionally, after deleting the data of the software update application, when the second electronic device connects to the WLAN again, determining that the automatically downloaded switch item under the WLAN is in an on state according to the second database, and executing the operation of automatically downloading the upgrade package or updating the application under the WLAN by the second electronic device. And when the second electronic equipment determines that the switch item installed at night is in an on state according to the second database at 02:00-4:00 of night, executing software installation operation.
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 on the switch item of the software update application is deleted accordingly. The associated switch item of the software update application will revert to the default state. It may thus occur that the user has made certain settings for the software update application, but the software update application is autonomously restored 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 comparison diagram of the setting interface after deleting the setting data of the second application of the first electronic device is shown. Fig. 9 (a) shows an interface for the font size of the second application of the first electronic device. The font size setting interface of the second application displays a sliding bar for adjusting the font size. Optionally, font scales are arranged on the sliding bar, and different font scales correspond to different font sizes. Optionally, a font adjustment control is disposed on the sliding bar. The position of the font adjustment control in the sliding bar is used to indicate the font size currently set by the second application. As shown in (a) of fig. 9, the font size of the second application defaults to the standard size. The font adjustment control is located on a font scale of standard font size. When the first electronic device detects that the user slides the font adjustment control rightwards, the font displayed by the second application becomes larger; when the first electronic device detects that the user slides the font adjustment control leftwards, the font displayed by the second application becomes smaller. As shown in (b) of fig. 9, when the first electronic device detects that the user slides the font adjustment control rightward 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 font size currently set by 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. As shown in fig. 9 (d), when the font size setting interface of the second application is re-entered, the font adjustment control is still located on the standard font size font scale.
It can be seen that, when the second application of the first electronic device does not execute the method of the embodiment of the present invention, if the data of the second application is deleted, the setting data of the second application by the user is deleted correspondingly, and the second application is restored to the default state. It may thus happen that the user makes certain settings for the second application, but the second application is autonomously restored to the default state, thereby affecting the user experience.
Referring to fig. 10, a schematic structural diagram of an electronic device according to an embodiment of the present invention is provided. 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 (universal serial bus, USB) interface 130, a charge 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, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, a user identification module (subscriber identification module, SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor, a gyroscope sensor, a barometric sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, or a bone conduction sensor, among others.
It should be understood that the illustrated structure of the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrix organic light emitting diode), a flexible light-emitting diode (flex), a mini, a Micro led, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, 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 the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving 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 enable expansion of the memory capabilities of the electronic device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
In some embodiments, internal memory 121 may be used to store computer-executable program code, including instructions. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the electronic device 100 (e.g., audio data, phonebook, etc.), and so on. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like. The processor 110 performs 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 an 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, which when run on a computer, cause the computer to execute the data storage method of the embodiment of the invention.
Embodiments of the present invention also provide a computer program product comprising instructions which, when executed on a computer or on any of the at least one processors, cause the computer to perform the steps of the data storage method of embodiments of the present invention.
The embodiment of the invention also provides a chip which comprises a processor and a data interface, wherein the processor reads the instructions stored in the memory through the data interface so as to execute the corresponding operation and/or flow of the method of the embodiment of the invention.
Optionally, the chip further comprises a memory, the memory is connected with the processor through a circuit or a 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 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 read-only memory (ROM), other types of static storage devices that can store static information and instructions, random access memory (random access memory, RAM) or other types of dynamic storage devices that can store information and instructions, electrically erasable programmable read-only memory (electrically erasable programmable read-only memory, EEPROM), compact disc read-only memory (compact disc read-only memory) or other optical disk storage, optical disk storage (including compact disc, laser disc, optical disc, digital versatile disc, blu-ray disc, etc.), magnetic disk storage media, or any other magnetic storage device 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 configured to perform the corresponding methods provided above, and therefore, the advantages achieved by the electronic device, the computer storage medium, or the computer program product may refer to the advantages of the corresponding methods provided above, which are not described herein.
In the embodiments of the present application, "at least one" means one or more, and "a plurality" means two or more. "and/or", describes an association relation of association objects, and indicates that there may be three kinds of relations, for example, a and/or B, and may indicate that a alone exists, a and B together, and B alone exists. Wherein A, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of the following" and the like means any combination of these items, including any combination of single 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 the embodiments disclosed herein can be implemented as a combination of electronic hardware, computer software, and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the 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 will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In several embodiments provided herein, any of the functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely specific embodiments of the present application, and any person skilled in the art may easily conceive of changes or substitutions within the technical scope of the present application, which 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 (8)

1. A method of data storage, 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 the setting application;
when the setting interface of the software updating application is detected to be entered, displaying the first switch item to be in the second state according to the setting data of the first database;
the method further comprises the steps of:
setting a first memory variable, wherein the first memory variable is a variable of a software updating application;
when the condition that the setting data of the first switch item stored in the first database is changed from a first state to a second state is detected, the first memory variable is assigned to the second state;
when the entering of the setting interface of the software updating application is detected, displaying the first switch item to be in the second state according to the setting data of the first database, wherein the method comprises the following steps:
Reading the value of the first memory variable when the setting interface entering the software updating application is detected;
and displaying the first switch item in the second state on a setting interface of the software updating application according to the value of the first memory variable.
2. The method of claim 1, wherein the first switch item is set from a first state to a second state, comprising:
the first switch item is set to a non-default state from a default state; or alternatively, the process may be performed,
the first switch item is set from a non-default state to a 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 alternatively, the process may be performed,
the default state of the first switch item is an off state, and the non-default state is an on state.
4. A method according to any one of claims 1 to 3, wherein the first switching term comprises:
automatically downloaded switching items and/or night installed switching items under a wireless local area network WLAN.
5. The method of claim 1, wherein upon detecting entry into a setup interface of a software update application, after displaying the first switch item in the second state according to setup data of the first database, 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 in the preset specified state.
6. The method of claim 5, wherein if the second state is not a preset specified state, the method further comprises, in addition to displaying the first prompt message:
displaying options for setting the prompting times of the first prompting information;
if the selected operation of the user on the option is detected, determining a prompting times threshold of the first prompting information according to the selected operation, wherein the prompting times threshold is used for determining the displaying times of the first prompting information.
7. An electronic device, comprising: the electronic device comprising 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 of any of the preceding claims 1-6.
8. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program which, when run on an electronic device, causes the electronic device to perform the method of any of the preceding claims 1-6.
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 CN115640034A (en) 2023-01-24
CN115640034B true 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)

Families Citing this family (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 (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988213A (en) * 2021-04-13 2021-06-18 荣耀终端有限公司 Program data updating method, electronic equipment and computer storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8589904B2 (en) * 2009-08-10 2013-11-19 Symantec Corporation Systems and methods for updating a software product
JP5335622B2 (en) * 2009-08-31 2013-11-06 レノボ・シンガポール・プライベート・リミテッド Computer program that manages the configuration information database
CN102830995B (en) * 2012-08-03 2015-11-18 广东欧珀移动通信有限公司 A kind of Android platform software upgrade method retaining user data
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

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988213A (en) * 2021-04-13 2021-06-18 荣耀终端有限公司 Program data updating method, electronic equipment and computer storage medium

Also Published As

Publication number Publication date
CN115640034A (en) 2023-01-24

Similar Documents

Publication Publication Date Title
EP3572936B1 (en) Method, terminal and computer-readable storage medium for displaying interface of application program
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
EP3073379A1 (en) Firmware recovery method, device and terminal
CN115640034B (en) Data storage method and device
JP5336965B2 (en) Information processing apparatus, information processing apparatus control method, and program
US11379283B2 (en) Memory crash prevention for a computing device
CN107656754B (en) Method for restoring set parameters and user equipment thereof
US11316971B2 (en) Method for controlling temperature of terminal, and terminal
KR102666329B1 (en) Method and electronic device for executing application
US20140380292A1 (en) Method, device, and storage medium for upgrading operating system
KR20180020401A (en) Method for controlling communication network connection, storage medium and electronic device therefor
CN111857531A (en) Mobile terminal and file display method thereof
JP7244231B2 (en) ELECTRONIC DEVICE, CONTROL PROGRAM AND DISPLAY CONTROL METHOD
JP5108857B2 (en) Display control apparatus and program
US11487524B2 (en) Processing method and electronic device
CN111026476A (en) Lock screen display control method, terminal and computer readable storage medium
CN115098128A (en) Software updating method, device, equipment and storage medium
JP5464801B2 (en) Electronics
KR20070022439A (en) Method for upgrading data in mobile telecommunication terminal
CN115033193A (en) Screen rotation processing method, screen rotation processing device, screen rotation processing medium and electronic equipment
CN111767063A (en) Resource updating method, device and equipment for application program
KR101817809B1 (en) A method, apparatus, computer program and user interface
CN116032876A (en) Unread message notification processing method, electronic equipment and storage medium

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