Data management method and electronic equipment

Through the unified media framework, the unified management of media data is solved in electronic devices, the problem of data separation between applications is improved, the simplicity and fluency of data sharing is improved, and the user experience is improved.

CN120255984AActive Publication Date: 2025-07-04HUAWEI TECH CO LTD

Patent Information

Application Number
CN202410745339.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-01-10
Filing Date
2024-06-07
Publication Date
2025-07-04
Estimated Expiration
2044-06-07

AI Technical Summary

Technical Problem

In the prior art, the media data management systems used in each electronic device are independent and isolated, resulting in complex data sharing and confusing formats, and the inability to achieve global unified management, which reduces the user experience.

Method used

It provides a unified media framework, through the interface and capabilities of the first operating system, it realizes unified management of the collection, encoding, storage, sharing, decoding and playback of media data, including media data types, life cycles, security management and distributed management capabilities, breaking the boundaries of applications and devices.

Benefits of technology

It realizes standardized and unified management of data of various application media, improves the simplicity and fluency of data sharing, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120255984A_ABST
    Figure CN120255984A_ABST
Patent Text Reader

Abstract

The invention discloses a data management method and electronic equipment, an operating system of the electronic equipment can provide a uniform interface and capability for calling when an application starting function is used, so that processing such as collection, coding, storage, sharing, decoding and playing of media data is realized, and each application is enabled to have a good application effect in the running process. According to the media data management method and device, the media data can be managed in a standardized, unified and convenient mode through the unified interface and capacity provided by the operating system of the electronic device, the situation that all applications manage and control the media data according to respective data management systems is avoided, the boundary of the media data in the applications and the devices is broken through, and the use experience of a user on the media data is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of terminals and computer technologies, and in particular, to a data management method and an electronic device. Background Art

[0002] With the continuous development of the terminal field, more and more applications are installed in electronic devices, and more and more media data such as text, pictures, videos, and audios are generated in electronic devices. Summary of the Invention

[0003] This application provides a data management method and an electronic device, realizing standardized, unified, and convenient management of media data.

[0004] In a first aspect, an embodiment of this application provides a data management method, which is applied to a first electronic device. A first operating system runs on the first electronic device, and a first application runs on the first operating system. The first operating system provides: a first interface, a media data interface, and a second capability; the first application is a third-party application, and the first application includes program code for calling the first interface. The first interface is used to call the media data interface, and the media data interface encapsulates the second capability. The second capability includes the capability to perform one or more of the following processes on media data: collection, encoding, storage, sharing, decoding, and playing. The method includes: displaying a user interface of the first application, where the user interface presents a first option corresponding to a first function; detecting an operation acting on the first option; in response to the operation, starting the first function through the first interface, where the first function is used to perform one or more of the following processes on first media data: collection, encoding, storage, sharing, decoding, and playing. The second capability further includes a third capability. During the process of starting the first function, the third capability is used to perform one or more of the following: setting the data type of the first media data, managing the life cycle of the first media data, controlling the security of the first media data, setting the data model of the first media data, and performing distributed management on the first media data.

[0005] Implementing the method provided in the first aspect can provide a unified media data management platform to realize unified management of media data, enabling applications to process media data according to unified rules and formats, avoiding applications from controlling media data according to their own data management systems, breaking the boundaries of media data in applications and devices, and enhancing the user experience of using media data.

[0006] In combination with the first aspect, in a possible implementation, the parameters passed in through the first interface include one or more of the following: device name, application name of the first application, and parameters passed in by the first application, where the parameters passed in by the first application are the parameters and parameter content of the first function, and the parameter content includes one or more of the following: description information of the first function, first media data, and indication information of the first media data.

[0007] In combination with the first aspect, in a possible implementation, the first function includes a face recognition function, and the parameters passed in by the first application include: parameters of the face recognition function, coordinates of the face, and an image of the face; or, the first function includes a beauty function, and the parameters passed in by the first application include: parameters of the beauty function, beauty level, and face information.

[0008] In combination with the first aspect, in a possible implementation, the parameters passed in through the media data interface include: capability indication information, parameters of the first function, and the first media data or indication information of the first media data, where the indication information of the first media data is all or part of the parameters passed in by the first application, and / or the indication information of the first media data is determined by the first operating system: the capability indication information is used to indicate the capability called by the media data interface in the second capability.

[0009] In combination with the first aspect, in a possible implementation, the first function is a photographing function, and the first media data includes one or more of the following: photographing stream, preview stream, and the capability indication information is used to indicate the capability of collecting the first media data in the second capability; or, the first function is a picture viewing function, and the first media data includes one or more of the following: large picture, thumbnail, and the capability indication information is used to indicate the capability of storing the first media data in the second capability; or, the first function is a music playing function, the first media data is music, and the indication information of the first media data includes one or more of the following: music name, music size, music duration, and the capability indication information is used to indicate the capability of playing the first media data in the second capability; or, the first function is a file creation function or a file deletion function, the first media data is a file, and the indication information of the first media data includes one or more of the following: file name, file owner, file path, file size, and the capability indication information is used to indicate the capability of storing the first media data in the second capability.

[0010] In combination with the first aspect, in a possible implementation, the parameters passed in through the second capability include: parameters of the first function, and the first media data or indication information of the first media data, where the indication information of the first media data is all or part of the parameters passed in by the first application, and / or the indication information of the first media data is determined by the first operating system.

[0011] In combination with the first aspect, in a possible implementation, the third capability includes: media data type capability, the media data type capability is used to determine the data type of the first media data according to the parameters passed by the first application, and the data type is: text, picture, audio or video.

[0012] It can be seen that the media data type capability can realize the classification of media data of each application according to a unified and standardized type, so that the media data of the same attributes of each application are no longer distributed discretely, which is conducive to the unified management of various media data in the system.

[0013] In combination with the first aspect, in a possible implementation, the third capability includes: data lifecycle capability, and the data lifecycle capability is used to perform one or more of the following: setting a validity period of the first media data, and processing the first media data when the validity period of the first media data expires.

[0014] It can be seen that the data lifecycle capability can uniformly control the entire process of media data from generation to disappearance of different applications, so that the media data of each application can disappear according to unified rules, reducing the generation of junk data in the system.

[0015] In combination with the first aspect, in a possible implementation manner, the third capability includes: a data security management capability, and the data security management capability is used to verify whether the content of the first media data complies with a preset requirement.

[0016] It can be seen that through data security management capabilities, it is possible to control the security of media data of various applications through unified rules, improve the security of users' use of media data, reduce the risk of media data leakage or the emergence of illegal information, and so on.

[0017] In combination with the first aspect, in a possible implementation, the third capability includes: a unified media data capability, which is used to set a data model of the first media data when some or all of the parameters passed in by the first application are null values, and the data model of the first media data includes: parameters of the first function, and the first media data or indication information of the first media data; the indication information of the first media data is all or part of the parameters passed in by the first application, and / or the indication information of the first media data is determined by the first operating system.

[0018] It can be seen that by unifying the media data capabilities, the media data transmitted by each application when starting the function can be standardized, so that the media data of each application can maintain a unified and standardized data format, solve the problem of data fragmentation between applications and devices, and lay the foundation for smooth data sharing between applications and devices.

[0019] In combination with the first aspect, in a possible implementation, the third capability includes: a distributed management capability, which is used to provide the ability to execute a first function on a second electronic device or to execute the first function through a second application on a first electronic device; the second electronic device and the first electronic device are logged in with the same account.

[0020] It can be seen that through the distributed management capability, the boundaries of media data between applications and devices can be broken, and convenient and smooth sharing of media data among multiple applications and multiple devices can be realized.

[0021] In combination with the first aspect, in a possible implementation, the first media data is second media data created by a second application before a first application starts a first function, and the data format of the second media data is the same as that of the media data processed by the third capability.

[0022] That is to say, the first application and the second application can achieve sharing of media data through an access mechanism. Different applications can uniformly standardize the media data of the application and achieve sharing of media data by calling the interfaces provided by the first operating system.

[0023] In combination with the first aspect, in a possible implementation, the first media data is obtained by parsing and reconstructing second media data created by a second application before a first application starts a first function. The data format of the second media data is different from that of the media data processed by the third capability, and the data format of the first media data is the same as that of the media data processed by the third capability.

[0024] That is to say, the second application can achieve sharing of media data through a delegation mechanism. This is because there are some applications that are not adapted to the first operating system and cannot process media data through the first interface, the media data interface, the second capability, and the third capability to standardize the format of the media data. Then, the media data can be directly parsed and reconstructed and reassembled into media data with a unified format so that other applications can identify and use the media data to achieve data sharing between applications.

[0025] In combination with the first aspect, in a possible implementation, the first media data is media data created by a second application, and the second application does not open the access permission to the first media data; before starting the first function, the method further includes: asking the second application to obtain the permission for the first application to access the first media data.

[0026] That is to say, applications can share media data through a dynamic mechanism. When an application needs to access media data across applications, it can adopt the query and response method. After obtaining the access permission of the application to the media data, it can temporarily build a bridge for sharing media data, avoiding excessive opening and sharing of media data and ensuring the security of media data.

[0027] Combined with the first aspect, in a possible implementation manner, the second application is an application on the first electronic device or the second electronic device.

[0028] Exemplarily, the second electronic device may refer to a device logged in with the same account as the first electronic device.

[0029] Among them, if the second application is an application on the first electronic device, the first electronic device can achieve smooth and simple sharing of data between applications through the above-mentioned various mechanisms. If the second application is an application on the second electronic device, the first electronic device and the second electronic device can achieve smooth and simple sharing of data between devices through the above-mentioned various mechanisms.

[0030] In a second aspect, an embodiment of the present application provides an electronic device, which includes: a memory, a processor, and a computer program stored on the memory. The computer program includes a first operating system, and a first application runs on the first operating system. The first operating system provides: a first interface, a media data interface, and a second capability; the first application is a third-party application, and the first application includes program code for calling the first interface. The first interface is used to call the media data interface, and the media data interface encapsulates the second capability. The second capability includes the ability to perform one or more of the following processes on media data: acquisition, encoding, storage, sharing, decoding, and playback. The second capability further includes a third capability, and the third capability includes the ability to perform one or more of the following processes on media data: setting the data model of the media data, setting the data type of the media data, managing the life cycle of the media data, managing the security of the media data, and performing distributed management on the media data. The processor executes the computer program to implement the method described in the first aspect or any one of the implementation manners in the first aspect.

[0031] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. The computer program includes a first operating system, and a first application runs on the first operating system. The first operating system provides: a first interface, a media data interface, a second capability, and a third capability; the first application is a third-party application, and the first application includes program code for invoking the first interface. The first interface is used to invoke the media data interface, and the media data interface encapsulates the second capability. The second capability includes the ability to perform one or more of the following processes on media data: acquisition, encoding, storage, sharing, decoding, and playback. The second capability further includes the third capability, and the third capability includes the ability to perform one or more of the following processes on media data: setting the data model of the media data, setting the data type of the media data, managing the life cycle of the media data, managing the security of the media data, and performing distributed management on the media data. When the computer program is executed by a processor, it implements the method described in the first aspect or any one of the implementation manners in the first aspect.

[0032] In a fourth aspect, an embodiment of the present application provides a computer program product, which includes a computer program. The computer program includes a first operating system, and a first application runs on the first operating system. The first operating system provides: a first interface, a media data interface, and a second capability; the first application is a third-party application, and the first application includes program code for invoking the first interface. The first interface is used to invoke the media data interface, and the media data interface encapsulates the second capability. The second capability includes the ability to perform one or more of the following processes on media data: acquisition, encoding, storage, sharing, decoding, and playback. The second capability further includes the third capability, and the third capability includes the ability to perform one or more of the following processes on media data: setting the data model of the media data, setting the data type of the media data, managing the life cycle of the media data, managing the security of the media data, and performing distributed management on the media data. When the computer program is executed by a processor, it implements the method described in the first aspect or any one of the implementation manners in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 A schematic diagram showing the differences between a data processing method provided by an embodiment of the present application and a data management method provided by an embodiment of the present application;

[0034] Figure 2A A schematic diagram of the software architecture of the electronic device 100 provided by an embodiment of the present application;

[0035] Figure 2B A schematic diagram of the relationship between the various modules in the software architecture provided by an embodiment of the present application;

[0036] Figure 2C A schematic diagram of the call relationship of the interfaces provided by an embodiment of the present application;

[0037] Figure 3 Schematic diagram of data sharing between applications under the existing mechanism provided by the embodiments of the present application;

[0038] Figure 4 Schematic diagram of data sharing between applications under the access mechanism provided by the embodiments of the present application;

[0039] Figure 5 Schematic diagram of data sharing between applications under the entrustment mechanism provided by the embodiments of the present application;

[0040] Figure 6 Schematic diagram of data sharing between applications under the dynamic mechanism provided by the embodiments of the present application;

[0041] Figure 7 Schematic flowchart of the data management method provided by the embodiments of the present application;

[0042] Figure 8 Schematic diagram of internal interface calls of the operating system when the electronic device 100 provided by the embodiments of the present application implements the photographing function through the camera application;

[0043] Figure 9 Schematic diagram of internal interface calls of the operating system when the electronic device 100 provided by the embodiments of the present application implements the picture viewing function through the gallery application;

[0044] Figure 10 Schematic diagram of internal interface calls of the operating system when the electronic device 100 provided by the embodiments of the present application implements the music playing function through the music application;

[0045] Figure 11 Schematic diagram of internal interface calls of the operating system when the electronic device 100 provided by the embodiments of the present application implements the file creation function through the storage application;

[0046] Figure 12 Schematic diagram of internal interface calls of the operating system when the electronic device 100 provided by the embodiments of the present application implements the file deletion function through the storage application;

[0047] Figure 13 Schematic diagram of the hardware structure of the electronic device 100 provided by the embodiments of the present application. Detailed implementation manners

[0048] The technical solutions in the embodiments of the present application will be clearly and elaborately described below with reference to the accompanying drawings. Among them, in the description of the embodiments of the present application, unless otherwise specified, " / " means "or". For example, A / B may represent A or B. The "and / or" in the text is only a description of the association relationship between associated objects, indicating that there can be three relationships. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality of" means two or more than two.

[0049] Hereinafter, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as implying or suggesting relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of the present application, unless otherwise specified, the meaning of "a plurality of" is two or more.

[0050] Currently, multiple applications can be installed on an electronic device to meet different usage requirements of users. However, each application has its own data management system, making the media data between applications and between devices independent, isolated, and non-unified.

[0051] For example, for the picture M obtained by shooting with the camera application, both the gallery application and the instant messaging application can view the picture M and perform operations on the picture M, such as modification or deletion, etc. However, since the gallery application and the instant messaging application each have their own data management system, the gallery application may perform operations on picture M1.0 when processing picture M, while the instant messaging application may perform operations on picture M2.0 when processing picture M. In this way, although the picture M can be viewed through both the gallery application and the instant messaging application, in the gallery application, operations on the picture M, such as deletion, modification, viewing, etc., are all operations on picture M1.0 and will not affect picture M2.0. That is to say, even if the user initiates the deletion of picture M in the gallery application, the user can still view the picture M through the instant messaging application. Or, even if the user initiates the modification of the picture M in the gallery application, the picture M viewed by the user through the instant messaging application is still the unmodified picture M.

[0052] For another example, if the user downloads the video N to the local through video player software 1, but cannot view the video N when viewing the local video through video player software 2.

[0053] It can be seen that the independent data management systems of various applications lead to problems such as complex operations, chaotic data formats, and chaotic interfaces in data sharing and information sharing between applications. The electronic device cannot systematically manage the media data of applications from a global perspective, reducing the user experience.

[0054] Therefore, how to manage the media data of each application in the electronic device is an urgent problem to be solved at present.

[0055] The embodiment of the present application provides a data management method, which is implemented under the unified media framework constructed in the embodiment of the present application, enabling each application to manage media data in a standardized, unified, and convenient manner through the unified media framework during operation, and solving problems such as application islands and data fragmentation.

[0056] Among them, the data management method provided by the embodiment of the present application involves unified management of aspects such as collection, encoding, storage, sharing, decoding, and playback of media data during the process from generation to extinction, avoiding each application from controlling media data according to its own data management system, breaking the boundaries of media data in applications and devices, and enhancing the user experience of using media data.

[0057] Figure 1 It is a schematic diagram showing the difference between a data processing method and the data management method provided by the embodiment of the present application.

[0058] Among them, Figure 1 (a) in shows a schematic diagram of the principle of a data processing method, Figure 1 (b) in shows a schematic diagram of the principle of the data management method provided by the embodiment of the present application.

[0059] As Figure 1 shown in (a) in, any application such as a system application, a self-developed application, or a third-party application can process media data in a database, memory data, and files according to business by selecting corresponding framework capabilities. For example, system applications and self-developed applications process media data in the database through different interface capabilities. It can be seen that this method does not have a unified management strategy for the media data of different applications.

[0060] As Figure 1 shown in (b) in, any application such as a system application, a self-developed application, or a third-party application uses the unified media framework to implement operations such as production, use, sales, and recovery of media data in a database, memory data, and files, providing a unified media data management interface for application development, and the interface capabilities can cover combined scenarios of single devices and multiple devices, providing a unified system framework capability for the drainage and data display of media data between different applications.

[0061] It can be seen that through the unified media framework, the electronic device provides the ability to uniformly process the media data of each application, realizes the unified management of the media data of each application by the electronic device, breaks the application boundary of the media data, and provides a logical basis for realizing the efficient and smooth cross-application sharing and cross-device sharing of the media data.

[0062] The electronic device can be a portable terminal device equipped with HarmonyOS, iOS, Android, Microsoft or other operating systems, such as a mobile phone, a tablet computer, a wearable device, etc., or a non-portable terminal device such as a laptop computer with a touch-sensitive surface or a touch panel, a desktop computer with a touch-sensitive surface or a touch panel. The software system of the electronic device can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. In this embodiment of the application, taking the layered HarmonyOS as an example, the software structure of the electronic device 100 is exemplarily described.

[0063] Figure 2A It is a schematic diagram of the software architecture of the electronic device 100 provided in this embodiment of the application.

[0064] The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, HarmonyOS is divided into four layers, from top to bottom are the application layer, the application framework layer, the service layer, and the kernel layer. The higher the layer, the more interactions with the user; the lower the layer, the more system capabilities it represents.

[0065] It should be understood that Figure 2A The software architecture shown is only an example, and it may also include more or fewer modules, which are not limited here.

[0066] The application layer may include a series of application packages. For example, applications such as camera, calendar, map, music, message, gallery, communication, navigation, Bluetooth, video, etc.

[0067] As Figure 2A shown, the application package may include: camera application, gallery application, music application, video application. Among them, the camera application can be used to collect media data such as pictures, videos, etc., the gallery application can be used to view, modify, delete or share media files such as pictures, videos, etc., the music application can be used to download, play, delete or share audio, and the video application can be used to download, play, delete or share videos.

[0068] It should be understood that the camera application can generally refer to one or more applications with a photographing function. That is to say, the application program package of the electronic device 100 may include one or more camera applications, such as a system camera application, a self-developed camera application, a third-party camera application, and so on. The same applies to other applications such as the gallery application, the music application, and the video application, which will not be elaborated here.

[0069] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications in the application layer. The application framework layer includes some predefined functions. The application framework layer may also include modules such as a window manager, a content provider, a view system, a telephone manager, and a resource manager, which will not be introduced in detail here.

[0070] As Figure 2A shown, the application framework layer may include function interfaces such as a camera function interface (PhotoMode), an editing function interface (EditMode), a storage function interface (StorageMode), a sharing function interface (ShareMode), a playback function interface (PlayMode), and a file management function interface (FileManageMode). These function interfaces can be directly called by the applications in the application layer.

[0071] Exemplarily, the camera function interface can be an interface (PhotoModeKit) or a selector (PhotoModePicker). Among them, multiple shooting function interfaces can be encapsulated in PhotoModePicker. One shooting function interface can be used to start one shooting function, and the shooting function can refer to: shooting function, video recording function, night scene function, portrait function, large aperture function, time-lapse photography function, artificial intelligence (AI) scene recognition function, barcode scanning function, face recognition function, face interaction function, and so on. PhotoModePicker can select the corresponding interface from multiple shooting function interfaces according to the parameters passed in by the application.

[0072] For example, when the electronic device 100 starts portrait shooting through an application with a photographing function, that is, a camera application, the camera application can call PhotoModePicker and pass the parameters passed in by the application. For example, the parameter indicates that the camera used for shooting is the front camera. Then, through this parameter, PhotoModePicker can select the shooting function interface corresponding to the portrait function to implement the shooting function of the camera application.

[0073] It should be understood that other functional interfaces such as EditMode, StorageMode... are similar to the description of PhotoMode and will not be elaborated here.

[0074] It can be seen that the application framework layer can provide unified interfaces for multiple applications in the application layer to call, enabling these multiple applications to implement the same function. For example, for the system camera application, third-party applications can all call PhotoMode to implement the photo-taking function. Compared with different applications calling different interfaces, it solves the problem of chaotic interface calls during the operation of the application.

[0075] In addition, the application framework layer can also include: a media data interface (MediaDataKit). The media data interface can be used by multiple functional interfaces such as PhotoMode, EditMode, StorageMode, ShareMode, PlayMode, and FileManageMode to control the acquisition, encoding, storage, sharing, decoding, and playback of media data.

[0076] Exemplarily, MediaDataKit can be used to implement querying, generating, saving, deleting, synchronizing, and change monitoring of media data, etc. Among them, querying media data means that MediaDataKit provides the ability to query media data according to conditions, generating media data means that MediaDataKit provides the ability to generate media data of a specified type, saving media data means that MediaDataKit provides the ability to save media data, deleting media data means that MediaDataKit provides the ability to delete media data that meets specified conditions, synchronizing data means that MediaDataKit provides the ability to synchronize media data end-to-end to ensure data consistency between devices, and monitoring media data changes means that MediaDataKit provides the ability to monitor changes in specified types or specified media data.

[0077] In addition, the application framework layer can also include multiple capabilities such as normal, Acquisition, Code, Storage, Share, Decode, Play, etc. These multiple capabilities can be called by the media data interface to implement the processing of media data, including acquisition, encoding, storage, sharing, decoding, playback, etc.

[0078] Among them, whether to perform media collection, encoding, storage, sharing, decoding, or playback can be determined by the functions launched by the application. For example, if the function launched by the camera application is the camera function, the operations performed on the media data may include collection. Another example is that if the function launched by the video application is the playback function, the operations performed on the media data may include playback.

[0079] Combined with Figure 2A As shown in the software architecture, when the electronic device 100 detects that the user operates to view a video through the gallery application, the gallery application can call the PlayMode interface, and the PlayMode interface then calls MediaDataKit. MediaDataKit determines that the operation to be performed on the media data is "playback" according to PlayMode. Therefore, MediaDataKit then calls the playback capability to implement the playback of the video.

[0080] In addition, the application framework layer may further include multiple capabilities such as media data type, data life cycle, data security management, unified media data, and distributed management. Among them:

[0081] The media data type capability can be used to set the data type of the media data so that the media data of each application can maintain a unified and standardized data type after being uniformly processed. This data type may include: text, picture, audio, video, etc. Among them, the media data type capability can be used to determine the data type of the media data according to the information passed in by the application. If the media data type capability is called by the collection capability, the data type of the media data can be determined according to the data type of the media data collected by the application. For example, if the camera application launches the picture shooting function, it will call the collection capability to implement the collection of pictures. It can be seen that the data type of the collected media data is a picture. Therefore, the data type of the unified media data can be set to a picture. Similarly, if the media data type capability is called by the encoding capability, the data type of the media data can be determined according to the data type of the media data encoded by the application. If the media data type capability is called by the storage capability, the data type of the media data can be determined according to the data type of the media data stored by the application. If the media data type capability is called by the sharing capability, the data type of the media data can be determined according to the data type of the media data shared by the application. If the media data type capability is called by the decoding capability, the data type of the media data can be determined according to the data type of the media data decoded by the application. If the media data type capability is called by the playback capability, the data type of the media data can be determined according to the data type of the media data played by the application.

[0082] It can be seen that through the media data type capability, the media data of each application can be classified according to a unified and standardized type, so that the media data of the same attribute in each application is no longer discretely distributed, which helps the unified management of various media data in the system.

[0083] The data life cycle capability can be used to manage the life cycle of media data. Specifically, the data life cycle capability can be used to set the expiration date of media data and process the media data when the expiration date of the media data expires. Among them, processing media data can refer to deleting the media data or extending the expiration date of the media data. Exemplarily, the data life cycle capability can customize different expiration dates for different media data, or, taking applications as units, manage the life cycles of the media data of different applications differently. For example, it can be set that the media data exists permanently, or the media data is updated regularly, or the media data is deleted or extended after expiration, etc.

[0084] It can be seen that through the data life cycle capability, the entire process of media data of different applications from generation to extinction can be uniformly controlled, so that the media data of each application can be extinguished according to a unified rule, reducing the generation of garbage data in the system.

[0085] The data security management capability can be used to uniformly manage the security of media data, specifically including: checking the rationality, compliance and legality of media data, and controlling the expiration date of media data, etc. Exemplarily, the data security management capability can be used to verify whether the content of media data conforms to preset regulations. If it conforms, it indicates that the media data is secure; if it does not conform, it indicates that there are security risks in the media data.

[0086] It can be seen that through the data security management capability, the security of the media data of each application can be controlled through unified rules, improving the security of users using media data and reducing the risks of media data leakage or the appearance of illegal information, etc.

[0087] The unified media data capability can be used to provide a standardized data model and standardize model parameters to achieve the unification and standardization of media data. Among them, the data model can be used to standardize the function initiated by the application and the media data processed by the function or the indication information of the media data. Among them, the data model can include: the parameters of the function, and the media data or the indication information of the media data. For example, if there is a null value in the parameters passed in by the application, the data model can be set to fill in the parameters in the data model. For example, if one of the parameters passed in by the application is a null value, the operating system can fill in the parameter with the default value by itself. Standardizing model parameters can include standardizing the specific values of the parameters included in the data model. For example, if the parameters passed in by the application include the duration of music and the duration is negative, it indicates that the model parameters are not standardized and need to be adjusted again.

[0088] It can be seen that by unifying the media data capabilities, the media data transmitted by each application when starting a function can be standardized, enabling the media data of each application to maintain a unified and standardized data format, solving the problem of data fragmentation between applications and devices, and laying a foundation for smooth data sharing between applications and devices.

[0089] The distributed management capability can be used to manage media data in a distributed manner, realize the synchronization of media data between applications and devices, and manage the cross-application and cross-device sharing of media data. Specifically, the distributed management capability can be used to provide the ability to process media data on other applications or other devices, where the other devices can refer to devices logged in with the same account as the electronic device 100. For example, if an application calls a storage function interface to store media data, and the local end cannot store the media data due to insufficient storage space, the distributed management capability can be called to complete the storage of the media data at the remote end. Exemplarily, the distributed management capability can be based on a relational database (RDB) to achieve cross-device synchronization of media data. Among them, RDB is a relational database and a way of organizing data using a database. In addition, in the cross-device sharing of media data, the distributed management capability can be used to determine the device storing the media data.

[0090] It can be seen that through the distributed management capability, the boundaries of media data between applications and devices can be broken, and convenient and smooth sharing of media data among multiple applications and multiple devices can be realized.

[0091] The unified media framework provided by the embodiments of the present application may include Figure 2A all the interfaces and capabilities in the application program framework layer shown. In other embodiments of the present application, the names of the unified media framework and each of the above-introduced interfaces or capabilities may also be other, and the embodiments of the present application do not limit this. For example, the unified media framework may also be referred to as the unified media management framework. In addition, in the unified media framework, the functional interfaces that an application can directly call may be more or less than Figure 2A the functional interfaces shown, and the capabilities that the media data interface calls downward may be more or less than Figure 2A the capabilities shown, and the embodiments of the present application do not limit this.

[0092] It can be seen that in the unified media framework provided by the embodiments of the present application, the interfaces and services are layered, enabling application developers to only focus on the functions provided by the interfaces without having to concern themselves with the complex implementation of underlying commands. At the same time, each application can call the same interfaces provided in the unified media framework to implement the same function, enabling fast, efficient, and convenient management and control of media data between different applications, media data between different devices, and different types of media data.

[0093] As Figure 2A shown, the service layer may include: data type service, lifecycle service, data security service, unified data service, distributed management service, etc. Among them, the data type service can be used to provide business logic related to standardizing media data types, the lifecycle service can be used to provide business logic related to managing the lifecycle of media data, the data security service can be used to provide business logic related to managing the security of media data, the unified data service can be used to provide business logic related to unified media data, and the distributed management service can be used to provide business logic related to managing the distributed management of media data.

[0094] The kernel layer is the layer between hardware and software. The kernel layer may include a display driver, a camera driver, an audio driver, a sensor driver, and so on. As Figure 2A shown, the kernel layer may include: memory storage driver, disk storage driver, persistent storage driver, distributed storage driver. Among them, memory storage refers to a storage method of storing media data in memory, disk storage refers to a storage method of storing media data on a disk, persistent storage refers to a storage method of saving transient data in memory as persistent data, such as saving to a database or a hard disk to prevent data loss when the device loses power or the application is closed, and distributed storage refers to a storage method of storing media data across devices.

[0095] It can be understood that the unified media framework provided by the present application can be implemented as a system capability, or as a software development kit (SDK), a resident service, a binary shared object (SO) file, etc. Among them, the resident service can be regarded as a resident process that is always running after the electronic device is powered on.

[0096] Figure 2B Taking the processing of media data as an example of acquisition, the relationships between the various modules in the Figure 2A shown software architecture are illustrated.

[0097] As Figure 2B shown, the service invoker may refer to an Figure 2A application in the application layer shown, such as a camera application, a gallery application, a music application, a video application, and so on.

[0098] If the service caller initiates a service call, which is used to collect media data, the entire service call process requires the software framework to provide collection capabilities, media data interfaces, full life cycle management of unified data, and support for data across devices and applications. Figure 2A The distributed management capability in the software architecture shown enables the processing of data across devices and across applications.

[0099] In addition, the media data interface needs to be able to support a unified data model and data life cycle management. The unified data model can be Figure 2A The unified media data capability shown in the figure provides control over the data lifecycle. Figure 2A This is achieved through the data lifecycle capabilities shown.

[0100] Furthermore, the unified data model needs to take into account the various characteristics and types of data, which may include databases, memory data, and files, etc. Therefore, the unified data model should be able to provide a unified data model for persistent data, memory data, database data, file library data, etc., unify and standardize different types of media data, and ensure the uniformity of data sharing among applications. In addition, the unified data model also needs to support data security, which can be achieved through Figure 2A The data security management capabilities shown are used to manage the security of media data.

[0101] It should be understood that when media data is encoded, stored, shared, decoded, played, etc., the factors that need to be considered in the service call process are similar to those mentioned above. Figure 2B The description in will not be repeated here.

[0102] To better understand Figure 2A In the software architecture shown, the calling relationship of each layer interface is Figure 2C The diagram of the calling relationship of the interface is shown as an example.

[0103] like Figure 2C As shown, the application may refer to the above Figure 2A The camera application, gallery application, music application or video application in the application layer mentioned in XXMode can refer to the above Figure 2A Any functional interface mentioned in, for example, camera function interface (PhotoMode), editing function interface (EditMode), storage function interface (StorageMode), sharing function interface (ShareMode), playback function interface (PlayMode), file management function interface (FileManageMode), etc., MediaDataKit is the media data interface.

[0104] The application can detect user operations and trigger the activation of a certain function, which can be used to perform one or more processes of collecting, encoding, storing, sharing, decoding, and playing certain media data.

[0105] Then, after the application detects a user operation, the XXMode interface can be called. For example, if the camera application detects a photo-taking operation, the XXMode interface can be the PhotoMode interface; if the video application detects a video-playing operation, the XXMode interface can be the PlayMode interface.

[0106] Among them, the form of the XXMode interface is XXMode(DeviceName, AppName, key, value, extend).

[0107] The device name (DeviceName) can refer to the device name of the local device or the device name of the remote device. If the device name is the device name of the local device, the local device can activate the corresponding function in response to the operation detected by the application; if the device name is the device name of the remote device, the remote device can activate the corresponding function in response to the operation detected by the application.

[0108] The application name (AppName) can refer to the name of the application that calls the XXMode interface.

[0109] The parameters (key, value) passed in by the application include one or more parameters passed in by the application after detecting a user operation. For example, if the user operation is a file creation operation, the parameters passed in by the application can include the file name, owner, etc. of the file.

[0110] Among them, the parameters passed in by the application can exist in the form of parameter (key)-parameter content (value), where the parameter (key) is the parameter of the function started by the application and is used to indicate the function started by the application. Exemplarily, this parameter can be the name, identifier, index, or number, etc. of the function started by the application, and the parameter content (value) represents the data required to implement the function started by the application, which can include one or more of the following: description information of the function started by the application, media data, and indication information of the media data.

[0111] Key and value can form a key-value pair. One key can correspond to one or more values. The keys and values passed in the XXMode interface can include one or more pairs, such as key1, value1, key2, value2.

[0112] For example, if the functions launched by the application include a face recognition function, the data required for the face recognition function may include one or more of the following: the coordinate information of the face, the image of the face, etc. For another example, if the functions launched by the application include a beauty function, the data required for the beauty function may include one or more of the following: the beauty level, face information, etc. For yet another example, if the functions launched by the application include a camera startup function, the data required for the camera startup function may include camera information, which is used to indicate the cameras enabled in the device, such as the front camera, rear camera, telephoto camera, wide-angle camera, etc.

[0113] The extended field (extend) can be used for the construction of embedded capabilities or differentiated capabilities.

[0114] It can be understood that the device name, application name, and extended field are optional.

[0115] After the application calls the XXMode interface, the XXMode interface can call MediaDataKit, and the interface form of MediaDataKit is MediaDataKit(type, key, value, extend).

[0116] The type represents the type of processing performed on the media data. The type may include but is not limited to the following: normal, Acquisition, code, storage, share, decode, play, other, etc. Among them, the type can be determined according to the previous interface that calls MediaDataKit. For example, if the previous interface is the PhotoMode interface, the electronic device can determine that the current function to be launched is the camera function, and perform the acquisition processing on the media data, so it is regarded as the acquisition type.

[0117] The indication parameter (key) of the function point is used to indicate the launched function point, and can be obtained from the parameters passed into the XXMode interface, or determined by the name of the XXMode interface.

[0118] The value required for the function point is used to indicate the data required to implement the function point, and can be obtained from the parameters passed into the XXMode interface. If it cannot be obtained from the parameters passed into the XXMode interface, it can be determined by the operating system.

[0119] The extended field (extend) can be used for the construction of embedded capabilities or differentiated capabilities.

[0120] After the MediaDataKit interface is called, other interfaces provided by the framework layer can be called continuously according to the type. For example, if the type is collection, the collection ability can be called to collect media data; if the type is encoding, the encoding ability can be called to encode media data; if the type is storage, the storage ability can be called to store media data; if the type is sharing, the sharing ability can be called to share media data; if the type is decoding, the decoding ability can be called to decode media data; if the type is playing, the playing ability can be called to play media data. Among them, the parameters passed by abilities such as collection, encoding, storage, sharing, decoding, or playing can include: key, value, extend.

[0121] During the process of calling any one of the abilities such as collection, encoding, storage, sharing, decoding, or playing, multiple abilities such as unified media data, media data type, data life cycle, data security management, and distributed management can also be called to standardize and unify media data. Among them, the media data type ability can be used to determine the data type of media data, the data life cycle ability can be used to determine the life cycle of media data, the data security management ability can be used to manage the security of media data, the unified media data ability can be used to standardize the data model of media data, which is the indication parameter (key) of the function point and the value (value) required by the function point, and the distributed management ability can be used to provide distributed management for media data.

[0122] In some embodiments, during the process of calling any one of the abilities such as collection, encoding, storage, sharing, decoding, or playing, only some of the multiple abilities such as unified media data, media data type, data life cycle, data security management, and distributed management can be called, which can be specifically determined by the application. For example, if the application does not need to set the life cycle of the media data, the data life cycle ability can be not called.

[0123] In some embodiments, after the XX Mode interface is called, it can bypass MediaDataKit and directly call other framework layer abilities below MediaDataKit to implement the function of application startup.

[0124] In some embodiments, the XXMode interface can be a kit or a picker. When the XXMode interface is implemented as a picker, the MediaDataKit can also be correspondingly subdivided into multiple interfaces with more detailed functions, so that the XXMode interface can select a suitable interface from these multiple interfaces for invocation.

[0125] After the framework layer interface is invoked, it will continue to call the interfaces of the service layer and the kernel layer below to implement the corresponding shooting function.

[0126] Specifically regarding Figure 2C For detailed examples of Figures 8 - 12 .

[0127] According to different application scenarios, the unified media framework provided by the embodiments of the present application can be implemented through any of the following mechanisms:

[0128] 1) Access mechanism

[0129] The access mechanism means that an application can actively access the MediaDataKit provided by the unified media framework to implement processing such as acquisition, encoding, storage, sharing, decoding, and playing of media data.

[0130] In this way, the unified management of media data can be achieved according to the unified interfaces provided by the unified media framework. And as long as the application processes media data according to the access mechanism, this part of the data belongs to the data opened by the application for other applications to use. Other applications can obtain and use this media data through the unified media framework to realize the sharing of media data between applications.

[0131] 2) Delegation mechanism

[0132] The delegation mechanism means that an application does not originally access the MediaDataKit provided by the unified media framework to complete the acquisition, encoding, storage, sharing, decoding, and playing of media data. The media data of the application is not originally data that has been uniformly standardized according to the unified media framework. Therefore, it can be determined whether to parse and reconstruct this part of the media data into data that conforms to the unified standard of the unified media framework according to whether the application authorizes it.

[0133] Among them, if the application gives authorization, the media data of the application can be parsed and reconstructed into data that conforms to the unified specification of the unified media framework. In this way, this part of the media data can be reassembled into data that can be recognized and used by other applications. This part of the media data can be regarded as the data opened by the application for other applications to use. Other applications can obtain and use this media data through the unified media framework, realizing the sharing of media data between applications. If the application does not give authorization, the media data of the application cannot be parsed and reconstructed into data that conforms to the unified specification of the unified media framework, and other applications cannot use this part of the media data through the unified media framework.

[0134] 3) Dynamic mechanism

[0135] The dynamic mechanism is a mechanism introduced to ensure the security of media data and prevent applications from over-opening or sharing media data. Under this dynamic mechanism, applications can achieve the opening and sharing of media data through the "query-response" method. When an application (hereinafter referred to as Application A) needs to use the media data of other applications, it can query through the unified media framework whether there is media data that can be shared by applications. If there is an application (hereinafter referred to as Application B) that can share media data, Application B can respond to this query request through the unified media framework and open its media data so that Application A can use this media data, realizing data sharing between applications. Moreover, the media data opened this time is only for the query of Application A this time. When Application A or other applications need to use this media data again next time, they need to ask Application B again through the "query-response" method.

[0136] In this way, for the media data between applications, applications need to complete data sharing between applications through the "query-response" method.

[0137] Exemplarily, to better understand these three mechanisms, Figures 3 - 6 Exemplarily shows the principle of data sharing between applications under different mechanisms.

[0138] Figure 3 It is the schematic diagram of data sharing between applications under the existing mechanism.

[0139] As Figure 3 shown, the data in an application can generally be divided into: private data and shared data. Among them, private data is the data used inside the application, which cannot be accessed or used by other applications, and shared data is the data that can be accessed and used by other applications.

[0140] Under the existing mechanism, each application has a set of data management systems to manage its own media data. Suppose the shared data of Application A includes media data X1.0. If Application B wants to access and use this media data X1.0, under the existing mechanism, Application B usually saves the media data X1.0 as media data X2.0. The processing of media data X by Application A is the processing of media data X1.0, and the processing of media data X by Application B is the processing of media data X2.0. For example, if Application A initiates the deletion of media data X, Application A can only delete the media data X1.0 in its own application directory and will not delete the media data X2.0 in the application directory of Application B. Similarly, if Application B initiates the deletion of media data X, Application B can only delete the media data X2.0 in its own application directory and will not delete the media data X1.0 in the application directory of Application A.

[0141] It can be seen that under the existing mechanism, the media data between applications is independent, isolated, and not unified, resulting in complex and fragmented operations such as management, viewing, addition, deletion, and modification of media data by users. Smooth and simple data sharing cannot be achieved between applications.

[0142] Figure 4 This is the schematic diagram of data sharing between applications under the access mechanism provided by the embodiments of this application.

[0143] As Figure 4 shown, both Application A and Application B can achieve unified management of shared data by accessing a unified media framework. Whether Application A or Application B is performing processing on media data, as long as it accesses MediaDataKit, the media data of different applications can have the same data format and are uniformly controlled by the unified media framework. This media data can be called unified data.

[0144] Taking the media data X included in the unified data as an example, suppose the media data X is the media data processed after Application A accesses MediaDataKit. Then this media data is the data opened by Application A for other applications to use. Other applications, such as Application B, can also access and use this media data X by accessing MediaDataKit.

[0145] For example, suppose Application A is a camera application and Application B is a video call application, and the media data X is the image preview stream collected by Application A. Since Application B also needs to turn on the camera and collect the image preview stream when starting the video call function, Application B can directly use the image preview stream collected by Application A during the process of Application A collecting the image preview stream to achieve media data sharing between applications. In this way, the electronic device can run two applications that need to use the camera simultaneously, improving the user experience.

[0146] Figure 5 This is the schematic diagram of data sharing between applications under the delegation mechanism provided by the embodiments of this application.

[0147] Considering that during the operation of an application, it is not necessary to process media data according to a unified media framework. In this case, the media data of the application may still be managed according to its own set of data management systems.

[0148] As Figure 5 shown, Application A is an application that processes media data according to a unified media framework, and Application B is not an application that processes media data according to a unified media framework.

[0149] Under the delegation mechanism, if, with the authorization of Application B, there is data willing to be unified in the shared data of Application B, then this part of the data willing to be unified can be parsed and reconstructed, and converted into data with the same format as the unified data, that is, reassembled into data that can be recognized and used by other applications. In this way, other applications that process media data according to a unified media framework, such as Application A, can access and use this part of the data by accessing MediaDataKit.

[0150] Figure 6 This is the schematic diagram of data sharing between applications under the dynamic mechanism provided by the embodiments of this application.

[0151] As Figure 6 shown, Application A is an application that processes media data according to a unified media framework, and Application B is not an application that processes media data according to a unified media framework.

[0152] Under the dynamic mechanism, when Application A wants to use the media data of other applications, it can send a query request to the unified media framework to request the media data of other applications. The unified media framework then sends the query request to other applications. If Application B responds, then Application B and Application A can establish a dynamic channel and temporarily open the sharing of media data X. The unified media framework can parse and reconstruct the media data X on this dynamic channel and convert it into data with the same format as the unified data. In this way, Application A can access and use the media data X by accessing MediaDataKit on this dynamic channel. And after this sharing ends, this dynamic channel will be closed. When Application A or other applications want to use the media data X again, they need to establish a dynamic channel again through the query and response method.

[0153] For example, if Application A is a camera application on Device A and Application B is a camera application on Device B, when the camera application on Device A wants to use the media data collected by the camera application on another device, the camera application on Device A can send a query request to the unified media framework. If the camera application on Device B responds, the camera application on Device A can access the media data collected by the camera application on Device B.

[0154] In some embodiments, Application B can be an application that processes media data according to the unified media framework. In this case, it is equivalent to that, on the basis of the access mechanism, before accessing media data across applications, it is necessary to obtain the permission for the application to access media data by querying the application.

[0155] It can be understood that the above Figures 4 - 6 mentioned Application A and Application B can refer to different applications on the same device. For example, Application A and Application B are respectively a camera application and a gallery application on the same device, or Application A and Application B can refer to applications on different devices. For example, Application A is a camera application of Device A, and Application B is a camera application or a gallery application on Device B. It can be seen that the unified media framework provided by the embodiments of the present application can realize the smooth and simple sharing of media data between different applications on the same device, and can also realize the smooth and simple sharing of media data between different devices, breaking the boundaries of media data between applications and between devices, and providing a platform for data sharing between applications and between devices.

[0156] Figure 7 It is a schematic flowchart of the data management method provided by the embodiments of the present application.

[0157] As Figure 7 shown, the data management method mainly involves the following steps:

[0158] S101. The electronic device 100 displays the user interface of the first application, and the user interface presents a first option corresponding to a first function, and the first function is used to perform one or more of the following processes on the first media data: acquisition, encoding, storage, sharing, decoding, and playing.

[0159] Among them, the electronic device 100 runs a first operating system, the first application runs on the first operating system, and the first operating system provides: a first interface, a media data interface, a second capability, and a third capability.

[0160] Exemplarily, the first application can be a third-party application, and the first application includes program code for calling the first interface. For example, the first application can refer to a camera application, a gallery application, a music application, a video application, and so on.

[0161] The first media data may include one or more of the following: text, pictures, videos, audio, and so on.

[0162] The first function may refer to a photographing function, a picture viewing function, a music playing function, a file creating function, a file deleting function, and so on. For example, if the first function is a photographing function, the user interface of the first application may refer to a photographing interface, the first option may refer to a photographing option, the first media data may include pictures, and the first function may include the acquisition of pictures.

[0163] The first interface can be used to start the first function provided by the first application, and the first interface can be used to call the media data interface. In the embodiments of the present application, the first operating system may provide multiple first interfaces, and different first interfaces can be used to start different functions.

[0164] The media data interface encapsulates a second capability, and the second capability includes the capability of performing one or more of the following processes on the media data: acquisition, encoding, storage, sharing, decoding, and playing.

[0165] See Figure 2A , the first interface can be Figure 2A the camera function interface, the editing function interface, the storage function interface, the sharing function interface, the file management function interface, or the playing function interface mentioned in Figure 3 , and the second capability can include one or more of the acquisition capability, the encoding capability, the storage capability, the sharing capability, the decoding capability, and the playing capability mentioned in

[0166] The second capability includes a third capability, and the third capability includes the capability of performing one or more of the following processes on the media data: setting the data type of the media data, managing the life cycle of the media data, managing the security of the media data, setting the data model of the media data, and performing distributed management on the media data.

[0167] Exemplarily, the third capability may include one or more of the following: unified media data capability, data life cycle capability, data security interface, unified media data capability, and distributed management capability.

[0168] For a detailed description of the interfaces and capabilities included in the first operating system, reference may be made to the relevant content of the above Figure 2A .

[0169] S102. The electronic device 100 detects an operation acting on the first option.

[0170] This operation can be used to trigger the start of the first function. This operation may refer to a touch operation acting on the touch screen, or may also refer to a voice command of the user, and so on. The embodiments of the present application do not limit the form of this operation.

[0171] It can be understood that, in addition to starting the function by operating on the option, when the electronic device 100 does not display a screen, based on the user's voice command, or an operation on a physical button, the start of an application function can be achieved. For example, when the electronic device 100 is in the screen-off state, it can detect the user's voice command "open the camera", open the camera application, and start the photo preview function of the camera application. Among them, the photo preview function can be used to collect the preview stream.

[0172] S103. The electronic device 100 responds to the operation and starts the first function.

[0173] Exemplarily, the electronic device 100 starts the first function, which specifically includes: the electronic device 100 calls the first interface through the first application, then calls the media data interface through the first interface, and then calls one or more capabilities in the second capability through the media data interface. During the process of running one or more capabilities in the second capability, the third capability is called.

[0174] Among them, the first function is used to perform one or more of the following processes on the first media data. During the process of starting the first function, the third capability is used to perform one or more of the following: setting the data type of the first media data, managing the life cycle of the first media data, controlling the security of the first media data, setting the data model of the first media data, and performing distributed management on the first media data.

[0175] The parameters passed into the first interface can include one or more of the following: device name, application name of the first application, parameters passed in by the first application, etc. Among them, the parameters passed in by the first application can be the parameters and parameter content of the first function. The parameter content includes one or more of the following: description information of the first function, the first media data, and indication information of the first media data.

[0176] It should be noted that if the functions started by the electronic device 100 in response to the operation on the first option include multiple ones, the parameters passed in by the first application can include multiple key-value pairs. A pair of key-value can be used to describe a function and the related information under this function.

[0177] It can be seen that when the first application calls the first interface, device information, application information, and related information of the started first function can be passed to the first interface. The related information of the first function can include the parameters of the first function, and can also include the first media data itself, or information used to indicate the first media data. For example, if the first media data is a picture, the indication information of the first media data can include the address, name, size, etc. of the picture.

[0178] Among them, the device name can be the name of the electronic device 100. It can be understood that if the electronic device 100 cannot start the first function and it is determined that other electronic devices can respond to the operation and start the first function, then the device name can be the name of other electronic devices.

[0179] Exemplarily, if the first function includes a face recognition function, the parameters passed in by the first application include: the name, identifier, index, or encoding, etc. of the face recognition function, the coordinates of the face, the image of the face, etc. Among them, the name, identifier, index, or encoding of the face recognition function are the parameters of the face recognition function, and the coordinates of the face and the image of the face are the parameter contents; if the first function includes a beauty function, the parameters passed in by the first application include: the name, identifier, index, or encoding, etc. of the beauty function, the beauty level, face information, etc. Among them, the name, identifier, index, or encoding, etc. of the beauty function are the parameters of the beauty function, and the beauty level and face information are the parameter contents.

[0180] The parameters passed in by the media data interface may include: capability indication information, the parameters of the first function, and the first media data or the indication information of the first media data.

[0181] Among them, the capability indication information can be used to indicate the capability invoked by the media data interface in the second capability. Exemplarily, the capability indication information can be determined according to the first interface. For example, if the capability invoked by the media data interface downward is the encoding capability, then the capability indication information can be used to indicate the encoding capability.

[0182] It should be noted that when the first interface invokes the media data interface, some of the parameters passed in by the first application may be null values. Therefore, the first operating system can automatically fill in these parameters with default parameters. Therefore, in the parameters passed in by the media data interface, the indication information of the first media data can be all or part of the parameters passed in by the first application, and / or the indication information of the first media data is determined by the first operating system.

[0183] The parameters passed in by the second capability may include: the parameters of the first function, and the first media data or the indication information of the first media data.

[0184] It can be seen that the parameters passed in by the second capability can be a part of the parameters passed in by the media data interface. For the specific description of the parameters passed in by the second capability, reference can be made to the relevant description in the parameters passed in by the media data interface, which will not be elaborated here.

[0185] Next, different examples are used to describe the interface call relationship inside the operating system and the parameters passed between the interfaces when the electronic device 100 starts different functions.

[0186] Example 1: The first function is the camera function

[0187] Among them, Figure 8 is a schematic diagram of interface calls inside the operating system when the electronic device 100 provided by the embodiment of this application implements the photographing function through the camera application.

[0188] As Figure 8 shown, after the camera application detects the operation of the user starting the photographing function, the camera application can call the PhotoMode interface. Among them, the parameters passed by the PhotoMode interface include: DeviceName, AppName, key1, value1, key2, value2, extend.

[0189] After the camera application calls the PhotoMode interface, the PhotoMode interface then calls MediaDataKit. The parameters passed by MediaDataKit include: Acquisition, PhotoMode, [PictureFlow, PreviewFlow,...], extend.

[0190] Among them, Acquisition is used to indicate the acquisition capability. Acquisition is determined according to the PhotoMode interface. PhotoMode is used to indicate the photographing function. PhotoMode can be determined according to the interface name of the PhotoMode interface or according to the parameters key1, value1, key2, value2 passed by the PhotoMode interface. PictureFlow is the photographing stream and is used to store the data of the photographing result. PreviewFlow is the preview stream and is used to display the preview data to the user in real time. Among them, PhotoMode and [PictureFlow, PreviewFlow,...] are a pair of key-value, and [PictureFlow, PreviewFlow,...] is the media data processed during the process of the camera application starting the photographing function.

[0191] It can be understood that PictureFlow and PreviewFlow can be determined by the first operating system.

[0192] After the PhotoMode interface calls MediaDataKit, MediaDataKit can determine that the next called capability is the acquisition capability according to the parameter Acquisition it passes. The parameters passed by the acquisition capability can include: PhotoMode, [PictureFlow, PreviewFlow,...], extend.

[0193] Then, during the process of running the acquisition capability, one or more of the media data type capability, data life cycle capability, data security management capability, unified media data capability, and distributed management capability can be called to standardize the format of media data. For example, by calling the media data type capability, it is determined that the data type of the media data is a picture.

[0194] It can be understood that Figure 8 This is just an example. For instance, in addition to Figure 8 the camera application shown, other applications with a photo-taking function, such as instant messaging applications, can also trigger the photo-taking function based on user operations. The parameters passed to MediaDataKit can contain more or fewer parameters than Figure 8 shown. Subsequently Figures 9 - 12 This is also just an example and will not be elaborated further below.

[0195] From Figure 8 it can be seen that if the first function is the photo-taking function, among the parameters passed to the media data interface, the first media data can include one or more of the following: the photo-taking stream, the preview stream, and the capability indication information can be used to indicate the capability of performing acquisition on the first media data in the second capability.

[0196] Example 2: The first function is the picture viewing function

[0197] Among them, Figure 9 This is a schematic diagram of the interface call inside the operating system when the electronic device 100 provided in the embodiment of the present application realizes the picture viewing function through the gallery application.

[0198] As Figure 9 shown, after the gallery application detects the user's operation of viewing a picture, the gallery application can call the PhotosMode interface. Among them, the parameters passed by the PhotosMode interface include: DeviceName, AppName, key1, value1, key2, value2, extend.

[0199] For the specific description of the parameters passed by the PhotosMode interface, reference can be made to the relevant content in the above Figure 8 and will not be elaborated here.

[0200] After the camera application calls the PhotoMode interface, the PhotoMode interface then calls MediaDataKit. The parameters passed by MediaDataKit include: Storage, PhotosMode, [BigPicture, ThumbNail,...], extend.

[0201] Among them, Storage is used to indicate the storage capacity, PhotosMode is used to indicate the picture viewing function, BigPicture is the large picture, and ThumbNail is the thumbnail. PhotosMode and [BigPicture, ThumbNail,...] form a pair of key-value. Among them, and, BigPicture and ThumbNail are the media data processed in the picture viewing function launched by the gallery application.

[0202] After the PhotosMode interface calls MediaDataKit, MediaDataKit can determine that the next interface to be called is the storage capacity according to the parameter Storage passed by it. The parameters passed by the storage capacity can include: PhotosMode, [BigPicture, ThumbNail,...], extend.

[0203] Then, during the process of running the storage capacity, one or more of the media data type capacity, data life cycle capacity, data security management capacity, unified media data capacity, and distributed management capacity can be called to standardize the format of the media data.

[0204] From Figure 9 It can be seen that if the first function is the picture viewing function, among the parameters passed into the media data interface, the indication information of the first media data can include one or more of the following: large picture, thumbnail, and the ability indication information can be used to indicate the ability to perform storage on the first media data in the second ability.

[0205] Example 3: The first function is the music playing function

[0206] Among them, Figure 10 This is a schematic diagram of the interface call inside the operating system when the electronic device 100 provided by the embodiment of the present application realizes the music playing function through the music application.

[0207] As Figure 10 shown, after the music application detects the operation of the user playing music, the music application can call the PlayMode interface. After the music application calls the PlayMode interface, the PlayMode interface then calls MediaDataKit, and the parameters passed by MediaDataKit include: Play, PlayMusic, [MusicName, size, time,...], extend.

[0208] Among them, Play is used to indicate the playback capability that MediaDataKit will call next, PlayMusic is used to indicate the music playback function, and [MusicName, size, time, …] is used to indicate the music to be played by this music playback function, where MusicName is the music name, size is the music size, and time is the music duration.

[0209] After the PlayMode interface calls MediaDataKit, MediaDataKit then calls the playback capability, and the parameters passed by the playback capability can include: PlayMusic, [MusicName, size, time, …], extend.

[0210] Then, during the process of running the playback capability, one or more of the media data type capability, data life cycle capability, data security management capability, unified media data capability, and distributed management capability can be called to standardize the format of the media data.

[0211] From Figure 10 It can be seen that if the first function is the music playback function and the first media data is music, among the parameters passed into the media data interface, the indication information of the first media data can include one or more of the following: music name, music size, music duration, and the capability indication information can be used to indicate the capability of performing playback on the first media data in the second capability.

[0212] Example 4: The first function is the file creation function or the file deletion function

[0213] Among them, Figure 11 is a schematic diagram of the interface call inside the operating system when the electronic device 100 provided by the embodiment of the present application implements the file creation function through the storage class application.

[0214] As Figure 11 shown, after the storage class application detects the user's operation of creating a file, the storage class application can call the FileManageMode interface. Then, the FileManageMode interface calls MediaDataKit again, and the parameters passed by MediaDataKit include: Storage, CreateFileMode, [name, owner, position, size…], extend.

[0215] Exemplarily, the storage class application can refer to a file management application, and the embodiment of the present application does not limit this.

[0216] Among them, Storage is used to indicate the storage capability that MediaDataKit will call next, CreateFileMode is used to indicate the file creation function, and [name, owner, position, size...] is used to indicate the file that needs to be created by this file creation function. Among them, name is the file name, owner is the file owner, position is the file path, and size is the file size.

[0217] After the FileManageMode interface calls MediaDataKit, MediaDataKit then calls the storage capability. The parameters passed by the storage capability can include: CreateFileMode, [name, owner, position, size...], extend.

[0218] Then, during the process of running the storage capability, one or more of the media data type capability, data life cycle capability, data security management capability, unified media data capability, and distributed management capability can be called to standardize the format of media data.

[0219] Among them, Figure 12 is a schematic diagram of interface calls inside the operating system when the electronic device 100 provided by the embodiment of this application realizes the file deletion function through the storage class application.

[0220] As Figure 12 shown, after the storage class application detects the user's operation of deleting a file, the storage class application can call the FileManageMode interface. After that, the FileManageMode interface calls MediaDataKit again. The parameters passed by MediaDataKit include: Storage, DeleteFileMode, [name, owner, position, size...], extend.

[0221] Among them, Storage is used to indicate the storage capability that MediaDataKit will call next, DeleteFileMode is used to indicate the file deletion function, and [name, owner, position, size...] is used to indicate the file that needs to be deleted by this file deletion function. Among them, name is the file name, owner is the file owner, position is the file path, and size is the file size.

[0222] After the FileManageMode interface calls the MediaDataKit, the MediaDataKit then calls the storage capability. The parameters passed by the storage capability can include: DeleteFileMode, [name, owner, position, size...], extend.

[0223] Then, during the process of running the storage capability, one or more of the media data type capability, data life cycle capability, data security management capability, unified media data capability, and distributed management capability can be called to standardize the format of media data.

[0224] From Figure 11 and Figure 12 It can be seen that if the first function is a file creation function or a file deletion function, and the first media data is a file, among the parameters passed into the media data interface, the indication information of the first media data can include one or more of the following: file name, file owner, file path, file size, and the capability indication information can be used to indicate the capability of performing storage on the first media data in the second capability.

[0225] Specifically, for the content not elaborated in Figures 9 - 12 reference can be made to the relevant content in Figure 8

[0226] In some embodiments, the first media data can be the second media data created by a second application before the first application starts the first function, and the data format of the second media data is the same as that of the media data processed by the third capability.

[0227] Exemplarily, referring to Figure 4 , the first application can refer to Application A, and the second application can refer to Application B.

[0228] That is to say, the first application and the second application can achieve the sharing of media data through an access mechanism. Different applications can uniformly standardize the media data of the application and achieve the sharing of media data by calling the interfaces provided by the first operating system.

[0229] In some embodiments, the first media data can be obtained by parsing and reconstructing the second media data created by a second application before the first application starts the first function. The data format of the second media data is different from that of the media data processed by the third capability, and the data format of the first media data is the same as that of the media data processed by the third capability.

[0230] Exemplarily, referring to Figure 5 , the first application can refer to Application A, and the second application can refer to Application B.

[0231] ​That is to say, the second application can achieve the sharing of media data through a delegation mechanism. This is because there are some applications that are not adapted to the first operating system and cannot process media data through the first interface, media data interface, second capability, and third capability, nor standardize the format of their media data. In this case, the media data can be directly parsed and reconstructed, and reassembled into media data with a unified format so that other applications can recognize and use the media data, realizing data sharing between applications.

[0232] In some embodiments, the first media data can be media data created by the second application, and the second application does not open the access permission to the first media data. Before the electronic device 100 starts the first function, the electronic device 100 can first access the second application to obtain the permission for the first application to access the first media data. After obtaining the access permission of the second application, the electronic device 100 can start the first function through the first application.

[0233] Exemplarily, see Figure 6 , the first application can refer to Application A, and the second application can refer to Application B.

[0234] That is to say, applications can achieve the sharing of media data through a dynamic mechanism. When an application needs to access media data across applications, it can adopt the query-response method. After obtaining the access permission of the application to the media data, a bridge for sharing media data can be temporarily built to avoid excessive opening and sharing of media data and ensure the security of media data.

[0235] It should be noted that the above-mentioned second application can refer to an application on the electronic device 100. In this way, the electronic device 100 can achieve smooth and simple data sharing between applications through multiple mechanisms. Or, the above-mentioned second application can refer to another electronic device, such as an application on the second electronic device. In this way, the electronic device 100 can achieve smooth and simple data sharing between devices through multiple mechanisms, where the second electronic device can be a device logged in with the same account as the electronic device 100.

[0236] Generally speaking, the data management method provided by the embodiments of the present application can provide a unified media data management platform to standardize the media data of each application, enabling each application to process media data according to unified rules and formats. At the same time, the unified media data management platform realizes the unified management of media data, breaks the application boundaries, makes data sharing between applications and devices more simple and smooth, and improves the user experience of using media data.

[0237] Figure 13 It is a schematic hardware structure diagram of the electronic device 100 provided by the embodiments of the present application.

[0238] The electronic device 100 can be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, as well as a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, a vehicle-mounted device, a smart home device, and / or a smart city device. The embodiments of the present application do not impose any special restrictions on the specific type of the electronic device.

[0239] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0240] It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than those illustrated, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0241] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.

[0242] In some embodiments, the processor 110 can be used to manage the operation of applications and start application functions based on user operations.

[0243] The controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.

[0244] A memory can also be set in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store the instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can directly call it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0245] The wireless communication function of the electronic device 100 can be implemented by the antenna 1, antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor, etc.

[0246] The antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example, the antenna 1 can be multiplexed as the diversity antenna of the wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0247] The mobile communication module 150 may provide a solution for wireless communication including 2G / 3G / 4G / 5G, etc. applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 may receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and then transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modulation and demodulation processor and convert it into electromagnetic waves through the antenna 1 for radiation. In some embodiments, at least some functional modules of the mobile communication module 150 may be provided in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be provided in the same device.

[0248] The modulation and demodulation processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. Subsequently, the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, receiver 170B, etc.), or displays an image or video through the display screen 194. In some embodiments, the modulation and demodulation processor may be an independent device. In other embodiments, the modulation and demodulation processor may be independent of the processor 110 and be provided in the same device as the mobile communication module 150 or other functional modules.

[0249] The wireless communication module 160 may provide solutions for wireless communications applied to the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite systems (GNSSs), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, demodulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 may also receive signals to be transmitted from the processor 110, perform frequency modulation and amplification on them, and convert them into electromagnetic waves through the antenna 2 for radiation.

[0250] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, enabling the electronic device 100 to communicate with the network and other devices through wireless communication technologies.

[0251] The electronic device 100 realizes the display function through the GPU, the display screen 194, and the application processor, etc. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to execute mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.

[0252] The display screen 194 is used to display images, videos, etc. In some embodiments, the electronic device may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0253] In some embodiments, the display screen 194 may be used to display the user interface of an application, and the user interface may include options for starting the application function. The electronic device 100 may detect the operation of the user on the option to realize the start of the application function.

[0254] The electronic device 100 may realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, and the application processor, etc.

[0255] The camera 193 is used to capture static images or videos. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.

[0256] The internal memory 121 may include one or more random access memories (RAMs) and one or more non-volatile memories (NVMs).

[0257] The random access memory can be directly read and written by the processor 110, can be used to store the operating system or executable programs (such as machine instructions) of other running programs, and can also be used to store user and application data, etc.

[0258] The non-volatile memory can also store executable programs and store user and application data, etc., and can be pre-loaded into the random access memory for the processor 110 to directly read and write.

[0259] In some embodiments, the internal memory 121 can be used to store media data and computer programs for implementing the data management method provided in the embodiments of the present application. The media data may include, but is not limited to: text, pictures, audio, and video, etc.

[0260] The electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor, etc. For example, music playback, recording, etc.

[0261] It should be understood that each step in the above method embodiments can be completed by the integrated logic circuit in the hardware of the processor or the instructions in the form of software. The method steps disclosed in combination with the embodiments of the present application can be directly embodied as being executed and completed by the hardware processor, or executed and completed by the combination of the hardware and software modules in the processor.

[0262] The present application also provides an electronic device, which includes: a memory, a processor, and a computer program stored on the memory. The computer program includes a first operating system, and a first application runs on the first operating system. The first operating system provides: a first interface, a media data interface, and a second capability. The first application is a third-party application, and the first application includes program code for calling the first interface. The first interface is used to call the media data interface, and the media data interface encapsulates the second capability. The second capability includes the ability to perform one or more of the following processes on media data: acquisition, encoding, storage, sharing, decoding, and playback. The second capability also includes a third capability, which includes the ability to perform one or more of the following processes on media data: setting the data model of the media data, setting the data type of the media data, managing the life cycle of the media data, managing the security of the media data, and performing distributed management on the media data. The processor executes the computer program to implement the method executed by the electronic device 100 in any of the above embodiments.

[0263] The present application also provides a chip system, which includes at least one processor for implementing the functions involved in the method executed by the electronic device 100 in any of the above embodiments.

[0264] In a possible design, the chip system further includes a memory for storing program instructions and data, and the memory is located inside or outside the processor.

[0265] The chip system may be composed of chips or may include chips and other discrete devices.

[0266] Optionally, the processor in the chip system may be one or more. The processor may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented by software, the processor may be a general-purpose processor that implements by reading software code stored in the memory.

[0267] Optionally, the memory in the chip system may also be one or more. The memory may be integrated with the processor or may be separately arranged from the processor, and the embodiments of the present application do not limit this. Exemplarily, the memory may be a non-transitory processor, such as a read-only memory ROM, which may be integrated with the processor on the same chip or may be separately arranged on different chips. The embodiments of the present application do not specifically limit the type of the memory and the setting manner of the memory and the processor.

[0268] Exemplarily, the chip system may be a field programmable gate array (FPGA), may be an application specific integrated circuit (ASIC), may also be a system on chip (SoC), may also be a central processor unit (CPU), may also be a network processor (NP), may also be a digital signal processor (DSP), may also be a micro controller unit (MCU), may also be a programmable logic device (PLD) or other integrated chip.

[0269] The present application also provides a computer-readable storage medium, on which a computer program (which may also be referred to as code or instruction) is stored. The computer program includes a first operating system, and a first application runs on the first operating system. The first operating system provides: a first interface, a media data interface, and a second capability; the first application is a third-party application, and the first application includes program code for calling the first interface. The first interface is used to call the media data interface, and the media data interface encapsulates the second capability. The second capability includes the capability of performing one or more of the following processes on media data: acquisition, encoding, storage, sharing, decoding, and playing. The second capability further includes a third capability, and the third capability includes the capability of performing one or more of the following processes on media data: setting the data model of the media data, setting the data type of the media data, managing the life cycle of the media data, managing the security of the media data, and performing distributed management on the media data. When the computer program is executed by a processor, it implements the method executed by the electronic device 100 in any of the above embodiments.

[0270] The present application also provides a computer program product. The computer program product includes a computer program (which may also be referred to as code or instructions). The computer program includes a first operating system, and a first application runs on the first operating system. The first operating system provides: a first interface, a media data interface, and a second capability; the first application is a third-party application, and the first application includes program code for calling the first interface. The first interface is used to call the media data interface, and the media data interface encapsulates the second capability. The second capability includes the capability to perform one or more of the following processes on media data: acquisition, encoding, storage, sharing, decoding, and playback. The second capability also includes a third capability, and the third capability includes the capability to perform one or more of the following processes on media data: setting the data model of the media data, setting the data type of the media data, managing the life cycle of the media data, managing the security of the media data, and performing distributed management on the media data. When the computer program is executed by a processor, it implements the method executed by the electronic device 100 in any of the above embodiments.

[0271] It should be understood that the processor in the embodiments of the present application may be an integrated circuit chip with the ability to process signals. In the implementation process, each step of the above method embodiments can be completed by the integrated logic circuit in the hardware of the processor or the instructions in the form of software. The above processor may be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor, or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being executed and completed by the hardware decoding processor, or executed and completed by the combination of the hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. This storage medium is located in the memory, and the processor reads the information in the memory and combines its hardware to complete the steps of the above method.

[0272] In addition, the embodiments of the present application also provide a device. The device may specifically be a component or a module. The device may include one or more processors and a memory connected to each other. Among them, the memory is used to store a computer program. When the computer program is executed by one or more processors, the device executes the methods in the above method embodiments.

[0273] Among them, the devices, computer-readable storage media, computer program products, or chips provided in the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be elaborated here.

[0274] The various embodiments of the present application can be combined arbitrarily to achieve different technical effects.

[0275] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can 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 the computer program instructions are loaded and executed on a computer, the processes or functions described in the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid-state disk (SSD)), etc.

[0276] Those of ordinary skill in the art can understand all or part of the processes in the methods of the above embodiments. These processes can be completed by relevant hardware instructed by a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above method embodiments. The aforementioned storage medium includes: ROM or random access memory RAM, magnetic disks, or optical discs and other media that can store program codes.

[0277] In summary, the above descriptions are only embodiments of the technical solutions of the present application, and are not used to limit the protection scope of the present application. Any modifications, equivalent replacements, improvements, etc. made according to the disclosure of the present application shall be included in the protection scope of the present application.

Claims

1. A data management method, characterized in that, The method is applied to a first electronic device on which a first operating system runs, and a first application runs on the first operating system. The first operating system provides: a first interface, a media data interface, and a second capability. The first application is a third-party application, and the first application includes program code for invoking the first interface. The first interface is used to invoke the media data interface, and the media data interface encapsulates the second capability. The second capability includes the ability to perform one or more of the following processes on media data: acquisition, encoding, storage, sharing, decoding, and playback. The method includes: Displaying a user interface of the first application, where the user interface presents a first option corresponding to the first function: Detecting an operation on the first option; In response to the operation, starting the first function through the first interface, where the first function is used to perform one or more of the following processes on first media data: acquisition, encoding, storage, sharing, decoding, and playback. The second capability further includes a third capability, and during the process of starting the first function, the third capability is used to perform one or more of the following: setting the data type of the first media data, managing the life cycle of the first media data, controlling the security of the first media data, setting the data model of the first media data, and performing distributed management on the first media data.

2. The method according to claim 1, wherein The parameters passed into the first interface include one or more of the following: device name, application name of the first application, and parameters passed in by the first application. The parameters passed in by the first application are the parameters and parameter content of the first function, and the parameter content includes one or more of the following: description information of the first function, the first media data, and indication information of the first media data.

3. The method according to claim 2, wherein: The first function includes a face recognition function, and the parameters passed in by the first application include: parameters of the face recognition function, coordinates of the face, and an image of the face; Or, The first function includes a beauty function, and the parameters passed in by the first application include: parameters of the beauty function, beauty level, and face information.

4. The method according to any one of claims 1 to 3, characterized in that, The parameters passed into the media data interface include: ability indication information, parameters of the first function, and the first media data or indication information of the first media data. The indication information of the first media data is all or part of the parameters passed in by the first application, and / or the indication information of the first media data is determined by the first operating system. The ability indication information is used to indicate the ability invoked by the media data interface in the second capability.

5. The method according to claim 4, wherein: The first function is a photographing function, and the first media data includes one or more of the following: a photographing stream, a preview stream. The ability indication information is used to indicate the ability to perform acquisition on the first media data in the second capability; Or, The first function is an image viewing function, and the first media data includes one or more of the following: large images, thumbnails. The ability indication information is used to indicate the ability to perform storage on the first media data in the second ability; Or, The first function is a music playing function, the first media data is music, and the indication information of the first media data includes one or more of the following: music name, music size, music duration. The ability indication information is used to indicate the ability to perform playback on the first media data in the second ability; Or, The first function is a file creation function or a file deletion function, the first media data is a file, and the indication information of the first media data includes one or more of the following: file name, file owner, file path, file size. The ability indication information is used to indicate the ability to perform storage on the first media data in the second ability.

6. The method according to any one of claims 1-5, characterized in that, The parameters passed into the second ability include: the parameters of the first function, and the first media data or the indication information of the first media data. The indication information of the first media data is all or part of the parameters passed into the first application, and / or the indication information of the first media data is determined by the first operating system.

7. The method according to any one of claims 1-6, characterized in that, The third ability includes: media data type ability, The media data type ability is used to determine the data type of the first media data according to the parameters passed into the first application. The data type is: text, picture, audio or video.

8. The method according to any one of claims 1-7, characterized in that, The third ability includes: data life cycle ability, The data life cycle ability is used to perform one or more of the following: set the expiration date of the first media data, process the first media data when the expiration date of the first media data expires.

9. The method according to any one of claims 1-8, characterized in that, The third ability includes: data security management ability, The data security management ability is used to verify whether the content of the first media data conforms to the preset regulations.

10. The method according to any one of claims 1-9, characterized in that, The third ability includes: unified media data ability. The unified media data ability is used to set the data model of the first media data when part or all of the parameters passed into the first application are null values. The data model of the first media data includes: the parameters of the first function, and the first media data or the indication information of the first media data; The indication information of the first media data is all or part of the parameters passed into the first application, and / or the indication information of the first media data is determined by the first operating system.

11. The method according to any one of claims 1-10, characterized in that, The third ability includes: distributed management ability, The distributed management ability is used to provide the ability to execute the first function on a second electronic device, or to execute the first function through a second application on the first electronic device; The second electronic device and the first electronic device are logged in with the same account.

12. The method according to any one of claims 1-11, characterized in that, The first media data is second media data created by a second application before the first application starts the first function. The data format of the second media data is the same as that of the media data processed by the third ability.

13. The method according to any one of claims 1-11, characterized in that, The first media data is obtained by parsing and reconstructing second media data created by a second application before the first application starts the first function. The data format of the second media data is different from that of the media data processed by the third capability, and the data format of the first media data is the same as that of the media data processed by the third capability.

14. The method according to any one of claims 1-11, characterized in that, The first media data is media data created by a second application, and the second application does not open the access permission to the first media data. Before starting the first function, the method further includes: Asking the second application to obtain the permission for the first application to access the first media data.

15. The method according to any one of claims 12-14, characterized in that, The second application is an application on the first electronic device or the second electronic device.

16. An electronic device, characterized in that, The electronic device includes: a memory, a processor, and a computer program stored on the memory. The computer program includes a first operating system. A first application runs on the first operating system. The first operating system provides: a first interface, a media data interface, and a second capability. The first application is a third-party application, and the first application includes program code for calling the first interface. The first interface is used to call the media data interface. The media data interface encapsulates a second capability. The second capability includes the capability to perform one or more of the following processes on media data: acquisition, encoding, storage, sharing, decoding, and playing. The second capability further includes a third capability. The third capability includes the capability to perform one or more of the following processes on media data: setting the data model of media data, setting the data type of media data, managing the life cycle of media data, managing the security of media data, and performing distributed management of media data. The processor executes the computer program to implement the method according to any one of claims 1-15.

17. A computer-readable storage medium, characterized in that, A computer program is stored thereon. The computer program includes a first operating system. A first application runs on the first operating system. The first operating system provides: a first interface, a media data interface, a second capability, and a third capability. The first application is a third-party application, and the first application includes program code for calling the first interface. The first interface is used to call the media data interface. The media data interface encapsulates a second capability. The second capability includes the capability to perform one or more of the following processes on media data: acquisition, encoding, storage, sharing, decoding, and playing. The second capability further includes a third capability. The third capability includes the capability to perform one or more of the following processes on media data: setting the data model of media data, setting the data type of media data, managing the life cycle of media data, managing the security of media data, and performing distributed management of media data. When the computer program is executed by the processor, it implements the method according to any one of claims 1-15.

18. A computer program product, characterized in that, The computer program product includes a computer program, the computer program includes a first operating system, a first application runs on the first operating system, and the first operating system provides: a first interface, a media data interface, and a second capability; the first application is a third-party application, the first application includes program code for calling the first interface, the first interface is used to call the media data interface, the media data interface encapsulates the second capability, and the second capability includes the capability to perform one or more of the following processes on media data: acquisition, encoding, storage, sharing, decoding, and playback. The second capability further includes the third capability, and the third capability includes the capability to perform one or more of the following processes on media data: setting the data model of media data, setting the data type of media data, managing the life cycle of media data, managing the security of media data, and performing distributed management on media data. When the computer program is executed by a processor, it implements the method according to any one of claims 1-15.

Citation Information

Patent Citations

  • File management method and device and mobile terminal

    CN107122429A

  • Application data processing method and related device

    CN111061524A

  • Sub-application operation control method and device, storage medium and electronic equipment

    CN112559069A

  • Data synchronization method and device

    CN114691631A

  • Multimedia editing method, electronic equipment and storage medium

    CN115016871A

Cited By

  • Data management method and electronic device

    EP4614319A1