Multimedia file access method and electronic equipment
By introducing a multimedia middleware and attribute tag mechanism into electronic devices, the problems of low efficiency and poor flexibility in multimedia file privacy settings are solved, and rapid settings and flexible access to privacy files are achieved, ensuring the security and flexibility of privacy files.
Patent Information
- Application Number
- CN202410364291.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-26
- Publication Date
- 2025-10-03
AI Technical Summary
The existing technology for privacy settings of multimedia files in electronic devices is inefficient and inflexible, and cannot meet user needs in different scenarios.
By introducing a multimedia middle platform into electronic devices, setting the attribute tags of multimedia files to privacy tags or ordinary tags, and searching for access control policies that match the application through the multimedia middle platform, it is determined whether the application has access rights, thereby achieving rapid setting and flexible access to private files.
It improves the efficiency of setting up private files, ensures the security and flexible access of private files, and meets the needs of users in different scenarios.
Smart Images

Figure CN120744962A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a multimedia file access method and electronic device. Background Art
[0002] With the development of electronic device technology, the storage capacity of electronic devices has also increased. Electronic devices can now store a large number of files, such as multimedia files such as images. During the use of electronic devices, multimedia files are often accessed. Therefore, a solution for accessing multimedia files on electronic devices is urgently needed. Summary of the Invention
[0003] Embodiments of the present application provide a multimedia file access method and an electronic device for implementing flexible access to multimedia files on an electronic device to ensure the privacy and security of the multimedia files.
[0004] To achieve the above objectives, this application adopts the following technical solutions:
[0005] In a first aspect, a multimedia file access method is provided, which is applied to an electronic device. The electronic device receives a first operation input by a user, wherein the first operation is used to trigger a first application of the electronic device to access a first media file having a privacy attribute tag. In other words, the first operation is used to trigger the electronic device to access the private file. The privacy tag of each first media file is set by the electronic device via a multimedia middleware in response to a second operation, wherein the second operation is used to trigger the electronic device to set the first media file as a private file.
[0006] In response to the first operation, the electronic device may search for a first target access control policy corresponding to the privacy tag and the identifier of the first application through the multimedia middleware, and then access the first media file through the first application if the first target access control policy indicates access.
[0007] In the present application, after the electronic device receives the second operation input by the user, it indicates that the first media file on the electronic device needs to be set as a private file. The electronic device can set the attribute tag of the first media file to a private tag through the multimedia middleware. Setting the private file by means of the attribute tag does not require moving the storage location of the first media file, thereby achieving quick setting of the private file and improving setting efficiency. Afterwards, when the first application on the electronic device accesses a media file whose attribute tag is a private tag, the first target access control policy corresponding to the privacy tag and the first application can be searched for to use the first target access control policy to determine whether the first application has the authority to access the private file, thereby achieving flexible access to the private file, avoiding the leakage of the private file, ensuring the privacy and security of the private file, and improving user satisfaction.
[0008] In one possible design, the storage location of the first media file whose attribute tag is a non-privacy tag (or called a common tag) is the same as the storage location of the first media file whose attribute tag is a privacy tag, thereby avoiding the need to move the storage location of the first media file when setting the first media file as a privacy file, thereby improving the efficiency of setting the privacy file.
[0009] In one possible design, if the electronic device finds the first target access control policy through the multimedia middleware, the electronic device may deem that the first target access control policy indicates access. Correspondingly, if the electronic device does not find the first target access control policy through the multimedia middleware, the electronic device may deem that the first target access control policy indicates access is prohibited.
[0010] In another case, after searching the first target access control policy, if the first target access control policy actually indicates access, the electronic device may consider that the first target access control policy indicates access. Correspondingly, if the first target access control policy actually indicates prohibition of access, the electronic device may consider that the first target access control policy indicates prohibition of access.
[0011] In one possible design, before the electronic device accesses the first media file through the first application, the electronic device may send an access handle of the first media file to the first application through the multimedia middle platform, where the access handle of the first media file represents the file path of the first media file.
[0012] Accordingly, the electronic device can access the first media file through the first application based on the access handle of the first media file, so that the first application can access the first media file. Based on this, when the multimedia middleware determines that the first application can access the first media file based on the first target access control policy, the multimedia file can return the access handle of the first media file to the first application so that the first application can access the first media file using the access handle.
[0013] Optionally, the file path may also be referred to as a storage location.
[0014] In one possible design, the first target access control policy indicates that access is permitted after identity authentication is successful. Accordingly, if the first target access control policy indicates that access is permitted after identity authentication is successful, the electronic device may perform identity authentication and obtain an identity authentication result. The identity authentication result indicates whether the user currently using the electronic device is the target user corresponding to the first scenario mode in which the electronic device is located. The identity authentication result may indicate authentication success or authentication failure.
[0015] When the identity authentication result indicates that the authentication is successful, it means that the user currently using the electronic device is the target user corresponding to the first scenario mode, and the electronic device can access the first media file through the first application.
[0016] If the identity authentication result indicates that the authentication fails, it means that the user currently using the electronic device is not the target user corresponding to the first scenario mode. The electronic device can prohibit access to the first media file, that is, prohibit the first application from accessing the first media file.
[0017] Based on this, when the first target access control policy indicates that the application is to be run after identity authentication is passed, the electronic device determines whether the first application can access the first media file based on the identity authentication result, thereby achieving flexible access to the media file and, to a certain extent, ensuring the security and privacy of the media file.
[0018] In one possible design, the first target access control policy indicates that "access" means "allowed access." Accordingly, when the first target access control policy indicates that "allowed access," indicating that the first application is trustworthy and has permission to access the private file, the electronic device can directly access the first media file through the first application. In other words, the first application can directly access the first media file, enabling flexible access to media files on the electronic device and ensuring the security and privacy of the media files.
[0019] In a possible design, the first target access control policy refers to an access control policy corresponding to the privacy tag, the identifier of the first application, and the information of the first scene mode in which the electronic device is located.
[0020] After the electronic device accesses the first media file through the first application, the electronic device receives a third operation, which is used to trigger the electronic device to switch the current scene mode to the second scene mode.
[0021] In response to the third operation, the electronic device can switch from the first scene mode to the second scene mode. Afterwards, the electronic device again receives the first operation for triggering the electronic device to access the first media file. In response to the first operation, the electronic device can output a file access prohibition prompt message when it is determined that there is no second target access control policy, or when the second target access control policy indicates that access is prohibited. The second target access control policy is an access control policy corresponding to the privacy label, the identifier of the first application, and the information of the second scene mode. The file access prohibition prompt message is used to prompt that access to the first media file is prohibited.
[0022] In the present application, the electronic device is in the first scene mode. When the first application of the electronic device needs to start a private file, the electronic device determines the first target access control policy corresponding to the identifier of the first application, the privacy label and the first scene mode. Since the first target access control policy indicates access, it indicates that the first application has the authority to access the private file in the first scene mode, and the first application of the electronic device can access the first media file normally. Afterwards, the electronic device switches to the second scene mode. When the first application of the electronic device needs to access the private file again, the electronic device can search for the second target access control policy corresponding to the identifier of the first application, the privacy label and the second scene mode. In the case that the second target access control policy is not found or the second target access control policy indicates that access is prohibited, it indicates that the first application does not have the authority to access the private file in the second scene mode. The electronic device can prohibit the first application from accessing the first media file, avoid the leakage of the private file, ensure the security and privacy of the private file, realize flexible access to the private file, and meet the needs of users in different scene modes.
[0023] In one possible design, the first target access control policy can be set based on user needs. The electronic device can obtain the access control policy setting information input by the user through the attribute access control module. The electronic device can then send a first request to the multimedia middleware through the attribute access control module. The first request includes the access control policy setting information and information about the first scenario mode in which the electronic device is located.
[0024] The access control policy setting information at least includes a mapping relationship between an attribute tag, access method information, and an identifier of the first application. The attribute tag is a privacy tag, and the access method information indicates access.
[0025] Afterwards, the electronic device can save the first target access control policy through the multimedia middle platform in response to the first request, wherein the first target access control policy is obtained based on the access control policy setting information and the information of the first scenario mode.
[0026] Based on this, the generation of the first target access control policy is achieved to meet the user's demand on how the first application accesses the private file in the first scenario mode.
[0027] In one possible design, the electronic device can also set all private files on the electronic device to non-private files. The electronic device can receive a fourth operation that triggers the electronic device to set the private files to non-private files. In response to the fourth operation, the electronic device can query the multimedia middle platform for a second media file with a private attribute tag to obtain all private files on the electronic device. The electronic device can then set the attribute tag of the second media file to a non-private tag through the multimedia middle platform. Based on this, private files can be quickly updated to non-private files.
[0028] In one possible design, the storage location of the second media file with the privacy attribute tag is the same as the storage location of the second media file with the non-privacy attribute tag. This avoids the need to move the storage location of the second media file when updating the second media file to a non-privacy file, thereby improving the efficiency of setting the attributes of the second media file.
[0029] In one possible design, the electronic device can also query the access control policy for the current scene mode through the multimedia middle platform. After the electronic device is restarted, the electronic device can send a second request to the multimedia middle platform through the attribute access control module. The second request includes information about the first scene mode in which the electronic device is located.
[0030] Afterwards, in response to the second request, the electronic device can determine the access control policy list corresponding to the information of the first scene mode through the multimedia middle platform. Afterwards, the electronic device can send the access control policy list to the attribute access control module. Among them, the access control policy list includes at least one access control policy. The access control policy list is used by the attribute access control module to display the access control policies included in the access control policy list. Based on this, after restarting, the electronic device can use the multimedia middle platform to query the latest access control policy in the current scene mode, so that the latest access control policy can be displayed, so that the user can know the access control policy that is effective in the current scene mode.
[0031] In a second aspect, an electronic device is provided that has the functionality to implement the method described in the first aspect. The functionality can be implemented in hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the functionality described above.
[0032] In a third aspect, an electronic device is provided, comprising a memory and one or more processors; the memory and the processor are coupled; the memory is used to store computer program code, and the computer program code includes computer instructions; when the processor executes the computer instructions, the electronic device executes the application running method as described in any one of the above-mentioned first aspects.
[0033] In a fourth aspect, a computer-readable storage medium is provided, comprising computer instructions. When the computer instructions are executed on an electronic device, the electronic device can execute the application running method described in any one of the above-mentioned first aspects.
[0034] In a fifth aspect, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the application running method described in any one of the first aspects.
[0035] It can be understood that the beneficial effects that can be achieved by the electronic device described in the second and third aspects, the computer storage medium described in the fourth aspect, and the computer program product described in the fifth aspect provided above can be referred to the beneficial effects in the first aspect and any possible implementation thereof, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1A Schematic diagram 1 of a setting scenario for a privacy image provided in an embodiment of the present application;
[0037] Figure 1B A schematic diagram of a setting scenario for a privacy image provided in an embodiment of the present application Figure 2 ;
[0038] Figure 1C A schematic diagram of a setting scenario for a privacy image provided in an embodiment of the present application Figure 3 ;
[0039] Figure 1D A schematic diagram of a setting scenario for a privacy image provided in an embodiment of the present application Figure 4 ;
[0040] Figure 1E A schematic diagram of a setting scenario for a privacy image provided in an embodiment of the present application Figure 5 ;
[0041] Figure 2 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0042] Figure 3 A schematic diagram of the software architecture of an electronic device provided in an embodiment of the present application;
[0043] Figure 4 A resource access schematic diagram 1 provided in an embodiment of the present application;
[0044] Figure 5 Schematic diagram 1 of a flow chart of a multimedia file access method provided in an embodiment of the present application;
[0045] Figure 6A resource access diagram provided in this application embodiment Figure 2 ;
[0046] Figure 7A Schematic diagram 1 of an access control policy setting process provided in an embodiment of the present application;
[0047] Figure 7B Schematic diagram of an access control policy setting scenario provided in an embodiment of the present application Figure 2 ;
[0048] Figure 7C Schematic diagram of an access control policy setting scenario provided in an embodiment of the present application Figure 3 ;
[0049] Figure 7D Schematic diagram of an access control policy setting scenario provided in an embodiment of the present application Figure 4 ;
[0050] Figure 8 A schematic diagram of a multimedia file access method provided in an embodiment of the present application Figure 2 ;
[0051] Figure 9 A schematic diagram of a multimedia file access method provided in an embodiment of the present application Figure 3 ;
[0052] Figure 10 A resource access diagram provided in this application embodiment Figure 3 . DETAILED DESCRIPTION
[0053] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described in the present application as "exemplary" or "for example" should not be interpreted as being more preferred or advantageous than other embodiments or design. To be precise, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way. In the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the related objects before and after are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple. In the embodiments of the present application, "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" can explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, the meaning of "multiple" is two or more.
[0054] For ease of understanding, some of the terms involved in the embodiments of this application are explained below.
[0055] Media files, also known as multimedia files, refer to files containing multiple media contents such as images, audio, and video, such as photos, music, and video files. Multimedia files are generally stored in binary form.
[0056] Structured data refers to data stored in a structured form on electronic devices, such as contact data, metadata of multimedia files, call logs, text messages, calendars, etc.
[0057] Metadata of a multimedia file refers to data that describes the multimedia file. For example, for a photograph, metadata may include basic information about the photo (such as the photo title and size), shooting information (such as the shooting location, shooting time, exposure time), and photo attribute information (such as resolution).
[0058] The electronic device has a multi-user function, that is, the electronic device can enter different user modes, such as owner mode, child mode, visitor mode and other user modes. After entering a certain user mode (such as owner mode), the owner can set the object resources of the electronic device (such as applications, multimedia files, structured data) as private resources. When the electronic device (such as the application of the electronic device) subsequently accesses the private resources of the electronic device, it can be determined based on the management and control policy whether it can access the private resources to limit access to the object resources on the electronic device, avoid non-owner users from viewing the owner's private data, thereby preventing privacy leaks and avoiding damage to object resources. For example, a user can set a multimedia file (such as an image) on an electronic device (such as a mobile phone) as a private file. As Figure 1A As shown, in response to the user clicking the icon 10 of the mobile phone's gallery APP, the mobile phone starts the gallery APP and displays the following Figure 1B When the user wants to set image 11 as a private image, the user can select image 11 and click Figure 1C In response to the user's click operation on the more controls 12, the mobile phone displays the following Figure 1D The hidden control 13 shown. Afterwards, the user can click on the hidden control 13. In response to the click on the hidden control 13, the mobile phone sets the image 11 as a private image, that is, stores the image 11 in the designated file directory corresponding to the private album, thereby implementing the setting of the private image. The location corresponding to the designated file directory is used to store all private images on the mobile phone. After the mobile phone sets the image 11 as a private image, it no longer displays the image 11 (such as Figure 1E As shown). Later, when the user wants to view image 11, the phone's gallery app needs to access the private image. The phone can verify the user's identity, such as through facial recognition, fingerprint recognition, or password recognition, to verify whether the user is the owner of the phone. After the identity authentication is successful, the phone's gallery app can access image 11 from the designated file directory and continue to display image 11.
[0059] However, the method of setting privacy resources by saving the object resource (such as the above-mentioned multimedia file) to the designated file directory of the electronic device is inefficient and has poor flexibility. For example, when the object resource is not a privacy resource, the object resource is in a file directory. After setting the object resource as a privacy resource, the electronic device needs to move the object resource to the designated file directory, which causes the electronic device to move the object resource multiple times, resulting in low efficiency and poor flexibility in setting privacy resources. In addition, in different access scenarios, such as when different applications of an electronic device access privacy resources, the management and control policies based on them may be the same, and the access flexibility of privacy resources is poor, which may not meet the user's usage needs in different access scenarios.
[0060] Therefore, in response to the above problems, the present application provides a method for accessing object resources (such as multimedia files) on electronic devices. Electronic devices can set attribute tags of multimedia files of electronic devices through multimedia middleware. The attribute tag can be a privacy tag or a normal tag. Among them, when the attribute tag of a multimedia file is a privacy tag, the multimedia file is a privacy file, and there is no need to save it to a specified file directory, that is, there is no need to move the storage path of the multimedia file multiple times, thereby realizing the rapid setting of privacy files, improving the setting efficiency of privacy files, and improving the flexibility of settings.
[0061] Afterwards, when the first application of the electronic device accesses the multimedia file of the electronic device, the electronic device can determine the first target access control policy that matches the first application based on the attribute tag of the multimedia file through the multimedia middle platform. Afterwards, the electronic device can determine whether the first application can access the multimedia file based on the first target access control policy through the multimedia middle platform, thereby avoiding the leakage of private files and protecting user privacy. In addition, the first target access control policy is matched with the first application, and the access control policies matched with different applications may be different, thereby realizing flexible setting of the access control policy, thereby meeting the user's usage needs in different access scenarios and realizing flexible access to multimedia files.
[0062] The attribute tags of the aforementioned object resources can be set based on user needs. For example, an electronic device receives a hidden operation (or second operation) input by a user, which triggers the electronic device to set a first media file as a private file. Subsequently, in response to the hidden operation, the electronic device can set the attribute tag of the first media file as a private tag through the multimedia middleware, thereby achieving personalized settings of the privacy attributes.
[0063] The first target access control policy matching the first application can also be configured based on user needs. For example, the electronic device obtains access control policy information input by the user. The access control policy information includes at least the application identifier, access method information, and attribute tags. The electronic device can then generate a corresponding access control policy based on the access control policy information, thereby enabling personalized access control policy configuration.
[0064] For example, the electronic device in the embodiments of the present application may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, as well as a wearable device, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, and other electronic devices with object resources. The embodiments of the present application do not impose any special restrictions on the specific form of the electronic device.
[0065] Figure 2 A schematic structural diagram of the electronic device 100 is shown.
[0066] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
[0067] It should be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0068] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0069] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0070] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0071] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.
[0072] The power management module 141 is used to connect the battery 142 , the charging management module 140 and the processor 110 . The power management module 141 receives input from the battery 142 and / or the charging management module 140 to provide power to the electronic device 100 .
[0073] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0074] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.
[0075] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0076] The modulation and demodulation processor may include a modulator and a demodulator. The wireless communication module 160 may provide wireless communication solutions including wireless local area networks (WLAN) (such as Wi-Fi (wireless fidelity) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc., applied to the electronic device 100. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signal and filters it, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate its frequency, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0077] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150 , and antenna 2 is coupled to wireless communication module 160 , so that electronic device 100 can communicate with the network and other devices through wireless communication technology.
[0078] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor.
[0079] The display screen 194 is used to display images, videos, etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.
[0080] The electronic device 100 can implement the shooting function through the ISP, camera 193, video codec, GPU, display 194 and application processor, etc. In some embodiments, the electronic device 100 can include 1 or N cameras 193, where N is a positive integer greater than 1.
[0081] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.
[0082] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area can store data created during the use of the electronic device 100 (such as multimedia files (such as images, videos, audio, etc.), structured data, etc.). In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0083] The electronic device 100 can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0084] The sensor module 180 may include a pressure sensor, a gyro sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.
[0085] Buttons 190 include a power button, a volume button, etc. Motor 191 can generate vibration prompts. Indicator 192 can be an indicator light that can be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0086] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and disconnected from the electronic device 100 by inserting or removing the SIM card into or from the SIM card interface 195. The electronic device 100 may support one or N SIM card interfaces, where N is a positive integer greater than one.
[0087] For example, the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the Android system with a layered architecture is used as an example to illustrate the software structure of the electronic device 100.
[0088] Figure 3 1 is a software structure block diagram of the electronic device 100 according to an embodiment of the present invention.
[0089] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.
[0090] The application layer can include a series of application packages.
[0091] like Figure 3 As shown, the application package may include camera, gallery, calendar, call, map, navigation, scene mode, music, video, short message and other applications.
[0092] The scenario mode is used to provide a relevant interface for users to input access control policy setting information.
[0093] The application framework layer provides an application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0094] like Figure 3 As shown, the application framework layer may include a multimedia middle platform (MediaProvider) and an attribute access control module.
[0095] The multimedia middle platform can be used to manage the attribute tags of object resources, which can be privacy tags or common tags (or non-privacy tags). For example, the multimedia middle platform can query or set the attribute tags of object resources. In addition, the multimedia middle platform can also be used to manage access control policies. For example, the multimedia middle platform can query or set access control policies.
[0096] Optionally, the multimedia middle platform can manage access control policies corresponding to different scenario modes. Exemplarily, scenario modes can include functional modes (such as flight mode, do not disturb mode, etc.) and / or user modes (such as owner mode, visitor mode, child mode, etc.).
[0097] The attribute access control module is used to query or set the access control policy using the multimedia platform based on the access control policy setting information input by the user. In addition, the attribute access control module can also obtain information about the scene mode of the electronic device and send the scene mode information to the multimedia platform.
[0098] Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.
[0099] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.
[0100] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.
[0101] The system library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0102] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
[0103] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0104] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0105] A 2D graphics engine is a drawing engine for 2D drawings.
[0106] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.
[0107] It can be understood that the software layer included in the electronic device and the content included in the software layer introduced above are only examples and this application does not limit them.
[0108] In the embodiment of this application, Figure 4As shown, the electronic device can set an access control policy for the object resources on the electronic device to implement the addition of access control points. Afterwards, when the subject object of the electronic device, such as an application or a user, accesses the object resource, the electronic device can use the resource access service (such as a multimedia middle platform) to determine the appropriate target access control policy based on the attribute tags of the subject object and the object resource, combined with the scenario mode, that is, the environment in which the electronic device is currently located, so as to use the target access control policy to decide whether the subject object can access the object resource. If it is determined that the subject object cannot access, the electronic device can intercept the access of the subject object. If it is determined that the subject object can access, the subject object can continue to access the object resource.
[0109] The attribute tag of the object resource may be set by the electronic device in response to a user's operation. For example, the user may input a corresponding operation according to their needs to trigger the electronic device to set the attribute tag of the object resource. Alternatively, the electronic device may recommend the attribute tag of the object resource to the user. Afterwards, upon receiving the user's triggering operation, the electronic device sets the attribute tag of the object resource to the recommended attribute tag. In addition, the attribute tag of the object resource may be set automatically by the electronic device.
[0110] In addition, if Figure 4 As shown, the above-mentioned object resources may include applications, files, and structured data. For example, files may include multimedia files. Of course, files may also include other files, where "other files" refers to files other than multimedia files. It is understood that when the object resource is an application, the subject object accessing the application can also be described as the subject object calling or using the application.
[0111] In addition, if Figure 4 As shown, object resources can also include hardware resources and functional services. Hardware resources can include microphones, cameras, Wi-Fi chips, positioning chips, Bluetooth chips, NFC chips, etc. Functional services can include application installation / uninstallation services, system sharing services, device search services, etc.
[0112] The following will take the above-mentioned electronic device as a mobile phone, the main object as an application, and the object resource as an image included in a multimedia file as an example to introduce the access process of the object resource on the electronic device provided by this application. Figure 5 As shown, the process can be as follows:
[0113] S201. The gallery APP displays image 1.
[0114] S202: In response to the user's hiding operation on image 1, the gallery app sends a request 1 to the multimedia middle station. Request 1 includes an identifier of image 1. Request 1 is used to trigger the multimedia middle station to set image 1 as a private image.
[0115] The hiding operation is used to trigger the mobile phone to set the image 1 as a private image. Figure 1D The click operation of the hidden control 12 is shown.
[0116] The above-mentioned image 1 may be one or more images.
[0117] In this embodiment of the present application, when a user wishes to set image 1 as a private image, the user may enter a hide operation for image 1. After receiving the hide operation, the gallery app may respond to the hide operation by sending request 1 to the multimedia middleware to trigger the multimedia middleware to set image 1 as a private image. Alternatively, image 1 may be described as the first media file.
[0118] S203: The multimedia middle platform responds to request 1 and sets the attribute tag of image 1 to a privacy tag.
[0119] For example, Figure 6 As shown, the multimedia middleware has a privacy attribute management function (FilePrivacyAttrManager). Among them, the privacy attribute management function can at least include a privacy tag setting (set) function for multimedia files, a privacy tag query (get) function, and a privacy tag clearing (clear) function.
[0120] The privacy tag setting function is used to set the attribute tag of a multimedia file to a privacy tag. The privacy tag query function is used to query multimedia files with privacy tags. The attribute tag clearing function is used to remove the privacy tag of a multimedia file, that is, to update the attribute tag of a multimedia file from a privacy tag to a normal tag.
[0121] In some embodiments, the privacy attribute management function can be encapsulated as an interface for a mobile phone (such as an app on a mobile phone) to call the interface to manage the privacy attributes of multimedia files. Specifically, the privacy tag setting function is encapsulated as a privacy tag setting interface. The privacy tag query function is encapsulated as a privacy tag query interface. The privacy tag clearing function is encapsulated as a privacy tag clearing interface.
[0122] Optionally, the privacy label setting interface can be:
[0123] int setPrivacyFiles(List <string>file_id,boolean isPrivacy) / / Call the isPrivacy function to set the privacy label;
[0124] boolean isPrivacyFile(String file_id) / / Set the privacy tag and get a Boolean value. This Boolean value indicates whether the privacy tag is set successfully.
[0125] The file_id is the identifier of the multimedia file for which a privacy label needs to be set, such as the identifier of the above-mentioned image 1.
[0126] In some embodiments, the privacy label may be Private, which may be represented by character 1 (such as 1). In addition, the normal label may be Normal, which may be represented by character 2 (such as 0).
[0127] Optionally, the privacy label query interface can be: List <string>getPrivacyFiles().
[0128] S204: The multimedia platform sends a tag setting result to the gallery app, where the tag setting result indicates that the tag setting is successful.
[0129] In an embodiment of the present application, after the multimedia middleware successfully sets the attribute tag of Image 1 as a privacy tag, indicating that the privacy attribute setting is successful, that is, the private image setting is successful, a tag setting result indicating the successful tag setting can be returned to the aforementioned gallery app, so that the gallery app is informed that Image 1 has been successfully set as a private image. Exemplarily, the tag setting result can be the Boolean value corresponding to the aforementioned isPrivacyFile. A Boolean value of 1 indicates that the tag setting result indicates that the tag setting is successful.
[0130] In addition, there is also a possibility that the privacy label setting of image 1 fails, that is, the above label setting result may also indicate that the label setting fails. Exemplarily, the above Boolean value is 0, indicating that the label setting result indicates that the label setting fails.
[0131] S205. The multimedia middle platform adds the identifier of image 1 and the privacy tag corresponding to image 1 to database 1.
[0132] Exemplarily, the multimedia middle platform may add the identifier of image 1 and the attribute tag corresponding to image 1 (or replace the attribute tag described as image 1) to data table 1 in database 1.
[0133] The data table 1 (eg, FilePrivacyAttribute table) is used to store attribute tags of multimedia files. The data table 1 includes at least two fields: the multimedia file identifier (ie, file_id) and the attribute tag (ie, privacy_attribute).
[0134] Optionally, the value of the attribute tag can be the above-mentioned character 1 or the above-mentioned character 2. As described above, the character 1 represents a privacy label, and the character 2 represents a normal label, that is, a non-privacy label. Character 1 and character 2 are different. For example, character 1 is 1 and character 2 is 0. For another example, character 1 is 0 and character 2 is 2. Of course, character 1 and character 2 can also be other values, and this application does not limit them. For the convenience of description, this application takes character 1 being 1 and character 2 being 0 as an example for introduction.
[0135] Optionally, the type of the multimedia file identifier can be a string type. The type of the attribute tag can be an int type. Of course, the types of the multimedia file identifier and attribute tag can also be other types, which are not limited by this application.
[0136] In some embodiments, the initial attribute tag of the multimedia file can be a normal tag. After obtaining the multimedia file, the mobile phone (such as the multimedia middle station in the mobile phone) sets the attribute tag of the image 1 to a normal tag by default. Afterwards, when receiving the privacy tag setting operation input by the user (such as the above-mentioned hiding operation), the mobile phone can update the attribute tag of the multimedia file to a privacy tag. For example, as shown in Table 1, 00003 is the identifier of image 1, and its corresponding attribute tag is 0, which is a normal tag. After receiving the hiding operation for image 1, the multimedia middle station updates the attribute tag of the multimedia file to a privacy tag, and the attribute tag corresponding to image 1 becomes 1 (as shown in Table 2).
[0137] Table 1
[0138] file_id privacy_attribute 00002 0 00003 0
[0139] Table 2
[0140] file_id privacy_attribute 00002 0 00003 1
[0141] In addition, the initial attribute tag of the multimedia file may not be an ordinary tag, but may be a privacy tag directly, and this application does not limit it.
[0142] S206 . In response to the tag setting result indicating that the tag setting is successful, the gallery APP stops displaying image 1 .
[0143] In the embodiment of the present application, after determining that the image 1 becomes a private image (or called a private file), the gallery APP can stop displaying the image 1. For example, compared with the above Figure 1B , Figure 1E The displayed image no longer includes image 11 , where image 11 may be image 1 .
[0144] It should be noted that the above uses the example of setting a privacy tag for Image 1 in the Gallery app to illustrate the privacy attribute setting scenario. Other privacy attribute setting scenarios are possible. For example, in a cloud backup scenario, a mobile phone application with permission can set the privacy attributes of multimedia files backed up by the mobile phone. When accessing the backed-up multimedia files, the application can determine whether to allow access based on the attribute tags of the multimedia files.
[0145] S201-S206 above introduced the process of adding a privacy tag to image 1 to set image 1 as a private image. The following will continue to introduce the process of setting the access control policy.
[0146] S207: The attribute access control module obtains the access control policy setting information input by the user.
[0147] Exemplarily, the attribute access control module obtains the access control policy setting information input by the user through other applications (such as scene mode applications). For example, when the user wants to set the access control policy for multimedia files on the mobile phone, the user enters the policy setting information on the relevant interface provided by the mobile phone. Figure 7A Click the settings app shown in the figure to start the settings app and display the following Figure 7B Afterwards, in response to the user's Figure 7B Click the scene mode control in the setting interface shown in the figure to start the scene mode application and display the scene mode setting interface (such as Figure 7C As shown), the scene mode setting interface is used to set the access control policy. Afterwards, the scene mode application receives the access control policy setting information input by the user in the access control policy interface and sends the access control policy setting information to the attribute access control module.
[0148] The access control policy setting information may include at least an attribute tag, access method information, and an application identifier. The access method information indicates an access method for the multimedia file corresponding to the attribute tag, which may indicate access or prohibited access (forbidden). Exemplarily, the access may indicate allowed access (allowed) or access after identity authentication (authentication needed).
[0149] The multimedia middle platform can determine, based on the access method in the access control policy, whether the application corresponding to the application identifier in the access control policy can access the multimedia file whose attribute tag is the attribute tag in the access control policy. It is understandable that the access control policy setting information input by the user can be the attribute tag, access method information and application identifier selected by the user. The access control policy setting information can actually be a mapping relationship (or correspondence relationship) between the application identifier and the attribute tag and access method information.
[0150] S208: The attribute access control module sends a request 2 to the multimedia middle station, wherein the request 2 includes access control policy setting information and information about the current scene mode of the mobile phone.
[0151] Optionally, the above request 2 can also be called the first request.
[0152] In this embodiment of the present application, the attribute access control module determines the current scene mode of the mobile phone (herein referred to as scene mode 1) and sends scene mode 1 information to the multimedia middle station, so that the multimedia middle station can generate an access control policy for scene mode 1. For example, if the mobile phone is currently in owner mode, the attribute access control module sends the owner mode information to the multimedia middle station. For another example, if the current user mode of the mobile phone is "Xiao Ming", the user mode information sent by the attribute access control module to the multimedia middle station can be Xiao Ming.
[0153] S209. In response to request 2, the multimedia middle station generates access control policy 1 corresponding to the information of the current scene mode based on the access control policy setting information.
[0154] Among them, as mentioned above Figure 6 As shown, the multimedia middleware includes an access control policy management function (FileAccessPolicyManager). The access control policy management module may include at least an access control policy setting (set) function, an access control policy query (get) function, and an access control policy clearing (clear) function.
[0155] The access control policy setting function is used to generate access control policies. The access control policy query function is used to query access control policies. The access control policy clearing function is used to delete access control policies.
[0156] In addition, the access control policy management module may further include an access control policy modification function, which is used to modify the access control policy.
[0157] In some embodiments, similar to the privacy attribute management function described above, the access control policy management function can also be encapsulated as an interface so that the attribute access control module or other applications can call this interface to manage the access control policy. For example, the access control policy setting function described above is encapsulated as an access control policy setting interface. The access control policy query function is encapsulated as an access control policy query interface. The access control policy clearing function is encapsulated as an access control policy clearing interface.
[0158] Optionally, the access control policy setting interface can be:
[0159] setFileAccessPolicy(List <string>package_name, int privacy_attribute, int access_policy). Package_name represents the application identifier, privacy_attribute represents the attribute tag, and access_policy represents the access method information.
[0160] Optionally, the access control policy query interface can be:
[0161] getFileAccessPolicy().
[0162] And the above access control policy clearing interface can be:
[0163] clearFileAccessPolicy().
[0164] S210: The multimedia middle platform sends a policy setting result to the attribute access control module, wherein the policy setting result indicates that the policy setting is successful.
[0165] If the policy setting result indicates that the policy setting is successful, it indicates that the corresponding access control policy 1 (or the first target access control policy) has been successfully generated based on the access control policy setting information input by the user. Alternatively, there is the possibility that the generation of access control policy 1 fails. In this case, the multimedia middleware sends a policy setting result indicating that the policy setting failed to the attribute access control module.
[0166] In some embodiments, the access control policy may not only be generated based on the access control policy information input by the user, but may also be automatically generated by the mobile phone, that is, preset.
[0167] In some embodiments, after determining the policy setting result, if the policy setting result indicates that the policy setting was successful, the attribute access control module may output (e.g., display) a policy setting success prompt message. If the policy setting result indicates that the policy setting failed, a policy setting failure prompt message may be output to promptly inform the user whether the access control policy was successfully set. Optionally, the policy setting prompt message may inform the user that the access control policy setting failed and that the user may try again after waiting for a certain period of time.
[0168] In some embodiments, the above S210 is an optional step, that is, no matter whether the multimedia middle platform successfully generates the access control policy 1, the mobile phone does not need to send the policy setting result to the attribute access control module.
[0169] S211. The multimedia middle platform saves access control policy 1 to database 2.
[0170] For example, the multimedia middleware can save the access control policy 1 corresponding to the current scene mode information to the data table 2 of the database 2. Among them, the data table 2 (such as the FileAccessPolicy table) is used to store the access control policy. The data table 2 includes at least the attribute label, the access mode information (i.e., access_policy), and the application identifier (i.e., package_name).
[0171] Optionally, the access mode information can be character 3, character 4, or character 5. Character 3 indicates that access is allowed, character 4 indicates that access is prohibited, and character 5 indicates that access is allowed after verification. Characters 3, 4, and 5 are different. For example, character 3 is 0, character 4 is 1, and character 5 is 2. Of course, characters 3, 4, and 5 can also be other characters, and this application does not limit them. For ease of description, this application uses character 3 being 0, character 4 being 1, and character 5 being 2 as an example.
[0172] Optionally, the type of the access mode information may be int. The type of the application identifier may be string. Of course, the types of the access mode information and the application identifier may also be other types, which are not limited in this application.
[0173] In some embodiments, the above-mentioned data table 2 can be used to store the access control policy corresponding to the current scene mode information, and the access control policies corresponding to different scene mode information (i.e., scene modes) can be saved in different data tables in the database 2. Alternatively, the data table 2 can store the access control policies corresponding to each scene mode.
[0174] Among them, the above-mentioned database 2 and the above-mentioned database 1 can be the same database or different databases, and this application does not limit them.
[0175] S212: When the policy setting result indicates that the policy setting is successful, the attribute access control module displays access control policy 1.
[0176] For example, the attribute access control module can not only display the access control policy 1 (such as Figure 7D The access control policy 1) shown in FIG2 may also output a prompt message indicating that the policy setting is successful. Specifically, the attribute access control module may send the policy setting result to the setting application. The setting application may output the above-mentioned prompt message indicating that the policy setting is successful if the policy setting result indicates that the policy setting is successful.
[0177] In addition, when the policy setting result indicates that the policy setting has failed, the attribute access control module (such as by setting an application) may output a policy setting failure prompt message.
[0178] In some embodiments, the above S212 is an optional step, and the attribute access control mode may not display access control policy 1.
[0179] It should be noted that the operations related to setting access control policies performed by the above-mentioned setting application (such as receiving access control policy information input by the user, sending the access control policy setting information to the attribute access control module, and providing corresponding prompt information based on the policy setting results, etc.) can be performed by other applications. For example, if the mobile phone has an access control policy management application installed, the access control policy management application can perform operations related to setting access control policies.
[0180] In some embodiments, the mobile phone can also query the access control policy on the mobile phone. Figure 8 As shown, S80, after the mobile phone is restarted, the attribute access control module sends a policy query request to the multimedia middle station. The policy query request includes information about the current scene mode. Afterwards, the multimedia middle station receives the policy query request (or is called a second request), and can execute S81, in response to the policy query request, to query the access control policy list corresponding to the current mode information. The access control policy list includes at least one access control policy, such as the above-mentioned access control policy 1. Afterwards, the multimedia middle station can execute S82, and send the access control policy list to the attribute access control module, so that the attribute access control module can determine the access control policy that is effective in the current scene mode, so that when the access control policy needs to be displayed, it can be directly displayed.
[0181] Optionally, the multimedia middle station may return specific information of the access control policy to the attribute access control module, or an access path of the access control policy, so that the attribute access control module can access the specific information of the access control policy using the access path.
[0182] It should be understood that restarting the mobile phone is only one possible situation that triggers the mobile phone to query the access control policy. The mobile phone may also query the access control policy in other situations, such as when the access control policy is updated.
[0183] It should be noted that the privacy label setting process described in S201-S205 can be executed before, after, or simultaneously with the access control policy setting process described in S207-S212, and this application does not restrict the order in which the two are executed. In general, the numbering of the steps in the embodiments of this application does not represent the order in which the steps are executed.
[0184] The previous section describes the process of setting up access control policies. When an application on a mobile phone accesses a multimedia file, the mobile phone (e.g., the multimedia middleware on the mobile phone) can apply the set access control policy to determine whether the application can access the multimedia file. The following section will continue to describe the application process for multimedia files.
[0185] S213: The image editing APP receives operation 1 input by the user.
[0186] Operation 1 (or the first operation) triggers the image editing app to access private images on the phone. The image editing app can process the image, such as adjusting brightness and contrast. For example, operation 1 is a private album access operation. When a user wants to process a private image on their phone, they can enter the private album access operation. This private album access operation triggers the image editing app to display the target private image.
[0187] S214: In response to operation 1, the image editing APP sends a request 3 to the multimedia middle station, wherein the request 3 includes an identifier of the image editing APP.
[0188] S215. The multimedia middle platform responds to request 3 and, based on the current scene mode, determines whether there is a target access control policy in which the attribute label is a privacy label and the application identifier is the identifier of the image editing APP.
[0189] In this embodiment of the present application, applications on a mobile phone (such as an image editing app) cannot directly access multimedia files, but must access multimedia files through the multimedia middle platform. Therefore, when the image editing app needs to access multimedia files, it sends a request 3 to the multimedia middle platform. In response to the request 3, the multimedia middle platform searches the database 2 for a target access control policy in which the attribute tag corresponding to the current scene mode is a privacy tag and the application identifier is the identifier of the image editing app.
[0190] After the target policy control policy exists, it indicates that the image editing APP belongs to the whitelist application. The multimedia middle station can determine that the image editing APP can access the target privacy image (or replace it with the first media file) based on the target access control policy, and then the multimedia middle station can execute S216 or S221.
[0191] When the target policy control policy does not exist, it indicates that the image editing APP does not belong to the whitelist application, and the multimedia middle platform can execute S223.
[0192] For example, the multimedia middle station determines that the data table corresponding to the current scene mode stored in database 2 is the above-mentioned data table 2 (as shown in Table 3). Afterwards, the multimedia middle station can search for an access control policy including an attribute label that is a privacy label and an application identifier that is an image editing APP from data table 2, and use it as the target access control policy.
[0193] Table 3
[0194]
[0195]
[0196] It can be understood that each row in the above Table 3 indicates an access control policy. For example, the access control policy indicated by the second row indicates that the application with the application identifier com.aXXX can access private files (that is, multimedia files whose attribute label is a privacy label). For another example, the access control policy indicated by the third row indicates that the application with the application identifier com.bXXX can access private files. For another example, the access control policy indicated by the fourth row indicates that the application with the application identifier com.cXXX needs to pass identity authentication to access private files. For another example, the access control policy indicated by the fifth row indicates that the application with the application identifier com.cXXX is prohibited from accessing ordinary files, that is, multimedia files whose attribute label is a normal label.
[0197] In general, access control policies can be categorized as whitelist or blacklist. Applications identified by application identifiers in a whitelist policy are allowed to access private files, while applications identified by application identifiers in a blacklist policy are prohibited from accessing regular files. Optionally, applications identified by application identifiers in a blacklist policy are also prohibited from accessing private files, meaning they are prohibited from accessing multimedia files.
[0198] In some embodiments, if the above-mentioned target access control policy is not found, the multimedia middle platform can determine whether the image editing APP can access multimedia files with attribute labels that are privacy labels based on native related management and control policies.
[0199] In some embodiments, the current scene mode in S215 may be determined based on the current scene mode information sent by the attribute access control module, or based on the current scene mode information sent by the image editing app, such as carried in request 3 sent by the image editing app. Furthermore, the current scene mode information may also be sent by other applications or modules, which is not limited in this application.
[0200] It should be noted that, as mentioned above Figure 6 As shown, the multimedia middle platform includes a file access control function (FileAccessPolicyControl). Among them, the file access control function is used to implement application access control to multimedia files.
[0201] In some embodiments, similar to the above-mentioned privacy attribute management function and access control policy management function, the file access control function can also be encapsulated as an interface so that applications (such as image editing APPs) can call the interface to achieve access to multimedia files.
[0202] S216. When the access mode information in the access control policy 1 indicates that the access is performed after identity authentication is passed, the multimedia middle station performs identity authentication and obtains an identity authentication result.
[0203] The identity authentication result indicates whether the authentication was successful or failed. Exemplarily, the multimedia middle station receives identity information input by a user. The multimedia middle station then determines whether the identity information is the target user identity information corresponding to the current scene mode, and obtains the identity authentication result. For example, if the current scene mode is the device owner mode, the target user corresponding to the current scene mode is the device owner.
[0204] If it is determined that the identity information input by the user is the target user information corresponding to the current scene mode, it indicates that the current user is the target user corresponding to the current scene mode, and the multimedia middle station can determine that the identity authentication result indicates that the authentication is successful. If it is determined that the identity information input by the user is not the target user identity information corresponding to the current scene mode, it indicates that the current user is not the target user corresponding to the current scene mode, and the multimedia middle station can determine that the identity authentication result indicates that the authentication failed.
[0205] In some embodiments, the multimedia middle platform can display an identity authentication interface. The multimedia middle platform then receives the identity information entered by the user on the identity authentication interface and uses this identity information for identity authentication. For example, if the identity authentication method is facial authentication, the identity authentication interface can be a facial recognition interface, and the identity information can be a facial image captured by a mobile phone. It should be understood that facial authentication is only one possible implementation method for identity authentication, and the multimedia middle platform can also perform identity authentication through other methods, such as behavior authentication, password authentication, fingerprint authentication, and other authentication methods.
[0206] S217. When the identity authentication result indicates that the authentication is successful, the multimedia middle platform sends the access handle of the target private image to the image editing APP.
[0207] S218. The image editing APP displays the target private image based on the access handle of the target private image.
[0208] The access handle of the target private image indicates the file path of the target private image. The image editing app can use the file path of the target private image to access and display the target private image.
[0209] In some embodiments, the multimedia middle station determines that the identity authentication result indicates that the authentication is successful, indicating that the image editing APP is allowed to access the target private image. The multimedia middle station can determine the access handle of the target private image. Exemplary, the access handle determination process may include: Figure 9 As shown, the multimedia middle station may execute S90, querying a list of target private image identifiers whose attribute tags are privacy tags. The list of target private image identifiers includes at least one target private image identifier. The multimedia middle station may then execute S91, determining, for each target private image identifier in the list of target private image identifiers, an access handle for the target private image corresponding to the target private image identifier.
[0210] It should be understood that the above description is only one possible scenario for the multimedia middle station to query private files, and the multimedia middle station can also query private files in other scenarios. For example, the privacy label clearing scenario. The gallery APP receives operation 2 (or the fourth operation) input by the user, and this operation 2 is used to trigger the mobile phone to set all private images on the mobile phone to non-private images. In response to this operation 2, the gallery APP can send a label update request to the multimedia middle station. Afterwards, in response to the label query request, the multimedia middle station searches the database 1 for the identifier of the image whose attribute label is a privacy label to obtain a list of private image identifiers. Afterwards, the multimedia middle station can update the attribute label corresponding to the identifier of each image in the privacy image identifier list from a privacy label to a normal label, and the file path of the image before and after the attribute label update is the same. Optionally, the multimedia middle station can send the privacy image identifier list to the gallery APP so that the gallery APP can know the private images on the mobile phone.
[0211] S219. When the identity authentication result indicates that the authentication is successful, the multimedia middle platform sends an access denial indication message to the image editing APP.
[0212] S220. In response to the access denial indication information, the image editing APP displays a prompt message indicating that access to the private image is prohibited.
[0213] In an embodiment of the present application, the multimedia middle platform determines that the identity authentication has failed, indicating that the current user is not the target user corresponding to the current scene mode, and prohibits the user from viewing the target private image, that is, prohibits the image editing APP from accessing the target private image. The multimedia middle platform refuses to return the above-mentioned access handle to the image editing APP to avoid the leakage of privacy information.
[0214] In some embodiments, the above-mentioned access prohibition prompt information can also be displayed by the multimedia middle platform, or the multimedia middle platform can be displayed through other applications or modules on the mobile phone, which is not limited by this application.
[0215] In some embodiments, the above-mentioned display of the privacy image access prohibition prompt information is only one possible implementation method of outputting the privacy image access prohibition prompt information. The image editing APP can also use other methods to prompt the user to prohibit the display of the target privacy image, such as voice, and this application does not limit it.
[0216] S216-S220 above describe the situation where a target access control policy exists for an image editing app, and where this target access control policy indicates access after identity authentication. Of course, the target access control policy can also indicate access in other situations, such as indicating runtime access. The following, combined with S221-S222, describes the process of an image editing app accessing multimedia files when the target access control policy indicates access is permitted.
[0217] S221. When the access method information in access control policy 1 indicates that access is allowed, the multimedia middle platform sends an access handle of the target private image to the image editing APP.
[0218] S222: The image editing APP displays the target private image based on the access handle of the target private image.
[0219] In an embodiment of the present application, after obtaining the target access control policy corresponding to the current scene mode and the image editing APP, the multimedia middle platform determines that the target access control policy indicates that access is allowed, indicating that the image editing APP belongs to a whitelist application. The multimedia middle platform can then directly send an access handle of the target private image to the image editing APP, so that the image editing APP can access the target private image based on the access handle.
[0220] S216-S222 above introduced the situation where the target access control policy exists after S215. The following will continue to introduce the situation where the target access control policy does not exist.
[0221] S223. The multimedia middle platform sends an access denial indication message to the image editing APP.
[0222] The access denial indication information is used to indicate the denial of access to the private file.
[0223] In an embodiment of the present application, when there is no target access control policy, indicating that the image editing APP does not have the authority to access the private file, the multimedia file prohibits the image editing APP from accessing the target private image.
[0224] In some embodiments, the above text uses the access control policy including the whitelist policy and the blacklist policy as an example to introduce how to determine whether the image editing APP can access the target private image. Of course, the mobile phone, such as the database 2 (or policy library) on the mobile phone, may also have an access control policy in which the attribute label is a privacy label and the access method information indicates that access is prohibited. Accordingly, after the multimedia middle station determines the target access control policy in which the attribute label is a privacy label and the application identifier is the identifier of the image editing APP, if the access method information in the target access control policy indicates that access is prohibited, indicating that the image editing APP does not have the authority to access the private files on the mobile phone, the multimedia middle station denies the image editing APP access to the target private image.
[0225] S224. In response to the access denial indication information, the image editing APP displays a prompt message indicating that access to the private image is prohibited.
[0226] The private image access prohibition prompt information is used to prompt that access to the target private image is prohibited, and can also be called file access prohibition prompt information.
[0227] In the embodiments of the present application, in different scene modes, users can set the access control policy corresponding to the scene mode according to their needs. After entering a scene mode, the access control policy corresponding to the scene mode will take effect. When an application accesses a multimedia file on the mobile phone, the mobile phone queries the access control policy corresponding to the scene mode for a target access control policy that matches the application. The target access control policy is then used to determine whether the application has permission to access the multimedia file, thereby preventing the leakage of the private files of the user corresponding to the scene mode. This can effectively protect user privacy, and the access control policy is flexible and meets personalized needs.
[0228] In some embodiments, when an application (such as application 1) accesses a multimedia file (such as multimedia file 2), the multimedia middle station can query the attribute tag of the multimedia file 2. If the attribute tag of the multimedia file 2 is a privacy tag, the multimedia middle station can query whether there is a whitelist policy in the whitelist policy whose application identifier is the identifier of application 1, that is, query whether application 1 is a whitelist application. If there is a whitelist policy whose application identifier is the identifier of application 1, it indicates that application 1 is a whitelist application, and the multimedia middle station can allow application 1 to access the multimedia file 2 normally.
[0229] If there is no whitelist policy whose application identifier is the identifier of application 1, it indicates that application 1 does not belong to the whitelist application, and the multimedia middle platform prohibits application 1 from accessing multimedia file 2.
[0230] In addition, if the attribute tag of the multimedia file 2 accessed by application 1 is a common tag, the multimedia middle station can query whether there is a blacklist policy in the blacklist policy whose application identifier is the identifier of application 1, that is, to query whether application 1 belongs to a blacklist application. If there is a blacklist policy whose application identifier is the identifier of application 1, it indicates that application 1 belongs to a blacklist application, and the multimedia middle station prohibits application 1 from accessing the multimedia file. If there is no blacklist policy whose application identifier is the identifier of application 1, it indicates that application 1 does not belong to a blacklist application, and the multimedia middle station allows application 1 to access the multimedia file 2.
[0231] Among them, optionally, if the attribute label of the above-mentioned multimedia file 2 is a privacy label, then after the multimedia middle station fails to query the whitelist policy whose application identifier is the identifier of the application 1, the multimedia middle station can continue to query whether there is a blacklist policy whose application identifier is the identifier of the application 1. If it exists, it means that the application 1 is not even allowed to access ordinary files. Therefore, for multimedia files 2 with higher privacy (i.e., multimedia files 2 with attribute labels that are privacy labels), they are even more inaccessible, and the multimedia middle station can prohibit the application 1 from accessing the multimedia file 2.
[0232] In addition, if there is no blacklist policy whose application identifier is the identifier of application 1, in order to avoid privacy leakage, the multimedia middle platform can still prohibit application 1 from accessing the above-mentioned multimedia files.
[0233] Optionally, in the absence of a whitelist policy whose application identifier is the identifier of application 1, the multimedia middle platform can directly determine whether application 1 can access the above-mentioned multimedia file 2 through the conventional control policy (or native control policy) on the mobile phone. Alternatively, in the absence of a whitelist policy whose application identifier is the identifier of application 1 and the absence of a blacklist policy whose application identifier is the identifier of application 1, the multimedia middle platform determines whether the application can access the above-mentioned multimedia file 2 through the conventional control policy on the mobile phone.
[0234] In some embodiments, since the APP needs to use the multimedia middle platform when accessing multimedia files, the native multimedia middle platform can be expanded, and the access control policy and the attribute tags of the multimedia files can be configured in the multimedia middle platform, so that when the mobile phone APP accesses the multimedia files, the multimedia middle platform can be used to determine whether the APP can access the multimedia files, thereby ensuring the security of the multimedia files.
[0235] In some embodiments, the interaction between the above modules is actually a mutual call between modules. For example, the gallery APP sends a request 1 to the multimedia middle station to trigger the multimedia middle station to set image 1 as a private image. In fact, the gallery APP calls the privacy label setting interface of the multimedia middle station to set the attribute label of image 1 to a private label. For another example, the attribute access control module sends a request 2 to the multimedia middle station to trigger the multimedia middle station to generate the corresponding access control policy 1. In fact, the attribute access control module calls the access control policy setting interface of the multimedia middle station to generate access control policy 1. For another example, the image editing APP sends a request 3 to the multimedia middle station to trigger the multimedia middle station to query whether the image editing APP can access the target private image. In fact, the image editing APP calls the file access control interface of the multimedia middle station to determine whether the image editing APP can access the target private image.
[0236] Specifically, as mentioned above Figure 6 As shown, the gallery app can call the privacy attribute management interface (application programming interface, API) provided by MediaProvider Kit to implement the call of the multimedia middle platform's privacy attribute management function, so as to set, clear, and query the privacy tags of multimedia files. Similarly, the gallery app can call the access control policy management interface provided by MediaProvider Kit to implement the call of the multimedia middle platform's access control policy management function, so as to generate, clear, and query the access control policies of multimedia files.
[0237] It should be noted that to facilitate applications invoking the access control policy management and privacy attribute management functions of the multimedia middleware, the mobile phone can first encapsulate the access control policy management function based on the Android Interface Definition Language (AIDL), and then encapsulate it again based on relevant standards to obtain the access control policy management interface. Similarly, the mobile phone can also encapsulate the privacy attribute management function accordingly to obtain the privacy attribute management interface.
[0238] In some embodiments, the access control policy corresponds to the scene mode. For the same application, the access control policy corresponding to the application in different modes of scene mode 1 may be different. For example, when the mobile phone is in scene mode 1 (or called the first scene mode), when the image editing APP needs to access a private file (such as the target private image mentioned above), the mobile phone determines through the multimedia middle platform that the target access control policy 1 (or called the first target access control policy) corresponding to the privacy tag, scene mode 1 and the image editing APP indicates access (such as the above-mentioned access allowed or access after identity authentication), indicating that the image editing APP has the authority to access the private file in the scene mode, and the mobile phone can access the private file through the image editing APP.
[0239] Afterwards, the mobile phone receives a mode switching operation input by the user, and the mode switching operation (or the third operation) is used to trigger the mobile phone to switch to scene mode 2. In response to the mode switching operation, the mobile phone switches from scene mode 1 to scene mode 2 (or the second scene mode). Afterwards, when the image editing APP needs to access the private file again, the mobile phone uses the multimedia middle platform to determine that there is no target access control policy 2 (or the second target access control policy) corresponding to the privacy label, the image editing APP's identifier and scene mode 2, indicating that the image editing APP does not have the authority to access the private file under scene mode 2. The mobile phone can then output a file access prohibition prompt message, thereby avoiding the leakage of private files, ensuring the security and privacy of private files, and realizing flexible access to private files to meet the needs of users in different scene modes.
[0240] In some embodiments, the above description uses different access control policies corresponding to different scenario modes as an example to describe the process of setting and applying access control policies. Of course, the access control policy set by the mobile phone can also be applied to all scenario modes. For example, the access control policy set in the mobile phone owner mode can also be applied in the non-owner mode.
[0241] In the embodiment of the present application, the mobile phone can configure access control policies for each access scenario through the multimedia middle platform, and the access control policies corresponding to different access scenarios do not affect each other, instead of restricting file access through the file access control module of the Linux Kernel, making the access control method more refined and flexible, meeting the access requirements of different access scenarios. For example, Figure 10 As shown, both privileged applications and non-privileged applications can achieve file access control through the access control policy in the multimedia center. Among them, privileged applications refer to applications that have the permission to set the attribute tags of multimedia files, such as the above-mentioned gallery APP and file manager. Non-privileged applications refer to applications that do not have the permission to set the attribute tags of multimedia files, such as third-party applications.
[0242] Additionally, optionally, as Figure 10 As shown, for system applications, it can also be managed through the multimedia middle platform, such as setting, querying and clearing privacy tags of multimedia files, to achieve the management of multimedia file attributes without moving the storage location of the multimedia files, thereby avoiding repeated movement of multimedia files and improving the management efficiency of multimedia file attributes.
[0243] In some embodiments, the multimedia middle platform can determine whether the subject object can access the object resource based on the attributes of the subject object, such as the attributes of the above-mentioned gallery APP. Simply put, the application identifier in the above-mentioned database 2 can be replaced with the attributes of the subject object. Accordingly, when the subject object accesses a multimedia file, the multimedia middle platform can search for a target access control policy that matches the attributes of the subject object from database 2, rather than searching for a target access control policy that matches the identifier of the subject object.
[0244] Taking the subject object as an application as an example, the application attributes may include at least one of the application type, installation source, security attributes, and applicable age. Taking the subject object as a user as an example, the user attribute may be the user's identity.
[0245] Among them, the types of the above applications, that is, the classification of the applications, can include one or more types of office, education, payment, shopping, sports, travel, audio and video, games, and social networking.
[0246] The above-mentioned installation source may include one or more of system applications, application markets, and non-application markets. Among them, when the installation source of the application of the electronic device is a system application, the application is pre-installed on the electronic device, such as the application can be installed in the operating system of the electronic device.
[0247] When the installation source of an electronic device's application is an application market, the application is a third-party application, and the application is installed from the electronic device's application market APP. When the installation source of an electronic device's application is not an application market, the application is a third-party application, and the application is not installed from the electronic device's application market APP, such as from a browser application.
[0248] The above-mentioned security attribute indicates whether the application is a risky application. The security attribute may include a risk attribute and a normal attribute. Among them, the risk attribute indicates that the application is a risky application, and the normal attribute indicates that the application is a safe application instead of a risky application.
[0249] The applicable age above indicates the age that users must reach to use the app. For example, the applicable age for an app may be 6 years old, 18 years old, etc.
[0250] It should be noted that the operations performed by the modules or applications in the mobile phone described above are merely examples, and the operations may also be performed by other modules or applications. This application does not limit the execution entity of the operations. In addition, the operations performed by the modules or applications in the mobile phone are actually performed by the mobile phone, that is, the execution entity of the operations described above can all be the mobile phone.
[0251] In some embodiments, the present application provides a computer-readable storage medium including computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the multimedia file access method as described above.
[0252] In some embodiments, the present application provides a computer program product, which, when executed on an electronic device, enables the electronic device to execute the multimedia file access method described above.
[0253] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0254] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0255] The units described as separate components may or may not be physically separate, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0256] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0257] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0258] The above content is only a specific embodiment of this application, but the scope of protection of this application is not limited to this. Any changes or replacements within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.< / string> < / string> < / string>
Claims
1. A method for accessing a media file, characterized in that: Applied to electronic equipment, the method includes: Receive a first operation input by a user; wherein the first operation is used to trigger a first application of the electronic device to access a first media file whose attribute label is a privacy label; the privacy label of the first media file is set by the electronic device through the multimedia middleware in response to a second operation, and the second operation is used to trigger the electronic device to set the first media file as a private file; In response to the first operation, determining, through the multimedia middle platform, a first target access control policy corresponding to the privacy label and the identifier of the first application; In a case where the first target access control policy indicates access, the first media file is accessed through the first application.
2. The method according to claim 1, characterized in that The first target access control policy indicates that access means access after identity authentication is passed; The step of accessing the first media file by using the first application when the first target access control policy indicates access includes: If the first target access control policy indicates access after identity authentication, perform identity authentication to obtain an identity authentication result; wherein the identity authentication result indicates whether the user currently using the electronic device is the target user corresponding to the first scene mode in which the electronic device is located; When the identity authentication result indicates that the authentication is successful, the first media file is accessed through the first application.
3. The method according to claim 1 or 2, characterized in that Before accessing the first media file through the first application, the method further includes: Sending, through the multimedia middle platform, an access handle of the first media file to the first application; wherein the access handle of the first media file represents a file path of the first media file; Accessing the first media file through the first application includes: The first media file is accessed by the first application based on the access handle of the first media file.
4. The method according to claim 1, wherein The first target access control policy indicates that access is allowed; when the first target access control policy indicates that access is allowed, the first media file is accessed through the first application.
5. The method according to any one of claims 1 to 4, characterized in that The first target access control policy refers to an access control policy corresponding to the privacy tag, the identifier of the first application, and information about the first scene mode in which the electronic device is located; The method further comprises: In response to a third operation input by the user, switching to a second scene mode; receiving the first operation; In response to the first operation, through the multimedia middle platform, when it is determined that there is no second target access control policy, or when the second target access control policy indicates that access is prohibited, a file access prohibited prompt information is output; wherein, the second target access control policy is an access control policy corresponding to the privacy label, the identifier of the first application and the information of the second scene mode; the file access prohibited prompt information is used to prompt that access to the first media file is prohibited.
6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: Obtaining access control policy setting information input by a user through an attribute access control module, and sending a first request to the multimedia middle station; wherein the first request includes the access control policy setting information and information about the first scene mode of the electronic device; the access control policy setting information includes at least a mapping relationship between an attribute tag, access method information, and an identifier of the first application; the attribute tag is a privacy tag, and the access method information indicates access; In response to the first request, a first target access control policy is saved through the multimedia middle platform; wherein the first target access control policy is obtained based on the access control policy setting information and the information of the first scenario mode.
7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: Receiving a fourth operation; wherein the fourth operation is used to trigger the electronic device to set the private file to a non-private file; In response to the fourth operation, querying, through the multimedia middle platform, a second media file whose attribute tag is a privacy tag; The attribute tag of the second media file is set as a non-privacy tag through the multimedia middle platform.
8. The method according to claim 7, characterized in that The file path of the second media file whose attribute tag is a privacy tag is the same as the file path of the second media file whose attribute tag is a non-privacy tag.
9. An electronic device, characterized in that: The electronic device includes a memory and one or more processors; the memory and the processor are coupled; the memory is used to store computer program code, and the computer program code includes computer instructions; when the processor executes the computer instructions, the electronic device executes the method as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that The method comprises computer instructions, which, when executed on an electronic device, cause the electronic device to execute the method according to any one of claims 1 to 8.
11. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Privacy protection method and device
CN103324893A
Android privacy data protection method and system based on authority tags
CN104318171A
File access method and mobile terminal
CN107798252A
Terminal control method and apparatus, readable storage medium, and terminal
CN108521494A
Album access method, device, computing device and storage medium
CN109145130A