Data management method, device and electronic equipment

By obtaining the target identification information of the application's data to be managed and the business scenarios to which it belongs, and determining and managing its target data storage directory, the problems of unauthorized processing and disk space waste in application data management are solved, achieving more efficient data management and security.

CN114547036BActive Publication Date: 2025-09-16BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210172466.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-24
Publication Date
2025-09-16
Estimated Expiration
2042-02-24

AI Technical Summary

Technical Problem

In the existing technology, the data management method of application programs has the problem of unauthorized processing, which leads to online failures and wastes disk space resources, affecting data security.

Method used

By obtaining the target identification information of the application's data to be managed and the business scenario to which it belongs, its target data storage directory is determined, and management is performed based on the directory to prevent unauthorized processing.

Benefits of technology

It improves the data management effect of the application, prevents unauthorized processing, optimizes disk space utilization, and enhances data security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114547036B_ABST
    Figure CN114547036B_ABST
Patent Text Reader

Abstract

The present disclosure provides a data management method, apparatus, and electronic device, relating to the field of data processing technology, and more specifically, to the field of disk management technology. A specific implementation scheme comprises: obtaining to-be-managed data of an application, and target identification information of a first business scenario to which the to-be-managed data belongs, where the first business scenario is a business scenario of the application under a first version; determining a first target data storage directory for the to-be-managed data based on the target identification information; and managing the to-be-managed data based on the first target data storage directory.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, in particular to the field of disk management technology, and specifically to a data management method, device and electronic device. Background Art

[0002] Some applications, such as map applications, take up a large amount of disk space on electronic devices, which wastes disk space resources and poses a threat to data security. In addition, these applications are complex and correspond to many business scenarios, so the data of these applications needs to be managed.

[0003] Currently, application data is usually stored arbitrarily, such as storing data for various business scenarios of an application in one directory. Summary of the Invention

[0004] The present disclosure provides a data management method, device, and electronic device.

[0005] According to a first aspect of the present disclosure, there is provided a data management method, applied to an electronic device, comprising:

[0006] Acquire data to be managed of an application and target identification information of a first business scenario to which the data to be managed belongs, where the first business scenario is a business scenario of the application under a first version;

[0007] Determining a first target data storage directory for the data to be managed based on the target identification information;

[0008] The data to be managed is managed based on the first target data storage directory.

[0009] According to a second aspect of the present disclosure, there is provided a data management device, applied to an electronic device, comprising:

[0010] A first acquisition module is configured to acquire data to be managed of an application and target identification information of a first business scenario to which the data to be managed belongs, where the first business scenario is a business scenario of the application under a first version;

[0011] A determination module, configured to determine a first target data storage directory of the data to be managed based on the target identification information;

[0012] A first management module is configured to manage the data to be managed based on the first target data storage directory.

[0013] According to a third aspect of the present disclosure, there is provided an electronic device, including:

[0014] at least one processor; and

[0015] a memory communicatively connected to at least one processor; wherein,

[0016] The memory stores instructions that can be executed by at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform any one of the methods in the first aspect.

[0017] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute any one of the methods in the first aspect.

[0018] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, which implements any one of the methods in the first aspect when executed by a processor.

[0019] The technology disclosed in the present invention solves the problem in the related art that the data management method of the application program may cause online failures due to unauthorized processing, thereby improving the data management effect of the application program.

[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present disclosure.

[0022] Figure 1 is a flowchart of a data management method according to the first embodiment of the present disclosure;

[0023] Figure 2 It is a diagram of the migration process in data management;

[0024] Figure 3 It is a flowchart for determining the directory for data management after standardizing the directory;

[0025] Figure 4 This is a flowchart for classifying and counting the first type of data in a business scenario;

[0026] Figure 5 This is a flowchart of automatically cleaning the second type of data in a business scenario;

[0027] Figure 6 is a structural diagram of a data management device according to a second embodiment of the present disclosure;

[0028] Figure 7 is a schematic block diagram of an example electronic device for implementing an embodiment of the present disclosure. DETAILED DESCRIPTION

[0029] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0030] First embodiment

[0031] like Figure 1 As shown, the present disclosure provides a data management method, which is applied to an electronic device and includes the following steps:

[0032] Step S101: Acquire the data to be managed of the application and target identification information of a first business scenario to which the data to be managed belongs, where the first business scenario is a business scenario of the application under a first version.

[0033] In this embodiment, the data management method relates to the field of data processing technology, and in particular, to the field of disk management technology, and can be widely applied in disk management scenarios. The data management method of the disclosed embodiment can be executed by the data management device of the disclosed embodiment. The data management device of the disclosed embodiment can be configured in any electronic device to execute the data management method of the disclosed embodiment. The electronic device can be a server or a terminal device, and is not specifically limited here.

[0034] In this step, the application may be any application installed on the electronic device, for example, the application may be a map application.

[0035] The application may include M business scenarios, where M is a positive integer, and the first business scenario is a business scenario among the M business scenarios. The business scenario refers to a business that can be performed by the application, such as navigation, imaging, public transportation, and drawing.

[0036] During the operation of each business of the application, corresponding data will be generated. Taking the map application as an example, during the operation of the image business, image cache, offline map and other data can be generated. During the operation of the navigation business, user footprint data, search history, offline navigation, voice package and other data can be generated.

[0037] The application may include at least one release version, wherein the first version may be the current version of the application installed on the electronic device. For example, the first version may be the latest release version of the application, 22.01.0. Furthermore, the first version is the version that implements permission control and standardizes the storage directory for each business scenario of the application.

[0038] The data to be managed refers to data that needs to be managed. Management may refer to deletion, storage, modification or update, etc. That is, the data to be managed may be data that needs to be deleted, stored, modified or updated, etc.

[0039] The data to be managed may be data newly generated during the running of the application. Accordingly, the data generated during the running of the application may be obtained as the data to be managed.

[0040] The data to be managed can also be data that needs to be standardized when an application is installed on an electronic device over a historical release version. For example, in a historical release version, the application data is usually stored arbitrarily. If the application is updated from a historical release version to the first version, the data in the application under the historical release version needs to be standardized and stored in the corresponding directory. Accordingly, when the application is installed over a previous release version, the data corresponding to the historical release version can be obtained as the data to be managed.

[0041] The data to be managed may also be data specified by the user to be managed. Accordingly, when a user performs a management operation on the data in the application, the data may be obtained as the data to be managed, wherein the management operation may be operations such as deletion, update or modification.

[0042] The target identification information may refer to the key value of the business scenario. In the first version, by configuring a key for each business scenario, permission control can be performed on the data of the business based on the key of the business scenario to prevent other businesses from unauthorized processing of the data of the business.

[0043] The target identification information of the first business scenario to which the data to be managed belongs can be obtained by querying the data registration list file. For example, for each piece of data (which can be newly generated data under the first version or data under a historical release version), it can be registered in the data registration list file. When registering data, the registration information may include but is not limited to the following items: enumeration of data types, old storage path, new storage path, data type, business scenario, and version number.

[0044] The old storage path can be the storage path of the historical release version. The registration information for the data in the historical release version can include this item. For new data in the first version, this item can be empty. The new storage path is the storage directory standardized for each business scenario in the first version.

[0045] Correspondingly, the target identification information of the first business scenario to which the data to be managed belongs in the registration information can be obtained by querying the registration information of the data to be managed in the data registration list file.

[0046] The target identification information of the first business scenario to which the data to be managed belongs can also be obtained by querying the business registry. For example, when running the image business, some new data is generated. The first business scenario to which the data belongs is the image business scenario. Accordingly, the target identification information of the image business scenario in the business registry can be obtained.

[0047] It should be noted that when the first version of an application is newly installed, identification information for each business scenario in the application can be generated and stored in the business registry. Alternatively, when the application is updated to the first version, identification information for the target business scenario of the application can be generated and stored in the business registry. The target business scenario can refer to the business scenario that the first version updates relative to the previous release version.

[0048] Step S102: determining a first target data storage directory of the data to be managed based on the target identification information.

[0049] In one possible implementation of this step, if the application is newly installed on the electronic device, meaning it was not previously installed and is being installed for the first time, or it was previously uninstalled and is being reinstalled, in this scenario, data storage directories can be created for each business scenario of the application, with each data storage directory corresponding to identification information of a business scenario. Accordingly, the data storage directory corresponding to the target identification information of the first business scenario can be determined as the first target data storage directory for the data to be managed.

[0050] In another possible implementation, if the application is installed as an overwrite installation, the first target data storage directory of the data to be managed can be determined based on the target identification information and the data migration record, where the data migration record refers to the record of data migration from the old storage path to the new storage path.

[0051] For example, if there is a migration record for the data to be managed, the data storage directory corresponding to the target identification information of the first business scenario is determined as the first target data storage directory, that is, the data storage directory under the new storage path is determined as the first target data storage directory.

[0052] For another example, if there is no migration record for the data to be managed, and the data storage directory under the old storage path includes the data to be managed, the data storage directory under the old storage path is determined as the first target data storage directory.

[0053] Step S103: managing the data to be managed based on the first target data storage directory.

[0054] In this step, when the data storage directory of the data to be managed is determined, the data to be managed can be managed accordingly in the first target data storage directory.

[0055] For example, the data to be managed may be stored in the first target data storage directory, the data to be managed in the first target data storage directory may be deleted, or the data to be managed in the first target data storage directory may be modified.

[0056] In this embodiment, the application's data to be managed and the target identification information of the first business scenario to which the data to be managed belong are obtained; based on the target identification information, a first target data storage directory for the data to be managed is determined; and based on the first target data storage directory, the data to be managed is managed. In this way, by performing permission control based on the application's business scenario and standardizing the data storage directory for the application's business scenario, other businesses can be prevented from unauthorized processing during data management, thereby improving the application's data management effectiveness.

[0057] Optionally, step S102 specifically includes at least one of the following:

[0058] In a case where a migration record exists for the data to be managed, a first data storage directory is determined as the first target data storage directory, the first data storage directory is the data storage directory corresponding to the target identification information, the migration record represents a record of migration of the data to be managed from the second data storage directory to the first data storage directory, the second data storage directory is the data storage directory of the application under the second version, and a release time of the second version is earlier than a release time of the first version;

[0059] If there is no migration record for the data to be managed and the second data storage directory includes the data to be managed, determining the second data storage directory as the first target data storage directory;

[0060] In a case where there is no migration record for the data to be managed and the second data storage directory does not include the data to be managed, the first data storage directory is determined as the first target data storage directory.

[0061] In this embodiment, if the installation mode of the application is overwrite installation, the first target data storage directory of the data to be managed can be determined based on the target identification information and the migration record of the data.

[0062] Specifically, the migration record table can be queried to determine whether there is a migration record for the data to be managed. If the data migration of the application is successful, the migration record of the data can be stored in the migration record table, where the migration record can include the old storage path and the new storage path of the data.

[0063] The migration process is as follows Figure 2 As shown, step S201: when the application is overwritten and installed, and the application is cold-started, and data management is in the main thread, the data of the application under the second version is migrated to standardize the storage path of the data. The second version is a historical release version;

[0064] Step S202: Register each business scenario of the application to obtain a business registration table, wherein the registration process may be a process of generating identification information of the business scenario;

[0065] Step S203: Obtain the second version under overwriting installation;

[0066] Step S204: creating a data storage directory corresponding to the identification information for the business scenario updated relative to the second version, or creating a data storage directory corresponding to the identification information for all business scenarios under the first version;

[0067] Step S205: for any data, determine whether the data does not exist in the second data storage directory corresponding to the second version, or whether the data exists in the first data storage directory corresponding to the first version, or whether the second version is consistent with the version of the data;

[0068] Step S206: If any of the items in step S205 is negative, migrate the data from the second data storage directory to the first data storage directory;

[0069] Step S207: If the data migration is successful, delete the successfully migrated data in the second data storage directory, generate a migration record, and store the migration record in the migration record table;

[0070] Step S208: If all the answers in step S206 are yes, the migration process ends.

[0071] It should be noted that, in the event of data migration failure, a soft link for the data can be created, which is used to link to the directory of the old storage path of the data, so that data management can also be achieved.

[0072] Accordingly, if a migration record for the data to be managed exists in the migration record table, it can be indicated that the data to be managed has been successfully migrated. In this case, the new storage path, i.e., the first data storage directory, can be determined as the first target data storage directory. The first data storage directory is a data storage directory standardized for the application's business scenario, i.e., the directory under the new storage path.

[0073] If there is no migration record of the data to be managed in the migration record table, it may indicate that the migration of the data to be managed has failed, or the data to be managed is newly generated data. If the data to be managed includes a soft link and is linked to the second data storage directory including the data to be managed through the soft link, it may indicate that the migration of the data to be managed has failed, and the second data storage directory is determined as the first target data storage directory.

[0074] In the case that the second data storage directory does not include the data to be managed, it can be indicated that the data to be managed is newly generated data, and the first data storage directory is determined as the first target data storage directory.

[0075] In this embodiment, when the application is installed as an overwrite installation, the first target data storage directory for the data to be managed is determined based on the target identification information and the data migration record. This allows data management to be compatible with historical release versions, thereby improving data management compatibility.

[0076] The following details the directory for determining data management. Figure 3 This is a flowchart for determining the directory for data management after standardizing the directory, such as Figure 3 As shown, the process includes the following:

[0077] Step S301: input key (i.e. target identification information);

[0078] Step S302: Determine whether the key is empty. If so, execute step S308; if not, execute step S303. For example, when the key is empty, it can indicate to create a favorite.

[0079] Step S303: Determine whether the key's version number is empty. If a new business scenario is added, if so, execute step S309; ​​if not, execute step S304;

[0080] Step S304: Check whether the key exists in the service registration table. If yes, go to step S305; if not, go to step S309.

[0081] Step S305: Check whether there is a migration record of the data to be managed in the migration record table. If yes, execute step S309; ​​if not, execute step S306.

[0082] Step S306: Check whether the directory under the old storage path contains data to be managed. If so, execute step S307; if not, execute step S309.

[0083] Step S307: Return to the directory under the old storage path;

[0084] Step S308: Return to the root directory;

[0085] Step S309: Return to the directory under the new storage path.

[0086] Optionally, before step S101, the method further includes:

[0087] When it is determined that the version of the application is updated to the first version and the target identification information does not exist in the registry, creating the first data storage directory;

[0088] The target identification information is stored in the registration table.

[0089] In this embodiment, the registry can be a business registry. When the application is installed in an overwrite manner, if the target identification information does not exist in the business registry, it means that the first business scenario is a business scenario in which the first version is updated relative to the second version. Accordingly, the first business scenario can be registered, and specifically, the target identification information of the first business scenario can be generated and stored in the business registry.

[0090] A first data storage directory corresponding to the target identification information is created to perform permission control on the business scenario of the application program and standardize the data storage directory of the application scenario of the application program.

[0091] In this embodiment, when the application is installed in an overwrite manner, by registering the business scenarios updated relative to the historical release version, permission control can be implemented for each business scenario of the application under the first version.

[0092] Optionally, the application under the first version includes M business scenarios, the first business scenario is a business scenario among the M business scenarios, M is a positive integer, and the method further includes:

[0093] For each business scenario, obtaining a second target data storage directory for the business scenario under the first target directory, where the first target directory is used to store data of the application program related to a first type;

[0094] Performing disk space occupancy statistics on a first data set to obtain statistical information, wherein the first data set includes data stored in the second target data storage directory;

[0095] Based on the statistical information, the data of the first type related to the business scenario is managed.

[0096] In this embodiment, under the condition of a standardized catalog, the data of the application can be classified and counted according to the business scenario of the application. Specifically, the first type of data of the application can be classified and counted to manage the first type of data related to the business scenario.

[0097] Among them, the first type can be one of the data types. In a possible implementation method, the data can be classified into three categories, namely cached data, persistent data and big data. Persistent data can be used as the first type of data, which is data that does not want to be frequently cleaned. Taking a map application as an example, persistent data can include user footprint data, retrieval history records, etc.

[0098] Cached data can be considered as the second type of data. This type of data is usually large in size, does not require backup, and its removal will not affect the normal operation of the application. Taking a map application as an example, cached data can include image cache, information flow cache, etc.

[0099] Big data can be regarded as the third type of data. This type of data has a large storage volume and users can choose to actively download it. Taking map applications as an example, big data can include offline maps, offline navigation, voice packages, etc.

[0100] When classifying application data, you can also standardize the data storage directory according to the data type, and store different types of data in different directories. For example, persistent data can be stored in the first target directory, cached data can be stored in the second target directory, and big data can be stored in the third target directory.

[0101] Accordingly, under each target directory, data can be stored in a standardized manner for each business scenario of the application, with data for the same business scenario stored in the same directory and data for different business scenarios stored in different directories.

[0102] Under the premise of standardizing the directory, the second target data storage directory stores data of the first type in a certain business scenario. The data storage directory corresponding to the identification information of the business scenario in the first target directory can be determined as the second target data storage directory for the business scenario.

[0103] The disk space occupied by the first data set may be statistically analyzed. Specifically, the sum of the disk space occupied by all data in the first data set may be calculated to obtain statistical information. The first data set at least includes data in the second target data storage directory.

[0104] In a possible implementation, if the application is installed in a new installation mode, disk space usage statistics may be directly performed based on the data in the second target data storage directory to obtain statistical information.

[0105] If the application is installed as an overwrite installation, the first data set may also include data of the first type related to the business scenario in a third data storage directory. The third data storage directory is the data storage directory of the third version of the application, which was released earlier than the first version, i.e., the directory under the old storage path. Accordingly, the data in the directories under the old storage path and the directories under the new storage path of the business scenario can be jointly counted. This can provide more comprehensive statistics on the first type of data in the business scenario and improve data management effectiveness.

[0106] Afterwards, the first type of data for the business scenario can be managed based on the statistical information. In an optional embodiment, if the disk space occupied by the first type of data in the business scenario is close to the specified quota, an additional data storage quota for the business scenario can be requested from the server to store the first type of data in the business scenario. In another optional embodiment, if the disk space occupied by the first type of data in the business scenario exceeds a certain threshold, an early warning message can be sent to the user to remind the user.

[0107] In this embodiment, under the condition of a standardized catalog, by classifying and counting the first type of data of the application, the first type of data of the business scenario is managed based on the statistical information. In this way, the first type of data can be managed.

[0108] Figure 4 This is a flow chart for classifying and counting the first type of data in a business scenario, such as Figure 4 As shown, the process includes the following:

[0109] Step S401: performing classification statistics when the application is running in the background;

[0110] Step S402: Is the last tracking time greater than one week? If so, execute step S403; wherein the tracking time refers to the time of the last classification statistics, and one week refers to one week. This value is set for a specific example, and other values ​​may be used in other examples;

[0111] Step S403: Obtain the directory under the new storage path of the business scenario;

[0112] Step S404: Is it a new installation? If so, go to step S407; if not, go to step S405.

[0113] Step S405: Obtain the directory under the old storage path of the business scenario;

[0114] Step S406: combining the directory under the new storage path with the directory under the old storage path;

[0115] Step S407: Classification statistics.

[0116] Optionally, the method further includes:

[0117] Counting a target disk space occupancy value, where the target disk space occupancy value includes at least one of a disk space occupancy value of the application on the electronic device and a disk space occupancy value of the electronic device:

[0118] When each disk space occupancy value is greater than or equal to a preset threshold, data in a second target directory is cleaned up, where the second target directory is used to store data of the second type related to the application.

[0119] In this embodiment, the disk space occupied by the application on the electronic device can be counted to obtain the disk space occupancy value of the application on the electronic device, and the disk space already occupied by the electronic device can be counted to obtain the disk space occupancy value of the electronic device.

[0120] The target disk space usage value can be counted when preset conditions are met. The preset conditions can include at least one of the following:

[0121] The application is running in the background;

[0122] The application is started as a cold start;

[0123] The application was not pushed to the background during navigation;

[0124] The application has the automatic cleanup feature turned on.

[0125] When the disk space occupancy value of the application on the electronic device is greater than or equal to a first threshold, and / or the disk space occupancy value of the electronic device is greater than or equal to a second threshold, the cached data in the second target directory can be automatically cleaned up. In an optional embodiment, cached data whose usage time exceeds a third threshold can be cleaned up first.

[0126] It should be noted that the first threshold, the second threshold and the third threshold can be controlled by cloud control. For example, the cloud control server can send these thresholds to the electronic device to trigger the timing of automatic cleaning and the data range of automatic cleaning.

[0127] Figure 5 This is a flowchart for automatically cleaning the second type of data in a business scenario, such as Figure 5 As shown, the process includes the following:

[0128] Step S501: When the application is pushed to the background, automatic cleaning is performed;

[0129] Step S502: Check whether the application is cold started. If so, execute step S503; if not, execute step S510.

[0130] Step S503: Check whether the application is pushed to the background during navigation. If so, execute step S510; if not, execute step S504.

[0131] Step S504: Check whether the application has enabled the automatic cleanup function. If so, proceed to step S505; if not, proceed to step S510.

[0132] Step S505: Check whether the disk space occupied by the application on the electronic device exceeds the threshold. If so, execute step S506; if not, execute step S510.

[0133] Step S506: Check whether the disk space usage of the electronic device exceeds the threshold. If so, go to step S507; if not, go to step S510.

[0134] Step S507: traverse the second target directory;

[0135] Step S508: Check whether the most recent usage time exceeds the threshold. If so, go to step S509; if not, go to step S510.

[0136] Step S509, deleting data;

[0137] Step S510: End the automatic cleaning process.

[0138] In this embodiment, the cache data is automatically cleaned up to achieve disk management and reduce user disk space.

[0139] Optionally, the method further includes:

[0140] Upon receiving the first input from the user, obtaining a second data set, where the second data set includes data of the second type related to the application in a second target directory and a third data storage directory, where the second target directory is used to store the data of the second type related to the application, and the third data storage directory is a data storage directory of the application under a third version, where the release time of the third version is earlier than the release time of the first version;

[0141] The second data set is cleaned.

[0142] In this embodiment, cached data is manually cleaned, that is, the timing of data cleaning is manually controlled.

[0143] The user can operate the manual cleaning control. Accordingly, when the electronic device receives the user's first input to the manual cleaning control, it obtains a second data set. The second data set can be a set of cached data. The second data set can include the data in the directory under the new storage path, that is, the second target directory, and the data in the directory under the old storage path, that is, the third data storage directory.

[0144] The second data set is cleaned up in a manner similar to the automatic cleaning manner, which will not be described in detail here.

[0145] In this embodiment, disk management is achieved by manually cleaning cache data, thereby reducing user disk space.

[0146] Optionally, the electronic device further includes data of a third type related to the first business scenario, and the method further includes:

[0147] Displaying the data management page for the first business scenario;

[0148] Based on the data management page, the third type of data related to the first business scenario is managed.

[0149] In this embodiment, for the business scenario of the application, a data management page of the business scenario can be displayed. The data management page is used to manage the big data of the business scenario. By displaying the data management page of the business scenario to manage the big data of the business scenario, other businesses can be prevented from unauthorized processing, or the business can be prevented from unauthorized processing of data of other businesses.

[0150] It should be noted that the above data management method can be executed through various modules and basic programs. For example, the electronic device can include an automatic cleaning module, a manual cleaning module, a migration module, etc.

[0151] Second embodiment

[0152] like Figure 6 As shown, the present disclosure provides a data management device 600, comprising:

[0153] A first acquisition module 601 is configured to acquire data to be managed of an application and target identification information of a first business scenario to which the data to be managed belongs, where the first business scenario is a business scenario of the application in a first version;

[0154] A determination module 602 is configured to determine a first target data storage directory for the data to be managed based on the target identification information;

[0155] The first management module 603 is configured to manage the data to be managed based on the first target data storage directory.

[0156] Optionally, the determining module 602 is specifically configured to:

[0157] In a case where a migration record exists for the data to be managed, a first data storage directory is determined as the first target data storage directory, the first data storage directory is the data storage directory corresponding to the target identification information, the migration record represents a record of migration of the data to be managed from the second data storage directory to the first data storage directory, the second data storage directory is the data storage directory of the application under the second version, and a release time of the second version is earlier than a release time of the first version;

[0158] If there is no migration record for the data to be managed and the second data storage directory includes the data to be managed, determining the second data storage directory as the first target data storage directory;

[0159] In a case where there is no migration record for the data to be managed and the second data storage directory does not include the data to be managed, the first data storage directory is determined as the first target data storage directory.

[0160] Optionally, the device further includes:

[0161] a creation module, configured to create the first data storage directory when it is determined that the version of the application is updated to the first version and the target identification information does not exist in the registry;

[0162] A storage module is used to store the target identification information in the registration table.

[0163] Optionally, the application under the first version includes M business scenarios, the first business scenario is a business scenario among the M business scenarios, M is a positive integer, and the device further includes:

[0164] A second acquisition module is configured to acquire, for each business scenario, a second target data storage directory for the business scenario under the first target directory, where the first target directory is used to store data of the first type related to the application;

[0165] a first statistics module, configured to perform disk space occupancy statistics on a first data set to obtain statistical information, wherein the first data set includes data in the second target data storage directory;

[0166] The second management module is configured to manage the data of the first type related to the business scenario based on the statistical information.

[0167] Optionally, the first data set further includes:

[0168] The business scenario in the third data storage directory is about the first type of data. The third data storage directory is the data storage directory of the application under the third version, and the release time of the third version is earlier than the release time of the first version.

[0169] Optionally, the device further includes:

[0170] The second statistical module is configured to calculate a target disk space occupancy value, where the target disk space occupancy value includes at least one of a disk space occupancy value of the application on the electronic device and a disk space occupancy value of the electronic device.

[0171] The first cleaning module is used to clean up data in a second target directory when each disk space occupancy value is greater than or equal to a preset threshold value, and the second target directory is used to store data of the second type related to the application.

[0172] Optionally, the device further includes:

[0173] a third acquisition module configured to, upon receiving the first input from the user, acquire a second data set, the second data set including data of the second type related to the application in a second target directory and a third data storage directory, the second target directory being used to store the data of the second type related to the application, the third data storage directory being a data storage directory of a third version of the application, the release time of the third version being earlier than the release time of the first version;

[0174] The second cleaning module is used to clean the second data set.

[0175] Optionally, the electronic device further includes data of a third type related to the first business scenario, and the apparatus further includes:

[0176] A display module, configured to display a data management page for the first business scenario;

[0177] The third management module is used to manage the third type of data related to the first business scenario based on the data management page.

[0178] The data management device 600 provided in the present disclosure can implement each process implemented in the data management method embodiment and can achieve the same beneficial effects. To avoid repetition, it will not be described here.

[0179] In the technical solutions disclosed herein, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0180] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0181] Figure 7 A schematic block diagram of an example electronic device that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0182] like Figure 7 As shown, the device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. Various programs and data required for the operation of the device 700 can also be stored in the RAM 703. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0183] Various components in device 700 are connected to I / O interface 705, including an input unit 706, such as a keyboard, mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a magnetic disk, optical disk, etc.; and a communication unit 709, such as a network card, modem, wireless communication transceiver, etc. The communication unit 709 allows device 700 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0184] The computing unit 701 can be a variety of general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods and processes described above, such as the data management method. For example, in some embodiments, the data management method can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the data management method described above can be performed. Alternatively, in other embodiments, the computing unit 701 can be configured to perform the data management method by any other appropriate means (e.g., by means of firmware).

[0185] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0186] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0187] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0188] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0189] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0190] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. The client-server relationship arises through computer programs running on the respective computers and having a client-server relationship with each other. The server may be a cloud server, a server in a distributed system, or a server integrated with a blockchain.

[0191] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not limited herein.

[0192] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.

Claims

1. A data management method, applied to an electronic device, comprising: Acquire data to be managed of an application and target identification information of a first business scenario to which the data to be managed belongs, where the first business scenario is a business scenario of the application under a first version; Determining a first target data storage directory for the data to be managed based on the target identification information; Managing the data to be managed based on the first target data storage directory; The application is a map application, the application under the first version includes M business scenarios, the first business scenario is a business scenario among the M business scenarios, M is a positive integer, and the method further includes: For each business scenario, obtaining a second target data storage directory for the business scenario under the first target directory, wherein the first target directory is used to store data of the application program related to a first type; the first type is one of the data types, and the data types obtained by classifying the application program data are cached data, persistent data, and big data, respectively; Performing disk space usage statistics on the first data set to obtain statistical information, where if the application is installed as a new installation, the first data set is data in the second target data storage directory; if the application is installed as an overwrite installation, the first data set includes: data in the second target data storage directory and data of the first type related to the business scenario in a third data storage directory, where the third data storage directory is a data storage directory for a third version of the application, where the third version is released earlier than the first version; Based on the statistical information, managing the data of the first type related to the business scenario; if the disk space occupied by the data of the first type in the business scenario is close to the specified quota, applying for an additional data storage quota for the business scenario from the server; if the disk space occupied by the data of the first type in the business scenario exceeds a certain threshold, sending a warning message to the user; The method further comprises: When the preset conditions are met, the target disk space usage value is counted; When the disk space occupancy value is greater than or equal to a preset threshold, the data in the second target directory is cleaned up, and cached data whose usage time exceeds a third threshold is cleaned up first. The second target directory is used to store the second type of data of the application.

2. The method according to claim 1, wherein The determining, based on the target identification information, a first target data storage directory for the data to be managed includes at least one of the following: In a case where a migration record exists for the data to be managed, a first data storage directory is determined as the first target data storage directory, the first data storage directory is the data storage directory corresponding to the target identification information, the migration record represents a record of migration of the data to be managed from the second data storage directory to the first data storage directory, the second data storage directory is the data storage directory of the application under the second version, and a release time of the second version is earlier than a release time of the first version; If there is no migration record for the data to be managed and the second data storage directory includes the data to be managed, determining the second data storage directory as the first target data storage directory; In a case where there is no migration record for the data to be managed and the second data storage directory does not include the data to be managed, the first data storage directory is determined as the first target data storage directory.

3. The method according to claim 2, before obtaining the application's data to be managed and the target identification information of the first business scenario to which the data to be managed belongs, further comprising: When it is determined that the version of the application is updated to the first version and the target identification information does not exist in the registry, creating the first data storage directory; The target identification information is stored in the registration table.

4. The method according to claim 1, further comprising: Upon receiving the first input from the user, obtaining a second data set, where the second data set includes data of a second type related to the application in a second target directory and a third data storage directory, where the second target directory is used to store the data of the second type related to the application, and the third data storage directory is a data storage directory of the application under a third version, where the release time of the third version is earlier than the release time of the first version; The second data set is cleaned.

5. The method according to claim 1, wherein The electronic device further includes data of a third type related to the first business scenario, and the method further includes: Displaying the data management page for the first business scenario; Based on the data management page, the third type of data related to the first business scenario is managed.

6. A data management device, applied to an electronic device, comprising: A first acquisition module is configured to acquire data to be managed of an application and target identification information of a first business scenario to which the data to be managed belongs, where the first business scenario is a business scenario of the application under a first version; A determination module, configured to determine a first target data storage directory of the data to be managed based on the target identification information; a first management module, configured to manage the data to be managed based on the first target data storage directory; The application is a map application, the application under the first version includes M business scenarios, the first business scenario is a business scenario among the M business scenarios, M is a positive integer, and the device further includes: A second acquisition module is configured to acquire, for each business scenario, a second target data storage directory for the business scenario under the first target directory, wherein the first target directory is configured to store data of a first type related to the application; the first type is one of the data types, and the data of the application is classified into cached data, persistent data, and big data. a first statistics module, configured to perform disk space usage statistics on a first data set to obtain statistical information, wherein if the application is installed as a new installation, the first data set is data in the second target data storage directory; if the application is installed as an overwrite installation, the first data set includes: data in the second target data storage directory and data of the first type related to the business scenario in a third data storage directory, wherein the third data storage directory is a data storage directory for a third version of the application, and the release time of the third version is earlier than the release time of the first version; a second management module, configured to manage the data of the first type related to the business scenario based on the statistical information; if the disk space occupied by the data of the first type in the business scenario is close to a specified quota, apply to the server for an additional data storage quota for the business scenario; and if the disk space occupied by the data of the first type in the business scenario exceeds a certain threshold, send a warning message to the user; The second statistical module is used to count the target disk space usage value when the preset conditions are met; The first cleaning module is used to clean up the data in the second target directory when the disk space occupancy value is greater than or equal to a preset threshold, and give priority to cleaning cached data whose usage time exceeds a third threshold. The second target directory is used to store the second type of data of the application.

7. The device according to claim 6, wherein The determining module is specifically configured to: In a case where a migration record exists for the data to be managed, a first data storage directory is determined as the first target data storage directory, the first data storage directory is the data storage directory corresponding to the target identification information, the migration record represents a record of migration of the data to be managed from the second data storage directory to the first data storage directory, the second data storage directory is the data storage directory of the application under the second version, and a release time of the second version is earlier than a release time of the first version; If there is no migration record for the data to be managed and the second data storage directory includes the data to be managed, determining the second data storage directory as the first target data storage directory; In a case where there is no migration record for the data to be managed and the second data storage directory does not include the data to be managed, the first data storage directory is determined as the first target data storage directory.

8. The apparatus according to claim 7, further comprising: a creation module, configured to create the first data storage directory when it is determined that the version of the application is updated to the first version and the target identification information does not exist in the registry; A storage module is used to store the target identification information in the registration table.

9. The apparatus according to claim 6, further comprising: a third acquisition module, configured to, upon receiving the first input from the user, acquire a second data set, the second data set including data of a second type related to the application in a second target directory and a third data storage directory, the second target directory being used to store the data of the second type related to the application, the third data storage directory being a data storage directory of a third version of the application, the release time of the third version being earlier than the release time of the first version; The second cleaning module is used to clean the second data set.

10. The device according to claim 6, wherein The electronic device further includes data of a third type related to the first business scenario, and the apparatus further includes: A display module, configured to display a data management page for the first business scenario; The third management module is used to manage the third type of data related to the first business scenario based on the data management page.

11. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 5.

12. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 5.

13. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Data storage path management method, client and server

    CN104104582A

  • File management method and device and computer readable storage medium

    CN110765078A

  • File cleaning method and device, storage medium and equipment

    CN113934692A