Data management method and electronic device

The unified media framework solves the problem of independent media data management for various applications on electronic devices, enabling standardized and unified data management and convenient sharing, thereby improving the user experience.

CN120255984BActive Publication Date: 2026-03-27HUAWEI TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

In the existing technology, the media data management of each application in electronic devices is independent and isolated, which leads to complex data sharing, chaotic formats, and an inability to manage systematically from a global perspective, thus reducing the user experience.

Method used

It adopts a unified media framework and provides a unified media data management platform. Through interfaces, capabilities and mechanisms, it realizes the standardized and unified management of media data, including the unified processing of processes such as acquisition, encoding, storage, sharing, decoding and playback, breaking down the data boundaries between applications and devices.

Benefits of technology

It enables unified management of media data across applications, improves user experience, simplifies data sharing processes, ensures data format uniformity and security, and supports convenient sharing across applications and devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120255984B_ABST
    Figure CN120255984B_ABST
Patent Text Reader

Abstract

The application discloses a data management method and an electronic device. An operating system of the electronic device can provide a unified interface and capability for an application to call when starting a function, and implement collection, encoding, storage, sharing, decoding and playing of media data and the like, so that the application can standardize, unify and facilitate management of the media data through the unified interface and capability provided by the operating system of the electronic device in a running process, media data is controlled by respective data management systems of the applications, the boundary of the media data in the applications and the device is broken, and the use experience of the user for the media data is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of terminals and computers, and in particular to a data management method and an electronic device. BACKGROUND

[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 audio are generated in electronic devices. SUMMARY

[0003] The present application provides a data management method and an electronic device, which realizes standardized, unified, and convenient management of media data.

[0004] In a first aspect, an embodiment of the present application provides a data management method, which is applied to a first electronic device, the first electronic device runs a first operating system, a first application runs in 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 of performing 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, the user interface presents a first option corresponding to a first function; detecting an operation acting on the first option; and in response to the operation, starting the first function through the first interface, wherein the first function is used to perform one or more of the following processes on the first media data: collection, encoding, storage, sharing, decoding, and playing, and the second capability further includes a third capability, and in the process of starting the first function, the third capability is used to perform one or more of the following: setting a data type of the first media data, managing a life cycle of the first media data, controlling security of the first media data, setting a data model of the first media data, and performing distributed management on the first media data.

[0005] The method provided by the first aspect can provide a unified media data management platform to realize unified management of media data, so that the application can process the media data according to unified rules and formats, avoid controlling the media data according to its own data management system, break the boundaries of media data in the application and the device, and improve the user experience of using the media data.

[0006] In a possible implementation manner of the first aspect, the parameters transmitted by the first interface include one or more of the following: a device name, an application name of the first application, and parameters transmitted by the first application, wherein the parameters transmitted by the first application are parameters of the first function and parameter content, 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.

[0007] In a possible implementation manner of the first aspect, the first function includes a face recognition function, and the parameters transmitted by the first application include: parameters of the face recognition function, coordinates of a face, and an image of the face; or the first function includes a beautifying function, and the parameters transmitted by the first application include: parameters of the beautifying function, a beautifying level, and face information.

[0008] In a possible implementation manner of the first aspect, the parameters transmitted by 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, the indication information of the first media data is all or part of the parameters transmitted 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 a capability of the media data interface in the second capability.

[0009] In a possible implementation manner of the first aspect, the first function is a photographing function, the first media data includes one or more of the following: a photographing stream and a preview stream, and the capability indication information is used to indicate a capability of performing collection on the first media data in the second capability; or the first function is a picture viewing function, the first media data includes one or more of the following: a large picture and a thumbnail, and the capability indication information is used to indicate a capability of performing storage on the first media data in the second capability; or the first function is a music playing function, the first media data is music, the indication information of the first media data includes one or more of the following: a music name, a music size, and a music duration, and the capability indication information is used to indicate a capability of performing playing on the first media data in the second capability; or the first function is a file creating function or a file deleting function, the first media data is a file, the indication information of the first media data includes one or more of the following: a file name, a file owner, a file path, and a file size, and the capability indication information is used to indicate a capability of performing storage on the first media data in the second capability.

[0010] In a possible implementation manner of the first aspect, the parameters transmitted by the second capability include: 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 transmitted by the first application, and / or the indication information of the first media data is determined by the first operating system.

[0011] In a possible implementation manner of the first aspect, the third capability includes: a media data type capability, the media data type capability being used to determine a data type of the first media data according to the parameters input by the first application, the data type being text, picture, audio or video.

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

[0013] In a possible implementation manner of the first aspect, the third capability includes: a data life cycle capability, the data life cycle capability being used to perform one or more of the following: setting an effective period of the first media data, processing the first media data when the effective period of the first media data expires.

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

[0015] In a possible implementation manner of the first aspect, the third capability includes: a data security management capability, the data security management capability being used to verify whether the content of the first media data conforms to a preset regulation.

[0016] It can be seen that the security of the media data of each application can be controlled by a unified rule by the data security management capability, the security of the user using the media data is improved, and the risk of media data leakage or appearance of illegal information is reduced.

[0017] In a possible implementation manner of the first aspect, the third capability includes: a unified media data capability, the unified media data capability being used to set a data model of the first media data in a case where part or all of the parameters input by the first application are null, the data model of the first media data including: 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 input 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 the media data transmitted by each application when starting a function can be uniformly standardized by the unified media data capability, the media data of each application can maintain a unified and standardized data format, the problem of data fragmentation between applications and devices is solved, and a foundation is laid for smooth data sharing between applications and devices.

[0019] In a possible implementation manner of the first aspect, the third capability includes a distributed management capability, and the distributed management capability is used to provide a capability of executing the first function on the second electronic device or executing the first function by the second application on the first electronic device, and the second electronic device and the first electronic device are logged in a same account.

[0020] It can be seen that, by using the distributed management capability, the boundary of the media data between applications and between devices can be broken, and the media data can be conveniently and smoothly shared between multiple applications and multiple devices.

[0021] In a possible implementation manner of the first aspect, the first media data is second media data created by the second application before the first function is started by the first application, and the second media data has a same data format as the media data processed by the third capability.

[0022] That is, the first application and the second application can share the media data by using the access mechanism. Different applications can call the interface provided by the first operating system to uniformly standardize the media data of the applications and to share the media data.

[0023] In a possible implementation manner of the first aspect, the first media data is second media data created by the second application before the first function is started by the first application, and the second media data has a same data format as the media data processed by the third capability.

[0024] That is, the second application can share the media data by using the delegation mechanism. This is because some applications are not adapted to the first operating system, and cannot process the media data by using the first interface, the media data interface, the second capability and the third capability to standardize the format of the media data. Therefore, the media data can be directly parsed and reconstructed to be reassembled into media data with a uniform format, so that other applications can recognize and use the media data, and data sharing between applications can be implemented.

[0025] In a possible implementation manner of the first aspect, the first media data is media data created by the second application, and the second application does not open an access permission of the first media data; before the first function is started, the method further includes querying the second application to obtain a permission of the first application to access the first media data.

[0026] That is, the media data can be shared between applications through a dynamic mechanism. When an application needs to access the media data across applications, the application can use a query response manner to obtain access permission of the media data from the application, and then temporarily build a bridge for sharing the media data, so as to avoid excessive opening and sharing of the media data and ensure the security of the media data.

[0027] With reference to the first aspect, in a possible implementation, the second application is an application on the first electronic device or the second electronic device.

[0028] For example, the second electronic device can be a device that has the same account as the first electronic device.

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

[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 in the memory. The computer program includes a first operating system, and the first operating system runs a first application. 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 the media data: collecting, encoding, storing, 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 the media data: setting a data model of the media data, setting a data type of the media data, managing a life cycle of the media data, managing 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 of the implementation manners of the first aspect.

[0031] In a third aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program comprises a first operating system, the first operating system runs a first application, and 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, the first application comprises program code for calling the first interface, the first interface is used for calling the media data interface, the media data interface encapsulates the second capability, the second capability comprises capability for performing one or more of the following processes on media data: collection, encoding, storage, sharing, decoding, and playing, the second capability further comprises the third capability, and the third capability comprises capability for performing one or more of the following processes on media data: setting a data model of the media data, setting a data type of the media data, managing a life cycle of the media data, managing security of the media data, and performing distributed management on the media data. The computer program is executed by a processor to implement the method described in the first aspect or any of the implementation manners of the first aspect.

[0032] In a fourth aspect, an embodiment of the present application provides a computer program product, which comprises a computer program, and the computer program comprises a first operating system, the first operating system runs a first application, 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 comprises program code for calling the first interface, the first interface is used for calling the media data interface, the media data interface encapsulates the second capability, the second capability comprises capability for performing one or more of the following processes on media data: collection, encoding, storage, sharing, decoding, and playing, the second capability further comprises the third capability, and the third capability comprises capability for performing one or more of the following processes on media data: setting a data model of the media data, setting a data type of the media data, managing a life cycle of the media data, managing security of the media data, and performing distributed management on the media data. The computer program is executed by a processor to implement the method described in the first aspect or any of the implementation manners of the first aspect. BRIEF DESCRIPTION OF DRAWINGS

[0033] Figure 1 A distinction diagram of 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 software architecture diagram of an electronic device 100 provided by an embodiment of the present application;

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

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

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

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

[0039] Figure 5 The data sharing principle diagram between applications under the delegation mechanism provided for the embodiments of the present application;

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

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

[0042] Figure 8 The interface calling diagram in the operating system when the electronic device 100 realizes the photographing function through the camera application provided for the embodiments of the present application;

[0043] Figure 9 The interface calling diagram in the operating system when the electronic device 100 realizes the picture viewing function through the gallery application provided for the embodiments of the present application;

[0044] Figure 10 The interface calling diagram in the operating system when the electronic device 100 realizes the music playing function through the music application provided for the embodiments of the present application;

[0045] Figure 11 The interface calling diagram in the operating system when the electronic device 100 realizes the file creating function through the storage class application provided for the embodiments of the present application;

[0046] Figure 12 The interface calling diagram in the operating system when the electronic device 100 realizes the file deleting function through the storage class application provided for the embodiments of the present application;

[0047] Figure 13 The hardware structure diagram of the electronic device 100 provided for the embodiments of the present application. DETAILED DESCRIPTION

[0048] The technical solutions in the embodiments of the present application will be described clearly and thoroughly below with reference to the drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " represents the meaning of or, for example, A / B can represent A or B; the "and / or" in the text only describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which means that there are three cases of A alone, A and B together, and B alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0049] Hereinafter, the terms "first" and "second" are used only for descriptive purposes, and cannot be understood as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with "first" and "second" can explicitly or implicitly include one or more features. In the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" is two or more than two.

[0050] Nowadays, multiple applications can be installed on electronic devices to meet different use requirements of users, but each application has its own data management system, so that the media data between applications and devices is independent, isolated and not unified.

[0051] For example, for a picture M obtained by a camera application, the picture M can be viewed and processed, such as modified or deleted, by a gallery application or an instant messaging application. However, since the gallery application and the instant messaging application each have a set of data management systems, the gallery application may perform an operation on the picture M1.0 when processing the picture M, and the instant messaging application may perform an operation on the picture M2.0 when processing the picture M. In this way, although the picture M can be viewed by the gallery application and the instant messaging application, the operations on the picture M in the gallery application, such as deletion, modification, viewing, etc., are operations on the picture M1.0 and do not affect the picture M2.0. That is, even if the user initiates deletion of the 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 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 a user downloads a video N to the local through a video playing software 1, but when viewing the local video through a video playing software 2, the video N cannot be viewed.

[0053] It is evident that the independent data management systems of each application lead to problems such as complex operations, chaotic data formats, and confusing interfaces in data sharing and information sharing between applications. Electronic devices cannot systematically manage the media data of applications from a global perspective, which reduces the user experience.

[0054] Therefore, how to manage the media data of various applications in electronic devices is an urgent problem to be solved.

[0055] This application provides a data management method. This method is implemented under the unified media framework constructed in this application, so that each application can manage media data in a standardized, unified and convenient manner through the unified media framework during operation, thereby solving problems such as application silos and data fragmentation.

[0056] The data management method provided in this application involves unified management of media data from generation to destruction, including collection, encoding, storage, sharing, decoding, and playback. This avoids each application controlling media data according to its own data management system, breaks down the boundaries of media data in applications and devices, and improves the user experience of media data.

[0057] Figure 1 This is a schematic diagram illustrating the difference between a data processing method and the data management method provided in the embodiments of this application.

[0058] in, Figure 1 Image (a) shows a schematic diagram illustrating the principle of a data processing method. Figure 1 Figure (b) shows a schematic diagram illustrating the principle of the data management method provided in the embodiments of this application.

[0059] like Figure 1 As shown in (a), any application—whether a system application, a self-developed application, or a third-party application—can select the appropriate framework capabilities to process media data from databases, memory, and files based on its business requirements. For example, system applications and self-developed applications process media data from databases through different interface capabilities. Therefore, this method lacks a unified management strategy for media data across different applications.

[0060] like Figure 1 As shown in (b), any application, including system applications, self-developed applications, and third-party applications, uses the unified media framework to realize operations such as the production, use, sale, and recovery of media data in databases, memory data, and files. It provides a unified media data management interface for application development, and the interface capability can cover single-device and multi-device combination scenarios, providing a unified system framework capability for the diversion and display of media data between different applications.

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

[0062] The electronic device can be a portable terminal device, such as a mobile phone, a tablet computer, a wearable device, and the like, running HarmonyOS, iOS, Android, Microsoft, or other operating systems. The electronic device can also be a non-portable terminal device, such as a laptop computer having a touch-sensitive surface or touch panel, a desktop computer having a touch-sensitive surface or touch panel, and the like. 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. Embodiments of the present application take the layered architecture of HarmonyOS as an example to exemplarily illustrate the software structure of the electronic device 100.

[0063] Figure 2A A software architecture diagram of the electronic device 100 provided by the embodiments of the present application is shown.

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

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

[0066] The application layer can include a series of application packages. For example, camera, calendar, map, music, SMS, gallery, communication, navigation, Bluetooth, video, and the like.

[0067] As Figure 2A shown, the application package can include a camera application, a gallery application, a music application, and a video application. The camera application can be used to collect media data such as pictures and videos, the gallery application can be used to view, modify, delete, or share media files such as pictures and videos, 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 video.

[0068] It should be understood that the camera application can refer to a collective name of one or more applications with photographing functions. That is, one or more camera applications, such as a system camera application, a self-developed camera application, a third-party camera application, and the like, can be included in the application package of the electronic device 100. Other application categories, such as a gallery application, a music application, and a video application, are similar and will not be described here.

[0069] The application framework layer provides an application programming interface (API) and a programming framework for the applications of the application layer. The application framework layer includes some pre-defined functions. The application framework layer can also include modules such as a window manager, a content provider, a view system, a phone manager, a resource manager, and the like, which will not be described here.

[0070] As shown in Figure 2A The application framework layer can include a camera function interface (PhotoMode), an editing function interface (EditMode), a storage function interface (StorageMode), a sharing function interface (ShareMode), a playing function interface (PlayMode), a file management function interface (FileManageMode), and the like, which 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). The PhotoModePicker can encapsulate a plurality of photographing function interfaces. One photographing function interface can be used to start one photographing function, which can be a photographing function, a video recording function, a night scene function, a portrait function, an aperture function, a time-lapse photography function, an AI scene recognition function, a code scanning function, a face recognition function, a face interaction function, and the like. The PhotoModePicker can select a corresponding interface from the plurality of photographing function interfaces according to an application input parameter.

[0072] For example, when the electronic device 100 starts a portrait photographing through an application with photographing function, i.e., a camera application, the camera application can call the PhotoModePicker and pass an application input parameter. For example, the parameter is used for a front camera for photographing. Through the parameter, the PhotoModePicker can select a photographing function interface corresponding to the portrait function to realize the photographing function of the camera application.

[0073] It should be understood that other function interface classes such as EditMode, StorageMode, and the like are similar to the description of PhotoMode, and will not be described here.

[0074] It can be seen that the application framework layer can provide a unified interface for multiple applications in the application layer to call, so that the multiple applications can implement the same function. For example, the system camera application and the third-party application can both call PhotoMode to implement the photographing function, compared to different applications calling different interfaces, the problem of interface confusion during application running is solved.

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

[0076] Exemplarily, MediaDataKit can be used to implement querying, generating, saving, deleting, synchronizing, and listening to changes of media data, and the like. Among them, querying media data refers to the ability of MediaDataKit to query media data according to conditions, generating media data refers to the ability of MediaDataKit to generate media data of a specified type, saving media data refers to the ability of MediaDataKit to save media data, deleting media data refers to the ability of MediaDataKit to delete media data of a specified condition, synchronizing data refers to the ability of MediaDataKit to synchronize media data end-to-end to ensure consistency of data between devices, and listening to changes in media data refers to the ability of MediaDataKit to listen to changes in a specified type or specified media data.

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

[0078] The actions performed on media, whether they include acquisition, encoding, storage, sharing, decoding, or playback, can be determined by the functions initiated by the application. For example, if a camera application initiates camera functions, the operations performed on media data can include acquisition. Similarly, if a video application initiates playback functions, the operations performed on media data can include playback.

[0079] Combination Figure 2A The software architecture shown allows the electronic device 100 to detect when a user views a video through the gallery application. The gallery application then calls the PlayMode interface, which in turn calls MediaDataKit. MediaDataKit determines that the operation performed on the media data is "play" based on PlayMode. Therefore, MediaDataKit then calls the playback capability to play the video.

[0080] In addition, the application framework layer can also include capabilities such as media data types, data lifecycle, data security management, unified media data, and distributed management. Among these:

[0081] The Media Data Type capability allows you to set the data type of media data so that media data from various applications maintains a consistent data type after unified processing. This data type can include text, images, audio, video, etc. Specifically, the Media Data Type capability can determine the data type of media data based on the information passed from the application. If the Media Data Type capability is invoked by the capture capability, the data type can be determined based on the data type of the media data captured by the application. For example, if a camera application initiates its image capture function, it will invoke the capture capability to capture an image; the captured media data type is thus an image, and therefore, the unified media data data type can be set to an image. Similarly, if the Media Data Type capability is invoked by the encoding capability, the data type can be determined based on the data type of the media data encoded by the application; if it is invoked by the storage capability, the data type can be determined based on the data type of the media data stored by the application; if it is invoked by the sharing capability, the data type can be determined based on the data type of the media data shared by the application; if it is invoked by the decoding capability, the data type can be determined based on the data type of the media data decoded by the application; and if it is invoked by the playback capability, the data type can be determined based on the data type of the media data played by the application.

[0082] It can be seen that the media data types capability can realize that 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 of each application is no longer discretely distributed, and the unified management of various media data in the system is facilitated.

[0083] The data life cycle capability can be used to manage the life cycle of the media data. Specifically, the data life cycle capability can be used to set the validity period of the media data, and handle the media data when the validity period of the media data expires. The handling of the media data can refer to deleting the media data or extending the validity period of the media data. For example, the data life cycle capability can customize different validity periods for different media data, or manage the life cycle of the media data of different applications in units of applications, for example, set the media data to exist permanently, or set the media data to update regularly, or set the media data to be deleted or extended after expiration, and the like.

[0084] It can be seen that the data life cycle capability can uniformly control the entire process from generation to disappearance of the media data of different applications, so that the media data of each application can be eliminated according to a unified rule, and the generation of garbage data in the system is reduced.

[0085] The data security management capability can be used to uniformly manage the security of the media data, specifically including checking the rationality, compliance and legality of the media data, and controlling the validity period of the media data. For example, the data security management capability can be used to verify whether the content of the media data conforms to the preset regulations. If it conforms, it means that the media data is safe, and if it does not conform, it means that the media data has security risks.

[0086] It can be seen that the data security management capability can realize the unified control of the security of the media data of each application through a unified rule, improve the security of the user using the media data, and reduce the risk of media data leakage or the appearance of illegal information, and the like.

[0087] The unified media data capability can be used to provide a standardized data model and a specification model parameter, so as to realize the unification and standardization of the media data. 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. 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 the application transmits a parameter with a null value, the data model can be set to fill in the parameter in the data model. For example, if a parameter in the parameter transmitted by the application is a null value, the operating system can automatically fill in the parameter with a default value. The specification model parameter can include the specific value of the parameter included in the data model. For example, if the parameter transmitted by the application includes the duration of music, and the duration is a negative number, it means that the model parameter is not standardized, and the value of the parameter needs to be adjusted.

[0088] It can be seen that the unified media data capability can unify the media data transmitted by each application when starting a function, 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 a foundation for smooth data sharing between applications and devices.

[0089] The distributed management capability can be used for distributed management of media data, synchronization of media data between applications and devices, and management of cross-application and cross-device sharing of media data. Specifically, the distributed management capability can be used to provide the capability of processing media data on other applications or other devices, where the other devices can refer to devices that log in to the same account as the electronic device 100. For example, if an application calls a storage function interface to store media data, if the local end cannot store the media data due to insufficient storage space, the distributed management capability can be called to store the media data on a remote end. For example, the distributed management capability can be used to realize cross-device synchronization of media data based on a relational database (RDB). The RDB is a relational database that organizes 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 that stores the media data.

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

[0091] The unified media framework provided by the embodiments of the present application can include Figure 2A all interfaces and capabilities in the application framework layer shown in the figure. In other embodiments of the present application, the names of the unified media framework and the above-mentioned interfaces or capabilities can be other, and the embodiments of the present application do not limit this. For example, the unified media framework can also be referred to as a unified media management framework. In addition, in the unified media framework, the function interfaces that can be directly called by the application can be more or less than Figure 2A the function interfaces shown in the figure, and the capabilities called by the media data interface can be more or less than Figure 2A the capabilities shown in the figure, and the embodiments of the present application do not limit this.

[0092] It can be seen that the unified media framework provided in the embodiments of the present application layers the interface and the service, so that the application developer only needs to focus on the function provided by the interface and does not need to focus on the complex implementation of the underlying command, and meanwhile, the same interface provided in the unified media framework can be called by each application to implement the same function, so that the media data between different applications, the media data between different devices and media data of different types can be quickly, efficiently and conveniently controlled.

[0093] As shown in Figure 2A , the service layer can include a data type service, a life cycle service, a data security service, a unified data service and a distributed management service. The data type service can be used to provide a business logic related to a specification media data type, the life cycle service can be used to provide a business logic related to management of a media data life cycle, the data security service can be used to provide a business logic related to management of media data security, the unified data service can be used to provide a business logic related to unified media data, and the distributed management service can be used to provide a business logic related to management of media data distributed management.

[0094] The kernel layer is a layer between hardware and software. The kernel layer can include a display driver, a camera driver, an audio driver, a sensor driver and the like. As shown in Figure 2A , the kernel layer can include a memory storage driver, a disk storage driver, a persistent storage driver and a distributed storage driver. The memory storage refers to a storage mode of storing media data to a memory, the disk storage refers to a storage mode of storing media data to a disk, the persistent storage refers to a storage mode of saving transient data in the memory as persistent data, for example, saving to a database or a hard disk, avoiding data loss due to device power failure or application program closing, and the distributed storage refers to a storage mode of saving media data across devices.

[0095] It can be understood that the unified media framework provided in 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 and the like. The resident service can be regarded as a resident process which is always started after the electronic device is powered on.

[0096] Figure 2B The relationship between the modules in the software architecture shown in Figure 2A is shown taking the processing of media data as an example.

[0097] As shown in Figure 2B , the business invoker can be an application in the application program layer shown in Figure 2A , for example, a camera application, a gallery application, a music application, a video application and the like.

[0098] If a service invoker initiates a service call for performing collection of media data, the whole service call process needs to provide collection capability, media data interface, whole life cycle management and control of unified data, and support of data across devices and support of data across applications by the software framework, wherein the processing of data across devices and data across applications can be implemented by the distributed management capability in the software architecture shown in Figure 2A .

[0099] In addition, the media data interface needs to be able to support unified data model and management and control of data life cycle, wherein the unified data model can be provided by the unified media data capability shown in Figure 2A , and the management and control of data life cycle can be implemented by the data life cycle capability shown in Figure 2A .

[0100] Further, the unified data model needs to take into account various characteristics and types of data, which can include database, memory data, and file, etc., therefore, the unified data model should be able to provide unified data model for persistent data, memory data, database data, file library data, etc., to unify and standardize different types of media data, to guarantee the uniformity of data sharing between applications, in addition, the unified data model also needs to support data security, which can be managed by the data security management capability shown in Figure 2A .

[0101] It should be understood that when encoding, storing, sharing, decoding, playing, etc. of media data, similar factors need to be considered in the service call process, which are described above in Figure 2B , and will not be repeated here.

[0102] In order to better understand the calling relationship of interfaces in the software architecture shown in Figure 2A , an interface calling relationship diagram is exemplarily shown in Figure 2C .

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

[0104] The application can detect a user operation, trigger starting a certain function, which can be used to perform one or more of the following processes on certain media data: acquisition, encoding, storage, sharing, decoding and playing.

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

[0106] The XXMode interface is in the form of 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 corresponding function can be started by the local device in response to the operation detected by the application, and if the device name is the device name of the remote device, the corresponding function can be started by the remote device 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 the 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] The parameters passed in by the application can be in the form of parameter (key) - parameter content (value), where the parameter (key) is the parameter of the function started by the application, which is used to indicate the function started by the application. For example, the 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] The key and value can constitute a pair of key values, one key can correspond to one or more values, and the key and value passed in the XXMode interface can include one or more pairs, such as key1, value1, key2, value2.

[0112] For example, if the function started by the application includes a face recognition function, the data required by the face recognition function can include one or more of the following: coordinate information of the face, an image of the face, and the like. For another example, if the function started by the application includes a beauty function, the data required by the beauty function can include one or more of the following: a beauty level, face information, and the like. For another example, if the function started by the application includes a camera starting function, the data required by the camera starting function can include camera information for indicating a camera turned on in the device, such as a front camera, a rear camera, a telephoto camera, a wide-angle camera, and the like.

[0113] An extension field (extend) can be used for pre-embedding capabilities or differentiated capability construction.

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

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

[0116] A type (type) indicates a processing type performed on media data. The type can include, but is not limited to, the following: normal, acquisition, code, storage, share, decode, play, other, and the like. Among them, the type can be determined according to a previous interface calling the MediaDataKit, for example, the previous interface is a PhotoMode interface, and the electronic device can determine that the current needs to start a photographing function, and performs acquisition processing on media data, and thus is regarded as an acquisition type.

[0117] An indication parameter (key) of a function point, used for indicating a started function point, can be obtained from a parameter input by the XXMode interface, or determined by a name of the XXMode interface.

[0118] A value (value) required by the function point, used for indicating data required for implementing the function point, can be obtained from a parameter input by the XXMode interface, and if the parameter input by the XXMode interface cannot be obtained, the value can be determined by an operating system.

[0119] An extension field (extend) can be used for pre-embedding capabilities or differentiated capability construction.

[0120] After the MediaDataKit interface is invoked, other interfaces provided by the framework layer can be continuously invoked according to the type, for example, if the type is collection, the collection capability can be invoked to realize collection of the media data, if the type is encoding, the encoding capability can be invoked to realize encoding of the media data, if the type is storage, the storage capability can be invoked to realize storage of the media data, if the type is sharing, the sharing capability can be invoked to realize sharing of the media data, if the type is decoding, the decoding capability can be invoked to realize decoding of the media data, and if the type is playing, the playing capability can be invoked to realize playing of the media data. The parameters passed by the collection, encoding, storage, sharing, decoding or playing capability can include key, value and extend.

[0121] In the process of invoking any one of the collection, encoding, storage, sharing, decoding or playing capability, the unified media data, media data type, data life cycle, data security management and distributed management capabilities can also be invoked to realize standardization and unification of the media data. The media data type capability can be used to determine the data type of the media data, the data life cycle capability can be used to determine the life cycle of the media data, the data security management capability can be used to manage the security of the media data, the unified media data capability can be used to standardize the data model of the media data, the data model being the indication parameter (key) of the function point and the value required by the function point, and the distributed management capability can be used to provide distributed management for the media data.

[0122] In some embodiments, in the process of invoking any one of the collection, encoding, storage, sharing, decoding or playing capability, only part of the unified media data, media data type, data life cycle, data security management and distributed management capabilities can be invoked, and the specific part can be 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 capability does not need to be invoked.

[0123] In some embodiments, after the XX Mode interface is invoked, other framework layer capabilities under the MediaDataKit can be directly invoked to realize the function started by the application.

[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 correspond to a plurality of interfaces with more detailed functions, so that the XXMode interface can select a suitable interface from the plurality of interfaces for calling.

[0125] After the framework layer interface is called, the service layer and the kernel layer interfaces are called in turn to implement corresponding shooting functions.

[0126] Specifically, the detailed examples of Figure 2C can be found in the subsequent 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 refers to that an application can actively access the MediaDataKit provided by the unified media framework to implement the collection, encoding, storage, sharing, decoding and playing of media data and the like.

[0130] In this way, the unified management of media data can be implemented according to the unified interface provided by the unified media framework, and as long as the application processes the media data according to the access mechanism, this part of data belongs to the data that the application opens to other applications, and other applications can obtain and use the media data through the unified media framework to realize the sharing of media data between applications.

[0131] 2) Delegation mechanism

[0132] The delegation mechanism refers to that the application does not access the MediaDataKit provided by the unified media framework to complete the collection, encoding, storage, sharing, decoding and playing of media data, and the media data of the application is not originally the data that is uniformly standardized according to the unified media framework, so whether to parse and reconstruct this part of media data into the data uniformly standardized by the unified media framework can be determined according to whether the application authorizes.

[0133] If the application is granted, the media data of the application can be parsed and reconstructed into data in the unified media framework unified specification, so that this part of the media data can be reassembled into data that can be recognized and used by other applications, and this part of the media data can be regarded as data opened by the application for use by other applications. Other applications can obtain and use the media data through the unified media framework, thereby realizing sharing of media data between applications. If the application is not granted, the media data of the application cannot be parsed and reconstructed into data in the unified media framework unified specification, 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 introduced to ensure the security of the media data and avoid excessive opening or sharing of the media data by the application. Under the dynamic mechanism, the opening and sharing of the media data between applications can be realized through the "query and response" mode. When an application (referred to as application A below) needs to use the media data of other applications, the application A can query through the unified media framework whether there is an application (referred to as application B below) that can share the media data. If there is an application B that can share the media data, the application B can respond to the query request through the unified media framework and open the media data to the application A, so that the application A can use the media data and realize sharing of the data between applications. Moreover, the media data opened this time is only for the query of the application A this time, and when the application A or other applications need to use the media data again next time, the "query and response" mode needs to be used again to inquire the application B.

[0136] In this way, for the media data between applications, the "query and response" mode needs to be used to complete the sharing of the data between applications.

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

[0138] Figure 3 The principle diagram of sharing of the data between applications under the existing mechanism is shown.

[0139] As shown in Figure 3 , the data in the application can be generally divided into private data and shared data. The private data is data used by the application internally, and other applications cannot access or use the private data. The shared data is data that can be accessed and used by other applications.

[0140] Since each application has a data management system under the existing mechanism, to manage its own media data, assuming that the shared data of application A includes media data X1.0, if application B wants to access and use the 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 application A on the media data X is the processing of the media data X1.0, and the processing of application B on the media data X is the processing of the media data X2.0. For example, if application A initiates deletion of the media data X, application A can only delete the media data X1.0 in its own application directory, and cannot delete the media data X2.0 in the application directory of application B. Similarly, if application B initiates deletion of the media data X, application B can only delete the media data X2.0 in its own application directory, and cannot delete the media data X1.0 in the application directory of application A.

[0141] As can be seen, under the existing mechanism, the media data between applications is independent, isolated, and not unified, resulting in complex and fragmented operations of the user on the media data, such as management, viewing, adding, deleting, and modifying, and the applications cannot achieve smooth and simple data sharing.

[0142] Figure 4 The access mechanism provided by the embodiments of the present application is shown in the principle diagram of data sharing between applications.

[0143] As shown in Figure 4 application A and application B can both access the unified media framework to achieve unified management of shared data. Whether it is application A or application B, when performing processing on the media data, as long as the MediaDataKit is accessed, the media data of different applications can have the same data format, and are all controlled by the unified media framework. This media data can be referred to as unified data.

[0144] Taking the media data X contained in the unified data as an example, assuming that the media data X is the media data processed by application A after accessing the MediaDataKit, the media data is the data opened by application A for other applications to use. Other applications, such as application B, can also access the MediaDataKit to access and use the media data X.

[0145] For example, assuming that application A is a camera application, application B is a video call application, and the media data X is an image preview stream collected by application A. Since the video call function of application B needs to start the camera and collect the image preview stream, application B can directly use the image preview stream collected by application A in the process of collecting the image preview stream by application A, to achieve media data sharing between applications. In this way, the electronic device can run two applications that need to use the camera at the same time, improving the user experience.

[0146] Figure 5 This is a schematic diagram illustrating the data sharing principle between applications under the delegation mechanism provided in this application embodiment.

[0147] Considering that the application may not need to process media data according to a unified media framework during operation, the application's media data may still be managed according to its own data management system.

[0148] like Figure 5 As shown, application A is an application that processes media data according to the unified media framework, while application B is not an application that processes media data according to the unified media framework.

[0149] Under the delegation mechanism, if, at the instruction of application B, application B's shared data contains data that is willing to be unified, this portion of data can be parsed and reconstructed, transforming it into data with the same format as the unified data—that is, reassembled into data that other applications can recognize and use. In this way, other applications that process media data according to the unified media framework, such as application A, can access and use this data by connecting to MediaDataKit.

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

[0151] like Figure 6 As shown, application A is an application that processes media data according to the unified media framework, while application B is not an application that processes media data according to the unified media framework.

[0152] Under the dynamic mechanism, when application A wants to use media data from other applications, it can send a query request to the Unified Media Framework, requesting the media data from other applications. The Unified Media Framework then forwards the query request to the other applications. If application B responds, application B and application A can establish a dynamic channel, temporarily opening up the sharing of media data X. The Unified Media Framework can parse and reconstruct media data X on this dynamic channel, converting it into data with the same format as Unified Data. In this way, application A can access and use media data X by connecting to MediaDataKit on this dynamic channel. Furthermore, the dynamic channel will be closed after this sharing ends. If application A or other applications want to use media data X again, they need to re-establish the dynamic channel through the query-response mechanism.

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

[0154] In some embodiments, the application B can be an application that processes media data according to the unified media framework, in which case, before accessing media data across applications based on the access mechanism, the permission of the application to access the media data needs to be obtained by querying the application.

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

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

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

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

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

[0160] For example, 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 be a camera application, a gallery application, a music application, a video application, etc.

[0161] ​The first media data can include one or more of the following: text, picture, video, audio, and the like.

[0162] The first function can be a photographing function, a picture viewing function, a music playing function, a file creating function, a file deleting function, and the like. For example, if the first function is a photographing function, the user interface of the first application can be a photographing interface, the first option can be a photographing option, and the first media data can include a picture, and the first function can include capturing the picture.

[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 can provide a plurality of 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: capturing, encoding, storing, sharing, decoding, and playing.

[0165] Referring to 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 , the second capability can include one or more of the following: the capturing 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 distributedly managing the media data.

[0167] Exemplarily, the third capability can 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 detailed description of the interfaces and capabilities contained in the first operating system, please refer to the related content of the above Figure 2A .

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

[0170] The operation can be used to trigger the starting of the first function. The operation can be a touch operation acting on the touch screen, or a voice instruction of the user, and the like. The embodiments of the present application do not limit the form of the operation.

[0171] It can be understood that, in addition to enabling the function by operating the options, the electronic device 100 can enable the application function based on the voice instruction of the user or the operation on the physical button when the screen is not displayed. For example, the electronic device 100 can detect the voice instruction "open the camera" of the user in the screen-off state, open the camera application, and enable the photograph preview function of the camera application, where the photograph preview function can be used to perform the collection of the preview stream.

[0172] S103. The electronic device 100 enables the first function in response to the operation.

[0173] Exemplarily, the electronic device 100 enables the first function, specifically including: the electronic device 100 invokes the first interface through the first application, then invokes the media data interface through the first interface, and then invokes one or more of the second capabilities through the media data interface, and then invokes the third capability in the process of running one or more of the second capabilities.

[0174] The first function is used to perform one or more of the following processes on the first media data, and the third capability is used to perform one or more of the following processes in the process of enabling the first function: setting the data type of the first media data, managing the life cycle of the first media data, managing 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 in by 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, and the like. The parameters passed in by the first application can be the parameters and parameter contents of the first function, where the parameter contents include one or more of the following: description information of the first function, the first media data, and the indication information of the first media data.

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

[0177] It can be seen that, when the first application invokes the first interface, the device information, the application information, and the related information of the enabled first function can be passed to the first interface, where 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 the 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, and the like of the picture.

[0178] 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 another electronic device can start the first function in response to the operation, the device name can be the name of the other electronic device.

[0179] For example, if the first function includes a face recognition function, the parameters transmitted by the first application include the name, identifier, index, or code of the face recognition function, the coordinates of the face, the image of the face, and the like, wherein the name, identifier, index, or code of the face recognition function is the parameter of the face recognition function, and the coordinates of the face and the image of the face are the parameter content; if the first function includes a beautification function, the parameters transmitted by the first application include the name, identifier, index, or code of the beautification function, the beautification level, and the face information, and the like, wherein the name, identifier, index, or code of the beautification function is the parameter of the beautification function, and the beautification level and the face information are the parameter content.

[0180] The parameters transmitted by the media data interface can include the capability indication information, the parameters of the first function, and the first media data or the indication information of the first media data.

[0181] The capability indication information can be used to indicate the capability called by the media data interface in the second capability. For example, the capability indication information can be determined according to the first interface. For example, if the capability called by the media data interface is the encoding capability, the capability indication information can be used to indicate the encoding capability.

[0182] It should be noted that when the first interface calls the media data interface, some of the parameters transmitted by the first application can be empty, and therefore the first operating system can automatically fill in the default parameters to complete these parameters. Therefore, in the parameters transmitted by the media data interface, the indication information of the first media data can be all or part of the parameters transmitted by the first application, and / or the indication information of the first media data is determined by the first operating system.

[0183] The parameters transmitted by the second capability can 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 transmitted by the second capability can be part of the parameters transmitted by the media data interface, and the description of the parameters transmitted by the second capability can be referred to the related description of the parameters transmitted by the media data interface, which will not be described here.

[0185] The following describes the interface calling relationship in the operating system and the parameters transmitted between the interfaces when the electronic device 100 starts different functions by different examples.

[0186] Example 1: The first function is a photographing function

[0187] wherein, Figure 8 The electronic device 100 provided by the embodiment of the present application, when implementing the photographing function through the camera application, an interface calling schematic diagram in the operating system is shown.

[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, wherein 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 calls the MediaDataKit, and the parameters passed by the MediaDataKit include: Acquisition, PhotoMode, [PictureFlow, PreviewFlow, …], extend.

[0190] wherein, 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 can be determined according to the parameters key1, value1, key2, value2 passed by the PhotoMode interface. PictureFlow is a photographing flow, used to store the data of the photographing result, and PreviewFlow is a preview flow, used to display the preview data to the user in real time. Wherein, PhotoMode and [PictureFlow, PreviewFlow, …] are a pair of key-value, and [PictureFlow, PreviewFlow, …] is the media data processed in 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 the MediaDataKit, the MediaDataKit can determine the next called capability as the acquisition capability according to the parameter Acquisition passed by the MediaDataKit, and the parameters passed by the acquisition capability can include: PhotoMode, [PictureFlow, PreviewFlow, …], extend.

[0193] Then in the process of running the collection capability, one or more of the media data type capability, the data life cycle capability, the data security management capability, the unified media data capability, and the distributed management capability can be called to regulate the format of the media data. For example, the media data type capability is called to determine that the data type of the media data is a picture.

[0194] It can be understood that, Figure 8 It is only an example. For example, in addition to the camera application shown in Figure 8 , other applications with a photographing function, such as an instant chat application, can also trigger the photographing function based on a user operation. The parameters passed in by the MediaDataKit can include more or fewer parameters than those shown in Figure 8 . The subsequent Figures 9-12 is also only an example, and the following will not be described in detail.

[0195] As can be seen from Figure 8 , if the first function is a photographing function, the first media data in the parameters passed in by the media data interface can include one or more of the following: a photographing stream, a preview stream, and capability indication information that can be used to indicate the capability in the second capability that is used to perform collection on the first media data.

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

[0197] Among them, Figure 9 is an interface calling schematic diagram in the operating system when the electronic device 100 provided by the embodiment of the present application implements the picture viewing function through the gallery application.

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

[0199] For a detailed description of the parameters passed in by the PhotosMode interface, refer to the related content in the above Figure 8 , which will not be described here.

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

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

[0202] After the PhotosMode interface calls the MediaDataKit, the MediaDataKit can determine the next called interface as storage capability according to the parameter Storage passed by the MediaDataKit. The parameter passed by the storage capability can include: PhotosMode, [BigPicture, ThumbNail, …], and extend.

[0203] Then, in 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 the media data.

[0204] From Figure 9 It can be seen that, if the first function is a picture viewing function, the indication information of the first media data in the parameter passed in by the media data interface can include one or more of the following: large picture, thumbnail, and capability indication information, which can be used to indicate the capability of storing the first media data in the second capability.

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

[0206] In the parameter passed in by the MediaDataKit, the first function indication information can include one or more of the following: Play, PlayMusic, [MusicName, size, time, …], and extend. Figure 10 The interface calling schematic diagram in the operating system when the electronic device 100 provided by the embodiment of the present application implements the music playing function through the music application.

[0207] As Figure 10 indicated, 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 calls the MediaDataKit, and the parameter passed in by the MediaDataKit includes: Play, PlayMusic, [MusicName, size, time, …], and extend.

[0208] Play is used to indicate the play capability of the MediaDataKit next called, PlayMusic is used to indicate the music play function, and [MusicName, size, time, …] is used to indicate the music to be played in the music play function, where MusicName is the music name, size is the music size, and time is the music duration.

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

[0210] Then in the process of running the play capability, one or more of the media data type capability, the data life cycle capability, the data security management capability, the unified media data capability, and the 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 a music play function and the first media data is music, the indication information of the first media data in the parameters passed in by the media data interface can include one or more of the following: music name, music size, and music duration, and the capability indication information can be used to indicate the capability of playing the first media data in the second capability.

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

[0213] wherein, Figure 11 The electronic device 100 provided by the embodiment of the present application implements the file creation function through the storage class application, and an interface calling diagram in the operating system is shown.

[0214] As Figure 11 shown, after the storage class application detects the operation of the user creating a file, the storage class application can call the FileManageMode interface. Then, the FileManageMode interface calls the MediaDataKit again, and the parameters passed by the MediaDataKit include: Storage, CreateFileMode, [name, owner, position, size…], and 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] Storage is used to indicate the storage capability called by MediaDataKit next, CreateFileMode is used to indicate the file creation function, and [name, owner, position, size...] is used to indicate the file to be created by the file creation function, where 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 calls the storage capability again, and the parameters passed by the storage capability can include CreateFileMode, [name, owner, position, size...], and extend.

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

[0219] Storage is used to indicate the storage capability called by MediaDataKit next, CreateFileMode is used to indicate the file creation function, and [name, owner, position, size...] is used to indicate the file to be created by the file creation function, where name is the file name, owner is the file owner, position is the file path, and size is the file size. Figure 12 When the electronic device 100 provided by the embodiment of the present application implements the file deletion function through the storage application, the interface calling diagram in the operating system is shown.

[0220] As shown in Figure 12 After the storage application detects the user's file deletion operation, the storage application can call the FileManageMode interface. Then, the FileManageMode interface calls MediaDataKit, and the parameters passed by MediaDataKit include Storage, DeleteFileMode, [name, owner, position, size...], and extend.

[0221] Storage is used to indicate the storage capability called by MediaDataKit next, CreateFileMode is used to indicate the file creation function, and [name, owner, position, size...] is used to indicate the file to be created by the file creation function, where 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 calls the storage capability again. The parameters passed by the storage capability can include: DeleteFileMode, [name, owner, position, size…], extend.

[0223] Then in the process of running the storage capability, one or more of the media data type capability, the data life cycle capability, the data security management capability, the unified media data capability, and the distributed management capability can be called to regulate the format of the 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, the first media data is a file, and the indication information of the first media data in the parameters passed in by the media data interface can include one or more of the following: file name, file owner, file path, file size, and capability indication information, which can be used to indicate the capability in the second capability for storing the first media data.

[0225] Specifically, the content not described in Figures 9-12 can be referred to the related content in Figure 8 .

[0226] In some embodiments, the first media data can be second media data created by a second application before the first application starts the first function, and the second media data has the same data format as 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, the first application and the second application can share the media data through the access mechanism. Different applications can call the interface provided by the first operating system to uniformly regulate the media data of the applications and realize the sharing of the media data.

[0229] In some embodiments, the first media data can be second media data created by a second application before the first application starts the first function, and the second media data has the same data format as 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, the second application can realize sharing of the media data through a delegation mechanism. This is considering that there is a part of applications that are not adapted to the first operating system and cannot process the media data through the first interface, the media data interface, the second capability and the third capability, and that the format of the media data is regulated, so that the media data can be directly parsed and reconstructed, and reassembled into media data of a uniform format, so that other applications can identify and use the media data, and realize 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 of 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 of the first application to access the first media data. After the permission of the second application is obtained, the electronic device 100 can start the first function through the first application.

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

[0234] That is, the applications can realize sharing of the media data through a dynamic mechanism. When the applications need to access the media data across the applications, the applications can adopt a query and response manner, and after obtaining the permission of the applications to access the media data, a bridge for sharing the media data can be temporarily built, so as to avoid excessive opening and sharing of the media data, and to protect the security of the media data.

[0235] It should be noted that the second application mentioned above can refer to an application on the electronic device 100, so that the electronic device 100 can realize smooth and simple sharing of data between applications through various mechanisms, or the second application mentioned above can refer to an application on another electronic device, for example, an application on a second electronic device, so that the electronic device 100 can realize smooth and simple sharing of data between devices through various mechanisms, where the second electronic device can be a device that logs in to the same account as the electronic device 100.

[0236] In general, the data management method provided by the embodiments of the present application can provide a unified media data management platform to regulate media data of various applications, so that the applications can process the media data according to uniform rules and formats, and at the same time, the unified media data management platform realizes unified management of the media data, breaks the application boundary, and makes the data sharing between applications and devices more simple and smooth, and improves the user experience of using the media data.

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

[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, and 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, and the specific type of the electronic device is not specially limited in the embodiments of the present application.

[0239] The electronic device 100 can 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 headset interface 170D, a sensor module 180, a key 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 can 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 can include more or fewer components than illustrated, or combine certain components, or split certain components, or different component arrangements. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.

[0241] The processor 110 can include one or more processing units, for example: the processor 110 can 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 can be independent devices, or can be integrated in one or more processors.

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

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

[0244] The processor 110 can also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can save instructions or data that have just been used or are recycled by the processor 110. If the processor 110 needs to use the instructions or data again, it can be directly called from the memory. This avoids repeated access and reduces the waiting time of the processor 110, thereby improving the efficiency of the system.

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

[0246] The antenna 1 and the 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 a diversity antenna of a 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 can provide a solution for wireless communication including 2G / 3G / 4G / 5G, etc. applied to the electronic device 100. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves by the antenna 1, and perform filtering, amplification, etc. on the received electromagnetic waves, and transfer the same to the modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor, and radiate the same as electromagnetic waves through the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 150 can be disposed in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 150 can be disposed in the same device as at least part of the modules of the processor 110.

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

[0249] The wireless communication module 160 can provide a solution for wireless communication including wireless local area networks (WLAN) (e.g., wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc. applied on the electronic device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, demodulates and filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 can also receive signals to be transmitted from the processor 110, frequency-modulate them, amplify them, and radiate them as electromagnetic waves via the antenna 2.

[0250] In some embodiments, the antenna 1 and the mobile communication module 150 of the electronic device 100 are coupled, and the antenna 2 and the wireless communication module 160 are coupled, so that the electronic device 100 can communicate with a network and other devices through wireless communication technology.

[0251] The electronic device 100 implements a display function through a GPU, a display screen 194, and an 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 perform mathematical and geometric calculations for graphics rendering. The processor 110 can include one or more GPUs that 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 can include 1 or N display screens 194, N being a positive integer greater than 1.

[0253] In some embodiments, the display screen 194 can be used to display a user interface of an application, which can include an option for starting an application function, and the electronic device 100 can detect a user's operation on the option to implement the start of the application function.

[0254] The electronic device 100 can implement a photographing function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor, etc.

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

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

[0257] The random access memory can be directly readable and writable by the processor 110, and can be used to store executable programs (e.g., machine instructions) of an operating system or other programs that are currently running, and can also be used to store data of users and application programs, etc.

[0258] The non-volatile memory can also store executable programs and store data of users and application programs, etc., and can be loaded in advance into the random access memory for direct reading and writing by the processor 110.

[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 by the embodiments of the present application, and the media data can include, but is not limited to, text, pictures, audio, and video, etc.

[0260] The electronic device 100 can realize audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor, etc. For example, music playing, recording, etc.

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

[0262] The application further provides an electronic device, comprising a memory, a processor and a computer program stored in the memory, the computer program comprising a first operating system, the first operating system running a first application, the first operating system being provided with a first interface, a media data interface and a second capability; the first application is a three-party application, the first application comprising program code for calling the first interface, the first interface being used for calling the media data interface, the media data interface encapsulating the second capability, the second capability comprising capability of performing one or more of the following processes on media data: collection, encoding, storage, sharing, decoding and playing, the second capability further comprising a third capability, the third capability comprising capability of performing one or more of the following processes on media data: setting a data model of the media data, setting a data type of the media data, managing a life cycle of the media data, managing security of the media data, and distributed management of the media data, and the processor executes the computer program to implement the method performed by the electronic device 100 in any one of the above embodiments.

[0263] The application further provides a chip system, comprising at least one processor, which is used to implement the functions involved in the method performed by the electronic device 100 in any one of the above embodiments.

[0264] In a possible design, the chip system further comprises a memory, which is used to store program instructions and data, and the memory is located in the processor or outside the processor.

[0265] The chip system can be composed of a chip, or can comprise a chip and other discrete devices.

[0266] Optionally, the processor in the chip system can be one or more. The processor can be implemented by hardware or software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit or the like. When implemented by software, the processor can be a general-purpose processor, which is used to read software codes stored in the memory.

[0267] Optionally, the memory in the chip system can also be one or more. The memory can be integrated with the processor, or can be arranged separately from the processor, and the embodiments of the application do not make a limitation in this aspect. For example, the memory can be a non-transient processor, for example, a read-only memory (ROM), which can be integrated on the same chip as the processor, or can be arranged on different chips respectively, and the embodiments of the application do not make a limitation on the type of the memory and the arrangement manner of the memory and the processor.

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

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

[0270] The application further provides a computer program product, which comprises a computer program (also referred to as code or instructions), and the computer program comprises a first operating system, the first operating system runs a first application, and the first operating system is provided with a first interface, a media data interface and a second capability. The first application is a three-party application, the first application comprises program code for calling the first interface, the first interface is used for calling the media data interface, the media data interface encapsulates the second capability, the second capability comprises capability for performing one or more of the following processes on media data: collection, encoding, storage, sharing, decoding and playing, the second capability further comprises third capability, and the third capability comprises capability for performing one or more of the following processes on media data: setting a data model of the media data, setting a data type of the media data, managing a life cycle of the media data, managing security of the media data, and performing distributed management on the media data. When the computer program is executed by a processor, a method performed by the electronic device 100 in any one of the above-mentioned embodiments is implemented.

[0271] It should be understood that the processor in the embodiments of the application can be an integrated circuit chip with a signal processing capability. In the implementation process, the steps of the above-mentioned method embodiments can be completed by an integrated logic circuit or an instruction in the form of software in the processor. The processor mentioned above can be a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiments of the application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, and other mature storage media in the art. The storage medium is located in the memory, and the processor reads the information in the memory and combines the hardware to complete the steps of the above-mentioned method.

[0272] In addition, the embodiments of the application further provide a device. The device can be specifically a component or a module, and the device can comprise one or more processors and memories connected thereto. The memory is used to store a computer program. When the computer program is executed by the one or more processors, the device executes the method in each of the above-mentioned method embodiments.

[0273] Among them, the device, computer readable storage medium, computer program product or chip provided by the embodiments of the present application are used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved are referred to the beneficial effects of the corresponding methods provided above, which will not be described here.

[0274] The embodiments of the present application can be combined in any way to achieve different technical effects.

[0275] In the above embodiments, all or part of them can be realized by software, hardware, firmware or any combination thereof. When realized by software, all or part of them can be realized in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, all or part of them generate processes or functions described in the present application. 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 transferred from one computer readable storage medium to another, for example, the computer instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) mode. 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, data center, etc. integrated with one or more available media. The available media can be magnetic media (for example, floppy disk, hard disk, magnetic tape), optical media (for example, DVD), or semiconductor media (for example, solid state disk (SSD)) and the like.

[0276] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by a computer program to instruct the relevant hardware to complete, and the program can be stored in a computer readable storage medium. When the program is executed, it can include the processes of the above-mentioned embodiments. The aforementioned storage medium includes ROM or random access memory (RAM), magnetic disk or optical disk and various media that can store program codes.

[0277] In summary, the above only describes the embodiments of the technical solutions of the present application, and is not used to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, 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, which runs a first operating system. A first application runs on the first operating system, which provides: a first interface, a media data interface, and a second capability. The first application is a third-party application, which includes program code that calls the first interface. The first interface is used to call the media data interface. The media data interface encapsulates the second capability, which includes the ability to perform multiple processes on media data: acquisition, encoding, storage, sharing, decoding, and playback. The method includes: The user interface of the first application is displayed, and the user interface presents a first option corresponding to the first function: An operation applied to the first option was detected; In response to the operation, the first function is started through the first interface, wherein 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 playback. The second capability also includes a third capability, which is used to perform one or more of the following during the start of the first function: setting the data type of the first media data, managing the lifecycle of the first media data, controlling the security of the first media data, setting the data model of the first media data, and distributing the management of the first media data. Specifically, activating the first function includes: calling the first interface through the first application, calling the media data interface through the first interface, calling the second capability through the media data interface, and calling the third capability during the operation of the second capability; the parameters passed to the first interface include one or more of the following: device name, application name of the first application, and parameters passed to the first application, wherein the parameters passed to 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.

2. The method according to claim 1, characterized in that, The first function includes a face recognition function, and the parameters passed in by the first application include: the parameters of the face recognition function, the coordinates of the face, and the image of the face; or, The first function includes a beautification function, and the parameters passed in by the first application include: the parameters of the beautification function, the beautification level, and facial information.

3. The method according to claim 1, characterized in that, The parameters passed 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, wherein the indication information of the first media data is all or part of the parameters passed through 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 invoked by the media data interface in the second capability.

4. The method according to claim 3, characterized in that, The first function is a photo-taking function, and the first media data includes one or more of the following: photo stream, preview stream, and the capability indication information is used to indicate the capability of the second capability to perform collection on the first media data; or, The first function is an image viewing function, and the first media data includes one or more of the following: large image, thumbnail image, and the capability indication information is used to indicate the capability of performing storage for the first media data in the second capability; or, The first function is a music playback 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 volume, music duration. The capability indication information is used to indicate the capability of the second capability to perform playback for the first media data. 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, and file size. The capability indication information is used to indicate the capability of performing storage for the first media data in the second capability.

5. The method according to claim 1, characterized in that, The parameters passed in by the second capability include: the parameters of the first function, and the first media data or indication information of the first media data, wherein 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.

6. The method according to claim 1, characterized in that, 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 based on the parameters passed in by the first application. The data type is: text, image, audio, or video.

7. The method according to claim 1, characterized in that, The third capability includes: data lifecycle capabilities. The data lifecycle capability is used to perform one or more of the following: setting the validity period of the first media data, and processing the first media data when the validity period of the first media data expires.

8. The method according to claim 1, characterized in that, The third capability includes: data security management capability. The data security management capability is used to verify whether the content of the first media data conforms to preset regulations.

9. The method according to claim 1, characterized in that, The third capability includes: a unified media data capability, which is used to set a data model for the first media data when some or all of the parameters passed in by the first application are empty. The data model for the first media data includes: the 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.

10. The method according to claim 1, characterized in that, The third capability includes: distributed management capability. The distributed management capability 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 into the same account.

11. The method according to claim 1, characterized in that, The first media data is the second media data created by the second application before the first application starts the first function, and the second media data has the same data format as the media data processed by the third capability.

12. The method according to claim 1, characterized in that, The first media data is obtained by parsing and reconstructing the second media data created by the second application before the first application starts the first function. The second media data has a different data format than the media data processed by the third capability, while the first media data has the same data format as the media data processed by the third capability.

13. The method according to claim 1, characterized in that, The first media data is media data created by the second application, and the second application has not granted access to the first media data; Before activating the first function, the method further includes: The second application was queried, and permission for the first application to access the first media data was obtained.

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

15. 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, on which a first application runs. The first operating system provides: a first interface, a media data interface, and a second capability. The first application is a third-party application, including program code that calls the first interface. The first interface is used to call the media data interface. The media data interface encapsulates the second capability, which includes the ability to perform multiple 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 a data model for media data, setting a data type for media data, managing the lifecycle of media data, managing the security of media data, and distributing the management of media data. The processor executes the computer program to implement the method as described in any one of claims 1-14.

16. A computer-readable storage medium, characterized in that, It stores computer programs, including a first operating system on which a first application runs. 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, including program code that calls the first interface. The first interface is used to call the media data interface. The media data interface encapsulates the second capability, which 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 the third capability, which includes the ability to perform multiple processes on media data: setting the data model of the media data, setting the data type of the media data, managing the lifecycle of the media data, managing the security of the media data, and distributing the management of the media data. When the computer program is executed by a processor, it implements the method as described in any one of claims 1-14.

17. A computer program product, characterized in that, The computer program product includes a computer program, which includes a first operating system. A first application runs on the first operating system, which provides: a first interface, a media data interface, and a second capability. The first application is a third-party application, and includes program code that calls the first interface. The first interface is used to call the media data interface. The media data interface encapsulates the second capability, which 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 the third capability, which includes the ability to perform multiple processes on media data: setting a data model for media data, setting a data type for media data, managing the lifecycle of media data, managing the security of media data, and distributing the management of media data. When the computer program is executed by a processor, it implements the method as described in any one of claims 1-14.

Citation Information

Patent Citations

  • Data synchronization method and device

    CN114691631A

Cited By

  • Data management method and electronic device

    WO2025148553A1