CN112328327A - Configuration partition sorting method and device - Google Patents
Configuration partition sorting method and device Download PDFInfo
- Publication number
- CN112328327A CN112328327A CN202011313497.4A CN202011313497A CN112328327A CN 112328327 A CN112328327 A CN 112328327A CN 202011313497 A CN202011313497 A CN 202011313497A CN 112328327 A CN112328327 A CN 112328327A
- Authority
- CN
- China
- Prior art keywords
- configuration
- list
- partition
- files
- recorded
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000005192 partition Methods 0.000 title claims abstract description 152
- 238000000034 method Methods 0.000 title claims abstract description 44
- 238000012217 deletion Methods 0.000 claims description 15
- 230000037430 deletion Effects 0.000 claims description 15
- 238000013316 zoning Methods 0.000 claims description 6
- 238000004590 computer program Methods 0.000 claims description 4
- 238000004891 communication Methods 0.000 description 10
- 230000008569 process Effects 0.000 description 9
- 238000010586 diagram Methods 0.000 description 5
- 238000007726 management method Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000004883 computer application Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000037361 pathway Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present specification provides a method, an apparatus, a medium, and a device for arranging configuration partitions, in which, when a system version is upgraded, a list of configuration files required by the upgraded version is recorded; the method comprises the following steps: judging whether preset configuration partition sorting conditions are met or not according to the occupation of the storage space of the configuration partition; wherein the configuration partition is used for storing configuration files; acquiring a pre-recorded list under the condition that the sorting condition is determined to be met; and deleting files which are stored in the current configuration partition and are not recorded in the list according to the acquired list. Files in the configuration partition of the embedded system, which are not in the configuration list file, are deleted, and the storage space is released, so that the probability that the storage space of the configuration partition is completely occupied is reduced, the new configuration file can be written in the configuration partition, and the normal operation of the system is ensured.
Description
Technical Field
The present disclosure relates to the field of computer application technologies, and in particular, to a method, an apparatus, a medium, and a device for sorting configuration partitions.
Background
In an embedded system, a separate configuration partition is typically partitioned in its small non-volatile memory to store configuration files. After the system version is upgraded, part of the configuration file of the previous version may become useless, but still exist in the configuration partition, and a new configuration file is also stored in the configuration partition, so that more and more data are in the configuration partition. After the system version is upgraded for many times, the storage space of the configuration partition is occupied completely, so that a new configuration file cannot be stored when the system version is upgraded, and the system cannot operate normally.
In the prior art, in order to prevent the storage space in the configuration partition from being completely occupied, a program running in a system generally deletes a discarded configuration file of the program after the system version is upgraded. However, such a deletion method may still cause the storage space of the configuration partition to be fully occupied, which affects the normal operation of the system: on one hand, after upgrading, some programs may be cut off, so that the configuration files of the programs cannot be deleted, and the storage space is occupied; on the other hand, due to the problem of program design, some non-configuration files may be stored in the configuration partition, and these files cannot be identified and deleted by the program, which occupies a memory space.
Disclosure of Invention
In order to overcome the problem that useless files occupy space in configuration partitions in the related art, the specification provides a configuration partition sorting method, a device, a medium and equipment.
According to a first aspect of the embodiments of the present description, a method for arranging configuration partitions is provided, in which when a system version is upgraded, a list of configuration files required by the upgraded version is recorded; the method comprises the following steps:
judging whether preset configuration partition sorting conditions are met or not according to the occupation of the storage space of the configuration partition; wherein the configuration partition is used for storing configuration files;
acquiring a pre-recorded list under the condition that the sorting condition is determined to be met;
and deleting the configuration files which are stored in the current configuration partition and are not recorded in the list according to the acquired list.
According to a second aspect of the embodiments of the present specification, there is provided a configuration partition organizing apparatus, in which, when a system version is upgraded, a list of configuration files required by the upgraded version is recorded; the device comprises:
the arrangement condition judgment unit is used for judging whether preset arrangement partition arrangement conditions are met or not according to the occupation of the storage space of the arrangement partitions; wherein the configuration partition is used for storing configuration files;
a list acquisition unit configured to acquire a pre-recorded list in a case where it is determined that the sorting condition is satisfied;
and the file deleting unit is used for deleting the files which are stored in the current configuration partition and are not recorded in the list according to the acquired list.
According to a third aspect of the embodiments of the present specification, there is provided a computer-readable storage medium on which a computer program is stored, the program, when executed by a processor, implementing the method for partition arrangement according to any one of the first aspect of the embodiments of the present specification.
According to a fourth aspect of embodiments herein, there is provided a computer apparatus comprising:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method of partition arrangement according to any one of the first aspect of the embodiments of the present specification.
In the embodiment of the present description, compared with the prior art, the system manages the configuration files in the configuration partition in a unified manner, and through the pre-recorded list of the configuration partition, the files that cannot be deleted in the prior art are deleted, so that the probability that the storage space of the configuration partition is completely occupied is reduced, a new configuration file can be written into the configuration partition, and the normal operation of the system is ensured.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the specification.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present specification and together with the description, serve to explain the principles of the specification.
FIG. 1 is a flow chart illustrating a method for configuration zoning according to an exemplary embodiment of the present description.
Fig. 2 is a flowchart illustrating how a file is deleted in a partition arrangement method according to an embodiment.
FIG. 3 is a flow diagram illustrating another method for configuring zoning coordination according to one embodiment of the present description.
FIG. 4 is a block diagram illustrating one configuration zoning collating device according to one exemplary embodiment of the present description.
Fig. 5 is a hardware configuration diagram of a computer device in which a partitioned collating apparatus is configured according to an embodiment of the present specification.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present specification. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the specification, as detailed in the appended claims.
The terminology used in the description herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the description. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of the present specification. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
The configuration file is used for recording configuration information of the program in the system and is an essential part for normal operation of the program. In the embedded system, because the memory space of the embedded system is small and in order to ensure that the configuration file is not lost in the shutdown or restart process, the configuration file is generally stored in a configuration partition of the nonvolatile storage device of the embedded system. The non-volatile storage device of the embedded system is typically a Flash memory card, such as a Compact Flash (CF) Flash card, which generally has a small storage space and a small configuration partition.
When the version of the embedded system is upgraded, the programs in the new version and the configuration file corresponding to each program are released, and compared with other systems, in each version of the embedded system, the configuration file necessary for the system cannot be changed due to the uninstallation or installation of the program. After the system version is upgraded, some configuration files which are not needed any more may be in the configuration partition, if the configuration files which are not needed by the new version are not deleted in time in the configuration partition, when the system is upgraded again, the configuration partition may not have an available storage space to store new configuration files needed by the upgraded version, and the system may not operate normally.
In the prior art, after a system is upgraded, each program in the system is respectively responsible for deleting configuration files which are not needed by the program. This solution can delete some of the configuration files that are not needed, but cannot delete some of the files that are not responsible for the program in the configuration partition, such as: some programs of the new version are cut off, and the original configuration files of the cut off programs have no corresponding program to be responsible for deleting; in addition, some non-configuration files stored in the partition by mistake may be configured, and the files have no corresponding program to be responsible for deleting.
Based on this, in one or more embodiments of the present invention, instead of the prior art scheme in which each program is responsible for managing its own configuration file, the system manages the files in the configuration partition as a whole, and the pre-recorded list of configuration files is compared with the files in the configuration partition, so that the system can delete useless files in the configuration partition when there is no spare storage space in the configuration partition, so as to release the space in the configuration partition. Therefore, the system can store a new configuration file when the next version is upgraded, so that the system can normally operate.
The embodiments of the present specification will be described in detail below from two stages of "preparation" and "finishing".
A preparation stage:
in order to implement the arrangement of the system configuration partition, when the system version is upgraded, a list of configuration files required by the upgraded version needs to be recorded.
The method for recording the list of configuration files may be as follows: each program provides the configuration files necessary for the program, and a list of the configuration files of the program is formed; and summarizing the lists of the configuration files of the programs corresponding to all the programs into a total list of the configuration files. When the list of configuration files is stored in the configuration partition, the file of the list itself needs to be added to the list in order to prevent the list from being deleted when the configuration partition is arranged.
In the list of configuration files, a unique configuration file identifier of each required file can be stored; in order to find the file conveniently, the storage directory path of each required file may be stored in the list of configuration files, that is, the list of configuration files includes the storage directory path of the configuration file in the configuration partition.
A finishing stage:
based on pre-recording the list in the preparation phase, the configuration partitions may be sorted when there is a sorting requirement, as shown in fig. 1, where fig. 1 is a flowchart of a configuration partition sorting method according to an exemplary embodiment shown in this specification, and specifically may include the following steps:
Wherein the configuration partition is used for storing configuration files. In an embedded system, in order to prevent the configuration file from being lost when the device is powered off, the configuration partition is a storage space in the non-volatile memory, such as a certain folder in a CF card.
Step 101 may be: and when the specified period is reached, judging whether the preset arrangement condition of the configuration subareas is met or not according to the occupation of the storage space of the configuration subareas. The designated period may be selected to be a suitable value according to actual conditions, for example, the configuration partition may be stored with some non-configuration files, the designated period may be shortened, or the configuration partition may be smaller and may be cleaned up frequently. The designated period can also be selected as small as possible to realize real-time monitoring and configuration of the occupied storage space of the partition.
Step 101 may also be: before each system upgrade, whether the preset arrangement condition of the configuration subarea is met or not is judged according to the occupation of the storage space of the configuration subarea. The arrangement condition of the configuration partition may be whether the occupancy rate of the configuration partition reaches a preset threshold, or whether the size of the space occupied by all the files in the configuration partition reaches a preset value. In practice, the preset threshold or the preset value may be selected according to actual situations, for example, the configuration partition is small, and the preset threshold may be set to be small, so as to prevent that there is no space for storing a new configuration file when the system is updated.
In addition, except that whether the preset configuration partition sorting condition is met or not is judged according to the occupation of the storage space of the configuration partition, the method can also comprise the following steps: when a user inputs a configuration partition arrangement instruction, arrangement is carried out on the configuration partitions, or after each system upgrade, arrangement is carried out on the configuration partitions.
In a case where it is determined that the sorting condition is not satisfied, execution of step 101 next time is waited. If step 101 is performed at a specified period, in the case where it is determined that the sorting condition is not satisfied, the arrival of the next specified period is waited for.
And 103, deleting files which are stored in the current configuration partition and are not recorded in the list according to the acquired list.
After step 103 is performed, the next condition is waited for that triggers step 101. If step 101 is performed at the specified period, then the next specified period is waited for after step 103 is completed.
Deleting files which are stored in the current configuration partition and are not recorded in the list according to the acquired list, wherein the deleting method specifically comprises the following steps: comparing the files stored in the configuration partition with the configuration files in the list, and adding a deletion mark in the files which are stored in the current configuration partition and are not recorded in the list; and deleting files which are stored in the configuration partition and are not recorded in the list according to the deletion marks.
After each version of the system is upgraded, the list of the configuration file of the previous version can be deleted. When the list of the configuration files is in the configuration partition, the system may not delete the list of the configuration file of the previous version after each version upgrade, and since the list of the configuration file of the previous version is not in the list of the configuration file of the latest version, the list of the configuration file of the previous version may be deleted when the configuration partition is sorted.
Specifically, as shown in fig. 2, fig. 2 is a flowchart illustrating how to delete a file in a partition sorting method according to an embodiment, and step 103 may include the following steps:
and step 1031, acquiring all file lists of the configuration partition.
Step 1032, comparing the configuration partition all-file list with the configuration file list, and adding deletion marks to files which do not exist in the configuration file list and exist in the configuration partition all-file list.
Each file in the configuration partition is processed item by item, step 1033.
At step 1034, it is determined whether the file has a deletion flag.
If the result of the determination is yes, i.e. the file has a deletion flag, the process goes to step 1035, and if the result of the determination is no, i.e. the file has no deletion flag, the process goes to step 1033.
Step 1036, determine whether all files of the configuration partition have been traversed.
If the result of the determination is yes, that is, if all files in the configuration partition have been traversed, the arrangement of the configuration partition has been completed, and the arrangement process of the configuration partition is ended, and if the result of the determination is no, that is, if all files in the configuration partition have not been traversed, the jump is made to 1033.
When the version is upgraded, the system records the configuration file necessary for the upgraded version in advance to form a list of the configuration file. When the configuration partitions need to be sorted, the system uniformly deletes files which are not necessary for the version in the configuration partitions through the recorded list of the configuration files, and manages the configuration partitions through the whole system, so that the problem that the configuration files of cut programs in a new version cannot be deleted in the prior art is solved, the probability that the storage space of the configuration partitions is completely occupied is reduced, the new configuration files can be written into the configuration partitions, and the normal operation of the system after updating is ensured.
For example, as shown in fig. 3, fig. 3 is a flowchart illustrating another configuration partition sorting method according to an embodiment of the present disclosure. In the embedded system, the entry directory of the configuration partition is a/config path, and the list of configuration files is stored in the configuration partition. There are two programs a1 and a2 in the old version, where the storage directory path of the configuration file of a1 is/config/a 1/1 and/config/a 1/2, respectively, the storage directory path of the configuration file of a2 is/config/a 2/3, the storage directory path of the list of configuration files of this version is/config/cfg.list, and the storage directory path of each necessary configuration file is stored in the list of configuration files of this version. Before the system version is upgraded, the configuration partition has no unnecessary configuration file and no other file, so that the files in the list of the configuration partition and the configuration file before the system version is upgraded are the same, and the list of the configuration file comprises: /config/A1/1,/config/A1/2,/config/A2/3 and/config/cfg.list.
After the system version is upgraded, in the new version system, A2 is cut off, the new version system only has two programs of A1 and A3, the storage directory paths of the configuration files required by A1 are/config/A1/1 and/config/A1/4 respectively, and the storage directory paths of the configuration files required by A3 are/config/A3/5. And when the version is upgraded, the list of the configuration file of the old version is replaced by the list of the configuration file of the new version.
After the release of the new version, the method comprises the following steps:
And when the version is upgraded, recording a list of configuration files required by the upgraded version, and replacing the list of the configuration files with the original list of the configuration files in the configuration partition, wherein the name of the list of the configuration files is cfg. The list of new versions of configuration files includes the following: /config/A1/1,/config/A1/4,/config/A3/5 and/config/cfg.list.
And after the system version is upgraded, starting the system, and sorting the configuration partitions according to the occupation conditions of the configuration partitions when a specified period is reached.
And step 304, judging whether a preset configuration partition sorting condition is met according to the occupation of the storage space of the configuration partition.
If yes, that is, after the preset configuration partition arrangement condition is satisfied, step 305 is executed, and if no, the process goes to step 303.
Monitoring whether the occupancy rate of the configuration partition reaches a specified threshold. After the system is upgraded and the first appointed period is reached, the storage directory path of the file in the configuration partition is as follows: the six files enable the configuration partition to reach the preset arrangement condition of the configuration partition. Then execution continues at step 305.
In the configuration partition, a list of configuration files cfg.list is obtained by storing directory path/config/cfg.list.
And step 306, deleting files which are stored in the current configuration partition and are not recorded in the list according to the acquired list.
After step 306 is executed, the process jumps to step 303 to wait for the next specified period.
Based on comparing all files in the configuration partition with the list of configuration files obtained, the following optional configuration files are found: the configuration file/config/A1/2 which the A1 does not need and the original configuration file/config/A2/3 of the A2 which is cut off are deleted. After deleting, configuring files in the partition as follows: the configuration partition management method comprises the steps of/config/A1/1,/config/A1/4,/config/A3/5 and/config/cfg.list, wherein the storage space occupancy rate in the configuration partition does not reach the preset configuration partition management condition, and the configuration partition management is realized.
In one or more embodiments of the present invention, a scheme in the prior art is changed, in which each program is responsible for configuration file management of its own program, files in a configuration partition are managed by the whole system, and a list of configuration files is pre-recorded and compared with files in the configuration partition, so that when there is no spare storage space in the configuration partition, the system can delete useless files in the configuration partition to release space in the configuration partition. Therefore, the system can store a new configuration file when the next version is upgraded, so that the system can normally operate.
Corresponding to the embodiment of the method, the specification also provides an embodiment of configuring the partitioned sorting device and a terminal applied by the partitioned sorting device.
As shown in fig. 4, fig. 4 is a block diagram of a configuration zoning organizing apparatus shown in the present specification according to an exemplary embodiment, the apparatus comprising:
a sorting condition determining unit 410, configured to determine whether a preset sorting condition of the configuration partition is satisfied according to the storage space occupation of the configuration partition; wherein the configuration partition is used for storing configuration files.
A list acquisition unit 420 for acquiring a pre-recorded list in a case where it is determined that the sorting condition is satisfied.
A file deleting unit 430, configured to delete, according to the obtained list, files that are stored in the currently configured partition and are not recorded in the list.
The implementation process of the functions and actions of each module in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
Further, the list of configuration files includes storage directory paths of the configuration files in the configuration partition.
Further, the finishing condition determining unit is specifically configured to: and when the specified period is reached, judging whether the preset arrangement condition of the configuration subareas is met or not according to the occupation of the storage space of the configuration subareas.
Further, the file deleting unit specifically includes: a deletion mark adding subunit, configured to compare the file stored in the configuration partition with the configuration file in the list, and add a deletion mark to the file stored in the current configuration partition and not recorded in the list; and the file deleting subunit is used for deleting the files which are stored in the configuration partition and are not recorded in the list according to the deletion marks.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, wherein the modules described as separate parts may or may not be physically separate, and the parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution in the specification. One of ordinary skill in the art can understand and implement it without inventive effort.
As shown in fig. 5, fig. 5 is a hardware structure diagram of a computer device in which a partitioned collating apparatus is configured, and the device may include: a processor 510, a memory 520, an input/output interface 530, a communication interface 540, and a bus 550. Wherein processor 510, memory 520, input/output interface 530, and communication interface 540 are communicatively coupled to each other within the device via bus 550.
The processor 510 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present specification.
The Memory 520 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, or the like. The memory 520 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 520 and called by the processor 510 for execution.
The input/output interface 530 is used for connecting an input/output module to realize information input and output. The i/o module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, an indicator light, etc.
The communication interface 540 is used for connecting a communication module (not shown in the figure) to realize communication interaction between the device and other devices. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, Bluetooth and the like).
It should be noted that although the above-mentioned device only shows the processor 510, the memory 520, the input/output interface 530, the communication interface 540 and the bus 550, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures.
The embodiments of the present specification further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the configuration partition sorting method according to any one of the first aspect of the embodiments of the present specification.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Other embodiments of the present description will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This specification is intended to cover any variations, uses, or adaptations of the specification following, in general, the principles of the specification and including such departures from the present disclosure as come within known or customary practice within the art to which the specification pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the specification being indicated by the following claims.
It will be understood that the present description is not limited to the precise arrangements described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.
The above description is only a preferred embodiment of the present disclosure, and should not be taken as limiting the present disclosure, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.
Claims (10)
1. A configuration partition arrangement method is characterized in that when a system version is upgraded, a list of configuration files required by the upgraded version is recorded; the method comprises the following steps:
judging whether preset configuration partition sorting conditions are met or not according to the occupation of the storage space of the configuration partition; wherein the configuration partition is used for storing configuration files;
acquiring a pre-recorded list under the condition that the sorting condition is determined to be met;
and deleting files which are stored in the current configuration partition and are not recorded in the list according to the acquired list.
2. The method of claim 1, wherein the list of configuration files comprises storage directory paths of configuration files in the configuration partition.
3. The method according to claim 1, wherein determining whether a preset configuration partition sorting condition is satisfied according to the storage space occupation of the configuration partition specifically comprises:
and when the specified period is reached, judging whether the preset arrangement condition of the configuration subareas is met or not according to the occupation of the storage space of the configuration subareas.
4. The method according to claim 1, wherein deleting files stored in the currently configured partition and not recorded in the list according to the obtained list specifically comprises:
comparing the files stored in the configuration partition with the configuration files in the list, and adding a deletion mark in the files which are stored in the current configuration partition and are not recorded in the list;
and deleting files which are stored in the configuration partition and are not recorded in the list according to the deletion marks.
5. A configuration partition collating unit is characterized in that when a system version is upgraded, a list of configuration files required by the upgraded version is recorded; the device comprises:
the arrangement condition judgment unit is used for judging whether preset arrangement partition arrangement conditions are met or not according to the occupation of the storage space of the arrangement partitions; wherein the configuration partition is used for storing configuration files;
a list acquisition unit configured to acquire a pre-recorded list in a case where it is determined that the sorting condition is satisfied;
and the file deleting unit is used for deleting the files which are stored in the current configuration partition and are not recorded in the list according to the acquired list.
6. The apparatus of claim 5, wherein the list of configuration files comprises storage directory paths of configuration files in the configuration partition.
7. The apparatus according to claim 5, wherein the sorting condition determining unit is specifically configured to:
and when the specified period is reached, judging whether the preset arrangement condition of the configuration subareas is met or not according to the occupation of the storage space of the configuration subareas.
8. The apparatus of claim 5, wherein the file deleting unit specifically includes:
a deletion mark adding subunit, configured to compare the file stored in the configuration partition with the configuration file in the list, and add a deletion mark to the file stored in the current configuration partition and not recorded in the list;
and the file deleting subunit is used for deleting the files which are stored in the configuration partition and are not recorded in the list according to the deletion marks.
9. A computer-readable storage medium, characterized in that the readable storage medium has stored thereon a computer program which, when executed by a processor, implements the configuration zoning interpretation method according to any of claims 1 to 4.
10. A computer device, characterized in that the computer device comprises:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the configuration zoning interpretation method of any of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011313497.4A CN112328327B (en) | 2020-11-20 | 2020-11-20 | Configuration partition arrangement method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011313497.4A CN112328327B (en) | 2020-11-20 | 2020-11-20 | Configuration partition arrangement method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112328327A true CN112328327A (en) | 2021-02-05 |
CN112328327B CN112328327B (en) | 2023-10-27 |
Family
ID=74321828
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011313497.4A Active CN112328327B (en) | 2020-11-20 | 2020-11-20 | Configuration partition arrangement method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112328327B (en) |
Citations (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070162525A1 (en) * | 2006-01-11 | 2007-07-12 | Fujitsu Limited | File delete method, file open method, storage medium storing file delete program, and storage medium storing file open program |
CN101782859A (en) * | 2010-03-18 | 2010-07-21 | 上海乐毅信息科技有限公司 | Upgrading method of embedded system in application |
CN102609495A (en) * | 2012-01-29 | 2012-07-25 | 奇智软件(北京)有限公司 | Method for deleting file and system |
CN102654872A (en) * | 2011-03-03 | 2012-09-05 | 腾讯科技(深圳)有限公司 | Method and device for cleaning junk files generated by application programs |
CN103646087A (en) * | 2013-12-13 | 2014-03-19 | 北京奇虎科技有限公司 | Junk file data cleaning method and device |
CN104391850A (en) * | 2014-07-31 | 2015-03-04 | 珠海市君天电子科技有限公司 | Method and device for cleaning garbage files of disks, and terminal device |
CN105867845A (en) * | 2016-03-28 | 2016-08-17 | 乐视控股(北京)有限公司 | Application storage space management method and device |
CN106325942A (en) * | 2016-08-25 | 2017-01-11 | 维沃移动通信有限公司 | Application program data processing method and mobile terminal |
CN106339209A (en) * | 2015-07-17 | 2017-01-18 | 阿里巴巴集团控股有限公司 | Data processing method and equipment |
CN106557500A (en) * | 2015-09-28 | 2017-04-05 | 北京金山安全软件有限公司 | Method and device for cleaning uninstalled residual file and terminal |
US20170308369A1 (en) * | 2016-04-25 | 2017-10-26 | Hisense Electric Co., Ltd. | Data processing method and device of preset application after upgrading |
CN108121783A (en) * | 2017-12-19 | 2018-06-05 | 深圳创维数字技术有限公司 | A kind of automatic cleaning method, device, computer and storage medium for storing data |
US20180211044A1 (en) * | 2016-05-09 | 2018-07-26 | Boe Technology Group Co., Ltd. | Method and apparatus for upgrading embedded memory and terminal associated therewith |
CN109656881A (en) * | 2018-12-26 | 2019-04-19 | 山东华辰泰尔信息科技股份有限公司 | A kind of method and system for realizing file dynamic management based on FAT16 technology |
CN109902078A (en) * | 2019-01-10 | 2019-06-18 | 杭州迪普科技股份有限公司 | Database upgrade compatible method, apparatus, equipment and storage medium |
CN110471764A (en) * | 2019-08-01 | 2019-11-19 | 郑州阿帕斯科技有限公司 | A kind of processing method and processing device of memory cleaning |
CN111427598A (en) * | 2020-03-16 | 2020-07-17 | 深圳震有科技股份有限公司 | Control method and system of software upgrading file and intelligent terminal |
-
2020
- 2020-11-20 CN CN202011313497.4A patent/CN112328327B/en active Active
Patent Citations (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070162525A1 (en) * | 2006-01-11 | 2007-07-12 | Fujitsu Limited | File delete method, file open method, storage medium storing file delete program, and storage medium storing file open program |
CN101782859A (en) * | 2010-03-18 | 2010-07-21 | 上海乐毅信息科技有限公司 | Upgrading method of embedded system in application |
CN102654872A (en) * | 2011-03-03 | 2012-09-05 | 腾讯科技(深圳)有限公司 | Method and device for cleaning junk files generated by application programs |
CN102609495A (en) * | 2012-01-29 | 2012-07-25 | 奇智软件(北京)有限公司 | Method for deleting file and system |
CN103646087A (en) * | 2013-12-13 | 2014-03-19 | 北京奇虎科技有限公司 | Junk file data cleaning method and device |
CN104391850A (en) * | 2014-07-31 | 2015-03-04 | 珠海市君天电子科技有限公司 | Method and device for cleaning garbage files of disks, and terminal device |
CN106339209A (en) * | 2015-07-17 | 2017-01-18 | 阿里巴巴集团控股有限公司 | Data processing method and equipment |
CN106557500A (en) * | 2015-09-28 | 2017-04-05 | 北京金山安全软件有限公司 | Method and device for cleaning uninstalled residual file and terminal |
CN105867845A (en) * | 2016-03-28 | 2016-08-17 | 乐视控股(北京)有限公司 | Application storage space management method and device |
WO2017166679A1 (en) * | 2016-03-28 | 2017-10-05 | 乐视控股(北京)有限公司 | Method and apparatus for managing storage space of applications, and electronic device |
US20170308369A1 (en) * | 2016-04-25 | 2017-10-26 | Hisense Electric Co., Ltd. | Data processing method and device of preset application after upgrading |
US20180211044A1 (en) * | 2016-05-09 | 2018-07-26 | Boe Technology Group Co., Ltd. | Method and apparatus for upgrading embedded memory and terminal associated therewith |
CN106325942A (en) * | 2016-08-25 | 2017-01-11 | 维沃移动通信有限公司 | Application program data processing method and mobile terminal |
CN108121783A (en) * | 2017-12-19 | 2018-06-05 | 深圳创维数字技术有限公司 | A kind of automatic cleaning method, device, computer and storage medium for storing data |
CN109656881A (en) * | 2018-12-26 | 2019-04-19 | 山东华辰泰尔信息科技股份有限公司 | A kind of method and system for realizing file dynamic management based on FAT16 technology |
CN109902078A (en) * | 2019-01-10 | 2019-06-18 | 杭州迪普科技股份有限公司 | Database upgrade compatible method, apparatus, equipment and storage medium |
CN110471764A (en) * | 2019-08-01 | 2019-11-19 | 郑州阿帕斯科技有限公司 | A kind of processing method and processing device of memory cleaning |
CN111427598A (en) * | 2020-03-16 | 2020-07-17 | 深圳震有科技股份有限公司 | Control method and system of software upgrading file and intelligent terminal |
Non-Patent Citations (3)
Title |
---|
ZHAOYAN SHEN;LEI HAN; RENHAI CHEN: "An Efficient Directory Entry Lookup Cache With Prefix-Awareness for Mobile Devices", 《 IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN OF INTEGRATED CIRCUITS AND SYSTEMS》, vol. 39, no. 12, pages 4575, XP011821098, DOI: 10.1109/TCAD.2020.2978833 * |
李挺; 邓科; 张焕青; 蔡昂; 冯凝; 刘晓华; 李炜; 洪叶: "类Unix系统服务器文件夹磁盘空间监视及自动维护软件的研制", 《重庆理工大学学报(自然科学)》, vol. 31, no. 12, pages 151 - 155 * |
纪大峣: "GFUAeD:一种嵌入式设备的通用固件升级方法", 福建电脑, vol. 34, no. 06, pages 122 - 128 * |
Also Published As
Publication number | Publication date |
---|---|
CN112328327B (en) | 2023-10-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20140067879A1 (en) | Application management for a terminal | |
CN103577567A (en) | Method for uninstalling application and deleting garbage file in Android system | |
CN106031127B (en) | Method and apparatus for management of applications | |
US20130225148A1 (en) | Terminal with module protection and module managing method | |
CN108932286B (en) | Data query method and device | |
EP1679599B1 (en) | File update system and boot management system of mobile communication terminal, and corresponding methods | |
CN103559065A (en) | Method and system for OTA (Over-the-Air Technology) upgrade | |
CN112182010B (en) | Dirty page refreshing method and device, storage medium and electronic equipment | |
CN111198777A (en) | Data processing method, device, terminal and storage medium | |
CN112214388A (en) | Memory monitoring method, device, equipment and computer readable storage medium | |
CN102999349A (en) | Software upgrading method | |
CN114443058A (en) | Method for creating private mirror image in public cloud and related equipment | |
CN106484779B (en) | File operation method and device | |
CN114780019A (en) | Electronic device management method and device, electronic device and storage medium | |
CN103064767B (en) | Drive backup, the method recovered and device | |
CN113190325A (en) | Container creation method and device | |
JP2015172862A (en) | Information processing device for controlling data life cycle, data life cycle control method, and program for the same | |
CN112328327A (en) | Configuration partition sorting method and device | |
CN112988549B (en) | Method for obtaining log based on vehicle machine system and electronic equipment | |
CN110888649B (en) | Application deployment method, application baseline creation method and device | |
CN108427678B (en) | Method for searching application resource file by android system | |
CN115964061A (en) | Plug-in updating method and device, electronic equipment and computer readable storage medium | |
CN111124459B (en) | Method and device for updating service logic of FPGA cloud server | |
CN108363614B (en) | Application service module management method and device and server | |
CN106959888B (en) | Task processing method and device in cloud storage system |
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 |