CN114861209B - Method, device and terminal for acquiring occupied information of memory space - Google Patents

Method, device and terminal for acquiring occupied information of memory space Download PDF

Info

Publication number
CN114861209B
CN114861209B CN202210573758.9A CN202210573758A CN114861209B CN 114861209 B CN114861209 B CN 114861209B CN 202210573758 A CN202210573758 A CN 202210573758A CN 114861209 B CN114861209 B CN 114861209B
Authority
CN
China
Prior art keywords
data
memory space
access control
terminal
acquiring
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210573758.9A
Other languages
Chinese (zh)
Other versions
CN114861209A (en
Inventor
李杨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202210573758.9A priority Critical patent/CN114861209B/en
Publication of CN114861209A publication Critical patent/CN114861209A/en
Application granted granted Critical
Publication of CN114861209B publication Critical patent/CN114861209B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/604Tools and structures for managing or administering access control systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Bioethics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Automation & Control Theory (AREA)
  • Storage Device Security (AREA)

Abstract

The application discloses a method, a device and a terminal for acquiring occupation information of a memory space, and belongs to the technical field of terminals. The method comprises the steps of obtaining a data recovery data packet, controlling a terminal to enter a data recovery mode based on operation data in the data packet, starting a permission access control in the data recovery mode based on permission function data in the data packet, accessing data in a memory space based on the permission access control, and obtaining occupation information of the memory space based on the occupied space of the accessed data in the memory space. Because the permission access control has the permission of accessing the data in the memory space, the permission access control can access the data with the access permission set in the memory space and can also access the data without the access permission set in the memory space, so that the occupation information of the memory space can be acquired based on the space occupied by the accessed data in the memory space, and the comprehensiveness of counting the occupation information of the memory space is improved.

Description

Method, device and terminal for acquiring occupied information of memory space
Technical Field
The present application relates to the field of terminal technologies, and in particular, to a method and an apparatus for acquiring occupation information of a memory space, and a terminal.
Background
The user data (userdata) space of the terminal is a memory space, and the memory space may store user data and may also store system data, such as log information, application data, and the like. In the process of using the terminal, due to design defects, log information may be written into the memory space continuously, so that the memory space is abnormally occupied. Or some applications in the memory space are abnormal in the process of loading the configuration information, so that the memory space is occupied by the abnormality. In this case, statistics is required for the occupation of the memory space to analyze the abnormal occupation problem of the memory space.
In the related art, a space statistics function is set in a setting module of the terminal, that is, the terminal can count the occupation information of the memory space based on the space statistics function, however, the space statistics function can only count the occupation information of the data in which the access right is not set in the memory space.
Because the memory space not only has the data without the access right, but also has the data with the access right, the occupation information of the data without the access right in the memory space can only be counted in the related technology, so that the occupation information of the counted memory space is incomplete.
Disclosure of Invention
The embodiment of the application provides a method, a device and a terminal for acquiring occupation information of a memory space, which can improve the comprehensiveness of counting the occupation information of the memory space. The technical scheme is as follows:
in one aspect, a method for acquiring occupation information of a memory space is provided, where the method includes:
Acquiring a data Recovery data packet, wherein the Recovery data packet comprises operation data of a Recovery mode and authority function data of an authority access control;
Based on the operation data, controlling the terminal to enter the Recovery mode;
based on the authority functional data, enabling the authority access control in the Recovery mode, wherein the Recovery mode is used for providing an operation environment for the authority access control, and the authority access control has the authority for accessing the data in the memory space of the terminal;
accessing the data in the memory space based on the permission access control, and acquiring the occupation information of the memory space based on the space occupied by the accessed data in the memory space.
On the other hand, there is provided an apparatus for acquiring occupation information of a memory space, the apparatus comprising:
the first acquisition module is used for acquiring a data Recovery data packet, wherein the Recovery data packet comprises operation data in a Recovery mode and authority function data of an authority access control;
The control module is used for controlling the terminal to enter the Recovery mode based on the operation data;
The starting module is used for starting the authority access control in the Recovery mode based on the authority function data, the Recovery mode is used for providing an operation environment for the authority access control, and the authority access control has the authority for accessing the data in the memory space of the terminal;
The second acquisition module is used for accessing the data in the memory space based on the permission access control, and acquiring the occupation information of the memory space based on the space occupied by the accessed data in the memory space.
On the other hand, a terminal is provided, which comprises a processor and a memory, wherein at least one program code is stored in the memory, and the at least one program code is loaded and executed by the processor, so as to realize the method for acquiring the occupation information of the memory space.
In another aspect, a computer readable storage medium is provided, where at least one program code is stored in the computer readable storage medium, where the at least one program code is loaded and executed by a processor, so as to implement the method for acquiring the occupation information of the memory space.
In another aspect, a computer program product is provided, where at least one piece of program code is stored, where the at least one piece of program code is loaded and executed by a processor, so as to implement the method for acquiring the occupation information of the memory space.
The technical scheme provided by the embodiment of the application has the beneficial effects that:
The embodiment of the application provides a method for acquiring the occupation information of a memory space, which comprises the steps of firstly controlling a terminal to enter a data recovery mode, starting an authority access control in the data recovery mode, and accessing data in the memory space based on the authority access control.
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 disclosure.
Drawings
FIG. 1 is a schematic illustration of an implementation environment provided by an embodiment of the present application;
fig. 2 is a flowchart of a method for acquiring occupation information of a memory space according to an embodiment of the present application;
Fig. 3 is a flowchart of a method for acquiring occupation information of a memory space according to an embodiment of the present application;
Fig. 4 is a schematic diagram of acquiring occupation information of a memory space according to an embodiment of the present application;
fig. 5 is a flowchart of a method for acquiring occupation information of a memory space according to an embodiment of the present application;
Fig. 6 is a schematic structural diagram of an apparatus for acquiring occupation information of a memory space according to an embodiment of the present application;
Fig. 7 is a block diagram of a terminal according to an embodiment of the present application.
Detailed Description
In order to make the technical scheme and advantages of the present application more clear, the following further describes the embodiments of the present application in detail.
The terms "first," "second," "third," and "fourth" and the like in the description and in the claims and drawings are used for distinguishing between different objects and not necessarily for describing a particular sequential or chronological order. Furthermore, the terms "comprising," "including," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
It should be noted that, the information (including but not limited to user equipment information, user personal information, etc.), data (including but not limited to data for analysis, stored data, presented data, etc.), and signals related to the present application are all authorized by the user or are fully authorized by the parties, and the collection, use, and processing of the related data is required to comply with the relevant laws and regulations and standards of the relevant countries and regions. For example, the operation data, the authority function data, the data in the memory space, and the like related to the present application are all acquired under the condition of sufficient authority.
For ease of understanding, the terms referred to in the present application will be explained herein.
Memory space: also called userdata space, which is a space area for storing data, contacts, data materials, etc. of application programs, and is a readable and writable space area for storing system and user data, except for a system partition, and is stored in the terminal.
Data recovery mode: the mode is also called Recovery mode, and is a mode for modifying data in a terminal and a terminal system, and in the mode, operations such as upgrading, system backup, factory setting Recovery and the like can be performed on the terminal system. In the embodiment of the application, the terminal can also access the data in the memory space through the permission access control in the Recovery mode.
Fig. 1 is a schematic diagram of an implementation environment of a method for acquiring occupation information of a memory space according to an embodiment of the present application, referring to fig. 1, the implementation environment includes: the terminal 101, the terminal 101 includes a memory space, and the memory space stores data with access rights and data without access rights. When counting the occupation information, the terminal 101 firstly acquires a Recovery data packet, and after entering a Recovery mode based on the Recovery data packet, enables a permission access control by loading permission function data in the Recovery data packet, and can access not only data without access permission but also data with access permission, and acquire the occupation information of the memory space by counting the occupied space of the accessed data in the memory space, thereby improving the comprehensiveness of counting the occupation information of the memory space.
In the embodiment of the application, the memory space comprises a plurality of memory spaces, the plurality of memory spaces store data without access permission and data with access permission, the data stored in the plurality of memory spaces can be accessed through the permission access control, and the occupation information of the plurality of memory spaces in the memory space is counted.
The terminal 101 is at least one of a mobile phone, a tablet computer, PC (Personal Computer) equipment and the like.
Fig. 2 is a flowchart of a method for acquiring occupation information of a memory space according to an embodiment of the present application, referring to fig. 2, the method includes:
step 201: and obtaining a Recovery data packet.
The Recovery data packet comprises operation data of a Recovery mode and authority function data of an authority access control.
In the embodiment of the application, the terminal can load the authority function data in the Recovery mode, and the authority access control is started through the authority function data, so that the data with the access authority set in the memory space is accessed.
Step 202: and based on the operation data, the control terminal enters a Recovery mode.
Step 203: based on the rights function data, a rights access control is enabled in a Recovery mode.
The Recovery mode is used for providing an operation environment for the permission access control, and the permission access control has permission to access data in a memory space of the terminal.
In the embodiment of the application, the permission access control can access the data for setting the access permission. The data for setting the access permission may be encrypted data, data for setting the permission level, or data for both encryption and permission level setting. Correspondingly, if the data with the access authority is the encrypted data, the data without the access authority is the unencrypted data. If the data with the access authority is the data with the authority level, the data without the access authority is the data without the authority level. If the data with the access authority is the data which is encrypted and has the authority level, the data without the access authority is the data without the authority level, and the data without the access authority is the data without the authority level.
Step 204: accessing the data in the memory space based on the permission access control, and acquiring the occupation information of the memory space based on the space occupied by the accessed data in the memory space.
The occupancy information is used to represent the amount of space occupied by the data.
The embodiment of the application provides a method for acquiring the occupation information of a memory space, which comprises the steps of firstly controlling a terminal to enter a data recovery mode, starting an authority access control in the data recovery mode, and accessing data in the memory space based on the authority access control.
In the embodiment of the application, after the permission access control is started by the terminal, whether the screen locking password is set or not is determined, if the screen locking password is set, the verification is performed based on the screen locking password, and under the condition that the verification is passed, the data in the memory space is accessed based on the permission access control. If the screen locking password is not set, the data in the memory space is directly accessed based on the permission access control. Next, the screen locking password is set by the terminal as an example.
Fig. 3 is a flowchart of a method for obtaining occupancy information of a memory space according to an embodiment of the present application, which is executed by a terminal, and referring to fig. 3, the method includes:
step 301: and the terminal acquires the Recovery data packet.
The Recovery data packet comprises operation data of a Recovery mode and authority function data of an authority access control. The operation data is used for operating a Recovery mode, the authority functional data is used for operating an authority access control, the Recovery mode is used for providing an operation environment for the authority access control, and the authority access control has the authority for accessing the data in the memory space of the terminal.
The terminal may obtain the Recovery data packet through any of the following implementations.
In a first implementation manner, the terminal acquires the Recovery data packet through other terminals.
For convenience of distinction, this terminal will be referred to herein as a first terminal, and the other terminals will be referred to as second terminals. The first terminal and the second terminal may be connected through a wired network.
And the first terminal sends an acquisition request to the second terminal when detecting the preset operation, wherein the acquisition request is used for requesting acquisition of the Recovery data packet. And the second terminal sends a Recovery data packet to the first terminal based on the acquisition request, and the first terminal receives the Recovery data packet sent by the second terminal.
In a second implementation, the terminal obtains the Recovery packet from a System (System) partition of the terminal.
The System partition comprises a Recovery partition, a Recovery data packet is stored in the Recovery partition, and when a preset operation is detected, the terminal calls the Recovery data packet from the Recovery partition.
The preset operation can be set and changed according to the need, for example, the preset operation is the operation corresponding to the case that the key duration of the power key and the volume up key exceeds the preset duration when the terminal is in the power-off state.
Step 302: the terminal controls the terminal to enter a Recovery mode based on the operation data in the Recovery data packet.
The terminal acquires operation data from the Recovery data packet, and enters a Recovery mode by loading the operation data.
The Recovery mode is a mode for modifying data in the terminal and the terminal system, and in the mode, operations such as upgrading, system backup, factory setting Recovery and the like can be performed on the terminal system. In the embodiment of the application, in the Recovery mode, the terminal can also enable the permission access control, and the encrypted data in the memory space is decrypted through the permission access control.
Step 303: the terminal displays a statistical interface based on the first interface data in the Recovery data packet.
The Recovery data packet also includes first interface data.
In one possible implementation manner, the terminal directly obtains the first interface data from the Recovery data packet, and displays the statistical interface by loading the first interface data.
In another possible implementation, the terminal first obtains an enabling flag, and determines whether to display the statistical interface through the enabling flag. Accordingly, the process may be achieved by the following steps (1) to (2), including:
(1) And the terminal acquires an enabling mark corresponding to the permission access control.
The enablement flag is used to indicate whether the rights access control is enabled based on the statistical interface. The enabling flag setting process may be: and displaying a mark input interface when the terminal is in a starting-up state, wherein the mark input interface is used for inputting a mark password, acquiring the input mark password based on the mark input interface, and acquiring an enabling mark matched with the mark password.
In this implementation manner, the tag input interface may be a dial interface of the terminal, where the terminal obtains an input tag password, and the terminal determines a matched enabling tag according to the input tag password. The mark secret code is an engineering mode secret code and consists of characters and numbers, and different mark secret codes correspond to different enabling marks.
In the embodiment of the present application, referring to fig. 4, after the terminal obtains the enable flag in the power-on state, the enable flag may be written into a target partition, where the target partition may be a partition in the terminal other than a memory space, for example, the target partition is a cache (cache) partition, or other partitions, which is not limited herein specifically.
The enabling mark may be freely configured and may be freely selected, for example, the enabling mark is a file containing a character string, or a file with a special name, and the enabling mark is not particularly limited in the embodiment of the present application.
(2) In the case where the enablement flag is used to indicate enablement of the rights access control, a statistical interface is displayed based on the first interface data.
And the terminal acquires the enabling mark from the target partition in the Recovery mode, and determines whether to enable the permission access control according to the enabling mark. Under the condition that the enabling mark is used for indicating the permission access control is enabled, the terminal acquires first interface data from the Recovery data packet, renders the first interface data, displays a statistical interface and continues to refer to fig. 4.
And under the condition that the enabling mark is used for indicating that the permission access control is not enabled, the terminal executes Recovery operation on the data in the memory space based on the Recovery mode. Accordingly, the process may be: and under the condition that the enabling mark is used for indicating to execute Recovery operation on the data in the memory space, the terminal displays a data Recovery interface corresponding to the enabling mark based on the Recovery mode, the data Recovery interface displays a data Recovery entry, and the Recovery operation is executed on the data in the memory space in response to the data Recovery operation triggered by the data Recovery entry.
In the embodiment of the application, the mark password is input into the mark input interface, and whether the permission access control is started or not is determined according to the starting mark matched with the mark password, so that the occupation information can be obtained in the Recovery mode, and the use experience of a user is not influenced. And under the condition that the permission access control is not started, other operations can be performed in the Recovery mode, so that the flexibility is higher.
Step 304: and responding to the statistical operation triggered based on the statistical entry, and enabling the permission access control by the terminal in the Recovery mode based on the permission function data in the Recovery data packet.
The statistics interface displays a statistics entry, when the terminal detects the statistics operation triggered by the statistics entry, the terminal acquires authority function data from the Recovery data packet, and loads the authority function data, so that the authority access control is started in the Recovery mode, and the method continues to refer to fig. 4.
In the embodiment of the application, the data can be decrypted by adapting the authority function data to the Recovery mode, which is also a premise that the terminal can acquire the occupation information of the memory space in the embodiment of the application.
The permission access control may be a file-level encryption (FBE) control, and in the on state, the FBE control may encrypt data in the memory space to protect the data in the memory space, so that the data in the memory space is not normally readable by default. In the embodiment of the application, the FBE control is integrated into the Recovery mode, the data in the memory space is decrypted through the FBE control based on the strong execution authority of the Recovery, and the occupation information of the memory space is acquired by counting the space occupied by the decrypted data in the memory space.
In the embodiment of the application, the statistical interface is displayed with the statistical entry, and the user can automatically select the opportunity for starting the permission access control by triggering the statistical entry, so that the autonomous selectivity of the user is improved.
Step 305: and the terminal displays a lock screen checking interface based on the second interface data in the Recovery data packet.
The Recovery data packet further comprises second interface data, and the terminal obtains the second interface data from the Recovery data packet under the condition that the screen locking password is determined to be set, renders the second interface data and displays the screen locking verification interface.
The terminal acquires the input check password based on the screen locking check interface, compares the check password with a pre-stored screen locking password by using a gatekeeper native mechanism, and displays prompt information for prompting that the check is failed under the condition that the check is failed, and the terminal acquires the input check password again on the screen locking check interface until the check is passed. In case the verification passes, the terminal performs step 306.
The screen locking password may be a digital password, a pattern password, an alphabetic password, or a biometric password, such as a fingerprint password, which is not particularly limited. With continued reference to fig. 4, fig. 4 illustrates only the case where the screen locking code is a numeric code or a pattern code or an alphabetic code.
In the embodiment of the application, the screen locking password is bound with the key decrypted by the permission access control, and the decrypted key is acquired through the screen locking password, so that the data in the memory space can be accessed by the permission access control, and the comprehensiveness of acquiring the occupied information of the memory space is improved.
Step 306: and under the condition that the screen locking password is checked and passed based on the screen locking check interface, the terminal decrypts the first data in the memory space based on the permission access control to obtain third data.
The memory space comprises first data and second data, the first data is encrypted data, the second data is unencrypted data, and the terminal decrypts the first data through the permission access control under the condition that verification is passed, so that third data is obtained.
Because the memory space comprises a plurality of storage spaces, the first data can be distributed in one storage space or in a plurality of storage spaces, and the terminal can decrypt the first data in one or a plurality of storage spaces through the permission access control, so as to obtain decrypted third data. With continued reference to fig. 4, it can be seen from fig. 4 that: after the verification is passed, the terminal can decrypt the encrypted data through the permission access control.
In the embodiment of the application, the encrypted data can be decrypted through the permission access control, so that the comprehensiveness of acquiring the occupation information of the memory space can be improved according to the space occupied by the decrypted data and the unencrypted data in the memory space respectively.
Step 307: and the terminal acquires the occupation information of the memory space based on the space occupied by the second data and the third data in the memory space respectively.
In this step, the occupation information is used to represent the size of the space occupied by the data.
In one possible implementation manner, the terminal directly counts the space occupied by the second data and the third data in the memory space respectively, so as to obtain the occupation information of the memory space.
In the implementation manner, the terminal can directly count the space sizes occupied by the second data and the third data in the multiple storage spaces of the memory space through the statistical command in the first target script, so as to obtain the occupied information of the memory space.
In another possible implementation manner, the terminal preprocesses the second data and the third data, and obtains the occupation information of the memory space according to the space occupied by the preprocessed data in the memory space. Accordingly, the process may be achieved by the following steps (1) to (2), including:
(1) The terminal preprocesses the second data and the third data through a preprocessing command in the first target script to obtain fourth data and fifth data.
The preprocessing command may be a deletion command, a modification command, an addition command, a view command, or another linux command, and in the embodiment of the present application, the preprocessing command is not specifically limited. This preprocessing command is described here as an example of a deletion command and a modification command.
If the preprocessing command is a delete command, this step may be: and deleting the first type of data by the terminal through a deleting command in the first target script to obtain fourth data and fifth data, wherein the first type of data is data in the second data and the third data.
In this implementation manner, the deletion command may be a command for deleting data of a preset type, or may be a command for deleting data incompatible with other data in the current storage space, where the deletion command is not specifically limited.
The first type of data may be only data in the second data, may be only data in the third data, or may be a part of data in the second data and a part of data in the third data. If the first type of data is only the data in the second data, the fourth data is the data remaining after the first type of data is deleted in the second data, and the fifth data is still the third data. If the first type of data is only the data in the third data, the fifth data is the data remaining after the first type of data is deleted in the third data, and the fourth data is still the second data. If the first type of data is a part of the second data and a part of the third data, the fourth data is the data remaining after deleting a part of the second data, and the fifth data is the data remaining after deleting a part of the third data.
If the preprocessing command is a modification command, this step may be: and the terminal modifies the second type of data through the modification command in the first target script to obtain fourth data and fifth data, wherein the second type of data is the data in the second data and the third data.
In this implementation manner, the modification command may be a command for modifying a configuration file, or may be a command for modifying a file name, and the modification command is not specifically limited.
The second type of data may be only data in the second data, may be only data in the third data, or may be a part of the second data and a part of the third data.
(2) And the terminal acquires the occupation information of the memory space through the statistical command in the first target script based on the space occupied by the fourth data and the fifth data in the memory space respectively.
The terminal can count the space occupied by the fourth data and the fifth data which are obtained after preprocessing in a plurality of storage spaces of the memory space respectively through the statistical command in the first target script, and obtain the occupied information of the memory space. The occupation information is the occupation information of a plurality of storage spaces of the memory space.
For example, some storage spaces store video data, some storage spaces store audio data, some storage spaces store application data, and the terminal can count the space occupied by data in a plurality of storage spaces through a statistics command, so as to obtain occupation information of the plurality of storage spaces.
In another possible implementation manner, the terminal moves the storage space where the data is located, and obtains the occupation information of a plurality of storage spaces according to the space occupied by the moved data in the storage space. Accordingly, the process may be: the terminal moves the storage space in the memory space respectively by the movement command in the second target script; and acquiring the occupation information of a plurality of storage spaces in the memory space based on the space occupied by the moved second data and third data in the corresponding storage spaces respectively through the statistical command in the second target script.
In this implementation manner, the movement command may be a command for moving application data, or may be a command for moving preset type data, which is not limited specifically.
The terminal may move only the data in the second data, may move only the data in the third data, and may also move a part of the data in the second data and a part of the data in the third data, which is not limited specifically.
It should be noted that, in this implementation, the movement is a process of moving data from the first storage space to the second storage space, and after the data is moved, the occupation information of the second storage space and the first storage space will change, so the terminal obtains the occupation information of the plurality of storage spaces based on the space occupied by the moved second data and third data in the corresponding storage spaces respectively.
In the embodiment of the application, the terminal can also count the space occupied by the data based on other commands, so as to acquire the occupied information of the memory space. For example, the other command may be du, ls, stat or the like, and is not particularly limited. With continued reference to fig. 4, it can be seen from fig. 4 that: and the terminal calculates the data in the memory space by running the target script, so as to acquire the occupation information of the memory space.
In the embodiment of the application, the customized script can be operated according to the user requirement, and the data is counted through the corresponding script, so that the statistical requirement of the user is met.
The embodiment of the application provides a method for acquiring occupied information of a memory space, which comprises the steps of firstly controlling a terminal to enter a data recovery mode, starting an authority access control in the data recovery mode, checking a screen locking password based on a screen locking checking interface under the condition that the screen locking password is set by the terminal, and accessing data in the memory space based on the authority access control under the condition that the screen locking password is checked to pass the check. Because the screen locking password and the key decrypted by the permission access control have an association relationship, the decrypted key is acquired through the screen locking password, so that the permission access control can access the data with the access permission set in the memory space and the data without the access permission set in the memory space, and the occupation information of the memory space can be acquired based on the space occupied by the accessed data in the memory space, thereby improving the comprehensiveness of the occupation information of the statistical memory space.
In the embodiment of the application, after the terminal acquires the occupation information of the memory space, the terminal can perform exception analysis on the memory space according to the occupation information. Accordingly, the process may be: the terminal stores the occupation information into a target storage space of the terminal, derives the occupation information from the target storage space after exiting the Recovery mode, and performs exception analysis on the memory space based on the occupation information.
In this implementation manner, after acquiring the occupation information of the memory space in the Recovery mode, the terminal stores the occupation information into the target storage space, where the target storage space may be a storage space in the memory space or a storage space in another partition, which is not limited specifically. After exiting the Recovery mode, i.e. in the power-on state, the occupancy information is derived from the target storage space.
When the terminal derives the occupation information, the occupation information of the abnormal data can be highlighted and then fed back to the user, so that the data with abnormal occupation can be conveniently and accurately analyzed, and the method is continued to be shown in fig. 4. For example, the space occupied by a certain data is far more than the space occupied by other data in the storage space where the certain data is located, and in this case, the terminal can highlight the occupation information corresponding to the data. The highlighting may be at least one of bolded, enlarged, and a special color, which is not particularly limited.
The above description is given taking the terminal as an example to perform the abnormality analysis on the memory space based on the occupation information. In the embodiment of the application, the terminal can also send the occupation information to the server in a network feedback mode, correspondingly, the terminal is connected with the server through a wired or wireless network, the server receives the occupation information sent by the terminal, performs abnormal analysis on the memory space based on the occupation information, and then feeds back to the user in a statistical report mode or other modes.
The process of performing the anomaly analysis on the memory space by the server based on the occupation information is similar to the process of performing the anomaly analysis on the memory space by the terminal based on the occupation information, and is not described herein.
It should be noted that, the terminal through the permission access control not only can count the space occupied by the data in the memory space, but also can count at least one of the types of the data in the multiple storage spaces and the read-write permission to obtain the attribute information of the data in the memory space. And if the terminal acquires the attribute information and the occupancy information through the permission access control, the terminal stores the attribute information and the occupancy information into the target storage space together after acquiring the attribute information and the occupancy information, derives the attribute information and the occupancy information from the target storage space after exiting the Recovery mode, and performs anomaly analysis on the memory space based on the attribute information and the occupancy information.
In the implementation manner, the terminal can perform exception analysis on the memory space based on the attribute information and the occupation information, and can also send the attribute information and the occupation information to the server, and perform exception analysis on the memory space through the server, which is not particularly limited.
In the embodiment of the application, the strong execution authority of the Recovery mode is utilized, on the basis, the lock screen verification and the FBE decryption function are adapted to decrypt the data in the memory space, and then the space occupied by the data in the memory space is counted through the script to acquire the occupation information of the memory space. After exiting the Recovery mode, the occupation information is derived, so that the abnormal analysis is performed on the memory space based on the occupation information, and the analysis requirement on the abnormal occupation problem of the data in the memory space is met.
In summary, the method provided by the embodiment of the application can rapidly acquire the occupation condition of the memory space, shorten the problem processing period and greatly improve the analysis efficiency of the problem of abnormal occupation of the data in the memory space. In addition, the method controls the starting condition of the permission access control by inputting the mark password, and normal use experience of a user is not affected. In addition, the customized script can be run according to the requirements of users, various statistical functions can be realized in a diversified manner, and the method has good expansibility.
The following description will take the example that the terminal is not provided with the screen locking password. Fig. 5 is a flowchart of a method for obtaining occupancy information of a memory space according to an embodiment of the present application, which is executed by a terminal, and referring to fig. 5, the method includes:
step 501: and the terminal acquires the Recovery data packet.
Step 502: the terminal controls the terminal to enter a Recovery mode based on the operation data in the Recovery data packet.
Step 503: the terminal displays a statistical interface based on the first interface data in the Recovery data packet.
Step 504: and responding to the statistical operation triggered based on the statistical entry, and enabling the permission access control by the terminal in the Recovery mode based on the permission function data in the Recovery data packet.
Steps 501 to 504 are the same as steps 301 to 304 described above and will not be described again here.
In the case that the terminal does not set the lock screen password, the terminal directly performs step 505.
Step 505: and the terminal decrypts the first data in the memory space based on the permission access control to obtain third data.
The process of decrypting the first data in the memory space and obtaining the third data by the terminal in step 306 based on the permission access control is the same, and will not be described here again.
Step 506: and the terminal acquires the occupation information of the memory space based on the space occupied by the second data and the third data in the memory space respectively.
This step is the same as step 307 and will not be described again here.
The embodiment of the application provides a method for acquiring occupied information of a memory space, which comprises the steps of firstly controlling a terminal to enter a data recovery mode, starting an authority access control in the data recovery mode, directly decrypting first data in the memory space based on the authority access control under the condition that a screen locking password is not set by the terminal, and not needing to check any more, so that the time is shortened, and the efficiency of acquiring the occupied information is improved. And based on the permission access control, the data in the memory space can be accessed, the data with the access permission set in the memory space can be accessed, and the data without the access permission set in the memory space can be accessed, so that the occupation information of the memory space can be acquired based on the space occupied by the accessed data in the memory space, and the comprehensiveness of counting the occupation information of the memory space is improved.
Fig. 6 is a schematic structural diagram of an apparatus for acquiring occupancy information of a memory space according to an embodiment of the present application, referring to fig. 6, the apparatus includes:
The first obtaining module 601 is configured to obtain a data Recovery data packet, where the Recovery data packet includes operation data of a Recovery mode and rights function data of a rights access control;
The control module 602 is configured to control the terminal to enter a Recovery mode based on the operation data;
The enabling module 603 is configured to enable the rights access control in a Recovery mode based on the rights function data, where the Recovery mode is used to provide an operating environment for the rights access control, and the rights access control has a right to access data in a memory space of the terminal;
The second obtaining module 604 is configured to access the data in the memory space based on the permission access control, and obtain the occupation information of the memory space based on the space occupied by the accessed data in the memory space.
In one possible implementation, the Recovery packet further includes: counting first interface data of an interface;
An enabling module 603, configured to display a statistics interface based on the first interface data, where the statistics interface displays a statistics entry; and enabling the permission access control in the Recovery mode based on the permission function data in response to the statistical operation triggered based on the statistical entry.
In another possible implementation manner, the enabling module 603 is configured to obtain an enabling flag corresponding to the permission access control, where the enabling flag is used to indicate whether to enable the permission access control based on the statistical interface; in the case that the enablement flag is used to indicate enablement of the rights access control, a statistical interface is displayed based on the first interface data.
In another possible implementation, the apparatus further includes:
and the Recovery module is used for executing Recovery operation on the data in the memory space based on the Recovery mode under the condition that the enabling mark is used for indicating that the permission access control is not enabled.
In another possible implementation, the apparatus further includes:
The display module is used for displaying a mark input interface when the terminal is in a starting state, and the mark input interface is used for inputting a mark password;
The third acquisition module is used for acquiring the inputted mark secret code based on the mark input interface;
And the fourth acquisition module is used for acquiring the enabling mark matched with the mark password.
In another possible implementation, the Recovery packet further includes: the second interface data of the interface are checked by locking the screen;
The second obtaining module 604 is configured to display a lock screen verification interface based on the second interface data, where the lock screen verification interface is used to verify a lock screen password of the terminal; and under the condition that the screen locking password is checked and passed based on the screen locking check interface, accessing the data in the memory space based on the permission access control, and acquiring the occupation information of the memory space based on the space occupied by the accessed data in the memory space.
In another possible implementation, the data in the memory space includes: the first data is encrypted data, and the second data is unencrypted data;
A second obtaining module 604, configured to decrypt the first data based on the permission access control, to obtain third data; and acquiring the occupation information of the memory space based on the space occupied by the second data and the third data in the memory space respectively.
In another possible implementation manner, the second obtaining module 604 is configured to pre-process the second data and the third data through a pre-processing command in the first target script, so as to obtain fourth data and fifth data; and acquiring the occupation information of the memory space through the statistical command in the first target script based on the space occupied by the fourth data and the fifth data in the memory space respectively.
In another possible implementation manner, the second obtaining module 604 is configured to delete the first type of data by a delete command in the first target script to obtain fourth data and fifth data, where the first type of data is data in the second data and the third data; or modifying the second type of data by a modification command in the first target script to obtain fourth data and fifth data, wherein the second type of data is data in the second data and the third data.
In another possible implementation manner, the second obtaining module 604 is configured to move the storage space of the second data and the third data in the memory space respectively through a movement command in the second target script; and acquiring the occupation information of a plurality of storage spaces in the memory space based on the space occupied by the moved second data and third data in the corresponding storage spaces respectively through the statistical command in the second target script.
In another possible implementation, the apparatus further includes:
the storage module is used for storing the occupation information into a target storage space of the terminal;
The export module is used for exporting the occupation information from the target storage space after exiting the Recovery mode;
and the analysis module is used for carrying out abnormal analysis on the memory space based on the occupation information.
The embodiment of the application provides an acquisition device of occupation information of a memory space, which firstly controls a terminal to enter a data recovery mode, enables an authority access control in the data recovery mode, and accesses data in the memory space based on the authority access control.
Referring to fig. 7, a block diagram of a terminal 700 according to an exemplary embodiment of the present application is shown. The terminal 700 may be a smart phone, a tablet computer, or the like having a function of controlling other devices. The terminal 700 of the present application may include one or more of the following components: processor 710, memory 720.
Processor 710 may include one or more processing cores. The processor 710 connects various parts within the overall terminal 700 using various interfaces and lines, performs various functions of the terminal 700 and processes data by running or executing program code, programs, code sets, or program code sets stored in the memory 720, and invoking data stored in the memory 720. Alternatively, the processor 710 may be implemented in hardware in at least one of digital signal Processing (DIGITAL SIGNAL Processing, DSP), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 710 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), a neural network processor (Neural-network Processing Unit, NPU), and a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the NPU is used for realizing an artificial intelligence (ARTIFICIAL INTELLIGENCE, AI) function; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 710 and may be implemented by a single chip.
The Memory 720 may include random access Memory (Random Access Memory, RAM) or Read-Only Memory (ROM). Optionally, the memory 720 includes a non-transitory computer-readable medium (non-transitory computer-readable storage medium). Memory 720 may be used to store program code, programs, code sets, or program code sets. The memory 720 may include a stored program area and a stored data area, wherein the stored program area may store program code for implementing an operating system, program code for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), program code for implementing the above-described respective method embodiments, etc.; the storage data area may store data (e.g., audio data, phonebook) created according to the use of the terminal 700, etc.
In addition, those skilled in the art will appreciate that the structure of the terminal 700 shown in the above-described figures does not constitute a limitation of the terminal 700, and the terminal 700 may include more or less components than illustrated, or may combine certain components, or may have a different arrangement of components. For example, the terminal 700 further includes a microphone, a speaker, a radio frequency circuit, an input unit, a sensor, an audio circuit, a wireless fidelity (WIRELESS FIDELITY, wi-Fi) module, a power supply, a bluetooth module, and the like, which are not described herein.
In an exemplary embodiment, there is also provided a computer readable medium storing at least one program code loaded and executed by a processor to implement the method for acquiring the occupation information of the memory space in the above embodiment.
In an exemplary embodiment, there is also provided a computer program product storing at least one program code loaded and executed by a processor to implement the method for acquiring the occupation information of the memory space in the above embodiment.
In some embodiments, a computer program according to an embodiment of the present application may be deployed to be executed on one computer device or on multiple computer devices located at one site or on multiple computer devices distributed across multiple sites and interconnected by a communication network, where the multiple computer devices distributed across multiple sites and interconnected by a communication network may constitute a blockchain system.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the above storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The foregoing description is only for the convenience of those skilled in the art to understand the technical solution of the present application, and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (15)

1. The method for acquiring the occupied information of the memory space is characterized by comprising the following steps:
Acquiring a data Recovery data packet, wherein the Recovery data packet comprises operation data of a Recovery mode and authority function data of an authority access control;
Based on the operation data, controlling the terminal to enter the Recovery mode;
based on the authority functional data, enabling the authority access control in the Recovery mode, wherein the Recovery mode is used for providing an operation environment for the authority access control, and the authority access control has the authority for accessing the data in the memory space of the terminal;
accessing the data in the memory space based on the permission access control, and acquiring the occupation information of the memory space based on the space occupied by the accessed data in the memory space.
2. The method of claim 1, wherein the Recovery data packet further comprises: counting first interface data of an interface;
The enabling the rights access control in the Recovery mode based on the rights function data includes:
displaying the statistical interface based on the first interface data, wherein the statistical interface is displayed with a statistical inlet;
And responding to the statistical operation triggered based on the statistical entry, and enabling the authority access control in the Recovery mode based on the authority function data.
3. The method of claim 2, wherein the displaying the statistical interface based on the first interface data comprises:
Acquiring an enabling mark corresponding to the permission access control, wherein the enabling mark is used for indicating whether the permission access control is enabled based on the statistical interface;
And displaying the statistical interface based on the first interface data under the condition that the enabling mark is used for indicating to enable the permission access control.
4. A method according to claim 3, characterized in that the method further comprises:
and under the condition that the enabling mark is used for indicating that the permission access control is not enabled, executing Recovery operation on the data in the memory space based on the Recovery mode.
5. A method according to claim 3, wherein the enabling the setting of the flag comprises:
displaying a mark input interface when the terminal is in a starting-up state, wherein the mark input interface is used for inputting a mark password;
acquiring an input mark password based on the mark input interface;
And acquiring the enabling mark matched with the mark password.
6. The method of claim 1, wherein the Recovery data packet further comprises: the second interface data of the interface are checked by locking the screen;
the obtaining the occupation information of the memory space based on the permission access control comprises the following steps:
based on the second interface data, displaying the screen locking verification interface, wherein the screen locking verification interface is used for verifying a screen locking password of the terminal;
And accessing the data in the memory space based on the permission access control under the condition that the screen locking password is checked to pass based on the screen locking check interface, and acquiring the occupation information of the memory space based on the space occupied by the accessed data in the memory space.
7. The method of claim 1 or 6, wherein the data in the memory space comprises: first data and second data, wherein the first data is encrypted data, and the second data is unencrypted data;
Accessing the data in the memory space based on the permission access control, and acquiring the occupation information of the memory space based on the space occupied by the accessed data in the memory space, wherein the method comprises the following steps:
decrypting the first data based on the permission access control to obtain third data;
and acquiring the occupation information of the memory space based on the space occupied by the second data and the third data in the memory space respectively.
8. The method of claim 7, wherein the space occupied in the memory space based on the second data and the third data, respectively, comprises:
preprocessing the second data and the third data through a preprocessing command in the first target script to obtain fourth data and fifth data;
And acquiring the occupation information of the memory space through the statistical command in the first target script based on the space occupied by the fourth data and the fifth data in the memory space respectively.
9. The method according to claim 8, wherein preprocessing the second data and the third data by the preprocessing command in the first target script to obtain fourth data and fifth data includes any one of the following implementation manners:
deleting the first type of data through a deleting command in the first target script to obtain the fourth data and the fifth data, wherein the first type of data is data in the second data and the third data;
and modifying the second type of data by the modification command in the first target script to obtain the fourth data and the fifth data, wherein the second type of data is the data in the second data and the third data.
10. The method of claim 7, wherein the obtaining the occupancy information of the memory space based on the space occupied by the second data and the third data in the memory space, respectively, comprises:
Moving the storage space of the second data and the third data in the memory space respectively through a moving command in a second target script;
And acquiring the occupation information of a plurality of storage spaces in the memory space based on the space occupied by the moved second data and third data in the corresponding storage space respectively through the statistical command in the second target script.
11. The method according to claim 1, wherein the method further comprises:
Storing the occupation information into a target storage space of the terminal;
after exiting the Recovery mode, deriving the occupancy information from the target storage space;
and carrying out exception analysis on the memory space based on the occupation information.
12. An apparatus for acquiring occupation information of a memory space, the apparatus comprising:
the first acquisition module is used for acquiring a data Recovery data packet, wherein the Recovery data packet comprises operation data in a Recovery mode and authority function data of an authority access control;
The control module is used for controlling the terminal to enter the Recovery mode based on the operation data;
The starting module is used for starting the authority access control in the Recovery mode based on the authority function data, the Recovery mode is used for providing an operation environment for the authority access control, and the authority access control has the authority for accessing the data in the memory space of the terminal;
The second acquisition module is used for accessing the data in the memory space based on the permission access control, and acquiring the occupation information of the memory space based on the space occupied by the accessed data in the memory space.
13. A terminal, characterized in that it comprises a processor and a memory, said memory storing at least one program code, said at least one program code being loaded and executed by said processor to implement the method for acquiring occupation information of a memory space according to any one of claims 1 to 11.
14. A computer readable storage medium, wherein at least one program code is stored in the computer readable storage medium, and the at least one program code is loaded and executed by a processor to implement the method for acquiring the occupation information of the memory space according to any one of claims 1 to 11.
15. A computer program product, characterized in that at least one program code is stored in the computer program product, which is loaded and executed by a processor to implement the method of acquiring occupancy information of a memory space according to any one of claims 1 to 11.
CN202210573758.9A 2022-05-24 2022-05-24 Method, device and terminal for acquiring occupied information of memory space Active CN114861209B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210573758.9A CN114861209B (en) 2022-05-24 2022-05-24 Method, device and terminal for acquiring occupied information of memory space

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210573758.9A CN114861209B (en) 2022-05-24 2022-05-24 Method, device and terminal for acquiring occupied information of memory space

Publications (2)

Publication Number Publication Date
CN114861209A CN114861209A (en) 2022-08-05
CN114861209B true CN114861209B (en) 2024-06-04

Family

ID=82639648

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210573758.9A Active CN114861209B (en) 2022-05-24 2022-05-24 Method, device and terminal for acquiring occupied information of memory space

Country Status (1)

Country Link
CN (1) CN114861209B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102609304A (en) * 2012-02-08 2012-07-25 广东欧珀移动通信有限公司 Management method for internal third-party applications of Android mobile phone
CN102662798A (en) * 2012-04-12 2012-09-12 青岛海信移动通信技术股份有限公司 Data recovery method and terminal for Android system
CN103699420A (en) * 2013-12-31 2014-04-02 海信集团有限公司 System recovery method and system recovery device
CN107169053A (en) * 2017-04-26 2017-09-15 青岛海信移动通信技术股份有限公司 log information deriving method and device
CN109992522A (en) * 2017-12-29 2019-07-09 广东欧珀移动通信有限公司 Application processing method and device, electronic equipment, computer readable storage medium
CN112181467A (en) * 2020-10-10 2021-01-05 北京字节跳动网络技术有限公司 Method and device for upgrading memory firmware of terminal, terminal and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8266424B2 (en) * 2005-03-30 2012-09-11 Arris Group, Inc. Method and system for in-field recovery of security when a certificate authority has been compromised
CN112882804A (en) * 2016-08-17 2021-06-01 华为技术有限公司 Method and device for starting application

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102609304A (en) * 2012-02-08 2012-07-25 广东欧珀移动通信有限公司 Management method for internal third-party applications of Android mobile phone
CN102662798A (en) * 2012-04-12 2012-09-12 青岛海信移动通信技术股份有限公司 Data recovery method and terminal for Android system
CN103699420A (en) * 2013-12-31 2014-04-02 海信集团有限公司 System recovery method and system recovery device
CN107169053A (en) * 2017-04-26 2017-09-15 青岛海信移动通信技术股份有限公司 log information deriving method and device
CN109992522A (en) * 2017-12-29 2019-07-09 广东欧珀移动通信有限公司 Application processing method and device, electronic equipment, computer readable storage medium
CN112181467A (en) * 2020-10-10 2021-01-05 北京字节跳动网络技术有限公司 Method and device for upgrading memory firmware of terminal, terminal and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
A study on Effects of Different Access Modes on Database Performance for SIP sever;Whai En Chen;Shih Yuan Cheng;2014 Tenth International Conference on Intelligent Information Hiding and Multimedia Signal Processing;20140829;902-906 *

Also Published As

Publication number Publication date
CN114861209A (en) 2022-08-05

Similar Documents

Publication Publication Date Title
CN109388532B (en) Test method, test device, electronic equipment and computer readable storage medium
US20130122866A1 (en) Method and apparatus for unlocking operating system
US9378344B2 (en) Method and apparatus for protecting information based on data card
KR101489152B1 (en) Apparatus and method for preventing screen capture
CN103927466A (en) Method and device for controlling mobile terminal
CN105389484A (en) Permission controlling method and device for application programs
CN105701420B (en) A kind of management method and terminal of user data
CN109787957B (en) Configuration method of configuration file and related device
CN104184900A (en) Data processing method, system and mobile terminal
CN114650154B (en) Webpage authority behavior control method and device, computer equipment and storage medium
US20150047019A1 (en) Information processing method and electronic device
CN110770728A (en) Unmanned aerial vehicle control method, unmanned aerial vehicle and terminal for controlling unmanned aerial vehicle
CN114861209B (en) Method, device and terminal for acquiring occupied information of memory space
CN113411203A (en) Terminal configuration method and device, computer equipment and storage medium
CN110222492B (en) System switching method and device, computer equipment and computer readable storage medium
US20220311601A1 (en) Method for pushing key, method for operating file, storage medium, and computer device
CN107423655B (en) Setting code encryption method and terminal
EP3346406A1 (en) Data input method, and electronic device and system for implementing the data input method
KR101745390B1 (en) Data leakage prevention apparatus and method thereof
CN110636493B (en) Information backup method, device and equipment of virtual SIM card and storage medium
CN106682509A (en) Window body processing method and device
US9213816B2 (en) Protocol for biometric device capture and quality analysis
CN111814137A (en) Operation and maintenance method and system of terminal and storage medium
CN112035826A (en) Password management method, device, storage medium and electronic equipment
US20230098969A1 (en) Sim, communication device, and writing method for application

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