CN117667864A - Media file storage method and electronic equipment - Google Patents

Media file storage method and electronic equipment Download PDF

Info

Publication number
CN117667864A
CN117667864A CN202211066322.7A CN202211066322A CN117667864A CN 117667864 A CN117667864 A CN 117667864A CN 202211066322 A CN202211066322 A CN 202211066322A CN 117667864 A CN117667864 A CN 117667864A
Authority
CN
China
Prior art keywords
information
application
media
media file
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211066322.7A
Other languages
Chinese (zh)
Inventor
李勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202211066322.7A priority Critical patent/CN117667864A/en
Publication of CN117667864A publication Critical patent/CN117667864A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/168Details of user interfaces specifically adapted to file systems, e.g. browsing and visualisation, 2d or 3d GUIs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6227Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database where protection concerns the structure of data, e.g. records, types, queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Data Mining & Analysis (AREA)
  • Medical Informatics (AREA)
  • Human Computer Interaction (AREA)
  • Storage Device Security (AREA)

Abstract

The application provides a media file storage method and electronic equipment. The method can be applied to the fields of artificial intelligence (artificial intelligence, AI), man-machine interaction and the like. The method comprises the following steps: acquiring media data and attribute information of a first media file, wherein the attribute information comprises privacy information and non-privacy information except the privacy information; storing the media data and the non-private information in a first storage area of the electronic device and storing the private information in a second storage area of the electronic device.

Description

Media file storage method and electronic equipment
Technical Field
The present disclosure relates to the field of electronic technologies, and in particular, to a media file storage method and an electronic device.
Background
With the progress of terminal technology, the functions of electronic devices are gradually perfected. Taking a mobile phone as an example, the image capturing function is one of functions that are used by a user with a high frequency, and therefore, a large number of images or videos may be stored in the mobile phone, and attribute information corresponding to each image or each video, including some privacy information, such as capturing location information of the image, etc.
When users share the stored content such as images or videos through social application, the attribute information of the images or videos can be shared, so that privacy is revealed.
Disclosure of Invention
The application provides a media file storage method and electronic equipment, which are used for reducing the probability of privacy disclosure.
In a first aspect, a method for storing a media file is provided, the method being applicable to an electronic device, the method comprising: acquiring media data and attribute information of a first media file, wherein the attribute information comprises privacy information and non-privacy information except the privacy information; storing the media data and the non-private information in a first storage area of the electronic device and storing the private information in a second storage area of the electronic device.
In the embodiment of the application, the electronic device stores the non-private information and the private information in the attribute information of the first media file separately, and when the user shares the first media file, the media data and the non-private information of the image can be acquired and sent from the first storage area, but the private information is not acquired from the second storage area, so that the probability of privacy disclosure is reduced.
In one possible design, the first storage area is a folder and/or a database; and/or the second storage area is a folder and/or a database. That is, the storage area for storing media data and attribute information may be any area capable of storing data, such as a folder or a database, and any storage area meeting requirements may be selected as a target storage area in the process of storing data, which is helpful for improving the storage resource utilization rate.
In one possible design, if the first storage area and the second storage area are folders, the authority level of the first folder corresponding to the first storage area is lower than the authority level of the second folder corresponding to the second storage area. That is, if the first storage area and the second storage area are folders, the difficulty of acquiring the private information is increased, the probability of disclosure of the private information in the sharing process of the media file is reduced, and the security in the information sharing process is improved by setting the authority level of the second folder to be higher than that of the first folder.
In one possible design, the first media file is photographed by the electronic device; or, the first media file is received by the electronic device from other electronic devices. That is, whether the first media file is shot by the electronic device or not, the electronic device can store the private information and the non-private information of the first media file separately, so that the probability of disclosure of the private information in the sharing process of the media file is reduced, and the safety in the information sharing process is improved.
In one possible design, the private information, the non-private information, and the media data are acquired separately by different information; that is, the private information, the non-private information and the media data are acquired through different information respectively, which is beneficial to the electronic device to distinguish the private information from the non-private information, and is beneficial to improving the storage efficiency.
In one possible design, obtaining an exchangeable image format corresponding to the media data and the first media file, where the exchangeable image format includes the privacy information and the non-privacy information; and acquiring the privacy information from the exchangeable image file format, and deleting the privacy information included in the exchangeable image file format. That is, the electronic device deletes the privacy information included in the exchangeable image file format after acquiring the privacy information from the exchangeable image file format, so that the probability of disclosure of the privacy information in the process of sharing the media file is reduced, and the security in the process of sharing the information is improved.
In one possible design, the attribute information includes one or more of the following parameters: the method comprises the steps of capturing a media type of a first media file, capturing a theme of the first media file, capturing resolution of equipment of the first media file, capturing position information of the first media file, capturing model information of equipment of the first media file, capturing time of the first media file or capturing lens parameters of the first media file. It should be noted that, the parameters included in the attribute information are exemplified herein, that is, the attribute information may include information, and more or fewer parameters may also be included.
In one possible design, the privacy information includes one or more of the following parameters: and shooting the position information of the first media file, the model information of equipment used for shooting the first media file, the shooting time of the first media file or the lens parameters of the first media file. It should be noted that, the parameters of the private information are taken as examples herein, that is, the private information may include information, and more or fewer parameters may also be included.
In one possible design, the method further comprises: responsive to a user media file sharing operation based on a first application, displaying a plurality of media files on a display interface of the electronic device, wherein the plurality of media files comprise the first media file; and responding to the first media file selected by the user, and sending first data or first resource information of the first media file through the first application, wherein the first data comprises the media data and the non-private information, and the data corresponding to the first resource information comprises the media data and the non-private information. That is, when the user wants to share the first media file through the first application, the electronic device may send attribute information of the first media file except the privacy information through the first application, that is, the privacy information of the first media file is not shared through processing of the electronic device, so that the probability of privacy disclosure in the media file sharing process is reduced, and the security in the information sharing process is improved.
In one possible design, the first resource information includes a first uniform resource locator (uniform resource identifier, URI). The electronic equipment sends the first URI for acquiring the first media file through the first application, so that the response efficiency of the electronic equipment can be improved.
In one possible design, before the first data or the first resource information is sent by the first application, the method further includes: sending, by the first application, first request information to a media library of the electronic device, where the first request information is used to request to obtain the first media file; and acquiring the first data or the first resource information from the first storage area through the media library. That is, when the user shares the first media file through the first application, the request information needs to be sent to the media library, so that the media library can determine whether the privacy information needs to be sent or not based on the request information, the probability of privacy disclosure in the media file sharing process is reduced, and the safety in the information sharing process is improved.
In one possible design, the method further comprises: determining whether a first condition is satisfied; and if so, sending the first data or the first resource information through the first application. That is, the electronic device may determine whether to send the privacy information by determining whether to meet the corresponding condition, for example, when determining that the first condition is met, the electronic device does not send the privacy information, so that the probability of privacy disclosure in the media file sharing process is reduced, and the security in the information sharing process is improved.
In one possible design, determining whether the first condition is met includes: if the importance evaluation value of the first media file is greater than or equal to a first value, determining that the first condition is met; or if the media library receives first indication information, determining that the first condition is met, wherein the first indication information is used for indicating that privacy information is not sent; or if the first request information does not include the parameter of the privacy information, determining that the first condition is met, wherein the parameter of the privacy information is used for indicating the privacy information to be acquired; or if the first operation of the electronic equipment by the user is detected, determining that the first condition is met, wherein the first operation is used for indicating that the privacy information is not sent; or if the operation of the user based on the electronic equipment is not detected within the first duration, determining that the first condition is met.
That is, if the importance evaluation value of the first media file is greater than or equal to the first value, which indicates that the first media file is important, the electronic device may not send the privacy information of the first media file, so as to reduce the probability of disclosure of the privacy information of the important media file and improve the information security. If the media library receives first indication information sent by the first application according to the selection of the user, or first request information which does not comprise parameters of the privacy information, or if the first operation of the user based on the electronic equipment is detected, or if any operation for the electronic equipment is not detected within a first duration, the user does not want to share the privacy information, the electronic equipment does not send the privacy information, the disclosure of the privacy information which the user does not want to share is avoided, the processing process of the electronic equipment accords with the requirements of the user, and the user experience is facilitated.
In one possible design, the method further comprises: displaying a first preset option on the display interface, and responding to the option selected by the user based on the first preset option, sending the first indication information to the media library through the first application, wherein the first preset option comprises an option for indicating whether to send privacy information or not; or, displaying a second preset option on the display interface, and responding to the option selected by the user based on the second preset option, sending, by the first application, first request information which does not comprise parameters of the privacy information to the media library, wherein the second preset option comprises parameters of the privacy information; or detecting a first operation of the user based on the electronic device. That is, when the user shares the first media file through the first application, whether privacy information needs to be shared or not can be determined according to the requirement of the user, which is helpful for improving user experience.
In one possible design, the method further comprises: determining whether a second condition is satisfied; and if so, sending second data or second resource information of the first media file through the first application, wherein the second data comprises the media data, the non-private information and the private information, and the data corresponding to the first resource information comprises the media data, the non-private information and the private information. That is, the electronic device may determine whether to send the privacy information by determining whether to meet the corresponding condition, for example, when determining that the second condition is met, the privacy information is sent, so that the processing procedure of the electronic device meets the requirement of the user, which is beneficial to improving the sharing experience of the user.
In one possible design, determining whether the second condition is met includes: if the importance evaluation value of the first media file is smaller than a first value, determining that the second condition is met; or if the media library receives second indication information, determining that the second condition is met, wherein the second indication information is used for indicating to send privacy information; or if the first request information comprises parameters of the privacy information, determining that the second condition is met, wherein the parameters of the privacy information are used for indicating the privacy information to be acquired; or, if it is detected that the user is based on a second operation of the electronic device, determining that the second condition is satisfied; or if the first application is successfully checked, determining that the second condition is met; or if the media library receives the second indication information and the first application is successfully checked, determining that the second condition is met; or if the first request information comprises the parameters of the privacy information and the first application is successfully checked, determining that the second condition is met; or if the second operation of the electronic equipment is detected and the first application is checked successfully, determining that the second condition is met, wherein the second operation is used for indicating to send private information.
That is, if the importance rating of the first media file is less than the first value, indicating that the first media file is less important, the electronic device may send privacy information for the first media file; if the media library receives second indication information sent by the first application according to the selection of the user, or first request information comprising parameters of privacy information which the user wants to acquire, or if the second operation of the user based on the electronic device is detected, or if the electronic device checks the first application successfully, the electronic device indicates that the user needs to share part or all of the privacy information, the electronic device can send the privacy information, and the user selects whether to send the privacy information, or selects the parameters of the privacy information which needs to be sent, or inputs the second operation, or authorizes the related application to allow the privacy information to be sent, and the like, so that the processing process of the electronic device meets the requirements of the user, and the sharing experience of the user is facilitated to be improved. Or if the media library receives the second indication information sent by the first application according to the selection of the user, or the first request information including the parameters of the privacy information which the user wants to acquire, or if the second operation of the user based on the electronic device is detected, the electronic device can further check the first application, and when the first application is checked successfully, the electronic device can send part or all of the privacy information, so that the processing process of the electronic device can improve the security of information sharing while meeting the requirements of the user, and the sharing experience of the user is facilitated to be improved.
In one possible design, if the check on the first application fails, a rejection message is sent by the first application, the rejection message being used to indicate that the private message is rejected, for example, error is sent. Therefore, the user can determine that the first application does not have the right to send the privacy information based on the rejection information, and the user can send the first request information after authorizing the first application in the setting, so that the sharing efficiency of the privacy information is improved.
In one possible design, the method further comprises: displaying a first preset option on the display interface, and responding to the option selected by the user based on the first preset option, sending the second indication information to the media library through the first application, wherein the first preset option comprises an option for indicating whether to send privacy information or not; or, displaying a second preset option on the display interface, and responding to at least one option selected by the user based on the second preset option, sending, by the first application, first request information including parameters of first privacy information to the media library, wherein the second preset option includes parameters of the privacy information, and the parameters of the first privacy information include parameters of privacy information corresponding to the at least one option; or detecting a second operation of the user based on the electronic equipment, or determining whether the first application has the authority to access the second storage area, if so, determining that the first application is checked successfully, and if not, determining that the first application is checked successfully, wherein the authority is used for indicating whether the user authorizes the first application or indicating parameters of sent privacy information. That is, when the user shares the first media file through the first application, whether privacy information needs to be shared or not can be determined according to the requirement of the user, which is helpful for improving user experience.
In one possible design, before sending, by the first application, the second data or the second resource information of the first media file, the method further comprises: the media data and the non-private information are acquired from the first storage area and the private information is acquired from the second storage area through the media library. That is, when there is no need to transmit the private information, the electronic device may acquire the media data and the non-private information from the first storage area through the media library, without acquiring the private information from the second storage area; when the privacy information is required to be sent, the media data and the non-privacy information are acquired from the first storage area through the media library, and the privacy information is acquired from the second storage area, so that the probability of privacy disclosure in the media file sharing process is reduced, and the safety in the information sharing process is improved.
In one possible design, the non-private information is in an exchangeable image file format that does not contain the private information, the method further comprising: and inserting the privacy information into the exchangeable image file format which does not contain the privacy information through the media library to obtain a second media file, wherein the data of the second media file is the second data, or the resource information of the second media file is the second resource information.
In one possible design, the method further comprises: and deleting the second data or the second resource information through the media library after the preset time length. This can save storage resources and reduce the probability of disclosure of private information.
In one possible design, the first data or the second data sent by the first application is media data and attribute information of the first media file stored by the electronic device. That is, the data transmitted through the first application is data locally stored by the electronic device, not a snapshot or a screenshot, and definition of image quality of the media file can be ensured.
In a second aspect, a communication apparatus is provided, which may be an electronic device, or a chip system for use in an electronic device. The communication device comprises a communication interface and a processor, and optionally a memory. Wherein the memory is configured to store a computer program, and the processor is coupled to the memory and the communication interface, and when the processor reads the computer program or instructions, the processor causes the communication device to perform the method performed by the electronic device in the first aspect.
In a third aspect, there is provided a computer readable storage medium for storing a computer program which, when run on a computer, causes the computer to perform the method as provided in the first aspect above.
In a fourth aspect, there is provided a computer program product comprising a computer program which, when run on a computer, causes the computer to perform the method as described in the first aspect above.
In a fifth aspect, there is provided a graphical user interface on an electronic device with a display, a memory, and a processor to execute one or more computer programs stored in the memory, the graphical user interface comprising a graphical user interface displayed by the electronic device when performing the method of the first aspect described above.
In a sixth aspect, a chip system is provided, including a processor and an interface, where the processor is configured to invoke and execute instructions from the interface, so that the chip system implements the method according to the first aspect.
The advantages of the second aspect to the sixth aspect are described above, and detailed description thereof will not be repeated with reference to the advantages of the first aspect.
Drawings
Fig. 1A is a schematic hardware structure of a mobile phone 100 according to an embodiment of the present application;
fig. 1B is a schematic software structure of a mobile phone 100 according to an embodiment of the present application;
fig. 2 is a schematic diagram of a user graphical interface of the mobile phone 100 according to an embodiment of the present application;
Fig. 3A is a schematic diagram of a user graphical interface of the mobile phone 100 according to an embodiment of the present application;
fig. 3B is a schematic diagram of a user graphical interface of the mobile phone 100 according to an embodiment of the present application;
fig. 4 is a schematic diagram of a user graphical interface of the mobile phone 100 according to an embodiment of the present application;
FIG. 5 is a flowchart illustrating a method for storing a media file according to an embodiment of the present disclosure;
fig. 6 is a flowchart of image storage captured by a camera application according to an embodiment of the present application;
fig. 7 is a flowchart of another image storage captured by a camera application according to an embodiment of the present application;
FIG. 8 is a flowchart illustrating a media file sharing method according to an embodiment of the present disclosure;
FIG. 9 is a flowchart illustrating a method for storing and sharing media files according to an embodiment of the present disclosure;
FIG. 10 is a flowchart illustrating another method for storing and sharing media files according to an embodiment of the present disclosure;
fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It will be apparent that the described embodiments are merely some, but not all embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
In the following, some terms in the embodiments of the present application are explained for easy understanding by those skilled in the art.
An Application (APP) to which embodiments of the present application relate is a software program capable of implementing some or more specific functions. In general, a plurality of applications can be installed in a terminal. Such as camera applications, gallery applications, short message applications, multimedia message applications, various mailbox applications, etc. The application mentioned below may be an application installed when the terminal leaves the factory, or may be an application downloaded from a network or acquired from another terminal by a user in the process of using the terminal.
In the embodiment of the present application, in the process of sharing media files (including images, videos, etc., which are illustrated by the following embodiments, the image selection needs to be performed, which may refer to an image selection interface (also referred to as an image candidate interface), where a thumbnail of multiple images may be displayed for a user to select, for example, the interface 305 in fig. 3A, or the interface 405 in fig. 4, etc.
The thumbnail related to the embodiment of the application is an image with incomplete content, which is made for facilitating a user to browse images in a gallery application or for displaying more images. The thumbnail may be an image obtained by compressing one image, or an image obtained by reducing the size of one image, or an image obtained by sampling a part of pixels on one image, or an image including only a part of the content on one image, or an image displaying only the outline of one image (for example, the original image is stored in the cloud, and the thumbnail of the image may be locally displayed, where the content included in the thumbnail is the outline of the content included in the image). For example, interface 305 in FIG. 3A or interface 405 in FIG. 4 may display a thumbnail, which the user selects.
The universal resource locator according to the embodiment of the application is a succinct character string for identifying abstract or physical resources and is a number or name for uniquely identifying elements or attributes. The URI includes a uniform resource name (uniform resource name, URN) and a uniform resource locator (uniform resource locator, URL), the emphasis of the URI being to locate the resource, rather than the location.
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. Wherein, in the description of the embodiments of the present application, "/" means or is meant unless otherwise indicated, for example, a/B may represent a or B; "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. In addition, in the description of the embodiments of the present application, "plurality" means two or more than two.
The terms "first" and "second" are used below for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the present embodiment, unless otherwise specified, the meaning of "plurality" is two or more.
Embodiments of electronic devices, graphical user interfaces (graphical user interface, GUIs) for such electronic devices, and for using such electronic devices are described below. In some embodiments of the present application, the electronic device may be an electronic device such as a mobile phone, a tablet computer, a wearable device (smart watch), an extended reality (XR) device, a vehicle-mounted device (car machine), a customer premise equipment (customer premise equipment, CPE), or the like, and the specific type of the electronic device is not limited in this embodiment of the present application.
Typically, electronic devices may support a variety of applications. Such as one or more of the following applications: camera applications, instant messaging applications, photograph management applications, and the like. Among these, instant messaging applications can be varied. Such as a short message application, a multimedia message application, a mail application, etc. A user may send text, voice, image, video files, and other various files to other contacts (or other contacts) via an instant messaging application.
The electronic device is a mobile phone as an example. Fig. 1A is a schematic diagram of a structure of a mobile phone 100.
The handset 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge 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, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identity module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a neural center or a command center of the mobile phone 100. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
The processor 100 may execute software codes of the media file storage and sharing algorithm provided in the embodiments of the present application to implement a media file storage and sharing process.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect to a charger to charge the mobile phone 100, or may be used to transfer data between the mobile phone 100 and a peripheral device.
The charge management module 140 is configured to receive a charge input from a charger. The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like.
The wireless communication function of the mobile phone 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the handset 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G, etc. applied to the handset 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc. applied to the handset 100. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, the antenna 1 and the mobile communication module 150 of the handset 100 are coupled, and the antenna 2 and the wireless communication module 160 are coupled, so that the handset 100 can communicate with a network and other devices through wireless communication technology. The wireless communication techniques may include the Global System for Mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS) and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
The mobile phone 100 implements display functions through a GPU, a display 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrix organic light emitting diode), a flexible light-emitting diode (flex), a mini, a Micro led, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments, the cell phone 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The camera 193 is used to capture still images or video. The camera 193 may include a front camera and a rear camera.
The internal memory 121 may be used to store computer executable program code including instructions. The processor 110 executes various functional applications of the cellular phone 100 and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an operating system and software code of at least one application program (such as a camera application, a short message application, etc.), etc. The data storage area may store data (e.g., images, video, etc.) generated during use of the handset 100, etc. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like.
The internal memory 121 may also store software codes of the media file storing and sharing method provided in the embodiments of the present application, and when the processor 110 runs the software codes, the process steps of the media file storing and sharing method are executed, so as to implement a media file storing and sharing process.
The internal memory 121 may also store images, videos, etc. taken or received from other electronic devices.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capabilities of the handset 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
Of course, the software code of the media file storing and sharing method provided in the embodiments of the present application may also be stored in an external memory, and the processor 110 may execute the software code through the external memory interface 120 to execute the flow steps of the media file storing and sharing method, so as to implement the media file storing and sharing process. The images, videos, etc. captured by the mobile phone 100 may also be stored in an external memory.
It should be understood that the user may specify whether the image is stored in the internal memory 121 or the external memory. For example, when the mobile phone 100 is currently connected to the external memory, if an image is captured by the mobile phone 100, a prompt message may be popped up to prompt the user whether to store the image in the external memory or the internal memory 121; of course, there are other ways of specifying, and the embodiments of the present application are not limited; alternatively, when the mobile phone 100 detects that the memory amount of the internal memory 121 is smaller than the preset amount, the image may be automatically stored in the external memory.
The handset 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The pressure sensor 180A is used to sense a pressure signal, and may convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194.
The gyro sensor 180B may be used to determine the motion gesture of the cell phone 100. In some embodiments, the angular velocity of the handset 100 about three axes (i.e., x, y, and z axes) may be determined by the gyro sensor 180B. The gyro sensor 180B may be used for photographing anti-shake.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, the handset 100 calculates altitude from the barometric pressure value measured by the barometric pressure sensor 180C, aiding in positioning and navigation.
The magnetic sensor 180D includes a hall sensor. The mobile phone 100 can detect the opening and closing of the flip cover using the magnetic sensor 180D. In some embodiments, when the mobile phone 100 is a flip phone, the mobile phone 100 may detect the opening and closing of the flip based on the magnetic sensor 180D. And then according to the detected opening and closing state of the leather sheath or the opening and closing state of the flip, the characteristics of automatic unlocking of the flip and the like are set.
The acceleration sensor 180E can detect the magnitude of acceleration of the mobile phone 100 in various directions (typically three axes). The magnitude and direction of gravity can be detected when the handset 100 is stationary. The electronic equipment gesture recognition method can also be used for recognizing the gesture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
A distance sensor 180F for measuring a distance. The cell phone 100 may measure the distance by infrared or laser. In some embodiments, the cell phone 100 may range using the distance sensor 180F to achieve quick focus.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The cellular phone 100 emits infrared light outward through the light emitting diode. The cell phone 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object in the vicinity of the cell phone 100. When insufficient reflected light is detected, the handset 100 can determine that there is no object in the vicinity of the handset 100. The mobile phone 100 can detect that the user holds the mobile phone 100 close to the ear to talk by using the proximity light sensor 180G, so as to automatically extinguish the screen to achieve the purpose of saving electricity. The proximity light sensor 180G may also be used in holster mode, pocket mode to automatically unlock and lock the screen.
The ambient light sensor 180L is used to sense ambient light level. The cell phone 100 may adaptively adjust the brightness of the display 194 based on perceived ambient light levels. The ambient light sensor 180L may also be used to automatically adjust white balance when taking a photograph. The ambient light sensor 180L may also cooperate with the proximity light sensor 180G to detect if the handset 100 is in a pocket to prevent false touches.
The fingerprint sensor 180H is used to collect a fingerprint. The mobile phone 100 can utilize the collected fingerprint characteristics to realize fingerprint unlocking, access an application lock, fingerprint photographing, fingerprint incoming call answering and the like.
The temperature sensor 180J is for detecting temperature. In some embodiments, the handset 100 performs a temperature processing strategy using the temperature detected by the temperature sensor 180J. For example, when the temperature reported by temperature sensor 180J exceeds a threshold, handset 100 performs a reduction in the performance of a processor located near temperature sensor 180J in order to reduce power consumption to implement thermal protection. In other embodiments, when the temperature is below another threshold, the mobile phone 100 heats the battery 142 to avoid the low temperature causing the mobile phone 100 to be abnormally shut down. In other embodiments, when the temperature is below a further threshold, the handset 100 performs boosting of the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperatures.
The touch sensor 180K, also referred to as a "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is for detecting a touch operation acting thereon or thereabout. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 194. In other embodiments, the touch sensor 180K may be disposed on the surface of the mobile phone 100 at a different location than the display 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, bone conduction sensor 180M may acquire a vibration signal of a human vocal tract vibrating bone pieces. The bone conduction sensor 180M may also contact the pulse of the human body to receive the blood pressure pulsation signal.
The keys 190 include a power-on key, a volume key, etc. The keys 190 may be mechanical keys. Or may be a touch key. The handset 100 may receive key inputs, generating key signal inputs related to user settings and function control of the handset 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration alerting as well as for touch vibration feedback. For example, touch operations acting on different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects.
The indicator 192 may be an indicator light, may be used to indicate a state of charge, a change in charge, a message indicating a missed call, a notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card may be inserted into the SIM card interface 195 or removed from the SIM card interface 195 to enable contact and separation with the handset 100.
It should be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the mobile phone 100. In other embodiments of the present application, the handset 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components may be provided. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
It should be noted that, in the prior art, the mobile phone 100 may store an image and a video, and attribute information corresponding to the image and the video, where the attribute information is, for example, information included in an exchangeable image file format (exchangeable image file format, exif), and the attribute information includes privacy information and non-privacy information corresponding to the image and the video, when the mobile phone 100 receives request information for requesting to acquire the image by an application (or detects an input operation, such as an operation for publishing the image or an operation for sending the image to other contacts), after the image is selected by the user, if privacy protection is selected by the user at the same time, the privacy information needs to be erased, and the image sharing efficiency is low. And if abnormal conditions such as network faults occur, the privacy information may not be successfully wiped out, and the probability of privacy disclosure exists.
In the embodiment of the present application, after capturing an image, the mobile phone 100 may store media data of the image and non-private information (attribute information other than the private information) in the first storage area and private information in the second storage area. When the mobile phone 100 detects the request information for the first application to request to acquire an image, the media data and the non-private information of the image can be acquired and transmitted from the first storage area, without acquiring the private information from the second storage area, reducing the probability of privacy disclosure.
In some embodiments, the software system of the handset 100 may employ a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The following embodiments exemplify a layered android (android) system, and exemplify the software structure of the mobile phone 100.
Fig. 1B is a block diagram of a software architecture of a mobile phone 100 according to an embodiment of the present application. The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, an android system may be divided into four layers, from top to bottom, an application layer, an application framework layer, an Zhuoyun row (android run) and system libraries, and a kernel layer, respectively. The application layer may include a series of application packages. As shown in fig. 1B, the application package may include applications for cameras, gallery, calendar, phone calls, maps, navigation, WLAN, bluetooth, music, video, short messages, etc. The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 1B, the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like. The window manager is used for managing window programs. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like. The content provider is used to store and retrieve data and make such data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc. The view system includes visual controls, such as controls to display text, controls to display images, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text messaging icon may include a view displaying text and a view displaying an image. The telephony manager is used to provide the communication functions of the handset 100. Such as the management of call status (including on, hung-up, etc.). The resource manager provides various resources to the application program, such as localization strings, icons, images, layout files, video files, and the like. The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as notification manager is used to inform that the download is complete, message alerts, etc. The notification manager may also be a notification in the form of a chart or scroll bar text that appears on the system top status bar, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in a status bar, a prompt tone is emitted, the electronic device vibrates, and an indicator light blinks, etc.
an android run includes a core library and virtual machines. android run is responsible for scheduling and management of android systems. The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android. The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface manager (surface manager), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), 2D graphics engines (e.g., SGL), etc.
The surface manager is used for managing the display subsystem and providing fusion of 2D and 3D layers for a plurality of application programs.
Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio video encoding formats, such as: MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc.
It should be noted that, in the embodiment of the present application, the media library is further configured to obtain media data and attribute information of a media file, where the attribute information includes one or more of the following: media type (image or video), theme (title), resolution, photographing time, lens parameters (focal length, exposure time, aperture value, etc.), position information (geographical position information, such as latitude and longitude information), device model, etc. In the embodiment of the application, the electronic device stores media data and non-private information (such as one or more of media type, title, resolution, etc.) of the media file in a first storage area (for example, a non-private database described below), and stores private information (such as shooting time, lens parameters, location information, device model, etc.) in a second storage area (for example, a private database described below). When sharing the media file, the electronic device can acquire the media data and the non-private information from the first storage area and acquire the private information from the second storage area through the media library. As an example, the media library described in the embodiments of the present application provides two interfaces, a first interface (e.g., a first interface described below) for acquiring media data and non-private information from a first storage area, and a second interface (e.g., a second interface described below) for acquiring media data and non-private information from a first storage area, and private information from a second storage area. Optionally, the media library may also perform a rights check on the application requesting the acquisition of the media file.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
For easy understanding, the following embodiments of the present application will take a mobile phone having a structure shown in fig. 1A and fig. 1B as an example, and the media file storage and sharing method provided in the embodiments of the present application will be described with reference to the accompanying drawings. The implementation process of the technical scheme of the application is described below in different application scenes. In the following description, the media file is taken as an example of an image.
Scene 1-camera applications
Referring to fig. 2 (a), the mobile phone 100 displays a main interface 201, and the main interface 201 includes application icons of a plurality of applications (camera application, gallery application, calendar application, etc.). For example, when the mobile phone 100 detects an operation of the icon 202 triggering the camera application by the user, the mobile phone 100 may display the photographing interface 203 of the camera application, as shown in (b) of fig. 2.
In one embodiment, referring to (b) of fig. 2, the image displayed by the photographing interface 203 of the camera application is a preview image, which is an image captured by the mobile phone 100 based on preset photographing parameters of the camera.
In one embodiment, referring to fig. 2 (b), the capture interface 203 of the camera application also displays options for selecting media types, such as a "capture" corresponding option 204, a "video" corresponding option 205, and a control 206, and when the control 206 is triggered, an image or video may be captured and the captured image or video data stored in a designated location.
As an example, assuming that the user currently selects the option 204 corresponding to "photograph", when the mobile phone 100 detects that the user triggers the control 206, the camera applies to photograph an image, and stores the data of the photographed image to a designated location (e.g., stores the media data and non-privacy information of the photographed image to a first storage area, and stores the privacy information of the image to a second storage area), so that when the mobile phone 100 performs image sharing, the mobile phone 100 can acquire and send the data of the image from the designated location, so as to realize the sharing of the image.
In the scene 2, the camera application, after capturing an image, reduces the probability of privacy disclosure by storing media data and non-private information of the captured image in the first storage area and storing the private information of the image in the second storage area, so that when detecting an operation of sharing the image by the user, the mobile phone 100 can acquire and transmit the media data and the non-private information of the image from the first storage area without acquiring the private information of the image from the second storage area.
Scene 2-social application
See (a) in fig. 3A. The handset 100 displays an interface 301 of the social application, including a control 302 in the interface 301. When the control 302 is triggered, the handset 100 displays a capture option 303 and an option 304 for selecting an image from the gallery, see (b) in fig. 3A.
When the mobile phone 100 detects that the image option 304 is selected from the gallery, the mobile phone 100 displays an image candidate interface 305, as shown in (c) of fig. 3A.
As an example, see (c) in fig. 3A. The image candidate interface 305 includes thumbnail images of a plurality of images in a gallery in the mobile phone 100, and when the mobile phone 100 detects that the image 306 is selected, the mobile phone 100 displays an option 309 corresponding to "send privacy information" and an option 310 corresponding to "do not send privacy information", as shown in (a) in fig. 3B. Alternatively, when the mobile phone 100 detects that the image 306 is selected, the mobile phone 100 displays options for parameters of the privacy information, including one or more of: an option 311 corresponding to "none", an option 312 corresponding to "shooting time", an option 313 corresponding to "lens parameter", an option 314 corresponding to "shooting position information", an option 315 corresponding to "device model", and an option 316 corresponding to "finish", see (B) in fig. 3B. Wherein, when the user does not need to acquire the private information, the option 311 corresponding to "none" may be selected, and when the user does not need to continue to select the parameter of the private information, the option 316 corresponding to "complete" may be selected. Note that, the content displayed by the mobile phone 100 is not limited to the above text content, and the user may be directly prompted to: the data related to the privacy information such as the shooting time and the shooting position information is not transmitted, wherein the prompt can be a text prompt or a voice prompt.
For example, when the mobile phone 100 detects that the image 306 is selected, the mobile phone 100 sends first request information for acquiring the image 306 to the media library through the social application, and displays an interface as shown in (a) in fig. 3B to ask the user if the user needs to send the privacy information, and if the user selects the option 310 corresponding to "do not send the privacy information", the mobile phone 100 sends first indication information for indicating that the privacy information is not sent to the media library through the social application, and the media library acquires and sends the media data and the non-privacy information of the image 306 from the first storage area when receiving the first request information and the first indication information.
For another example, when the mobile phone 100 detects that the image 306 is selected, the mobile phone 100 displays an interface as shown in (B) in fig. 3B to inquire about parameters of privacy information that the user needs to send, and if the user selects the option 311 corresponding to "none", the mobile phone 100 sends first request information for acquiring the image 306 to the media library through the social application, where the first request information does not include parameters of privacy information, and when the media library receives the first request information, the media library acquires and sends media data and non-privacy information of the image 306 from the first storage area. If the user selects the option 313 corresponding to the "lens parameter", the mobile phone 100 sends the first request information to the media library through the social application, where the first request information includes the lens parameter, and when the media library receives the first request information, the media library obtains the media data and the non-privacy information of the image 306 from the first storage area, and obtains the lens parameter information of the image 306 from the second storage area.
Alternatively, when the mobile phone 100 displays the interface shown in (B) in fig. 3B, if the mobile phone 100 detects that the user selects the option 311 corresponding to "none", the mobile phone 100 displays the option corresponding to the parameter of the privacy information (i.e. the option 312 corresponding to "photographing time", the option 313 corresponding to "lens parameter", the option 314 corresponding to "photographing position information" and the option 315 corresponding to "device model") as gray, at this time, the user cannot continue to select other options, and the user can click the option 316 corresponding to "complete" to end the selection of the parameter of the privacy information, and accordingly, when the mobile phone 100 detects that the user clicks the option 316 corresponding to "complete", the mobile phone 100 sends the first request information to the media library through the social application and exits the interface for selecting the parameter of the privacy information. Alternatively, if the mobile phone 100 detects that the user selects the option 311 corresponding to "none", the mobile phone 100 may send the first request information to the media library directly through the social application, and exit the interface for selecting the parameters of the privacy information.
Alternatively, when the user selects the parameters of the private information, one or more parameters may be selected at the same time, where if the number of parameters of the private information selected by the user is greater than or equal to 1 and less than the total number of parameters of the private information (taking (a) in fig. 3B as an example, the total number of parameters of the private information is 4), the user may click on the "complete" corresponding option 316 to end the selection of the parameters of the private information, and accordingly, when the user clicks on the "complete" corresponding option 316 is detected, the mobile phone 100 sends the first request information to the media library through the social application, and exits the interface for selecting the parameters of the private information. Or, the mobile phone 100 does not detect the parameter of selecting the privacy information by the user within the preset duration, sends the first request information to the media library through the social application, and exits the interface for selecting the parameter of the privacy information. If the number of parameters for which the user selects the private information is equal to 4, the mobile phone 100 may directly send the first request information to the media library through the social application and exit the interface for selecting the parameters for the private information.
In scenario 2, when the mobile phone 100 detects an operation for publishing an image on a social platform, an interface as shown in (a) in fig. 3B or (B) in fig. 3B may be displayed, so that a user may determine whether to share private information, or may determine parameters of the private information to be shared, so that accidental disclosure of the private information under the condition that the user is unaware is avoided, and user experience is improved.
Scenario 3-instant messaging application.
See (a) in fig. 4. The mobile phone 100 displays an interface 401 of a short message application, and the interface 401 is a communication interface between the user and other contacts. The interface 401 includes a control 402, and when the mobile phone 100 detects that the control 402 is triggered, a gallery control 403 and a shooting control 404 are displayed.
As an example, when the handset detects that the user triggers gallery control 403, an interface 405 as shown in fig. 4 (b) is displayed, with thumbnails of multiple images included in interface 405, such as image 406, image 407, and image 408 included in interface 405. Assuming that the mobile phone 100 detects that the image 406 is selected, the mobile phone 100 displays an option 409 to transmit privacy information and an option 410 to not transmit privacy information, as shown in (c) of fig. 4. Alternatively, when the mobile phone 100 detects that the image 406 is selected, the mobile phone 100 displays options of parameters of the privacy information, including: an option 411 corresponding to "none", an option 412 corresponding to "shooting time", an option 413 corresponding to "lens parameter", an option 414 corresponding to "shooting position information", and an option 415 corresponding to "device model", see (d) in fig. 4.
In the scenario 3, after the user selects based on the interface shown in fig. 4 (c) or fig. 4 (d), the interaction process of applying the short message to the media library is the same as the interaction process of applying the social contact in the scenario 2 to the media library, which is not described herein.
It should be understood that, in fig. 4, a short message application is taken as an example, and for other instant messaging applications, a similar manner may be adopted, which is not repeated.
In scenario 3, when the mobile phone 100 detects an operation for sending an image to other contacts, an interface as shown in (c) in fig. 4 or (d) in fig. 4 may be displayed, so that a user can conveniently determine whether to send private information to other contacts, or a user can conveniently determine parameters of the private information to be sent to other contacts, avoiding disclosure of the private information without the user's knowledge, and thus, improving user experience.
In the foregoing, the embodiment of the present application may store the private information and the non-private information of the media file, and referring to fig. 5, the method for storing the media file provided in the embodiment of the present application is described, where the method may be implemented by the mobile phone 100 shown in fig. 1A or other electronic devices. The media file may be an image or video, and in the following description, the media file is an image as an example.
S501: the electronic device obtains media data and attribute information of the first image.
The electronic device may acquire the media data, the private information, and the non-private information, respectively.
Optionally, the attribute information of the first image includes, for example, one or more of the following parameters: the method includes the steps of media type of a first media file, theme of the first media file, resolution of a device used for shooting the first media file, position information of the first media file, model information of the device used for shooting the first media file, shooting time of the first media file, or lens parameters of the first media file. The privacy information of the first image comprises, for example, one or more of the following parameters: location information of the first image, a model of a device (e.g., a cell phone model) for capturing the first image, a capturing time of the first image, or a lens parameter of the first image. The position information of the first image includes, for example, latitude and longitude information of a photographing device that photographs the first image when the first image is photographed. The lens parameters for capturing the first image include, for example, one or more of a focal length, an exposure time, and an aperture value of a lens for capturing the first image, and the names of the parameters included in the privacy information may be other names in practical applications.
In some embodiments, the first image may be captured by the electronic device through a camera application or other application that may capture images, or the first image may be received by the electronic device from other electronic devices through a social platform or instant messaging application, or the like.
In the process of shooting images by the camera application, the electronic equipment realizes the shooting function of the images by the camera drive and provides services to the outside by the camera service (namely a corresponding driving frame service layer of the camera drive). Thus, if the first image is captured by the electronic device through the camera application or another application that can capture an image (taking the example that the first image is captured by the electronic device through the camera application), the camera application may send a capture request to the camera service to request the camera service to report media data and attribute information of the first image during the process of capturing the first image, and the camera service may report the media data and attribute information of the first image based on the capture request after the camera is driven to capture the first image.
Optionally, the shooting request may include indication information, which indicates that the camera service separately reports the private information and the non-private information in the attribute information through different information, for example, indicates that the camera service does not write the private information into the Exif of the first image, and separately reports the private information, so that the camera service may send the private information and the Exif that does not include the private information through different information respectively. For example, the camera service may transmit Exif, which does not contain privacy information, to the camera application through the first information, and transmit privacy information to the camera application through the second information. The first information and the second information may be transmitted simultaneously or may not be transmitted simultaneously, and the transmission order is not limited. In addition, the camera service may transmit media data of the first image in addition to private information and non-private information. For example, the camera service may transmit the media data through the third information, or the camera service may include the media data in the first information. Accordingly, the camera application may acquire the private information, the non-private information, and the media data through different information, for example, the camera application may acquire the non-private information through the first information, the private information through the second information, and the media data through the third information or the first information.
Alternatively, the instruction information may not be included in the photographing request, and after the camera driver photographs the first image, the camera service may transmit media data of the first image and Exif including private information and non-private information to the camera application through the same piece of information. Alternatively, the camera service may also transmit media data of the first image and Exif including private information and non-private information to the camera application through different information, respectively. Accordingly, the camera application can acquire media data and Exif including private information and non-private information through the same piece of information. Alternatively, the camera application may acquire media data and Exif including private information and non-private information, respectively, through different information.
Optionally, if the Exif acquired by the camera application includes private information and non-private information, the camera application may further acquire the private information from the Exif, and delete the private information included in the Exif, to obtain the private information, the Exif that does not include the private information, and the media data, respectively.
If the first image is received by the electronic device from another electronic device, the other electronic device may transmit the media data and the attribute information of the first image in the same manner as the camera service transmits the media data and the attribute information described above. Accordingly, the manner in which the electronic device receives the media data and the attribute information may be the same as the manner in which the camera application receives the media data and the attribute information, which is not described herein.
S502: the electronic device stores the media data and the non-private information in a first storage area and stores the private information in a second storage area.
After the electronic device acquires the private information, the non-private information, and the media data of the first image, respectively, the acquired data may be stored, for example, the electronic device may store the media data and the non-private information of the first image in the first storage area and the private information of the first image in the second storage area.
Alternatively, the first storage area may be a folder and/or a database, and the second storage area may be a folder and/or a database, and several different combinations of the first storage area and the second storage area are described below.
First kind: the first storage area is a folder and the second storage area is a folder.
The first storage area is used for storing media data and non-private data, the importance of the data is lower, the second storage area is used for storing private data, and the importance of the data is higher, so when the first storage area and the second storage area are folders, the authority levels of the first folder corresponding to the first storage area and the second folder corresponding to the second storage area are different, for example, the authority level of the first folder is lower than the authority level of the second folder, wherein the authority level is used for indicating whether the authority verification is needed or not, the authority level is high, the requirement for the access authority verification is indicated, and the authority level is low, and the requirement for the access authority verification is indicated. Optionally, the two folders may be located in the electronic device, or may also be located in the cloud, or the first folder is located in the electronic device, and the second folder is located in the cloud.
Second kind: the first storage area is a folder and the second storage area is a database.
Alternatively, the first storage area may be a folder with a lower authority level, and the second storage area may be a privacy database. The positions of the first storage area and the second storage area are similar to the positions of the first folder and the second folder in the above embodiment, and may be located in the electronic device and/or the cloud end, which is not described herein.
Third kind: the first storage area is a database and the second storage area is a folder.
Alternatively, the first storage area may be a non-private database, and the second storage area may be a folder with a higher authority level. The positions of the first storage area and the second storage area are similar to the positions of the first folder and the second folder in the above embodiment, and may be located in the electronic device and/or the cloud end, which is not described herein.
Fourth kind: the first storage area is a database, and the second storage area is a database.
Alternatively, the first storage area may be a non-private database and the second storage area may be a private database. The positions of the privacy database and the non-privacy database are similar to the positions of the first folder and the second folder in the above embodiment, and may be located in the electronic device and/or the cloud end, which is not described herein. When the locations of the private database and the non-private database are both electronic devices, the non-private database and the private database may be databases managed through the media library.
Alternatively, the first storage area and the second storage area may be two different storage areas, for example, the first storage area is the internal memory 121 shown in fig. 1A, and the second storage area is the cloud.
Optionally, if the first storage area and/or the second storage area are cloud, the electronic device may send the corresponding data to the cloud to be stored through the cloud. For example, if the first storage area is located in the cloud end, the electronic device sends media data and non-private information of the first image to the cloud end, and the cloud end stores the received data in a first folder or a non-private database. If the second storage area is the cloud end, the electronic device sends the privacy information of the first image to the cloud end, and the cloud end stores the received data into a second folder or a privacy database. If the first storage area and the second storage area are both located in the cloud end, the electronic device can send the data stored in the first storage area and the data stored in the second storage area to the cloud end through information at different moments, and after the cloud end receives the data, the received data is stored in the corresponding storage area. In other embodiments, the electronic device may also send the media data, the non-private information, and the private information of the first image to the cloud end through the same information, where the cloud end obtains the private information and the non-private information, stores the media data and the non-private information in the first storage area, and stores the private information in the second storage area. In the following embodiments, the first storage area is a non-private database located in the electronic device, and the second storage area is a private database located in the electronic device.
In some other embodiments, the electronic device may also store the media data and the non-private information of the first media file separately, for example, store the non-private information in the first storage area, store the private information in the second storage area, store the media data in the third storage area, and the first storage area, the second storage area, and the third storage area may be located in the electronic device and/or the cloud, where the locations and types of the first storage area, the second storage area, and the third storage area are similar to those of the first storage area and the second storage area in the above embodiments, and are not described herein. Alternatively, when the electronic device is a mobile phone, the third storage area may be, for example, a gallery application installed on the mobile phone.
According to the technical scheme, the non-private information and the private information of the media file are stored separately, so that when the electronic equipment does not need to send the private information, the media data and the non-private information of the image can be acquired from the first storage area, the private information is not acquired from the second storage area, and the probability of privacy disclosure is reduced.
Two embodiments are described below with reference to fig. 6 and 7, which are two examples of the media file storage method described by the embodiment shown in fig. 5. In both examples, the image captured by the camera application of the electronic device is taken as an example.
Referring to fig. 6, a flowchart of an example of a media file storage method is provided for the embodiment shown in fig. 5.
S601: the handset 100 detects an operational behavior for the camera application.
Wherein the operational behavior is used to trigger the camera application to take an image. Taking (a) in fig. 2 as an example, this operation acts as, for example, an operation of the icon 202 of the user-triggered camera application. When the mobile phone 100 detects a trigger operation of the icon 202 for the camera application, an interface as shown in (b) of fig. 2 is displayed, and the user can perform related operations, such as selecting "photographing", or selecting "video", based on the interface as shown in (b) of fig. 2.
S602: the camera application sends a capture request to the camera service. Accordingly, the camera service receives a photographing request from the camera application.
In this example, the photographing request may include indication information indicating that the privacy information and the non-privacy information in the attribute information are separately reported, for example, indicating that the privacy information is not written in the Exif of the first image, and is separately reported.
S603: the camera service transmits privacy information and non-privacy information included in the attribute information of the first image to the camera application based on the photographing request. Accordingly, the camera application receives private information and non-private information from the camera service.
The manner in which the camera service sends the first image and the privacy information to the camera application based on the photographing request may refer to the manner in which the camera service sends the privacy information and the non-privacy information to the camera application when the photographing request includes the indication information in S501, which is not described herein.
S604: the camera application stores media data and Exif in a first storage area, and stores privacy information in a second storage area.
In the technical scheme, the camera service sends the private information and the non-private information to the camera application through different information, so that the camera application is facilitated to distinguish the two information.
Referring to fig. 7, a flowchart of another example of a media file storage method is provided for the embodiment shown in fig. 5.
S701: the handset 100 detects an operational behavior for the camera application.
The operation is similar to that in S601, and will not be described herein.
S702: the camera application sends a capture request to the camera service. Accordingly, the camera service receives a photographing request from the camera application.
In this example, the photographing request does not include instruction information for instructing to not write privacy information to the Exif of the image.
S703: the camera service transmits media data and Exif to the camera application. Accordingly, the camera application receives media data and Exif from the camera service.
The manner in which the camera service sends the privacy information and the non-privacy information of the first image to the camera application based on the capturing request may refer to the embodiment in which the camera service sends the privacy information and the non-privacy information to the camera application when the capturing request does not include the indication information in S501, which is not described herein.
S704: the camera application acquires the privacy information from the Exif and deletes the privacy information in the Exif.
Since the Exif contains the privacy information, the camera application can acquire the privacy information from the Exif and delete the privacy information in the Exif after receiving the Exif and the media data.
S705: the camera application stores media data and Exif deleting privacy information in the first storage area and stores privacy information in the second storage area.
According to the technical scheme, the camera service sends the private information and the non-private information through the same information, so that information interaction between the camera service and the camera application can be reduced.
In connection with the above embodiments and related drawings, the embodiments of the present application provide a media file sharing method, which may be implemented by using the mobile phone 100 shown in fig. 1A or other electronic devices. For example, the embodiments of the present application may be performed after performing the media file storage flow illustrated in any one of fig. 5 to 7. As shown in fig. 8, a flow chart of the method is shown.
S801: the electronic device displays a plurality of media files on a display interface of the electronic device in response to a media file sharing operation by a user based on the first application.
Wherein the plurality of media files includes a first media file. The first application is a social application installed in the electronic device, and taking (a) in fig. 3A as an example, the media file sharing operation may be an operation that a user clicks a control 302 in a display interface 301 of the social application. The electronic device upon detecting the media file sharing operation may display a plurality of media files, such as image 306, image 307, and image 308 in (c) of fig. 3A, with the first media file being, for example, image 306.
S802: the electronic device responds to the first media file selected by the user and sends first data or first resource information of the first media file through the first application.
Optionally, after the electronic device responds to the first media file selected by the user, the electronic device may further send, through the first application, first request information to a media library of the electronic device for requesting to acquire the first media file, where, taking (c) in fig. 3A and (B) in fig. 3B as an example, the first request information may be information sent by the social application when the user clicks "image 306" in the image candidate interface 305 of the social application, or the first request information may also be information sent by the social application when the user clicks "none" corresponding option 311, or clicks "complete" corresponding option 316, or clicks all options corresponding to parameters of the privacy information (including 312, 313, 314, 315) in the image candidate interface 305 of the social application.
After the media library receives the first request information, first data or first resource information of the first media file is acquired from the first storage area based on the first request information. Alternatively, the media library may retrieve the media data and the non-private information from the first storage area by invoking the first interface. In this embodiment of the present application, if the first storage area and the second storage area are databases, the electronic device sends, through the first application, first resource information for locating the first data resource, so that other electronic devices or the first application may acquire the requested data based on the first resource information. If the first storage area and the second storage area are different folders and the like, the electronic device can directly send the first data through the first application, wherein the first resource information comprises a first URI for locating the first data resource.
After the media library obtains the data or the first URI, the electronic device may send the first data or the first URI through the first application, for example, the electronic device may send the first data or the first URI through the first application to a cloud server of the first application, or the electronic device may send the first data or the first URI through the first application to other contacts.
For example, if the first application is a social application, the electronic device may send the first data or the first URI to a cloud server of the social application through the social application, so that the first data or the first URI may be obtained from the cloud server using an account of the social application. Or if the first application is an instant messaging application (e.g., a short message), the electronic device may send the first data or the first URI to a communication (e.g., a mobile phone number) corresponding to the other contact through the first application.
In this embodiment, when the data or the URI of the first media file is sent by the first application, the first data or the first URI of the first media file is sent by default, that is, the media data and the non-private information of the first media file are sent, and the private information of the first media file is not sent.
In some cases, the user may wish the electronic device to send the privacy information of the first media file together. For example, when the mobile phone is replaced, the album in the old mobile phone is to be synchronized with the new mobile phone, and when the old mobile phone sends the content of the album, for example, when cloning the mobile phone, the old mobile phone can send the privacy information of the image included in the album together; or when the images in the mobile phone are stored in a personal computer (personal computer, PC) or a cloud, the mobile phone can send the privacy information of the images together when sending the images; or when the mobile phone distributes and shares the image to other electronic equipment, the mobile phone can share the privacy information of the image, wherein the distributed sharing means that the mobile phone can display the content currently displayed by the mobile phone to the other electronic equipment in real time, and the other electronic equipment is the electronic equipment which is authorized by the mobile phone; or when the image is sent to the appointed contact person through the short message application, the mobile phone can send the privacy information of the image together when the image is sent through the short message application; or, when classifying the images in the gallery by combining the small program with the map, the mobile phone can send the privacy information of the images together when sending the images by the small program. Thus, optionally, the electronic device may also determine, before sending the data of the first media file or the first URI via the first application, whether the corresponding condition is met to determine whether to send the privacy information. For example, if the first condition is met, the electronic device may send the first data or the first URI through the first application, i.e., not send the privacy information of the first media file through the first application; or if the second condition is met, the electronic device may send the second data or the second URI of the first media file through the first application, where the data corresponding to the second data or the second URI includes the privacy information, the non-privacy information and the media data of the first media file, that is, the privacy information of the first media file may be sent through the first application.
Alternatively, the first condition includes, for example: the importance evaluation value of the media file is greater than or equal to a first value, and/or the media library receives first indication information, and/or parameters of the first request information, which do not include privacy information, and/or first operation of the user based on the electronic equipment is detected, and/or the electronic equipment does not detect the operation of the user based on the electronic equipment in a first duration. Wherein the first indication information and the first operation may indicate that the privacy information is not transmitted.
For example, the electronic device may analyze the first media file to determine an importance rating of the first media file to determine whether the first condition is satisfied based on the importance rating. If the importance evaluation value of the first media file is greater than or equal to the first value, which indicates that the first media file is important, sharing the privacy information of the first media file may cause a greater potential safety hazard, so the electronic device may not send the privacy information of the first media file. For example, the data sent by the electronic device in S802 may not include the privacy information of the first media file, or the electronic device may not include the privacy information of the first media file in the data corresponding to the first URI sent in S802.
Optionally, the electronic device may analyze the first media file based on the shooting scene of the first media file and/or shooting content to determine an importance assessment value of the first media file. For example, the shooting scene of the first media file is a living room or a bedroom, and the privacy information of the first media file may include shooting location information of the first media file that is a home address of the user, which is easy to cause a potential safety hazard. At this time, the electronic device may determine that the importance evaluation value of the first media file is higher, and may not share the privacy information of the first media file, so as to ensure personal safety of the user.
That is, the electronic device may determine whether to send the privacy information of the media file according to the importance of the media file, so as to reduce the probability of disclosure of the privacy information of the important media file and improve the information security.
The electronic device may also determine whether the first condition is met based on whether the first indication information is received by the media library. After the electronic device responds to the first media file selected by the user, a first preset option for indicating whether to send the private information may be displayed on the display interface, for example, as shown in (a) in fig. 3B, where the first preset option includes: the option 309 corresponding to "send privacy information" and the option 310 corresponding to "do not send privacy information" send first indication information to the media library through the first application when the user selects the option 310, so if the indication information received by the media library is the first indication information, it is determined that the first condition is satisfied.
The electronic device may also determine whether the first condition is satisfied according to whether the parameter of the privacy information is included in the first request information. After the electronic device responds to the first media file selected by the user, a second preset option may be displayed on the display interface, for example, as shown in (B) in fig. 3B, where the second preset option includes: the first application may transmit first request information of parameters not including privacy information when the user selects the "none" corresponding option 311, the "photographing time" corresponding option 312, the "lens parameter" corresponding option 313, the "photographing position information" corresponding option 314, the "device model" corresponding option 315, and the "completion" corresponding option 316. It is determined that the first condition is satisfied if the media library receives first request information that does not include parameters of the privacy information.
The electronic device may also determine whether the first condition is met based on whether a user is detected based on a first operation of the electronic device. The first operation is, for example, a click operation for a screen input of the electronic device, or other preset operation. For example, referring to (c) in fig. 3A, after the user selects the image 306, the electronic device displays a preview image of the image 306, and if the electronic device detects a click operation for the preview image, it is determined that the first condition is satisfied.
The electronic device may also determine whether the first condition is met based on whether a user operation based on the electronic device is detected. For example, after the electronic device displays the preview image of the image 306, if the electronic device does not detect any operation of the user based on the electronic device within a first period of time, at which time the user may default to not want to share the privacy information, it is determined that the first condition is satisfied.
That is, the electronic device judges whether the private information needs to be sent according to the requirement of the user, so that the disclosure of the private information which the user does not want to share can be avoided, the processing process of the electronic device meets the requirement of the user, and the sharing experience of the user is facilitated to be improved.
The first condition is described above and the second condition is described below. Optionally, the second condition includes, for example, one or more of: the importance evaluation value of the first media file is smaller than the first value, and/or the second indication information is received and the first application is successfully checked, and/or the first request information comprises parameters of privacy information and the first application is successfully checked, and/or the second operation of the user based on the electronic equipment is detected and the first application is successfully checked. The second indication information and the second operation may indicate sending the privacy information, and the parameter of the privacy information may indicate the privacy information that needs to be acquired.
For example, the electronic device may analyze the first media file to determine an importance rating of the first media file to determine whether the second condition is satisfied based on the importance rating. If the importance rating of the first media file is less than the first value, indicating that the importance of the first media file is low, the electronic device may send privacy information for the first media file. For example, the data transmitted by the electronic device in S802 may include the privacy information of the first media file, or the electronic device may include the privacy information of the first media file in the data corresponding to the first URI transmitted in S802. For example, the shooting scene of the first media file is a mall, and even if the privacy information of the first media file is shared, the user is not adversely affected, and at this time, the electronic device can determine that the importance evaluation value corresponding to the first media file is low, and can share the privacy information.
The electronic device may also determine whether the second condition is met based on whether the second indication information is received by the media library. For example, referring to (a) in fig. 3B, when the user selects option 309, the electronic device transmits second indication information to the media library through the first application, and thus determines that the second condition is satisfied if the indication information received by the media library is the second indication information.
The electronic device may also determine whether the second condition is satisfied according to whether the parameter of the privacy information is included in the first request information. For example, referring to (B) in fig. 3B, when the user selects the option 312 corresponding to "photographing time" from the parameters of the privacy information, the parameter of the privacy information carried by the first request information that the first application may send is the photographing time. And thus determines that the second condition is satisfied if the photographing time is included in the first request information received by the media library.
The electronic device may also determine whether a second condition is met based on whether a second operation of the user based on the electronic device is detected. The second operation is, for example, a double click operation for a screen input of the electronic device, or other preset operation. For example, referring to (c) in fig. 3A, after the user selects the image 306, the electronic device displays a preview image of the image 306, and if the electronic device detects a double click operation for the preview image, it is determined that the second condition is satisfied.
The electronic device may also determine whether the second condition is met based on whether the application is verified as successful. When the first application is installed (or in a subsequent use process), a user can determine whether privacy information can be sent by the first application according to actual requirements, and taking the electronic device (the mobile phone 100) as an android as an example, the first application declares permission to access the privacy database in android menu. For example, if the user determines that private information can be sent through the first application, the first application may be authorized, and if the user determines that private information cannot be sent through the first application, the first application is not authorized. Optionally, when the user authorizes the first application, the authorization type may also be specified, for example, the parameters specifying the privacy information that the first application may send include only the shooting time. When the first application is checked, whether the first application is checked successfully or not can be determined by whether the first application is authorized, for example, the first application is authorized by a user, the first application is determined to be checked successfully, if the first application is not authorized by the user, the first application is determined to be checked to fail, and when the first application is determined to be checked successfully, the second condition is determined to be met. Wherein the first application having been authorized by the user includes the first application being authorized to access the privacy database or the first application being authorized to send one or more parameters of the privacy information.
The electronic device may also determine whether the second condition is met based on whether the second indication information is received by the media library and whether the application is verified to be successful. For example, referring to fig. 3B (a), when the user selects the option 309 corresponding to "send privacy information", the first application may send the second indication information, and when the media library receives the second indication information, the first application may also be checked, and if the first application is authorized to access the privacy database, or the first application is authorized to send the shooting time, it is determined that the first application check is successful, and the second condition is satisfied.
The electronic device may further determine whether the second condition is satisfied according to whether the parameter of the privacy information is included in the first request information and whether the application is verified successfully. For example, referring to (B) in fig. 3B, when the user selects the option 312 corresponding to "shooting time" from the parameters of the privacy information, the parameter of the privacy information carried by the first request information that can be sent by the first application is shooting time, when the electronic device receives the first request information, the first application is checked, if the first application is authorized to access the privacy database, or the first application is authorized to send the shooting time, the check is determined to be successful, and the second condition is satisfied. If the first application is authorized to send the shot parameters, a verification failure is determined.
The electronic device may also determine whether the second condition is met based on whether it is detected that the user is successful based on a second operation of the electronic device and whether the application is verified. The second operation is, for example, a double click operation for a screen input of the electronic device, or other preset operation. For example, referring to fig. 3A (c), after the user selects the image 306, the electronic device displays a preview image of the image 306, and if the electronic device detects a double click operation for the preview image, the first application may also be checked, and if the check is successful, it is determined that the second condition is satisfied.
Alternatively, if the check on the first application fails, a rejection message is returned to be sent through the first application (e.g., error is returned through the first application). That is, when the electronic device determines that the private information needs to be sent according to the requirement of the user, the electronic device can also check the first application, if the first application is checked successfully, the electronic device can send the private information, so that the processing process of the electronic device meets the requirement of the user, and meanwhile, the security in the information sharing process can be further improved, and the sharing experience of the user is facilitated to be improved.
Optionally, when it is determined that the second condition is met, media data and non-private information of the first media file may be acquired from the first storage area through the media library, and private information of the first media file may be acquired from the second storage area through the media library, and the acquired media data, private information and non-private information may be sent through the first application. Alternatively, the media data and the non-private information may be retrieved from the first storage area by invoking the second interface through the media library.
As an example, the media data stored in the first storage area is, for example, a first image, the non-private information stored in the first storage area is, for example, an Exif that does not include private information, the electronic device may copy the first image and the Exif that does not include private information corresponding to the first image from the first storage area through the media library, and copy the private information corresponding to the first image from the second storage area, the media library may insert the private information into the Exif that does not include private information, obtain the Exif that includes private information, obtain a new first image (for example, a second image), wherein the Exif corresponding to the new first image is the Exif that includes private information, and send the second image through the first application, or send a URI (for example, a second URI) of the second image through the first application. Alternatively, the media library may delete the new first image after a preset period of time. It should be noted that determining that the first condition and the second condition are satisfied may be decoupled, for example, determining whether the first condition and the second condition are satisfied may correspond, for example, determining that the first condition is satisfied if the importance rating of the first media file is greater than or equal to the first value, and determining that the second condition is satisfied if the importance rating of the first media file is less than the first value. Alternatively, it may be non-corresponding to determine whether the first condition and the second condition are satisfied, for example, if the importance evaluation value of the first media file is greater than or equal to the first value, it is determined that the first condition is satisfied, but the importance evaluation value of the first media file is smaller than the first value, not as a determination condition for determining whether the first condition is satisfied, but a parameter for determining whether the second instruction information is received or whether the privacy information is included in the received first request information is included as a determination condition for determining whether the second condition is satisfied.
In some embodiments, the media data and attribute information of the first media file sent by the electronic device through the first application are media data and attribute information stored by the electronic device, rather than a snapshot or a screenshot, and privacy information can be hidden according to user requirements while ensuring image quality definition of the first media file.
According to the technical scheme, the electronic equipment can determine whether to send the private information according to the importance of the media file or the user requirement, the probability of privacy information disclosure of the important media file can be reduced, and when the private information is determined not to be sent, only the media data and the non-private information of the image can be obtained and sent through the media library without obtaining the private information of the media file by means of separately storing the private information and the non-private information in the attribute information, so that the probability of privacy disclosure is further reduced.
Two embodiments are described below by way of 9 and 10, which are two examples of combining fig. 5 and 8, in which the first storage area and the second storage area are databases managed by a media library, for example, to store images taken by a camera application of an electronic device.
Referring to fig. 9, a flowchart of an example of a media file storage and sharing method is provided for the embodiment shown in fig. 5 and 8.
S901: the handset 100 detects an operational behavior for the camera application.
S902: the camera application sends a capture request to the camera service. Accordingly, the camera service receives a photographing request from the camera application.
The shooting request includes indication information, which indicates that the privacy information and the non-privacy information in the attribute information are separately reported, for example, the indication information is not written in the Exif of the first image and is separately reported.
S903: the camera service sends a first photographing result to the camera application through the first information, and the camera service sends a second photographing result to the camera application through the second information. Accordingly, the camera application receives the first photographing result and the second photographing result from the camera service.
Wherein the first photographing result includes, for example, media data and non-private information of the first image, the second photographing result includes private information of the first image, and the private information includes, but is not limited to, the following information:
geographic location information, namely longitude and latitude information;
a mobile phone model;
shooting time;
lens parameters.
S904: the camera application stores media data to a gallery application (not shown in fig. 9), stores non-private information to a non-private database, and stores private information to a private database.
Wherein the non-private information and the private information are stored in a non-private database and a private database, for example, the camera application creates a record in the non-private database, writes the non-private information, and creates a record in the private database, writes the private information, and the non-private information is, for example, exif which does not contain the private information.
S905: the mobile phone 100 detects a media file sharing action for the first application.
The media file sharing behavior may include, for example, the behavior that the control 402 in (a) of fig. 4 is triggered, or the control 302 in (a) of fig. 3A is triggered.
S906: the first application sends first request information to the media library. Accordingly, the media library receives first request information from the first application.
The first request information is used for requesting to acquire the first image, where the first request information may include parameters of the privacy information, if the first request information does not include parameters of the privacy information, S907 is executed, and if the first request information includes parameters of the privacy information, S908 is executed.
S907: the media library sends a first URI of the first image to the first application.
The data corresponding to the first URI comprises a first image stored in the gallery application and non-private information corresponding to the first image stored in the non-private database.
S908: the media library performs rights verification on the first application.
Wherein if the first application authority check is successful, it indicates that the private information can be sent through the first application, S909 can be executed, and if the first application check is failed, it indicates that the private information cannot be sent through the first application, S912 can be executed.
S909: the media library copies the first image from the gallery application, copies a first Exif corresponding to the first image that does not contain private information from the non-private database, and copies private information corresponding to the first image from the private database.
S910: the media library inserts the privacy information into the first Exif to obtain a new first image and sends a second URI of the new first image to the first application.
S911: the media library deletes the new first image after a preset period of time.
S912: the media library returns error to the first application.
In the above embodiment, when the camera application instructs the camera service to separately report the private information and the non-private information when sending the shooting request, the received information can be directly stored respectively, so that the storage efficiency of the media file can be improved, and the non-private information and the private information of the media file are separately stored, so that when the electronic device does not need to send the private information, the media data and the non-private information of the image can be acquired from the first storage area, the private information is not acquired from the second storage area, and the probability of privacy disclosure is reduced.
Referring to fig. 10, a flowchart of another example of a media file storage and sharing method is provided for the embodiment shown in fig. 5 and 8.
S1001: the handset 100 detects an operational behavior for the camera application.
S1002: the camera application sends a capture request to the camera service. Accordingly, the camera service receives a photographing request from the camera application.
S1003: the camera service sends the photographing result to the camera application. Accordingly, the camera application receives the photographing result from the camera service.
The photographing result includes media data and attribute information of the first image, the attribute information is, for example, a second Exif, the Exif includes non-privacy information and privacy information of the first image, and the privacy information includes, but is not limited to, the following information:
geographic location information, namely longitude and latitude information;
a mobile phone model;
shooting time;
lens parameters.
S1004: the camera application stores the first image to a gallery application (not shown in fig. 9), acquires privacy information from the Exif, and deletes the privacy information in the Exif.
S1005: the camera application stores Exif deleting private information to the non-private database, and stores private information to the private database.
S1006: the mobile phone 100 detects a media file sharing action for the first application.
S1007: the first application sends first request information to the media library. Accordingly, the media library receives first request information from the first application.
S1008: the media library sends a first URI of the first image to the first application.
S1009: the media library performs rights verification on the first application.
S1010: the media library copies the first image from the gallery application, copies a first Exif corresponding to the first image that does not contain private information from the non-private database, and copies private information corresponding to the first image from the private database.
S1011: the media library inserts the privacy information into the first Exif to obtain a new first image and sends a second URI of the new first image to the first application.
S1012: the media library deletes the new first image after a preset period of time.
S1013: the media library returns error to the first application.
The specific implementation process of S1006 to S1013 may refer to S905 to S912, which are not described herein.
In the above embodiment, the camera service sends the private information and the non-private information through the same information, so that information interaction between the camera service and the camera application can be reduced, and the non-private information and the private information of the media file are stored separately, so that when the electronic device does not need to send the private information, the media data and the non-private information of the image can be acquired from the first storage area, the private information is not acquired from the second storage area, and the probability of privacy disclosure is reduced.
The following describes a schematic structural diagram of an electronic device provided in an embodiment of the present application, and is shown in fig. 11. The electronic device 1100 may be a cell phone as previously described. The electronic device 1100 may include: one or more processors 1101; one or more memories 1102; a communication interface 1103, and one or more computer programs 1104, each of which may be connected via one or more communication buses 1105. Wherein the one or more computer programs 1104 are stored in the memory 1102 and configured to be executed by the one or more processors 1101, the one or more computer programs 1104 comprising instructions. For example, the above instructions may be used to perform steps associated with a cell phone as in the corresponding embodiments above. The communication interface 1103 is used to enable communication of the handset with other devices (e.g., a drone), such as a transceiver.
The present application also provides a computer program product comprising a computer program which, when run on a computer, causes the computer to perform the method as in the above embodiments.
Embodiments of the present application also provide a graphical user interface on an electronic device with a display screen, a memory, and a processor to execute one or more computer programs stored in the memory, the graphical user interface comprising a graphical user interface displayed by the electronic device when performing the methods of the embodiments described above.
The embodiment of the application also provides a chip system, which comprises a processor and an interface, wherein the processor is used for calling and running instructions from the interface so as to enable the chip system to realize the method in the embodiment.
In the embodiments provided in the present application, the method provided in the embodiments of the present application is described from the point of view that the electronic device (mobile phone 100) is the execution subject. In order to implement the functions in the method provided in the embodiment of the present application, the terminal device may include a hardware structure and/or a software module, and implement the functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. Some of the functions described above are performed in a hardware configuration, a software module, or a combination of hardware and software modules, depending on the specific application of the solution and design constraints.
As used in the above embodiments, the term "when …" may be interpreted to mean "if …" or "after …" depending on the context. Similarly, the phrase "at the time of determination …" or "if detected (a stated condition or event)" may be interpreted to mean "if determined …" or "in response to determination …" or "at the time of detection (a stated condition or event)" or "in response to detection (a stated condition or event)" depending on the context.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk), etc.
The foregoing description, for purposes of explanation, has been described with reference to specific embodiments. However, the illustrative discussions above are not intended to be exhaustive or to limit the application to the precise forms disclosed. Many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the present application and its practical application to thereby enable others skilled in the art to best utilize the present application and various embodiments with various modifications as are suited to the particular use contemplated.

Claims (24)

1. A method of storing media files, for application to an electronic device, the method comprising:
acquiring media data and attribute information of a first media file, wherein the attribute information comprises privacy information and non-privacy information except the privacy information;
storing the media data and the non-private information in a first storage area of the electronic device and storing the private information in a second storage area of the electronic device.
2. The method of claim 1, wherein,
the first storage area is a folder and/or a database; and/or
The second storage area is a folder and/or a database.
3. The method of claim 2, wherein,
and if the first storage area and the second storage area are folders, the authority level of the first folder corresponding to the first storage area is lower than that of the second folder corresponding to the second storage area.
4. A method according to any one of claim 1 to 3,
the first media file is shot by the electronic equipment; or alternatively, the first and second heat exchangers may be,
the first media file is received by the electronic device from other electronic devices.
5. The method of any of claims 1-4, wherein obtaining media data and attribute information of the first media file comprises:
respectively acquiring the privacy information, the non-privacy information and the media data through different information; or alternatively, the first and second heat exchangers may be,
and acquiring exchangeable image formats corresponding to the media data and the first media file, wherein the exchangeable image formats comprise the privacy information and the non-privacy information.
6. The method of claim 5, wherein the exchangeable image format comprises the private information and non-private information, the method further comprising:
And acquiring the privacy information from the exchangeable image file format, and deleting the privacy information included in the exchangeable image file format.
7. The method of any of claims 1-6, wherein the attribute information includes one or more of the following parameters: the method comprises the steps of capturing a media type of a first media file, capturing a theme of the first media file, capturing resolution of equipment of the first media file, capturing position information of the first media file, capturing model information of equipment of the first media file, capturing time of the first media file or capturing lens parameters of the first media file.
8. The method of claim 7, wherein the privacy information comprises one or more of the following parameters: the location information, the model information of the device, the photographing time, or the lens parameter.
9. The method of any one of claims 1-8, further comprising:
responsive to a user media file sharing operation based on a first application, displaying a plurality of media files on a display interface of the electronic device, wherein the plurality of media files comprise the first media file;
And responding to the first media file selected by the user, and sending first data or first resource information of the first media file through the first application, wherein the first data comprises the media data and the non-private information, and the data corresponding to the first resource information comprises the media data and the non-private information.
10. The method of claim 9, wherein the first resource information comprises a first uniform resource locator, URI.
11. The method of claim 9 or 10, wherein prior to sending, by the first application, the first data or first resource information of the first media file, the method further comprises:
sending, by the first application, first request information to a media library of the electronic device, where the first request information is used to request to obtain the first media file;
and acquiring the first data or the first resource information from the first storage area through the media library.
12. The method according to any one of claims 9 to 11, further comprising:
determining whether a first condition is satisfied;
and if so, sending the first data or the first resource information through the first application.
13. The method of claim 12, wherein determining whether the first condition is satisfied comprises:
if the importance evaluation value of the first media file is greater than or equal to a first value, determining that the first condition is met; or alternatively, the first and second heat exchangers may be,
if the media library receives first indication information, determining that the first condition is met, wherein the first indication information is used for indicating that privacy information is not sent; or alternatively, the first and second heat exchangers may be,
if the first request information does not include the parameters of the privacy information, determining that the first condition is met, wherein the parameters of the privacy information are used for indicating the privacy information to be acquired; or alternatively, the first and second heat exchangers may be,
determining that the first condition is satisfied if a first operation of the electronic device by a user is detected, wherein the first operation is used for indicating that private information is not sent; or alternatively, the first and second heat exchangers may be,
and if the operation of the user based on the electronic equipment is not detected within a first duration, determining that the first condition is met.
14. The method of claim 13, wherein the method further comprises:
displaying a first preset option on the display interface, and responding to the option selected by the user based on the first preset option, sending the first indication information to the media library through the first application, wherein the first preset option comprises an option for indicating whether to send privacy information or not; or alternatively, the first and second heat exchangers may be,
Displaying a second preset option on the display interface, and responding to the option selected by the user based on the second preset option, and sending first request information which does not comprise parameters of the privacy information to the media library through the first application, wherein the second preset option comprises parameters of the privacy information; or alternatively, the first and second heat exchangers may be,
detecting that the user is based on a first operation of the electronic device.
15. The method according to any one of claims 9 to 11, further comprising:
determining whether a second condition is satisfied;
and if so, sending second data or second resource information of the first media file through the first application, wherein the second data comprises the media data, the non-private information and the private information, and the data corresponding to the first resource information comprises the media data, the non-private information and the private information.
16. The method of claim 15, wherein determining whether the second condition is satisfied comprises:
if the importance evaluation value of the first media file is smaller than a first value, determining that the second condition is met; or alternatively, the first and second heat exchangers may be,
if the media library receives second indication information, determining that the second condition is met, wherein the second indication information is used for indicating to send privacy information; or alternatively, the first and second heat exchangers may be,
If the first request information comprises parameters of the privacy information, determining that the second condition is met, wherein the parameters of the privacy information are used for indicating the privacy information to be acquired; or alternatively, the first and second heat exchangers may be,
determining that the second condition is satisfied if a second operation of the electronic device by the user is detected; or alternatively, the first and second heat exchangers may be,
if the first application is successfully checked, determining that the second condition is met; or alternatively, the first and second heat exchangers may be,
if the media library receives the second indication information and the first application is successfully checked, determining that the second condition is met; or alternatively, the first and second heat exchangers may be,
if the first request information comprises parameters of the privacy information and the first application is successfully checked, determining that the second condition is met; or alternatively, the first and second heat exchangers may be,
and if the second operation of the electronic equipment based on the user is detected and the first application is successfully checked, determining that the second condition is met, wherein the second operation is used for indicating to send private information.
17. The method of claim 16, wherein if the first application is verified successfully, determining that the second condition is met, the method further comprising:
and if the verification of the first application fails, sending rejection information through the first application, wherein the rejection information is used for indicating that the privacy information is refused to be sent.
18. The method of claim 16 or 17, wherein the method further comprises:
displaying a first preset option on the display interface, and responding to the option selected by the user based on the first preset option, sending the second indication information to the media library through the first application, wherein the first preset option comprises an option for indicating whether to send privacy information or not; or alternatively, the first and second heat exchangers may be,
displaying a second preset option on the display interface, and responding to at least one option selected by the user based on the second preset option, sending first request information comprising parameters of first privacy information to the media library through the first application, wherein the second preset option comprises parameters of the privacy information, and the parameters of the first privacy information comprise parameters of privacy information corresponding to the at least one option; or alternatively, the first and second heat exchangers may be,
detecting a second operation of the user based on the electronic device; or alternatively, the first and second heat exchangers may be,
determining whether the first application has the authority for accessing the second storage area, if so, determining that the first application is successfully checked, and if not, determining that the first application is failed to be checked, wherein the authority is used for indicating whether the user authorizes the first application or indicating parameters of the sent privacy information.
19. The method of any of claims 15-18, wherein prior to sending, by the first application, the second data or second resource information of the first media file, the method further comprises:
the media data and the non-private information are acquired from the first storage area and the private information is acquired from the second storage area through the media library.
20. The method of claim 19, wherein the non-private information is in an exchangeable image file format that does not contain the private information, the method further comprising:
and inserting the privacy information into the exchangeable image file format which does not contain the privacy information through the media library to obtain a second media file, wherein the data of the second media file is the second data, or the resource information of the second media file is the second resource information.
21. The method of claim 20, wherein the method further comprises:
and deleting the second data or the second resource information through the media library after the preset time length.
22. The method of any of claims 9-21, wherein the first data or second data sent by the first application is media data and attribute information of the first media file stored by the electronic device.
23. An electronic device, comprising:
a processor, a memory, and one or more programs;
wherein the one or more programs are stored in the memory, the one or more programs comprising instructions, which when executed by the processor, cause the electronic device to perform the method steps of any of claims 1-22.
24. A computer readable storage medium for storing a computer program which, when run on a computer, causes the computer to perform the method of any one of claims 1 to 22.
CN202211066322.7A 2022-09-01 2022-09-01 Media file storage method and electronic equipment Pending CN117667864A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211066322.7A CN117667864A (en) 2022-09-01 2022-09-01 Media file storage method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211066322.7A CN117667864A (en) 2022-09-01 2022-09-01 Media file storage method and electronic equipment

Publications (1)

Publication Number Publication Date
CN117667864A true CN117667864A (en) 2024-03-08

Family

ID=90085094

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211066322.7A Pending CN117667864A (en) 2022-09-01 2022-09-01 Media file storage method and electronic equipment

Country Status (1)

Country Link
CN (1) CN117667864A (en)

Similar Documents

Publication Publication Date Title
CN112783379B (en) Picture selection method and electronic equipment
KR102484738B1 (en) Method and electronic device for managing application rights
CN111143586B (en) Picture processing method and related device
CN110543579A (en) Image display method and electronic equipment
CN113254409B (en) File sharing method, system and related equipment
CN114173000B (en) Method, electronic equipment and system for replying message and storage medium
CN111615820B (en) Method and equipment for performing domain name resolution by sending key value to GRS server
CN114553814B (en) Method and device for processing push message
WO2022160991A1 (en) Permission control method and electronic device
CN115080941B (en) Account login method and electronic equipment
CN117667864A (en) Media file storage method and electronic equipment
CN116527266A (en) Data aggregation method and related equipment
CN115543496A (en) Message processing method and related device
CN116027933B (en) Method and device for processing service information
WO2023061298A1 (en) Picture backup system and method, and device
CN117149044B (en) Fingerprint unlocking method and electronic equipment
CN116048710B (en) Application identifier display method, electronic device and readable storage medium
CN116095226B (en) Photo processing method, electronic device, and readable storage medium
CN117354884B (en) APN switching method and related equipment
CN117708801A (en) Resource access method and electronic equipment
CN117675881A (en) Application data storage method and electronic equipment
CN116841761A (en) Equipment cooperation method
CN118170966A (en) Recommendation method, electronic equipment and server
CN114488961A (en) Equipment control method and device
CN116069731A (en) Media file management method and related device

Legal Events

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