CN115599929B - File management method and electronic equipment - Google Patents

File management method and electronic equipment Download PDF

Info

Publication number
CN115599929B
CN115599929B CN202211213484.9A CN202211213484A CN115599929B CN 115599929 B CN115599929 B CN 115599929B CN 202211213484 A CN202211213484 A CN 202211213484A CN 115599929 B CN115599929 B CN 115599929B
Authority
CN
China
Prior art keywords
application
information file
electronic equipment
file
identifier
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
CN202211213484.9A
Other languages
Chinese (zh)
Other versions
CN115599929A (en
Inventor
邹雄杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202211213484.9A priority Critical patent/CN115599929B/en
Publication of CN115599929A publication Critical patent/CN115599929A/en
Application granted granted Critical
Publication of CN115599929B publication Critical patent/CN115599929B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • G06F16/41Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • G06F16/44Browsing; Visualisation therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • G06F16/48Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually

Abstract

The application provides a file management method and electronic equipment. The method comprises the following steps: detecting that the content of the current first packet of information file of the electronic equipment is abnormal, scanning the application in the electronic equipment, and generating a second packet of information file; in the process of generating the second report information file, according to a preset allocation algorithm, an application identifier is allocated to a media provider in the electronic equipment and is recorded as a target application identifier; determining whether an application identification of the media provider has changed; if the change occurs, the directory information of the multimedia files in the electronic equipment is modified according to the target application identification. Therefore, the media provider can still access the created multimedia file after the packages.xml file is regenerated, and the user experience is improved.

Description

File management method and electronic equipment
Technical Field
The present disclosure relates to the field of terminal devices, and in particular, to a file management method and an electronic device.
Background
In an electronic device, an application may create and access multimedia files through a media provider. The packages. In some cases, packages.xml files in electronic devices may be damaged. At this point, the electronic device will rescan the application, generating packages. In the process, the information of the MediaProvider may change, so that the MediaProvider cannot access the already created multimedia file any more. This results in multimedia files that are not visible to the user and a poor experience for the user.
Disclosure of Invention
In order to solve the technical problems, the application provides a file management method and electronic equipment, which enable a media provider to still access an established multimedia file after packages.
In a first aspect, the present application provides a file management method. The method is applied to the electronic equipment. The method comprises the following steps: detecting that the content of the current first packet of information file of the electronic equipment is abnormal, scanning the application in the electronic equipment, and generating a second packet of information file; distributing application identifiers to media providers in the electronic equipment according to a preset distribution algorithm, and marking the application identifiers as target application identifiers; determining whether an application identification of the media provider has changed; if the change occurs, the directory information of the multimedia files in the electronic equipment is modified according to the target application identification. Therefore, the media provider can still access the created multimedia file after the packages.xml file is regenerated, and the user experience is improved.
According to a first aspect, when detecting that the content of the current first packet information file of the electronic device is abnormal, scanning an application in the electronic device, and before generating the second packet information file, further includes: reading a current first packet information file of the electronic equipment; judging whether the content of the first package information file is abnormal, if so, executing the operation of detecting that the content of the current first package information file of the electronic equipment is abnormal, scanning the application in the electronic equipment and generating a second package information file.
According to a first aspect, determining whether the content of the first package information file is abnormal includes: traversing a start identifier and an end identifier of each node in the first packet information file; determining whether there is a node for which the start identifier and the end identifier do not match; if yes, judging that the content of the first packet information file is abnormal, otherwise, judging that the content of the first packet information file is normal.
According to a first aspect, determining whether the content of the first package information file is abnormal includes: detecting whether the content of the first packet of information file comprises messy codes or not; if yes, judging that the content of the first packet information file is abnormal, otherwise, judging that the content of the first packet information file is normal.
According to a first aspect, determining whether an application identity of a media provider has changed comprises: when the electronic equipment is started, acquiring a CE catalog of a first application; determining whether the application identifier of the first application changes according to the CE catalog; if so, judging whether the first application is a media provider; if so, it is determined that the application identification of the media provider has changed.
According to a first aspect, determining whether an application identity of a media provider has changed comprises: querying a target CE catalog corresponding to a media provider in the CE catalog of the application; determining an application identifier corresponding to a media provider according to a target CE catalog, and marking the application identifier as a first application identifier; judging whether the first application identifier is consistent with the target application identifier; if not, it is determined that the application identification of the media provider has changed.
According to a first aspect, reading a current first package information file of an electronic device includes: and responding to the startup of the electronic equipment, and reading the current first packet of information file of the electronic equipment.
According to a first aspect, modifying directory information of multimedia files in an electronic device according to a target application identification, comprises: determining other catalogs except the Android catalogs in the catalog information of the multimedia files in the electronic equipment as target catalogs; for each target directory, detecting whether the application identifier and the group identifier in the target directory are consistent with the target application identifier; and if the application identifiers and the group identifiers in the target directory are inconsistent, modifying the application identifiers and the group identifiers in the target directory into target application identifiers.
According to a first aspect, determining whether an application identifier of a media provider has changed, and if so, modifying directory information of multimedia files in an electronic device according to a target application identifier, includes: in the unlocking process of the electronic equipment, determining whether the application identifier of the media provider has changed, and if so, modifying the directory information of the multimedia files in the electronic equipment according to the target application identifier.
According to a first aspect, the multimedia file is a multimedia file located under path/storage/scheduled/0.
According to a first aspect, the electronic device is a mobile phone or tablet.
In a second aspect, the present application provides an electronic device, comprising: a memory and a processor, the memory coupled to the processor; the memory stores program instructions that, when executed by the processor, cause the electronic device to perform the voice call cancellation method of any one of the first aspects.
In a third aspect, the present application provides a computer readable storage medium comprising a computer program which, when run on an electronic device, causes the electronic device to perform the voice call cancellation method of any one of the preceding first aspects.
Drawings
Fig. 1 is a schematic structural diagram of an exemplary electronic device 100;
fig. 2 is a software architecture block diagram of an electronic device 100 of an embodiment of the present application, which is exemplarily shown;
FIG. 3 is a flow chart of an exemplary illustrated file management method;
FIG. 4 is a flow chart illustrating an exemplary determination of whether a media provider's MediaProvider's application identification has changed;
FIG. 5 is a flow chart of an exemplary illustration of repairing a multimedia file directory;
fig. 6 is an exemplary diagram of an exemplary illustrated multimedia file directory.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
The term "and/or" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone.
The terms first and second and the like in the description and in the claims of embodiments of the present application are used for distinguishing between different objects and not necessarily for describing a particular sequential order of objects. For example, the first target object and the second target object, etc., are used to distinguish between different target objects, and are not used to describe a particular order of target objects.
In the embodiments of the present application, words such as "exemplary" or "such as" are used to mean serving as examples, illustrations, or descriptions. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
In the description of the embodiments of the present application, unless otherwise indicated, the meaning of "a plurality" means two or more. For example, the plurality of processing units refers to two or more processing units; the plurality of systems means two or more systems.
In the android system, each application has an application identifier uid (user id). The application identification is assigned to the application by the package administration service PMS (Package Manager Service).
In an electronic device employing an android system, such as a mobile phone, an application in the mobile phone can create and access multimedia files through MediaProvider. The directory information of the created multimedia file comprises an application identifier, and the application identifier is consistent with the application identifier of the MediaProvider when the multimedia file is created.
When a multimedia file is accessed through a MediaProvider, an application identification of the MediaProvider needs to be identical to an application identification included in directory information of the multimedia file to be accessed, so that the MediaProvider is allowed to access the multimedia file. If the application identification of the MediaProvider does not coincide with the application identification included in the directory information of the multimedia file to be accessed, the MediaProvider is prohibited from accessing the multimedia file.
The packages.xml files in electronic devices may in some cases be damaged. At this point, the electronic device will scan the applications in the electronic device, regenerating the packages. In the process, the application identifier of the MediaProvider may change, and if so, the MediaProvider cannot access the created multimedia file any more. Thus, the problem that the multimedia file is invisible to the user is caused, and the use experience of the user is poor.
The embodiment of the application provides a file management method, which enables the media provider to still access the created multimedia file after the packages.xml file is regenerated, and improves the use experience of a user.
The file management method in the embodiment of the application can be applied to electronic equipment, and the electronic equipment can be a mobile phone, a tablet and the like provided with an android system with a specified version.
The structure of the electronic device in this embodiment may be as shown in fig. 1.
Fig. 1 is a schematic diagram of an exemplary illustrated electronic device 100. It should be understood that the electronic device 100 shown in fig. 1 is only one example of an electronic device, and that the electronic device 100 may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components. The various components shown in fig. 1 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
Referring to fig. 1, an electronic device 100 may include: processor 110, internal memory 121, universal serial bus (universal serial bus, USB) interface 130, charge management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headset interface 170D, sensor module 180, indicator 192, camera 193, etc.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a neural hub and a command center of the electronic device 100, among others. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory.
The electronic device 100 may implement photographing functions through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The ISP is used to process data fed back by the camera 193. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing and is converted into an image visible to naked eyes. ISP can also optimize the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in the camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments, electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or a portion of the functional modules of the audio module 170 may be disposed in the processor 110.
The software system of the electronic device 100 may employ a layered architecture, an event driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. In this embodiment, taking an Android (Android) system with a hierarchical architecture as an example, a software structure of the electronic device 100 is illustrated.
Fig. 2 is a software structural block diagram of the electronic device 100 of the embodiment of the present application, which is exemplarily shown.
The layered architecture of the electronic device 100 divides the software into several layers, each with a distinct role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system may include an application layer, an application framework layer, a system library, a kernel layer, and the like.
The application layer may include a series of application packages.
As shown in fig. 2, the application package may include a camera, gallery, call, WLAN, music, video, media provider MediaProvider, FUSE (Filesystem in Userspace, user space file system) file system, and the like.
Wherein the media provider is used to create multimedia files in the FUSE file system or to access multimedia files in the FUSE file system. Each application in the application layer may create a multimedia file in the FUSE file system through the media provider MediaProvider or access a multimedia file in the FUSE file system through the media provider MediaProvider.
The FUSE file system is used to store multimedia files created by a media provider. Of course, in other embodiments, the FUSE file system may also be used to store other data.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions.
As shown in fig. 2, the application framework layer may include a window manager, a content provider, a resource manager, a view system, a package management service PMS, and the like.
The window manager is used for managing window programs. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make such data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc.
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like.
The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text message notification icon may include a view displaying text and a view displaying a picture.
The package management service PMS is mainly responsible for scanning a specified directory in the system, finding out files ending with apk inside, analyzing the files to obtain all information of the application program, and storing the information in packages.
The packet management service PMS is also used to manage DE (Device Encrypted) data and CE (Credential Encrypted) data of an application. Wherein the key for the DE data is only obtained after the system has performed a verifiable boot. CE directories are encrypted data using a key associated with user authentication (e.g., pattern, password, etc.), which can be obtained only after the user has performed authentication.
The CE catalog of the application may include the original uid of the application.
The package management service PMS is for executing the file management method in the present embodiment.
As shown in fig. 2, the system library may include a surface manager (surface manager), a Media library (Media Libraries), an Zhuoyun line (Android run), and the like.
The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio and video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc.
As shown in fig. 2, the kernel layer may include modules such as an audio driver, a display driver, a Wi-Fi driver, a bluetooth driver, a sensor driver, and the like.
It will be appreciated that the layers and components contained in the layers in the software structure shown in fig. 2 do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer layers than shown, and more or fewer components may be included in each layer, as the present application is not limited.
The present application will be described in detail with reference to examples.
The file management method in this embodiment may be performed by the packet management service PMS module in fig. 2.
Taking a mobile phone as an example.
Fig. 3 is a flow chart of an exemplary illustrated file management method. Referring to fig. 3, in this embodiment, the file management method may include the following steps:
s301, starting the mobile phone.
In this embodiment, the file management method of this embodiment is executed at the time when the mobile phone is turned on. However, it is understood that the file management method of the present embodiment may be performed at other timings. This embodiment is not limited thereto.
S302, the package management service PMS module reads package information files packages.
The packages.xml file is stored in the PMS module, so the PMS module can read the package information file packages.xml from itself.
S303, the package management service PMS module judges whether the contents of the packages.xml file are abnormal, if so, the step S304 is executed, and if not, the step S308 is executed.
S304, the package management service PMS module scans the application in the mobile phone again to generate a new packages.
S305, in the process of generating a new packages.xml file, the package management service PMS module distributes an application identifier uid1 to the media provider according to a preset distribution algorithm.
S306, the package management service PMS module judges whether the application identifier of the media provider has changed, if so, the step S307 is executed, otherwise, the step S308 is executed.
In an application, it may be determined by the install in the PMS module whether the application identity of the media provider has changed.
S307, the package management service PMS module modifies the multimedia file catalogue under the condition of storage/scheduled/0.
In an application, the operation of modifying/storing/scheduled/0 the multimedia file directory may be performed by the install in the PMS module.
S308, the mobile phone continues to start other services.
Fig. 4 is a flow chart illustrating a determination of whether an application identifier of a media provider MediaProvider has changed. Referring to fig. 4, in this embodiment, the process of determining whether the application identifier of the media provider has changed may include the following steps:
s401, the mobile phone starts unlocking.
In this embodiment, the repair of the multimedia directory file is performed during the unlocking process of the mobile phone.
S402, the package management service PMS module prepares a CE catalog of the current application.
The packet management service PMS module performs step S402 on an application-by-application basis.
The meaning of the CE catalog to be applied is: for each application, if the CE catalog of the application already exists at the moment, and the uid of the application in the CE catalog is consistent with the current uid of the application, the existing CE catalog is still used; if the CE catalog of the application does not exist at the moment, creating the CE catalog of the application; if the CE catalog of the application already exists at the moment, the uid of the application in the CE catalog is inconsistent with the current uid of the application, and the method is executed according to the follow-up flow.
S403, the packet management service PMS module judges whether the application identifier of the current application is changed, if so, the step S404 is executed, otherwise, the step S406 is executed.
Here, the judgment of ending the current application means stopping judgment of whether the application identifier of the media provider has changed according to the current application.
S404, the package management service PMS module judges whether the current application is a media provider, if so, the step S405 is executed, otherwise, the step S406 is executed.
S405, it is determined that the application identifier of the media provider has changed.
S406, ending the judgment of the current application.
Fig. 5 is a flow chart of exemplary illustrated repair of a multimedia file directory. Referring to fig. 5, in this embodiment, the process of repairing the multimedia file directory may include the following steps:
s501, the package management service PMS module judges whether the current version of the mobile phone is a designated version, if so, the step S502 is executed, otherwise, the process is ended.
It should be noted that, when it is determined through this step that the current version of the mobile phone is equal to the specified version, the packet management service PMS module performs the following steps S502 to S506 for each multimedia directory.
Wherein the designated version can be determined according to application requirements.
S502, the package management service PMS module judges whether the current multimedia directory is an Android directory, if not, the step S503 is executed, and if so, the step S506 is executed.
S503, the package management service PMS module judges whether the application identifier and the group identifier of the current multimedia catalog are both multimedia rights group media_rw, if not, the step S504 is executed, and if so, the step S506 is executed.
S504, the package management service PMS module judges whether the application identifier and the group identifier of the current multimedia catalog are consistent with the application identifier uid1 of the current MediaProvider, if not, step S505 is executed, and if so, step S506 is executed.
S505, the application identifier and the group identifier of the current multimedia catalog are modified to be the application identifier uid1 of the current MediaProvider.
S506, the verification of the current multimedia catalogue is ended.
In this embodiment, whether the application identifier uid of the MediaProvider application changes is determined in the process of unlocking the mobile phone, and if the application identifier uid of the MediaProvider application is determined to change, the application identifier of the multimedia directory is repaired before the unlocking is successful.
The repair process for the multimedia catalog is illustrated herein. Fig. 6 is an exemplary diagram of an exemplary illustrated multimedia file directory. Referring to fig. 6, the multimedia file directory includes a plurality of multimedia file directories. The PMS module performs checksum repair on each multimedia file directory item by item. Suppose that after the new packages.xml file is generated, the application identifier uid1 of MediaProvider is u0_a125.
The first multimedia file directory in fig. 6 is as follows:
drwx------2 u0_a126 u0_a126 3452 2022-6-23 12:08 Alarms
the repair process for the piece of multimedia file catalogue is as follows:
the PMS module determines that the multimedia directory is an Alarms type directory and is not an Android directory through judgment;
the PMS module determines that the application identifier uid and the group identifier gid of the multimedia directory are u0_ a126 and are not the multimedia authority group media _ rw through judgment;
the PMS module determines that the application identifier uid and the group identifier gid of the multimedia directory are u0_a126 through judgment and are inconsistent with the application identifier u0_a125 of the current MediaProvider;
the PMS module modifies both the application identification uid and the group identification gid of the multimedia directory to u0_a125.
Thus, the repair of the piece of multimedia catalogue is completed. After the repair is completed, the content of the multimedia directory is as follows:
drwx------2 u0_a125 u0_a125 3452 2022-6-23 12:08 Alarms
the second multimedia file directory in fig. 6 is as follows:
drwxrws---x 5 u0_a126 u0_a126 3452 2022-6-23 12:08 Android
the repair process for the piece of multimedia file catalogue is as follows:
and the PMS module determines that the multimedia directory is an Android directory through judgment, finishes checking the multimedia directory, and executes check sum restoration of the next multimedia directory.
Thus, after the repair of the second multimedia directory in fig. 6 is completed, the content of the multimedia directory remains unchanged.
The checksum repair process of the third, fourth, fifth and sixth multimedia file directories in fig. 6 is similar to the checksum repair process of the first multimedia file directory in fig. 6, and will not be described again. After repair, the contents of the third, fourth, fifth and sixth multimedia file directories in fig. 6 are as follows:
drwx------2 u0_a125 u0_a125 3452 2022-6-23 12:08 Audiobooks
drwx------2 u0_a125 u0_a125 3452 2022-6-23 12:08 DCIM
drwx------2 u0_a125 u0_a125 3452 2022-6-23 12:08 Documents
drwx------2 u0_a125 u0_a125 3452 2022-6-23 12:08 Download
as can be seen from the above, in the file management method of the present embodiment, after the packages. Xml file is damaged and reconstructed, the directory information of the multimedia file created by the MediaProvider is modified, so that the application identifier and the group identifier in the directory information of the multimedia file are consistent with the new application identifier allocated to the MediaProvider, thereby enabling the MediaProvider to access the created multimedia file, and improving the user experience.
The embodiment of the application also provides an electronic device, which comprises a memory and a processor, wherein the memory is coupled with the processor, the memory stores program instructions, and when the program instructions are executed by the processor, the electronic device is enabled to execute the file management method executed by the electronic device.
It will be appreciated that the electronic device, in order to achieve the above-described functions, includes corresponding hardware and/or software modules that perform the respective functions. The steps of an algorithm for each example described in connection with the embodiments disclosed herein may be embodied in hardware or a combination of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Those skilled in the art may implement the described functionality using different approaches for each particular application in conjunction with the embodiments, but such implementation is not to be considered as outside the scope of this application.
The present embodiment also provides a computer storage medium having stored therein computer instructions which, when executed on an electronic device, cause the electronic device to perform the above-described related method steps to implement the file management method in the above-described embodiments.
The present embodiment also provides a computer program product which, when run on a computer, causes the computer to perform the above-described related steps to implement the file management method in the above-described embodiments.
In addition, the embodiment of the application also provides a device, which can be a chip, a component or a module, and the device can comprise a processor and a memory which are connected; the memory is used for storing computer-executable instructions, and when the device is running, the processor can execute the computer-executable instructions stored in the memory, so that the chip executes the file management method in each method embodiment.
The electronic device, the computer storage medium, the computer program product, or the chip provided in this embodiment are used to execute the corresponding methods provided above, so that the beneficial effects thereof can be referred to the beneficial effects in the corresponding methods provided above, and will not be described herein.
It will be appreciated by those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional modules is illustrated, and in practical application, the above-described functional allocation may be performed by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to perform all or part of the functions described above.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts shown as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
Any of the various embodiments of the application, as well as any of the same embodiments, may be freely combined. Any combination of the above is within the scope of the present application.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions to cause a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those of ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are also within the protection of the present application.
The steps of a method or algorithm described in connection with the disclosure of the embodiments disclosed herein may be embodied in hardware, or may be embodied in software instructions executed by a processor. The software instructions may be comprised of corresponding software modules that may be stored in random access Memory (Random Access Memory, RAM), flash Memory, read Only Memory (ROM), erasable programmable Read Only Memory (Erasable Programmable ROM), electrically Erasable Programmable Read Only Memory (EEPROM), registers, hard disk, a removable disk, a compact disc Read Only Memory (CD-ROM), or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC.
Those skilled in the art will appreciate that in one or more of the examples described above, the functions described in the embodiments of the present application may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, these functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those of ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are also within the protection of the present application.

Claims (13)

1. A method of file management, applied to an electronic device, the method comprising:
detecting that the content of the current first packet of information file of the electronic equipment is abnormal, scanning the application in the electronic equipment, and generating a second packet of information file;
in the process of generating the second packet information file, distributing application identifiers for media providers in the electronic equipment according to a preset distribution algorithm, and marking the application identifiers as target application identifiers;
determining whether an application identification of the media provider has changed;
and if the change occurs, modifying the directory information of the multimedia files in the electronic equipment according to the target application identification.
2. The method of claim 1, wherein detecting that the content of the first packet information file of the electronic device is abnormal, scanning the application in the electronic device, and before generating the second packet information file, further comprises:
reading a current first packet information file of the electronic equipment;
judging whether the content of the first package information file is abnormal, if so, executing the operation of detecting that the content of the current first package information file of the electronic equipment is abnormal, scanning the application in the electronic equipment and generating a second package information file.
3. The method of claim 2, wherein determining whether the content of the first package information file is abnormal comprises:
traversing a start identifier and an end identifier of each node in the first packet information file;
determining whether there is a node for which the start identifier and the end identifier do not match;
if yes, judging that the content of the first packet information file is abnormal, otherwise, judging that the content of the first packet information file is normal.
4. The method of claim 2, wherein determining whether the content of the first package information file is abnormal comprises:
detecting whether the content of the first packet of information file comprises messy codes or not;
if yes, judging that the content of the first packet information file is abnormal, otherwise, judging that the content of the first packet information file is normal.
5. The method of claim 1, wherein determining whether the media provider's application identification has changed comprises:
when the electronic equipment is started, acquiring a CE catalog of a first application;
determining whether an application identifier of the first application changes according to the CE catalog;
if yes, judging whether the first application is the media provider;
if so, it is determined that the application identification of the media provider has changed.
6. The method of claim 1, wherein determining whether the media provider's application identification has changed comprises:
querying a target CE catalog corresponding to the media provider in an application CE catalog;
determining an application identifier corresponding to the media provider according to the target CE catalog, and marking the application identifier as a first application identifier;
judging whether the first application identifier is consistent with the target application identifier or not;
if not, it is determined that the application identification of the media provider has changed.
7. The method of claim 2, wherein reading the current first package information file of the electronic device comprises:
and responding to the startup of the electronic equipment, and reading the current first packet information file of the electronic equipment.
8. The method of claim 1, wherein modifying the directory information of the multimedia files in the electronic device based on the target application identification comprises:
determining other catalogs except the Android catalogs in the catalog information of the multimedia files in the electronic equipment as target catalogs;
for each target directory, detecting whether the application identifier and the group identifier in the target directory are consistent with the target application identifier;
and if the application identifiers and the group identifiers in the target directory are inconsistent, modifying the application identifiers and the group identifiers in the target directory into the target application identifiers.
9. The method of claim 1, wherein determining whether the application identification of the media provider has changed, and if so, modifying the directory information of the multimedia files in the electronic device based on the target application identification, comprises:
and in the unlocking process of the electronic equipment, determining whether the application identifier of the media provider is changed, and if so, modifying the directory information of the multimedia files in the electronic equipment according to the target application identifier.
10. The method of claim 1, wherein the multimedia file is a multimedia file located under path/storage/scheduled/0.
11. The method of claim 1, wherein the electronic device is a cell phone or tablet.
12. An electronic device, comprising:
a memory and a processor, the memory coupled with the processor;
the memory stores program instructions that, when executed by the processor, cause the electronic device to perform the file management method of any of claims 1-11.
13. A computer readable storage medium comprising a computer program, characterized in that the computer program, when run on an electronic device, causes the electronic device to perform the file management method according to any of claims 1-11.
CN202211213484.9A 2022-09-30 2022-09-30 File management method and electronic equipment Active CN115599929B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211213484.9A CN115599929B (en) 2022-09-30 2022-09-30 File management method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211213484.9A CN115599929B (en) 2022-09-30 2022-09-30 File management method and electronic equipment

Publications (2)

Publication Number Publication Date
CN115599929A CN115599929A (en) 2023-01-13
CN115599929B true CN115599929B (en) 2023-08-04

Family

ID=84844868

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211213484.9A Active CN115599929B (en) 2022-09-30 2022-09-30 File management method and electronic equipment

Country Status (1)

Country Link
CN (1) CN115599929B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102902909A (en) * 2012-10-10 2013-01-30 北京奇虎科技有限公司 System and method for preventing file from being tampered
WO2013097612A1 (en) * 2011-12-27 2013-07-04 Tencent Technology (Shenzhen) Company Limited Method and device for managing pictures of mobile terminal
CN106970978A (en) * 2017-03-28 2017-07-21 联想(北京)有限公司 Data sharing method and device
CN109388538A (en) * 2018-09-13 2019-02-26 西安交通大学 A kind of file operation behavior monitoring method and device based on kernel
CN109981881A (en) * 2019-01-21 2019-07-05 华为技术有限公司 A kind of method and electronic equipment of image classification
CN114048469A (en) * 2022-01-10 2022-02-15 荣耀终端有限公司 Directory operation management method, electronic device and readable storage medium
CN114116611A (en) * 2020-08-29 2022-03-01 华为技术有限公司 File scanning method and related device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013097612A1 (en) * 2011-12-27 2013-07-04 Tencent Technology (Shenzhen) Company Limited Method and device for managing pictures of mobile terminal
CN102902909A (en) * 2012-10-10 2013-01-30 北京奇虎科技有限公司 System and method for preventing file from being tampered
CN106970978A (en) * 2017-03-28 2017-07-21 联想(北京)有限公司 Data sharing method and device
CN109388538A (en) * 2018-09-13 2019-02-26 西安交通大学 A kind of file operation behavior monitoring method and device based on kernel
CN109981881A (en) * 2019-01-21 2019-07-05 华为技术有限公司 A kind of method and electronic equipment of image classification
CN114116611A (en) * 2020-08-29 2022-03-01 华为技术有限公司 File scanning method and related device
CN114048469A (en) * 2022-01-10 2022-02-15 荣耀终端有限公司 Directory operation management method, electronic device and readable storage medium

Also Published As

Publication number Publication date
CN115599929A (en) 2023-01-13

Similar Documents

Publication Publication Date Title
CN113032766B (en) Application authority management method and device
CN114969769A (en) Access control method, electronic device and system
CN115048642B (en) Communication method between trusted applications in multi-trusted execution environment and electronic equipment
CN115017534B (en) File processing authority control method, device and storage medium
CN115599929B (en) File management method and electronic equipment
CN114048469B (en) Directory operation management method, electronic device and readable storage medium
KR101297527B1 (en) Circuit card data protection
CN113468606A (en) Application program access method and electronic equipment
CN113326498A (en) Authority multiplexing method, resource access method based on authority multiplexing and related equipment
WO2022166502A1 (en) Data protection method and system, and medium and electronic device
WO2022199672A1 (en) Access control method for precise permission revocation, related apparatus, and system
CN112286632B (en) Cloud platform, cloud platform management method and device, electronic equipment and storage medium
US10742802B2 (en) Methods and devices for verifying a communication number
CN116982042A (en) Flexible authorized access control method, related device and system
CN114020377A (en) Terminal device, picture information protection method and storage medium
CN115114619A (en) Access control method, electronic device and system
CN115981576B (en) Method for sharing data, electronic device and storage medium
CN113496039A (en) Authority management method and terminal
CN111159734A (en) Communication terminal and multi-application data inter-access processing method
CN114205099B (en) Webpage authentication method, electronic equipment and system
CN113938890B (en) Data sharing method and terminal equipment
KR20150050693A (en) Method for contents playing and an electronic device thereof
CN117130698A (en) Menu display method and electronic equipment
WO2020113531A1 (en) Data recovery method and device, and electronic device
CN114154180A (en) Data sharing method and terminal equipment

Legal Events

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