Data management method and electronic device

Through the unified media framework, the unified management of media data in electronic devices is solved, the problem of data isolation between applications is improved, and the user experience is supported and data sharing across applications and devices is supported.

WO2025148553A1PCT designated stage expired Publication Date: 2025-07-17HUAWEI TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/135558
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-06-07
Filing Date
2024-11-29
Publication Date
2025-07-17

AI Technical Summary

Technical Problem

In the prior art, media data management of each application in electronic devices is independent and isolated, resulting in complex data sharing and confusing formats, and the inability to achieve global unified management, which reduces the user experience.

Method used

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

Benefits of technology

It realizes standardized and unified management of media data of each application, improves user experience, supports smooth data sharing across applications and devices, and simplifies data operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024135558_17072025_PF_FP_ABST
    Figure CN2024135558_17072025_PF_FP_ABST
Patent Text Reader

Abstract

The present application discloses a data management method and an electronic device. The operating system of the electronic device can provide a unified interface and capabilities that can be called when launching application functions, allowing for achievement of processing such as acquisition, coding, storage, sharing, decoding, and playback of media data. In this way, when various applications are running, the unified interface and capabilities provided by the operating system of the electronic device can carry out standardized, unified, and convenient management of media data, thus avoiding the situation wherein each application manages and controls media data according to its own data management system. This is a breakthrough for media data limitations in applications and on devices, and improves user experience with respect to media data.
Need to check novelty before this filing date? Find Prior Art

Description

Data management method and electronic equipment

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on January 10, 2024, with application number 202410042134.3 and application name “A method for implementing a unified media framework”. This application claims priority to the Chinese patent application filed with the China Patent Office on June 7, 2024, with application number 202410745339.8 and application name “Data management method and electronic device”. The entire contents of both applications are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of terminal and computer technology, and in particular to a data management method and electronic equipment. Background Art

[0003] 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 of the Invention

[0004] This application provides a data management method and electronic equipment, which realizes standardized, unified and convenient management of media data.

[0005] In a first aspect, an embodiment of the present application provides a data management method, which is applied to a first electronic device, wherein a first operating system runs on the first electronic device, a first application runs on the first operating system, and the first operating system provides: a first interface, a media data interface, and a second capability; the first application is a third-party application, the first application includes a program code for calling the first interface, the first interface is used to call the media data interface, and the media data interface encapsulates a second capability, the second capability includes the ability to perform one or more of the following processing on the media data: acquisition, encoding, storage, sharing, decoding and playback, the method includes: displaying a user interface of the first application, the user interface presenting a first option corresponding to a first function: detecting an operation acting on the first option; in response to the operation, starting the first function through the first interface, wherein the first function is used to perform one or more of the following processing on the first media data: acquisition, encoding, storage, sharing, decoding and playback, the second capability also 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 the data type of the first media data, managing the life cycle of the first media data, controlling the security of the first media data, setting the data model of the first media data, and performing distributed management of the first media data.

[0006] Implementing the method provided in the first aspect can provide a unified media data management platform to achieve unified management of media data, so that applications can process media data according to unified rules and formats, avoid applications from controlling media data according to their own data management systems, break the boundaries of media data in applications and devices, and enhance users' experience of using media data.

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

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

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

[0010] In combination with the first aspect, in a possible implementation, 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 acquisition on the first media data; or, the first function is a picture viewing function, and the first media data includes one or more of the following: large picture, thumbnail, and the capability indication information is used to indicate the capability of the second capability to perform storage on the first media data; or, the first function is a music playback function, and the first media data is music, and the indication information of the first media data includes one or more of the following: music name, music size, and music duration, and the capability indication information is used to indicate the capability of the second capability to perform playback on the first media data; or, the first function is a file creation function or a file deletion function, and 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, and the capability indication information is used to indicate the capability of the second capability to perform storage on the first media data.

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

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

[0013] It can be seen that the media data type capability can achieve the classification of media data of various applications according to a unified and standardized type, so that media data with the same attributes of various applications are no longer distributed discretely, which helps to unify the management of various media data in the system.

[0014] In combination with the first aspect, in one possible implementation, the third capability includes: data lifecycle capability, which 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.

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

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

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

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

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

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

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

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

[0023] That is, the first application and the second application can share media data through the access mechanism. Different applications can unify and standardize the media data of the applications and share the media data by calling the interface provided by the first operating system.

[0024] In combination with the first aspect, in one possible implementation, 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 data format of the second media data is different from that of the media data processed by the third capability, and the data format of the first media data is the same as that of the media data processed by the third capability.

[0025] In other words, the second application can use the delegation mechanism to share media data. This is because some applications are not compatible with the first operating system and cannot process media data through the first interface, media data interface, second capability, and third capability. By standardizing the format of their media data, the second application can directly parse and reconstruct the media data, reassembling it into a unified format so that other applications can recognize and use it, thus achieving data sharing between applications.

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

[0027] In other words, applications can share media data through a dynamic mechanism. When an application needs to access media data across applications, it can use a query-response method. After obtaining access permission from an application, a temporary bridge for sharing media data can be established, preventing excessive openness and sharing of media data and ensuring media data security.

[0028] In combination with the first aspect, in a possible implementation, the second application is an application on the first electronic device or the second electronic device.

[0029] Exemplarily, the second electronic device may refer to a device logged into the same account as the first electronic device.

[0030] Among them, if the second application is an application on the first electronic device, the first electronic device can use the above-mentioned multiple 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 multiple mechanisms to achieve smooth and simple sharing of data between devices.

[0031] 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 including a first operating system, a first application running on the first operating system, and the first operating system providing: a first interface, a media data interface, and a second capability; the first application is a third-party application, the first application includes a program code for calling the first interface, the first interface is used to call the media data interface, the media data interface encapsulates a second capability, the second capability includes the ability to perform one or more of the following processing on media data: acquisition, encoding, storage, sharing, decoding, and playback, the second capability also includes a third capability, the third capability includes the ability to perform one or more of the following processing on media data: setting a data model for media data, setting a data type for media data, managing the life cycle of media data, managing the security of media data, and performing distributed management of media data, the processor executes the computer program to implement the method described in the first aspect or any one of the implementation methods of the first aspect.

[0032] In a third aspect, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, the computer program including a first operating system, a first application running on the first operating system, the first operating system providing: a first interface, a media data interface, a second capability, and a third capability; the first application is a three-party application, the first application including a program code for calling the first interface, the first interface being used to call the media data interface, the media data interface encapsulating a second capability, the second capability including the capability to perform one or more of the following processing on media data: acquisition, encoding, storage, sharing, decoding, and playback, the second capability also including a third capability, the third capability including the capability to perform one or more of the following processing on media data: setting a data model for media data, setting a data type for media data, managing the life cycle of media data, managing the security of media data, and performing distributed management of media data, and when the computer program is executed by a processor, it implements the method described in the first aspect or any one of the implementation methods of the first aspect.

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

[0034] FIG1 is a schematic diagram illustrating the difference between a data processing method provided in an embodiment of the present application and a data management method provided in an embodiment of the present application;

[0035] FIG2A is a schematic diagram of the software architecture of the electronic device 100 provided in an embodiment of the present application;

[0036] FIG2B is a schematic diagram showing the relationship between various modules in the software architecture provided in an embodiment of the present application;

[0037] FIG2C is a schematic diagram of the calling relationship of the interface provided in an embodiment of the present application;

[0038] FIG3 is a diagram illustrating a principle of data sharing between applications under an existing mechanism provided by an embodiment of the present application;

[0039] FIG4 is a diagram illustrating a principle of data sharing between applications under an access mechanism provided in an embodiment of the present application;

[0040] FIG5 is a diagram illustrating the principle of data sharing between applications under the delegation mechanism provided in an embodiment of the present application;

[0041] FIG6 is a diagram illustrating the principle of data sharing between applications under the dynamic mechanism provided by an embodiment of the present application;

[0042] FIG7 is a flow chart of a data management method according to an embodiment of the present application;

[0043] FIG8 is a schematic diagram of an interface call within the operating system when the electronic device 100 according to an embodiment of the present application implements a photo-taking function through a camera application;

[0044] FIG9 is a schematic diagram of an interface call within the operating system when the electronic device 100 according to an embodiment of the present application implements a picture viewing function through a gallery application;

[0045] FIG10 is a schematic diagram of an interface call within the operating system when the electronic device 100 according to an embodiment of the present application implements a music playback function through a music application;

[0046] FIG11 is a schematic diagram of an interface call within an operating system when the electronic device 100 according to an embodiment of the present application implements a file creation function through a storage application;

[0047] FIG12 is a schematic diagram of an interface call within an operating system when the electronic device 100 according to an embodiment of the present application implements a file deletion function through a storage application;

[0048] FIG13 is a schematic diagram of the hardware structure of the electronic device 100 provided in an embodiment of the present application. DETAILED DESCRIPTION

[0049] The following is a clear and detailed description of the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship between related objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0050] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to imply or suggest relative importance or implicitly indicate the number of the technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, unless otherwise specified, "plurality" means two or more.

[0051] Nowadays, multiple applications can be installed on electronic devices to meet the different usage needs of users. However, each application has its own data management system, which makes the media data between applications and devices independent, isolated, and inconsistent.

[0052] For example, for a picture M captured by a camera app, both the gallery app and the instant messaging app can view and process it, such as modifying or deleting it. However, since the gallery app and the instant messaging app each have their own data management system, the gallery app may be processing picture M1.0, even though the messaging app may be processing picture M2.0. Thus, although both the gallery app and the instant messaging app can view the picture M, operations on the picture M in the gallery app, such as deleting, modifying, or viewing, are all operations on picture M1.0 and do not affect picture M2.0. In other words, even if a user initiates the deletion of picture M in the gallery app, the user can still view the picture M through the instant messaging app. Alternatively, even if a user initiates the modification of picture M in the gallery app, the picture M viewed by the user through the instant messaging app is still the unmodified picture M.

[0053] For another example, if a user downloads video N locally through video player software 1, but when viewing local videos through video player software 2, video N cannot be viewed.

[0054] It can be seen that the independent data management system of each application makes data sharing and information sharing between applications complex, with confusing data formats and interfaces. Electronic devices are unable to systematically manage the media data of applications from a global perspective, which reduces the user experience.

[0055] Therefore, how to manage the media data of various applications in electronic devices is a problem that needs to be solved urgently.

[0056] The embodiment of the present application provides a data management method, which is implemented under the unified media framework constructed in the embodiment of the present application, so that during the operation of each application, the unified media framework can be used to manage media data in a standardized, unified and convenient manner, thereby solving problems such as application islands and data fragmentation.

[0057] Among them, the data management method provided in the embodiment of the present application involves unified management of the collection, encoding, storage, sharing, decoding and playback of media data from generation to disappearance, avoiding the control of media data by each application according to its own data management system, breaking the boundaries of media data in applications and devices, and improving the user experience of media data.

[0058] FIG1 is a schematic diagram illustrating the difference between a data processing method and a data management method provided in an embodiment of the present application.

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

[0060] As shown in Figure 1 (a), any application—system applications, self-developed applications, or third-party applications—can select the appropriate framework capabilities based on their business needs to process media data in databases, memory, or files. For example, system applications and self-developed applications each process media data in a database through different interface capabilities. This demonstrates that this approach lacks a unified management strategy for media data from different applications.

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

[0062] It can be seen that electronic devices provide the ability to uniformly process media data of various applications through a unified media framework, realize unified management of media data of various applications by electronic devices, break the application boundaries of media data, and provide a logical basis for efficient and smooth cross-application and cross-device sharing of media data.

[0063] The electronic device can be a portable terminal device equipped with HarmonyOS, iOS, Android, Microsoft or other operating systems, such as a mobile phone, a tablet computer, a wearable device, etc., and can also be a non-portable terminal device such as a laptop computer with a touch-sensitive surface or a touch panel, a desktop computer with a touch-sensitive surface or a touch panel. The software system of the electronic device can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a microservice architecture, or a cloud architecture. The embodiment of the present application takes the layered architecture of HarmonyOS as an example to illustrate the software structure of the electronic device 100.

[0064] FIG2A is a schematic diagram of the software architecture of the electronic device 100 provided in an embodiment of the present application.

[0065] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, HarmonyOS is divided into four layers: application layer, application framework layer, service layer, and kernel layer, from top to bottom. Higher layers have more user interaction, while lower layers represent more system capabilities.

[0066] It should be understood that the software architecture shown in FIG. 2A is merely an example, and it may also include more or fewer modules, which is not limited here.

[0067] The application layer can include a series of application packages, such as camera, calendar, map, music, SMS, gallery, communication, navigation, Bluetooth, video, etc.

[0068] As shown in Figure 2A, the application package may include: a camera application, a gallery application, a music application, and a video application. The camera application can be used to capture media data such as pictures and videos; the gallery application can be used to view, modify, delete, or share pictures, videos, and other media files; the music application can be used to download, play, delete, or share audio; and the video application can be used to download, play, delete, or share videos.

[0069] It should be understood that the camera application can refer to a general term for one or more applications with a camera function. In other words, the application package of the electronic device 100 can include one or more camera applications, such as a system camera application, a self-developed camera application, a third-party camera application, etc. Other applications such as gallery applications, music applications, and video applications are similar and will not be described in detail here.

[0070] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions. The application framework layer also includes modules such as the window manager, content provider, view system, telephony manager, and resource manager, which are not discussed in detail here.

[0071] As shown in Figure 2A, the application framework layer may include: camera function interface (PhotoMode), editing function interface (EditMode), storage function interface (StorageMode), sharing function interface (ShareMode), playback function interface (PlayMode), file management function interface (FileManageMode) and other functional interfaces, which can be directly called by applications in the application layer.

[0072] Exemplarily, the camera function interface can be an interface (PhotoModeKit) or a selector (PhotoModePicker). Specifically, PhotoModePicker can encapsulate multiple shooting function interfaces, and a shooting function interface can be used to start a shooting function, which can include: shooting function, video function, night scene function, portrait function, large aperture function, time-lapse function, artificial intelligence (AI) scene recognition function, code scanning function, face recognition function, face interaction function, etc. PhotoModePicker can select the corresponding interface from multiple shooting function interfaces based on the parameters passed in by the application.

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

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

[0075] As can be seen, the application framework layer can provide a unified interface for multiple applications in the application layer to call, allowing these multiple applications to achieve the same functionality. For example, the system camera application and third-party applications can all call PhotoMode to implement the photo-taking function. Compared with different applications calling different interfaces, this solves the problem of confusing interfaces called during application operation.

[0076] In addition, the application framework layer can also include: Media Data Interface (MediaDataKit). The Media Data Interface can be used to be called by multiple functional interfaces such as PhotoMode, EditMode, StorageMode, ShareMode, PlayMode, FileManageMode, etc. to control the collection, encoding, storage, sharing, decoding and playback of media data.

[0077] Exemplarily, MediaDataKit can be used to implement querying, generating, saving, deleting, synchronizing, monitoring changes in media data, and so on. Querying media data refers to the ability of MediaDataKit to query media data based on 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 with specified conditions; synchronizing data refers to the ability of MediaDataKit to synchronize media data end-to-end to ensure data consistency across devices; and monitoring changes in media data refers to the ability of MediaDataKit to monitor changes in specified types or specified media data.

[0078] In addition, the application framework layer can also include multiple capabilities, such as normal, acquisition, encoding, storage, sharing, decoding, and playback. These capabilities can be called by the media data interface to implement media data processing, including acquisition, encoding, storage, sharing, decoding, and playback.

[0079] The media capture, encoding, storage, sharing, decoding, or playback operations performed on the media may be determined by the function activated by the application. For example, if the function activated by the camera application is the camera function, the operations performed on the media data may include capture. For another example, if the function activated by the video application is the playback function, the operations performed on the media data may include playback.

[0080] Combined with the software architecture shown in Figure 2A, when the electronic device 100 detects that the user is viewing a video through the gallery application, the gallery application can call the PlayMode interface, and the PlayMode interface then calls MediaDataKit. MediaDataKit determines that the operation performed on the media data is "play" based on PlayMode. Therefore, MediaDataKit then calls the playback capability to achieve the playback of the video.

[0081] In addition, the application framework layer can also include: media data type, data life cycle, data security management, unified media data, distributed management and other capabilities. Among them:

[0082] The media data type capability can be used to set the data type of media data, ensuring that all applications maintain a standardized, uniform data type after unified processing. This data type can include text, images, audio, or video. The media data type capability can be used to determine the data type of media data based on information passed in by the application. If the media data type capability is invoked by the capture capability, the data type of the media data can be determined based on the data type of the media data collected by the application. For example, if a camera application activates the image capture function, the capture capability is invoked to capture images. Since the data type of the collected media data is images, the unified media data type can be set to images. Similarly, if the media data type capability is invoked by the encoding capability, the data type of the media data can be determined based on the data type of the media data encoded by the application. If the media data type capability is invoked by the storage capability, the data type of the media data can be determined based on the data type of the media data stored by the application. If the media data type capability is invoked by the sharing capability, the data type of the media data can be determined based on the data type of the media data shared by the application. If the media data type capability is invoked by the decoding capability, the data type of the media data can be determined based on the data type of the media data decoded by the application. If the media data type capability is invoked by the playback capability, the data type of the media data can be determined based on the data type of the media data played by the application.

[0083] It can be seen that the media data type capability can achieve the classification of media data of various applications according to a unified and standardized type, so that media data with the same attributes of various applications are no longer distributed discretely, which helps to unify the management of various media data in the system.

[0084] Data lifecycle capabilities can be used to manage the lifecycle of media data. Specifically, data lifecycle capabilities can be used to set the validity period of media data and process the media data when the validity period expires. Processing media data can mean deleting the media data or extending the validity period of the media data. For example, data lifecycle capabilities can customize different validity periods for different media data, or manage the lifecycle of media data of different applications differently on an application-by-application basis, for example, setting the media data to exist permanently, setting the media data to be updated periodically, or setting the media data to be deleted or extended after expiration, etc.

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

[0086] Data security management capabilities can be used to centrally manage the security of media data. Specifically, this includes checking the rationality, compliance, and legality of media data, as well as controlling the validity period of media data. For example, data security management capabilities can be used to verify whether the content of media data complies with preset regulations. If so, the media data is secure; if not, it indicates a security risk.

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

[0088] The unified media data capability can be used to provide standardized data models and standard model parameters to achieve the unification and standardization of media data. The data model can be used to standardize the functions initiated by the application and the media data or the indication information of the media data processed by the function. 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 parameters passed in by the application have null values, the parameters in the data model can be filled in by setting the data model. For example, if one of the parameters passed in by the application is a null value, the operating system can automatically use the default value to fill in the parameter. The standard model parameters can include the specific values ​​of the parameters contained in the standard data model. For example, if the parameters passed in by the application include the duration of the music, if the duration is a negative number, it means that the model parameters are not standardized and the value of the parameter needs to be readjusted.

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

[0090] Distributed management capabilities can be used to perform distributed management of media data, achieve synchronization of media data between applications and devices, and manage cross-application and cross-device sharing of media data. Specifically, distributed management capabilities can be used to provide the ability to process media data on other applications or other devices, where other devices can refer to devices that have the same account logged in as the electronic device 100. For example, if an application calls a storage function interface to store media data, if the local end is unable to store the media data due to insufficient storage space, the distributed management capability can be called to achieve storage of the media data at the remote end. Exemplarily, distributed management capabilities can be based on a relational database (RDB) to achieve cross-device synchronization of media data. RDB is a relational database, which is a way of organizing data using a database. In addition, in cross-device sharing of media data, distributed management capabilities can be used to determine the device that stores the media data.

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

[0092] The unified media framework provided in the embodiment of the present application may include all interfaces and capabilities in the application framework layer shown in Figure 2A. In other embodiments of the present application, the names of the unified media framework and the various interfaces or capabilities introduced above may also be other, and the embodiment of the present application does not limit this. For example, the unified media framework may also be called a unified media management framework. In addition, in the unified media framework, the functional interfaces that can be directly called by the application may be more or less than the functional interfaces shown in Figure 2A, and the ability of the media data interface to call downward may be more or less than the capabilities shown in Figure 2A, and the embodiment of the present application does not limit this.

[0093] It can be seen that the unified media framework provided in the embodiment of the present application layers interfaces and services, allowing application developers to only focus on the functions provided by the interfaces without having to worry about the complex implementation of underlying commands. At the same time, each application can call the same interface provided in the unified media framework to implement the same function, and quickly, efficiently and conveniently manage and control media data between different applications, media data between different devices, and different types of media data.

[0094] As shown in Figure 2A, the service layer may include data type services, lifecycle services, data security services, unified data services, and distributed management services. Specifically, data type services may be used to provide business logic related to standardizing media data types, lifecycle services may be used to provide business logic related to managing the lifecycle of media data, data security services may be used to provide business logic related to managing media data security, unified data services may be used to provide business logic related to unified media data, and distributed management services may be used to provide business logic related to managing the distributed management of media data.

[0095] The kernel layer is the layer between hardware and software. The kernel layer may include display drivers, camera drivers, audio drivers, sensor drivers, and so on. As shown in Figure 2A, the kernel layer may include: memory storage drivers, disk storage drivers, persistent storage drivers, and distributed storage drivers. Memory storage refers to a storage method that stores media data in memory, disk storage refers to a storage method that stores media data on disk, persistent storage refers to a storage method that saves transient data in memory as persistent data, such as saving it to a database or hard disk to prevent the data from being lost after the device loses power or the application is closed, and distributed storage refers to a storage method that saves media data across devices.

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

[0097] FIG. 2B takes the processing of media data as acquisition as an example, and illustrates the relationship between the various modules in the software architecture shown in FIG. 2A .

[0098] As shown in FIG. 2B , the service caller may refer to an application in the application layer shown in FIG. 2A , such as a camera application, a gallery application, a music application, a video application, and the like.

[0099] If the business caller initiates a business call, which is used to execute the collection of media data, the entire business call process requires the software framework to provide collection capabilities, media data interfaces, full life cycle management of unified data, and support for data across devices and across applications. Among them, the distributed management capabilities in the software architecture shown in Figure 2A can be used to achieve data processing across devices and across applications.

[0100] In addition, the media data interface needs to be able to support a unified data model and data life cycle management, where the unified data model can be provided by the unified media data capability shown in Figure 2A, and the data life cycle management can be achieved through the data life cycle capability shown in Figure 2A.

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

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

[0103] In order to better understand the calling relationship of interfaces at each layer in the software architecture shown in FIG2A , FIG2C exemplarily shows a schematic diagram of the calling relationship of interfaces.

[0104] As shown in Figure 2C , the application may refer to the camera application, gallery application, music application, or video application in the application layer mentioned in Figure 2A . XXMode may refer to any functional interface mentioned in Figure 2A , such as the camera function interface (PhotoMode), editing function interface (EditMode), storage function interface (StorageMode), sharing function interface (ShareMode), playback function interface (PlayMode), file management function interface (FileManageMode), etc. MediaDataKit is the media data interface.

[0105] The application can detect user operations and trigger the start of a function that can be used to perform one or more of the following processes: acquisition, encoding, storage, sharing, decoding, and playback of a certain media data.

[0106] Then, after the application detects a user operation, it can call the XXMode interface. For example, if the camera application detects a photo operation, the XXMode interface can be the PhotoMode interface. If the video application detects a video playback operation, the XXMode interface can be the PlayMode interface.

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

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

[0109] Application name (AppName), which can refer to the name of the application that calls the XXMode interface.

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

[0111] Among them, the parameters passed in by the application can exist in the form of parameter (key)-parameter content (value), where the parameter (key) is the parameter of the function started by the application, which is used to indicate the function started by the application. For example, the parameter can be the name, identifier, index or number of the function started by the application, etc. The parameter content (value) represents the data required to implement the function started by the application, and may 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.

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

[0113] For example, if the function launched by the application includes face recognition, the data required for face recognition may include one or more of the following: facial coordinate information, facial image, etc. For another example, if the function launched by the application includes beauty enhancement, the data required for beauty enhancement may include one or more of the following: beauty level, facial information, etc. For another example, if the function launched by the application includes camera activation, the data required for camera activation may include camera information indicating which camera is active on the device, such as the front camera, rear camera, telephoto camera, wide-angle camera, etc.

[0114] The extended field (extend) can be used to build pre-built capabilities or differentiated capabilities.

[0115] It is understandable that the device name, application name, and extension fields are optional.

[0116] After the application calls the XXMode interface, the XXMode interface can call MediaDataKit. The interface format of MediaDataKit is MediaDataKit(type, key, value, extend).

[0117] Type indicates the type of processing to be performed on the media data. Types may include, but are not limited to, normal, acquisition, code, storage, share, decode, play, and other. The type can be determined based on the previous interface called by MediaDataKit. For example, if the previous interface is the PhotoMode interface, the electronic device may determine that the camera function needs to be activated and that the media data needs to be acquired, thus considering it as the acquisition type.

[0118] The indication parameter (key) of the function point is used to indicate the function point to be started. It can be obtained from the parameter passed in by the XXMode interface or determined by the name of the XXMode interface.

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

[0120] The extended field (extend) can be used to build pre-built capabilities or differentiated capabilities.

[0121] After the MediaDataKit interface is called, it can continue to call other interfaces provided by the framework layer according to the type (type). For example, if the type (type) is acquisition, the acquisition capability can be called to realize the acquisition of media data. If the type (type) is encoding, the encoding capability can be called to realize the encoding of media data. If the type (type) is storage, the storage capability can be called to realize the storage of media data. If the type (type) is sharing, the sharing capability can be called to realize the sharing of media data. If the type (type) is decoding, the decoding capability can be called to realize the decoding of media data. If the type (type) is playback, the playback capability can be called to realize the playback of media data. Among them, the parameters passed by the acquisition, encoding, storage, sharing, decoding or playback capabilities may include: key, value, extend.

[0122] During the invocation of any capability, such as acquisition, encoding, storage, sharing, decoding, or playback, multiple capabilities, including unified media data, media data type, data lifecycle, data security management, and distributed management, can also be invoked to achieve standardization and unification of media data. Specifically, the media data type capability can be used to determine the data type of media data, the data lifecycle capability can be used to determine the lifecycle of media data, the data security management capability can be used to manage the security of media data, the unified media data capability can be used to standardize the data model of media data, which consists of the indicator parameters (key) of a function point and the values ​​(value) required by that function point, and the distributed management capability can be used to provide distributed management of media data.

[0123] In some implementations, when any capability, such as acquisition, encoding, storage, sharing, decoding, or playback, is invoked, only some of the capabilities, including unified media data, media data type, data lifecycle, data security management, and distributed management, may be invoked. The specific capabilities may be determined by the application. For example, if the application does not need to set the lifecycle of the media data, then the data lifecycle capability may not be invoked.

[0124] In some implementations, after the XX Mode interface is called, it is possible to bypass MediaDataKit and directly call other framework layer capabilities below MediaDataKit to implement the application startup function.

[0125] In some implementations, the XXMode interface can be a kit or a picker. When the XXMode interface is implemented as a picker, the MediaDataKit can also be correspondingly subdivided into multiple interfaces with more detailed functions, so that the XXMode interface can select an appropriate interface from the multiple interfaces to call.

[0126] After the framework layer interface is called, it will continue to call the service layer and kernel layer interfaces to realize the corresponding shooting function.

[0127] For detailed examples of FIG. 2C , please refer to subsequent FIG. 8 to FIG. 12 .

[0128] Depending on the application scenario, the unified media framework provided in the embodiments of the present application can be implemented through any of the following mechanisms:

[0129] 1) Access mechanism

[0130] The access mechanism means that applications can actively access the MediaDataKit provided by the unified media framework to implement media data collection, encoding, storage, sharing, decoding and playback.

[0131] In this way, unified management of media data can be achieved according to the unified interface provided by the unified media framework. Moreover, as long as the application processes media data according to the access mechanism, this part of the data belongs to the data open to other applications for use. Other applications can obtain and use the media data through the unified media framework, thereby realizing the sharing of media data between applications.

[0132] 2) Delegation mechanism

[0133] The delegation mechanism means that the application does not originally access the MediaDataKit provided by the unified media framework to complete the collection, encoding, storage, sharing, decoding and playback of media data. The media data of the application is not originally standardized according to the unified media framework. Therefore, whether this part of the media data is parsed and reconstructed into the unified standard data of the unified media framework can be determined based on whether the application authorizes it.

[0134] If the application authorizes, its media data can be parsed and reconstructed into data that conforms to the unified media framework's specifications. This allows other applications to reassemble this media data into data that they can identify and use. This media data can then be considered data that the application makes available to other applications. Other applications can access and use this media data through the unified media framework, enabling inter-application media data sharing. If the application does not authorize, its media data cannot be parsed and reconstructed into data that conforms to the unified media framework's specifications, and other applications cannot use this media data through the unified media framework.

[0135] 3) Dynamic mechanism

[0136] The dynamic mechanism is introduced to ensure the security of media data and avoid excessive opening or sharing of media data by applications. Under this dynamic mechanism, media data can be opened and shared between applications through the "query response" method. When an application (hereinafter referred to as application A) needs to use the media data of other applications, it can query whether there is an application that can share media data through the unified media framework. If there is an application (hereinafter referred to as application B) that can share media data, application B can respond to the query request through the unified media framework and open its media data so that application A can use the media data and realize data sharing between applications. In addition, the media data opened this time is only for the query of application A this time. The next time application A or other applications need to use the media data again, they need to query application B again through the "query response" method.

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

[0138] For example, in order to better understand these three mechanisms, FIG3 to FIG6 exemplarily illustrate the data sharing principles between applications under different mechanisms.

[0139] FIG3 is a diagram showing the principle of data sharing between applications under the existing mechanism.

[0140] As shown in Figure 3, data in an application can generally be divided into private data and shared data. Private data refers to data used internally by the application and cannot be accessed or used by other applications, while shared data refers to data that can be accessed and used by other applications.

[0141] Under the existing mechanism, each application has its own data management system to manage its own media data. For example, suppose application A's shared data includes media data X1.0. If application B wants to access and use media data X1.0, under the existing mechanism, application B will typically save media data X1.0 as media data X2.0. Application A's processing of media data X is equivalent to processing media data X1.0, and application B's processing of media data X is equivalent to processing media data X2.0. For example, if application A initiates a deletion request for media data X, application A can only delete media data X1.0 in its own application directory and will not delete media data X2.0 in application B's application directory. Similarly, if application B initiates a deletion request for media data X, application B can only delete media data X2.0 in its own application directory and will not delete media data X1.0 in application A's application directory.

[0142] It can be seen that under the existing mechanism, the media data between applications is independent, isolated, and inconsistent, which makes the management, viewing, addition, deletion, modification and other operations performed by users on media data complex and fragmented, and it is impossible to achieve smooth and simple data sharing between applications.

[0143] FIG4 is a diagram showing the principle of data sharing between applications under the access mechanism provided in an embodiment of the present application.

[0144] As shown in Figure 4, both application A and application B can achieve unified management of shared data by accessing the unified media framework. Regardless of whether application A or application B processes media data, as long as they access MediaDataKit, the media data of different applications can have the same data format and are uniformly managed by the unified media framework. This media data can be called unified data.

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

[0146] For example, suppose application A is a camera application, application B is a video call application, and media data X is the image preview stream captured by application A. Since application B also needs to turn on the camera and capture the image preview stream when starting the video call function, application B can directly use the image preview stream captured by application A during the process of application A capturing the image preview stream, thereby realizing 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, thereby improving the user experience.

[0147] FIG5 is a diagram showing the principle of data sharing between applications under the delegation mechanism provided in an embodiment of the present application.

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

[0149] As shown in FIG5 , application A is an application that processes media data according to the unified media framework, and application B is an application that does not process media data according to the unified media framework.

[0150] Under the delegation mechanism, if application B, at its request, wishes to unify some of its shared data, it can parse and reconstruct this data, converting it into the same format as the unified data and reassembling it into data that other applications can recognize and use. This allows other applications that process media data according to the unified media framework, such as application A, to access and use this data by connecting to MediaDataKit.

[0151] FIG6 is a diagram showing the principle of data sharing between applications under the dynamic mechanism provided in an embodiment of the present application.

[0152] As shown in FIG6 , application A is an application that processes media data according to the unified media framework, and application B is an application that does not process media data according to the unified media framework.

[0153] In the dynamic mechanism, when application A wants to use another application's media data, it can send a query request to the unified media framework, requesting the other application's media data. The unified media framework then sends the query request to the other application. 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 in the same format as unified data. In this way, application A can access and use this media data X on this dynamic channel by connecting to MediaDataKit. After this sharing ends, the dynamic channel will be closed. If application A or another application wants to use media data X again, it will need to establish a dynamic channel again through the query response method.

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

[0155] In some implementations, application B may be an application that processes media data according to a unified media framework. In this case, based on the access mechanism, before accessing media data across applications, it is necessary to obtain the application's permission to access media data by querying the application.

[0156] It is understandable that Application A and Application B mentioned in Figures 4 to 6 above may refer to different applications on the same device, for example, Application A and Application B may be a camera application and a gallery application on the same device, respectively; or, Application A and Application B may refer to applications on different devices, for example, Application A may be a camera application on device A, and Application B may be a camera application or a gallery application on device B. It can be seen that the unified media framework provided in the embodiments of the present application can achieve smooth and simple sharing of media data between different applications on the same device, and can also achieve smooth and simple sharing of media data on different devices, breaking the boundaries of media data between applications and devices, and providing a platform for data sharing between applications and devices.

[0157] FIG7 is a flow chart of a data management method according to an embodiment of the present application.

[0158] As shown in FIG7 , the data management method mainly involves the following steps:

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

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

[0161] Exemplarily, the first application may be a third-party application, and the first application includes a program code for calling the first interface. For example, the first application may be a camera application, a gallery application, a music application, a video application, and the like.

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

[0163] The first function may be a photo taking function, a picture viewing function, a music playing function, a file creating function, a file deleting function, etc. For example, if the first function is a photo taking function, the user interface of the first application may be a photo taking interface, the first option may be a photo taking option, the first media data may include a picture, and the first function may include collecting the picture.

[0164] 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 embodiment of the present application, the first operating system can provide multiple first interfaces, and different first interfaces can be used to start different functions.

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

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

[0167] The second capability includes the third capability, which includes the ability to perform one or more of the following processing on media data: setting the data type of media data, managing the life cycle of media data, managing the security of media data, setting the data model of media data, and performing distributed management of media data.

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

[0169] For a detailed description of the interfaces and capabilities included in the first operating system, please refer to the relevant content of Figure 2A above.

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

[0171] This operation can be used to trigger the start of the first function. This operation can refer to a touch operation acting on the touch screen, or it can refer to a user's voice command, etc. The embodiment of the present application does not limit the form of this operation.

[0172] It is understood that in addition to activating functions by operating on options, the electronic device 100 can also activate application functions based on user voice commands or physical button operations when the screen is not displayed. For example, the electronic device 100 can detect the user's voice command "Open Camera" in the screen-off state, open the camera application, and activate the camera application's photo preview function, where the photo preview function can be used to execute the capture of the preview stream.

[0173] S103. The electronic device 100 starts the first function in response to the operation.

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

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

[0176] The parameters passed in by the first interface may include one or more of the following: a device name, an application name of the first application, parameters passed in by the first application, etc. The parameters passed in by the first application may be parameters and parameter content of the first function, wherein 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.

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

[0178] As can be seen, when the first application calls the first interface, device information, application information, and information related to the first function to be activated can be transmitted to the first interface. The information related to the first function can include parameters of the first function, the first media data itself, or information indicating the first media data. For example, if the first media data is an image, the information indicating the first media data can include the address, name, size, etc. of the image.

[0179] The device name may be the name of the electronic device 100. It is understandable that if the electronic device 100 cannot activate the first function and determines that other electronic devices can activate the first function in response to the operation, the device name may be the name of the other electronic device.

[0180] Exemplarily, if the first function includes a face recognition function, the parameters passed in 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, etc., wherein the name, identifier, index or code of the face recognition function are the parameters of the face recognition function, and the coordinates of the face and the image of the face are the parameter contents; if the first function includes a beauty function, the parameters passed in by the first application include: the name, identifier, index or code of the beauty function, the beauty level, face information, etc., wherein the name, identifier, index or code of the beauty function are the parameters of the beauty function, and the beauty level and face information are the parameter contents.

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

[0182] The capability indication information may be used to indicate the capability called by the media data interface in the second capability. For example, the capability indication information may be determined based on the first interface. For example, if the capability called downward by the media data interface is encoding capability, the capability indication information may be used to indicate encoding capability.

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

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

[0185] It can be seen that the parameters passed in by the second capability can be part of the parameters passed in by the media data interface. For specific descriptions of the parameters passed in by the second capability, please refer to the relevant description in the parameters passed in by the media data interface, which will not be repeated here.

[0186] The following uses different examples to describe the interface calling relationship within the operating system and the parameters transferred between interfaces when the electronic device 100 starts different functions.

[0187] Example 1: The first function is taking a photo

[0188] 8 is a schematic diagram of an interface call within the operating system when the electronic device 100 provided in an embodiment of the present application implements a photo-taking function through a camera application.

[0189] As shown in FIG8 , after the camera application detects that the user has started the photo-taking function, the camera application may call the PhotoMode interface, where the parameters passed by the PhotoMode interface include: DeviceName, AppName, key1, value1, key2, value2, and extend.

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

[0191] Acquisition indicates acquisition capabilities and is determined by the PhotoMode interface. PhotoMode indicates the photo function. PhotoMode can be determined by the interface name of the PhotoMode interface or by the parameters key1, value1, key2, and value2 passed by the PhotoMode interface. PictureFlow is the photo flow, used to store photo result data, and PreviewFlow is the preview flow, used to display preview data to the user in real time. PhotoMode and [PictureFlow, PreviewFlow, ...] are a key-value pair, where [PictureFlow, PreviewFlow, ...] represents the media data processed when the camera application initiates the photo function.

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

[0193] After the PhotoMode interface calls MediaDataKit, MediaDataKit can determine that the capability to be called next is the acquisition capability based on the parameter Acquisition passed. The parameters passed by the acquisition capability may include: PhotoMode, [PictureFlow, PreviewFlow, ...], and extend.

[0194] Then, during the collection process, one or more of the following capabilities can be used to standardize the media data format: media data type capability, data lifecycle capability, data security management capability, unified media data capability, and distributed management capability. For example, the media data type capability can be used to determine that the media data type is an image.

[0195] It is understood that Figure 8 is only an example. For example, in addition to the camera application shown in Figure 8, other applications with camera functions, such as instant messaging applications, can also trigger the camera function based on user operations. The parameters passed to MediaDataKit can include more or fewer parameters than those shown in Figure 8. The subsequent Figures 9 to 12 are also only examples and will not be repeated below.

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

[0197] Example 2: The first function is image viewing

[0198] 9 is a schematic diagram of an interface call within the operating system when the electronic device 100 provided in an embodiment of the present application implements a picture viewing function through a gallery application.

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

[0200] For a detailed description of the parameters passed by the PhotosMode interface, please refer to the relevant content in Figure 8 above, which will not be repeated here.

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

[0202] Storage indicates storage capacity, PhotosMode indicates image viewing, BigPicture indicates large images, and ThumbNail indicates thumbnails. PhotosMode and [BigPicture, ThumbNail, ...] form a key-value pair. BigPicture and ThumbNail represent the media data processed when the gallery app launches the image viewing function.

[0203] After the PhotosMode interface calls MediaDataKit, MediaDataKit can determine that the next interface to call is storage capability based on the parameter Storage passed. The parameters passed by storage capability may include: PhotosMode, [BigPicture, ThumbNail, ...], extend.

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

[0205] As can be seen from Figure 9, if the first function is a picture viewing function, the indication information of the first media data in the parameters passed in by the media data interface may include one or more of the following: large picture, thumbnail, and the capability indication information can be used to indicate the capability of performing storage for the first media data in the second capability.

[0206] Example 3: The first function is music playback

[0207] 10 is a schematic diagram of an interface call within the operating system when the electronic device 100 provided in an embodiment of the present application implements a music playback function through a music application.

[0208] As shown in Figure 10, after the music app detects the user's operation to play music, the music app can call the PlayMode interface. After the music app calls the PlayMode interface, the PlayMode interface calls MediaDataKit, and the parameters passed by MediaDataKit include: Play, PlayMusic, [MusicName, size, time, ...], and extend.

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

[0210] After the PlayMode interface calls MediaDataKit, MediaDataKit calls the playback capability. The parameters passed by the playback capability may include: PlayMusic, [MusicName, size, time, ...], extend.

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

[0212] As can be seen from Figure 10, if the first function is a music playback 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 may include one or more of the following: music name, music size, and music duration. The capability indication information can be used to indicate the capability of performing playback on the first media data in the second capability.

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

[0214] 11 is a schematic diagram of an interface call within the operating system when the electronic device 100 provided in an embodiment of the present application implements a file creation function through a storage-type application.

[0215] As shown in Figure 11, after a storage application detects a user creating a file, it can call the FileManageMode interface. The FileManageMode interface then calls MediaDataKit, passing the following parameters: Storage, CreateFileMode, [name, owner, position, size...], and extend.

[0216] Exemplarily, a storage application may refer to a file management application, which is not limited in the embodiments of the present application.

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

[0218] After the FileManageMode interface calls MediaDataKit, MediaDataKit calls storage capabilities. The parameters passed by storage capabilities may include: CreateFileMode, [name, owner, position, size...], extend.

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

[0220] 12 is a schematic diagram of an interface call within the operating system when the electronic device 100 provided in an embodiment of the present application implements a file deletion function through a storage-type application.

[0221] As shown in Figure 12, after a storage application detects a file deletion operation, it can call the FileManageMode interface. The FileManageMode interface then calls MediaDataKit, passing the following parameters: Storage, DeleteFileMode, [name, owner, position, size...], and extend.

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

[0223] After the FileManageMode interface calls MediaDataKit, MediaDataKit calls storage capabilities. The parameters passed by storage capabilities may include: DeleteFileMode, [name, owner, position, size...], extend.

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

[0225] As can be seen from Figures 11 and 12, if the first function is a file creation function or a file deletion function, and the first media data is a file, the indication information of the first media data in the parameters passed in by the media data interface may include one or more of the following: file name, file owner, file path, file size, and the capability indication information can be used to indicate the capability of performing storage on the first media data in the second capability.

[0226] For details about the contents not described in detail in Figures 9 to 12, please refer to the relevant contents in Figure 8.

[0227] In some implementations, the first media data may be 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.

[0228] For example, referring to FIG. 4 , the first application may be application A, and the second application may be application B.

[0229] That is, the first application and the second application can share media data through the access mechanism. Different applications can unify and standardize the media data of the applications and share the media data by calling the interface provided by the first operating system.

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

[0231] For example, referring to FIG. 5 , the first application may be application A, and the second application may be application B.

[0232] In other words, the second application can use the delegation mechanism to share media data. This is because some applications are not compatible with the first operating system and cannot process media data through the first interface, media data interface, second capability, and third capability. By standardizing the format of their media data, the second application can directly parse and reconstruct the media data, reassembling it into a unified format so that other applications can recognize and use it, thus achieving data sharing between applications.

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

[0234] For example, referring to FIG. 6 , the first application may be application A, and the second application may be application B.

[0235] In other words, applications can share media data through a dynamic mechanism. When an application needs to access media data across applications, it can use a query-response method. After obtaining access permission from an application, a temporary bridge for sharing media data can be established, preventing excessive openness and sharing of media data and ensuring media data security.

[0236] It should be noted that the second application mentioned above may refer to an application on the electronic device 100, so that the electronic device 100 can achieve smooth and simple sharing of data between applications through a variety of mechanisms, or the second application mentioned above may refer to other electronic devices, such as an application on the second electronic device, so that the electronic device 100 can achieve smooth and simple sharing of data between devices through a variety of mechanisms, wherein the second electronic device can be a device logged in with the same account as the electronic device 100.

[0237] In general, the data management method provided in the embodiments of the present application can provide a unified media data management platform to standardize the media data of each application, so that each application can process the media data according to unified rules and formats. At the same time, the unified media data management platform realizes unified management of media data, breaks the application boundaries, and makes data sharing between applications and devices simpler and smoother, thereby improving the user experience of using media data.

[0238] FIG13 is a schematic diagram of the hardware structure of the electronic device 100 provided in an embodiment of the present application.

[0239] The electronic device 100 may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, 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, an in-vehicle device, a smart home device, and / or a smart city device. The embodiments of the present application do not impose any particular restrictions on the specific type of the electronic device.

[0240] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity 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.

[0241] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

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

[0243] In some implementations, the processor 110 may be used to manage the execution of applications and initiate application functions based on user operations.

[0244] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0245] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.

[0246] 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.

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

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

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

[0250] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to 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 sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

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

[0252] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.

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

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

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

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

[0257] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).

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

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

[0260] In some embodiments, the internal memory 121 may be used to store media data and a computer program that implements the data management method provided in the embodiments of the present application. The media data may include but is not limited to text, pictures, audio, video, and the like.

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

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

[0263] The present application also 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, a first application runs on the first operating system, and the first operating system provides: a first interface, a media data interface, and a second capability; the first application is a three-party application, the first application includes a program code for calling the first interface, the first interface is used to call the media data interface, the media data interface encapsulates a second capability, the second capability includes the ability to perform one or more of the following processing on media data: acquisition, encoding, storage, sharing, decoding and playback, the second capability also includes a third capability, the third capability includes the ability to perform one or more of the following processing on media data: setting a data model of media data, setting a data type of media data, managing the life cycle of media data, managing the security of media data, and distributing management of media data, the processor executes the computer program to implement the method executed by the electronic device 100 in any of the above embodiments.

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

[0265] In one possible design, the chip system further includes a memory, which is used to store program instructions and data, and the memory is located inside or outside the processor.

[0266] The chip system can be composed of chips, or can include chips and other discrete devices.

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

[0268] Optionally, the memory in the chip system may be one or more. The memory may be integrated with the processor or may be provided separately from the processor, which is not limited in the embodiments of the present application. For example, the memory may be a non-transient processor, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or provided on different chips. The embodiments of the present application do not specifically limit the type of memory or the configuration of the memory and the processor.

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

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

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

[0272] It should be understood that the processor in the embodiments of the present application can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above-mentioned method embodiment can be completed by hardware integrated logic circuits in the processor or by software instructions. The above-mentioned processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The various methods, steps, and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of the present application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above-mentioned method.

[0273] In addition, embodiments of the present application further provide a device. Specifically, the device may be a component or module, and may include one or more processors and a memory connected to each other. The memory is configured to store a computer program. When the computer program is executed by one or more processors, the device performs the methods described in each of the above method embodiments.

[0274] The apparatus, computer-readable storage medium, computer program product, or chip provided in the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects of the corresponding methods provided above, and will not be repeated here.

[0275] The various implementation modes of this application can be combined arbitrarily to achieve different technical effects.

[0276] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described herein are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0277] Those skilled in the art will appreciate that all or part of the process steps in the above-described method embodiments can be implemented by a computer program instructing the relevant hardware. The program can be stored in a computer-readable storage medium, and when executed, the program can include the process steps in the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

[0278] In short, the above description is only an embodiment of the technical solution of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent replacements, improvements, etc. made based on the disclosure of this application should be included in the scope of protection of this application.

Claims

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

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

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

4. The method according to any one of claims 1 to 3, characterized in that, The parameters passed into the media data interface include: 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 passed in by the first application, and / or the indication information of the first media data is determined by the first operating system. The capability indication information is used to indicate the capability invoked by the media data interface in the second capability.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Citation Information

Patent Citations

  • Data management method and electronic device

    CN120255984B

  • Multimedia data processing method and device

    CN108469991A

  • Data synchronization method and device

    CN114691631A

  • Media information management method, device, equipment, medium and computer program product

    CN115221453A

  • Content management method, electronic equipment and system

    CN116561459A