Multimedia resource display method and electronic equipment
By implementing the display method of multimedia resources on electronic devices, the problem that users cannot share and synchronize multimedia resources across devices is solved, and the sharing and synchronization of multiple types of resources such as audio, video, pictures and documents is realized, improving the user experience.
Patent Information
- Application Number
- CN202310803762.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2024-12-31
AI Technical Summary
In the prior art, users cannot view the multimedia resources of other electronic devices on one electronic device, resulting in cumbersome operations and poor user experience. They can only share and synchronize pictures or videos, and cannot access other types of multimedia resources such as audio and documents. .
By implementing the display method of multimedia resources on the electronic device, the first electronic device is allowed to receive user operations, acquire and store multimedia resources, and send them to the second electronic device, so that it can display multimedia resources of the first electronic device, support Share and synchronize different types of multimedia resources such as audio, video, pictures and documents.
The multimedia resource sharing and synchronization across devices is realized. Users can access and view the multimedia resources of other electronic devices through one electronic device, improving the user experience and meeting the usage needs of different users.
Smart Images

Figure CN119225585A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electronic devices, and in particular to a method for displaying multimedia resources and an electronic device. Background Art
[0002] With the development of electronic device technology, the scope of electronic devices used by users has expanded from one electronic device to multiple electronic devices. When a user needs to view multimedia resources of an electronic device, the user can only view the multimedia resources (such as pictures or videos, etc.) of the electronic device on one electronic device.
[0003] That is, when the user needs to view multimedia resources in other electronic devices, the user needs to perform multiple operations to view the multimedia resources of other electronic devices respectively, which results in cumbersome operations for the user and poor user experience. Summary of the invention
[0004] The embodiments of the present application provide a method for displaying multimedia resources and an electronic device, which can realize sharing and synchronization of multimedia resources across multiple electronic devices.
[0005] In order to achieve the above purpose, the embodiment of the present application adopts the following technical solution:
[0006] In a first aspect, an embodiment of the present application provides a method for displaying multimedia resources, which is applied to a first electronic device, and the first electronic device may include a first application. The method for displaying multimedia resources may include: the first electronic device receives a first operation of a user on the first application; in response to the first operation, the first electronic device obtains and stores the multimedia resources of the first electronic device, wherein the multimedia resources include at least one of audio, video, pictures and documents; the first electronic device receives a first request sent by a second electronic device, and the first request is used to request the multimedia resources of the first electronic device; the first electronic device sends the multimedia resources of the first electronic device to the second electronic device according to the first request, so that the second electronic device displays the multimedia resources of the first electronic device.
[0007] Based on the method described in the first aspect, a user can obtain multimedia resources of the first electronic device through the first application of the first electronic device, and after the first electronic device receives the first request sent by the second electronic device, the multimedia resources of the first electronic device can be sent to the second electronic device according to the first request, so that the second electronic device displays the multimedia resources of the first electronic device, so that the user can access and view the multimedia resources included in the first electronic device through the second electronic device. In other words, the user can access and view the multimedia resources of other electronic devices through one electronic device, thereby realizing the sharing and synchronization of multimedia resources across devices.
[0008] Furthermore, the first electronic device can send the various types of multimedia resources it includes (such as audio, video, pictures or documents, etc.) to the second electronic device, that is, the solution of the present application can support the sharing and synchronization of different types of multimedia resources, meet the usage needs of different users, and enhance the user experience.
[0009] In combination with the first aspect, in another possible implementation, the above-mentioned response to the first operation, the first electronic device obtains and stores the multimedia resources of the first electronic device, which may include: in response to the first operation, starting the first media data middle station of the first electronic device; the first media data middle station obtains the multimedia resources of the first electronic device from the target database of the first electronic device, and stores the multimedia resources of the first electronic device.
[0010] Based on this possible implementation, the first application of the first electronic device can obtain and store the multimedia resources of the first electronic device from the target database of the first electronic device through the first media data middle station. In this way, the media data middle station of the electronic device can serve as a transfer station for multimedia resources. The media data middle station of the electronic device can obtain the multimedia resources of the electronic device and store the multimedia resources of the electronic device in the database of the media data middle station, so that other electronic devices can obtain the multimedia resources of the electronic device from the database of the media data middle station of the electronic device, and then the user can access and view the multimedia resources of the electronic device through other electronic devices.
[0011] In combination with the first aspect, in another possible implementation method, the multimedia resources of the first electronic device may include first multimedia resources and second multimedia resources, the target database may include a first database and a second database, and the first media data center obtains the multimedia resources of the first electronic device from the target database of the first electronic device and stores the multimedia resources of the first electronic device, which may include: the first media data center obtains the first multimedia resource from the first database and stores the first multimedia resource, wherein the first multimedia resource includes pictures or videos; the first media data center obtains the second multimedia resource from the second database and stores the second multimedia resource, wherein the second multimedia resource includes at least one of audio, video, pictures and documents.
[0012] Based on this possible implementation method, the first media data middle station can obtain the first multimedia resources of the first database, and can also obtain the second multimedia resources of the second database. In this way, the user can view the first electronic device including different types of multimedia resources through the first application of the first electronic device, and the user can view the first electronic device including different types of multimedia resources through the first application of the second electronic device.
[0013] In combination with the first aspect, in another possible implementation manner, the first database is a gallery database, and the second database is a media database.
[0014] Based on this possible implementation method, the first media data middle station can obtain the multimedia resources of the gallery database and media database of the first electronic device. In this way, the sharing and synchronization of pictures and videos stored in the gallery database between devices can be realized, and the sharing and synchronization of multimedia resources such as audio and documents stored in the media database between devices can also be realized.
[0015] In combination with the first aspect, in another possible implementation method, the above-mentioned first media data middle station obtains the multimedia resources of the first electronic device from the target database of the first electronic device and stores the multimedia resources of the first electronic device, which may include: when the first media data middle station is started, the first media data middle station creates a monitoring event, and the monitoring event is used to monitor whether the data in the target database changes; when the first media data middle station receives a monitoring notification, the first media data middle station obtains the multimedia resources of the first electronic device from the target database and stores the multimedia resources of the first electronic device, wherein the monitoring notification is a monitoring notification corresponding to the monitoring event, and the monitoring notification is used to indicate that the data in the target database has changed.
[0016] Based on this possible implementation, when the first media data center is started, the first media data center can monitor whether the data in the target database of the first electronic device has changed, so that when the first media data center monitors the data in the target database of the first electronic device has changed, the multimedia resources of the first electronic device can be obtained from the target database and stored. In this way, the first media data center can monitor the target database of the first electronic device in real time, so that when the data in the target database of the first electronic device changes, the multimedia resources in the target database of the first electronic device can be synchronized in time, thereby avoiding the user from being unable to obtain the multimedia resources of the first electronic device in time.
[0017] In combination with the first aspect, in another possible implementation method, the above-mentioned target database may include a first target data table, and the above-mentioned first media data middle station obtains the multimedia resources of the first electronic device from the target database and stores the multimedia resources of the first electronic device, which may include: the first media data middle station determines the first identification information of the second target data table, the second target data table is a data table corresponding to the first target data table, and the first identification information is used to indicate the data amount of metadata corresponding to the multimedia resources stored in the second target data table; the first media data middle station obtains the metadata corresponding to the multimedia resources of the first electronic device from the first target data table according to the first identification information; the first media data middle station stores the metadata corresponding to the multimedia resources of the first electronic device in the second target data table.
[0018] Based on this possible implementation method, when the first media data center obtains the multimedia resources of the first electronic device from the target database, the first media data center can synchronize the data in the first target data table in the target database to the second data table of the first media data center, which facilitates the storage of metadata corresponding to the multimedia resources and can improve the synchronization speed of the multimedia resources.
[0019] In combination with the first aspect, in another possible implementation method, the above-mentioned first media data center stores the metadata corresponding to the multimedia resources of the first electronic device in the second target data table, which may include: when there is metadata to be updated in the second target data table, updating the metadata to be updated according to the metadata corresponding to the multimedia resources of the first electronic device, and the metadata to be updated corresponds to the metadata corresponding to the multimedia resources of the first electronic device; when there is no metadata to be updated in the second target data table, inserting the metadata corresponding to the multimedia resources of the first electronic device into the second target data table.
[0020] Based on this possible implementation, when the first media data center stores the metadata corresponding to the multimedia resources of the first electronic device in the second target data table, if the metadata to be updated corresponding to the metadata of the multimedia resources of the first electronic device exists in the second target data table, the metadata to be updated is synchronously updated; if the metadata to be updated corresponding to the metadata of the multimedia resources of the first electronic device does not exist in the second target data table, the metadata corresponding to the multimedia resources of the first electronic device is inserted into the second target data table, so that abnormalities in the synchronized multimedia resources can be avoided.
[0021] In combination with the first aspect, in another possible implementation method, after the above-mentioned first media data center obtains the multimedia resources of the first electronic device from the target database of the first electronic device and stores the multimedia resources of the first electronic device, the above-mentioned multimedia resource display method may also include: the first media data center obtains a third multimedia resource from the target database, and the third multimedia resource includes the multimedia resources stored in the target database; the first media data center determines and deletes a fourth multimedia resource based on the third multimedia resource, wherein the fourth multimedia resource is a multimedia resource stored in the first media data center except the third multimedia resource.
[0022] Based on this possible implementation method, after the first media data center obtains the multimedia resources of the first electronic device from the target database of the first electronic device and stores the multimedia resources of the first electronic device, the first media data center obtains the third multimedia resource from the target database, and determines and deletes the fourth multimedia resource based on the third multimedia resource, thereby ensuring that the metadata corresponding to the multimedia resources stored in the first media data center is consistent with the metadata corresponding to the multimedia resources stored in the target database.
[0023] In combination with the first aspect, in another possible implementation method, the above-mentioned target database may include a first target data table, and the above-mentioned first media data middle station obtains the third multimedia resource from the target database, which may include: the first media data middle station obtains the second identification information of the first target data table, and the second identification information is used to indicate the data amount of metadata corresponding to the multimedia resources stored in the first target data table; when the second identification information is different from the first identification information, the first media data middle station obtains the metadata corresponding to the third multimedia resource from the first target data table according to the second identification information, wherein the first identification information is used to indicate the data amount of metadata corresponding to the multimedia resources stored in the second target data table of the first media data middle station, and the second target data table is a data table corresponding to the first target data table; the above-mentioned first media data middle station determines and deletes the fourth multimedia resource according to the third multimedia resource, which may include: the first media data middle station determines and deletes the metadata corresponding to the fourth multimedia resource from the second target data table according to the third multimedia resource, wherein the metadata corresponding to the fourth multimedia data is the metadata corresponding to the multimedia resources stored in the middle station in the second target data table except the metadata corresponding to the third multimedia resource.
[0024] Based on this possible implementation method, when the first media data center obtains the third multimedia resource from the target database, the first media data center can delete the metadata corresponding to the fourth multimedia resource that exists in the second target data table but does not exist in the first target data table from the second target data table. In this way, the multimedia resources of the first media data center can be synchronously deleted according to the changes of the multimedia resources in the target database, thereby ensuring that the metadata corresponding to the multimedia resources stored in the first media data center is consistent with the metadata corresponding to the multimedia resources stored in the target database.
[0025] In combination with the first aspect, in another possible implementation method, after the first media data center determines and deletes the metadata corresponding to the fourth multimedia resource from the second target data table based on the third multimedia resource, the display method of the multimedia resources may also include: the first media data center updates the first identification information based on the second identification information.
[0026] Based on this possible implementation method, after the first media data center determines and deletes the metadata corresponding to the fourth multimedia resource from the second target data table based on the third multimedia resource, the first media data center can update the first identification information based on the second identification information. In this way, when the first media data center synchronizes and adds or updates the first target data table next time, the first media data center can query the data to be synchronized based on the second identification information in the second target data table, thereby avoiding repeated synchronization of the same data.
[0027] In combination with the first aspect, in another possible implementation method, after the first media data center obtains the multimedia resources of the first electronic device from the target database of the first electronic device and stores the multimedia resources of the first electronic device, the method for displaying the multimedia resources also includes: the first electronic device displays a first interface, and displays the multimedia resources of the first electronic device on the first interface, wherein the first interface is an interface corresponding to the first application.
[0028] Based on this possible implementation, the user can access and view various types of multimedia resources in the first electronic device through the first application of the first electronic device, which provides a better user experience.
[0029] In combination with the first aspect, in another possible implementation method, the above-mentioned target database includes a first database and a second database, and the first media data center obtains the multimedia resources of the first electronic device from the target database of the first electronic device and stores the multimedia resources of the first electronic device, which may include: the first media data center obtains the multimedia resources of the first electronic device from the first database; when the multimedia resources of the first electronic device meet the first preset condition and the first media data center does not store the multimedia resources of the first electronic device, the first media data center stores the multimedia resources of the first electronic device and sets the identification information of the preset identification of the multimedia resources of the first electronic device to the third identification information, wherein the third identification information is used to indicate that the multimedia resources of the first electronic device do not meet the second preset condition; when the first media data center obtains the fifth multimedia resource from the second database, the identification information of the preset identification of the multimedia resources of the first electronic device is updated to the fourth identification information, wherein the fifth multimedia resource is the same multimedia resource as the multimedia resource of the first electronic device, and the fourth identification information is used to indicate that the multimedia resources of the first electronic device meet the second preset condition.
[0030] Based on this possible implementation, when the multimedia resources of the first electronic device obtained from the first database meet the first preset condition, the identification information of the preset identification of the multimedia resources of the first electronic device is set to the third identification information, so that after the data corresponding to the multimedia resources of the first electronic device is obtained from the second database, the identification information of the preset identification of the multimedia resources of the first electronic device is updated to the fourth identification information. In this way, it is possible to avoid synchronizing abnormal data in the first database to the first media data middle station of the first electronic device.
[0031] In combination with the first aspect, in another possible implementation method, the above-mentioned displaying the multimedia resources of the first electronic device on the first interface may include: displaying the multimedia resources of the first electronic device on the first interface when the identification information corresponding to the preset identification of the multimedia resources of the first electronic device meets the second preset condition.
[0032] Based on this possible implementation method, when the identification information corresponding to the preset identification of the multimedia resources of the first electronic device meets the second preset condition, the multimedia resources of the first electronic device are displayed on the first interface, which can avoid the existence of abnormal multimedia resources of the first electronic device causing the first electronic device to be unable to display the multimedia resources.
[0033] In combination with the first aspect, in another possible implementation, the first application is a photo album application, an image editing application, a video application, a music application, a file management application or a communication application.
[0034] Based on this possible implementation, the user can not only view the multimedia resources of the electronic device and other electronic devices through the local album application of the electronic device, but also view the multimedia resources of the electronic device and other electronic devices through other applications of the electronic device (such as image editing applications, video applications, music applications, file management applications or communication applications). In this way, the user can select the corresponding application according to the usage habits and the type of multimedia resources to be viewed, and can directly view the multimedia resources of the electronic device and other electronic devices through the application, which is simple to operate and can improve the user experience.
[0035] In a second aspect, an embodiment of the present application provides a display device for multimedia resources, which can be applied to an electronic device to implement the method in the first aspect. The function of the display device for multimedia resources can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions, for example, a receiving module, a synchronization module, and a sending module.
[0036] The receiving module may be used to receive a first operation of a user on a first application.
[0037] The synchronization module can be used to obtain and store multimedia resources of the first electronic device in response to the first operation, wherein the multimedia resources include at least one of audio, video, picture and document.
[0038] The receiving module may also be used to receive a first request sent by the second electronic device, where the first request is used to request multimedia resources of the first electronic device.
[0039] The sending module may be configured to send the multimedia resources of the first electronic device to the second electronic device according to the first request, so that the second electronic device displays the multimedia resources of the first electronic device.
[0040] In a third aspect, an electronic device is provided, which has the function of implementing the method described in the first aspect. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
[0041] In a fourth aspect, an electronic device is provided, comprising: a processor and a memory; the memory is used to store computer execution instructions, and when the electronic device is running, the processor executes the computer execution instructions stored in the memory to enable the electronic device to perform a method for displaying multimedia resources as described in any one of the first aspects above.
[0042] In a fifth aspect, an electronic device is provided, comprising: a processor; the processor is used to couple with a memory, and after reading instructions in the memory, execute the method for displaying multimedia resources as described in any one of the above-mentioned first aspects according to the instructions.
[0043] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by an electronic device, the electronic device implements a method for displaying multimedia resources as described in any one of the first aspect or possible implementations of the first aspect.
[0044] In a seventh aspect, an embodiment of the present application provides a computer program product, comprising a computer-readable code. When the computer-readable code is executed in an electronic device, the electronic device implements a method for displaying multimedia resources as described in any one of the first aspect or possible implementations of the first aspect.
[0045] In an eighth aspect, a device (for example, the device may be a chip system) is provided, the device including a processor for supporting an electronic device to implement the functions involved in the first aspect above. In one possible design, the device also includes a memory for storing program instructions and data necessary for the electronic device. When the device is a chip system, it may be composed of a chip, or may include a chip and other discrete devices.
[0046] It should be understood that the beneficial effects of the second to eighth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 A schematic diagram of a display interface of an electronic device in the prior art;
[0048] Figure 2 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0049] Figure 3 A schematic diagram of the software structure of an electronic device provided in an embodiment of the present application Figure 1 ;
[0050] Figure 4 A schematic diagram of the software structure of an electronic device provided in an embodiment of the present application Figure 2 ;
[0051] Figure 5 A schematic diagram of the software structure of an electronic device provided in an embodiment of the present application Figure 3 ;
[0052] Figure 6 A schematic diagram of data sources of a media data middle station provided in an embodiment of the present application;
[0053] Figure 7 A schematic diagram of synchronizing multimedia resources in a media data center provided in an embodiment of the present application;
[0054] Figure 8 A display interface diagram of an electronic device provided in an embodiment of the present application Figure 1 ;
[0055] Fig. 9 A display interface diagram of an electronic device provided in an embodiment of the present application Figure 2 ;
[0056] Fig.10 A display interface diagram of an electronic device provided in an embodiment of the present application Figure 3 ;
[0057] Fig.11 A schematic diagram of a process for synchronizing multimedia resources in a media data center provided in an embodiment of the present application Figure 1 ;
[0058] Fig.12 A schematic diagram of a process for synchronizing multimedia resources in a media data center provided in an embodiment of the present application Figure 2 ;
[0059] Fig.13 A scenario diagram of a method for displaying multimedia resources provided in an embodiment of the present application Figure 1 ;
[0060] Fig.14 A scenario diagram of a method for displaying multimedia resources provided in an embodiment of the present application Figure 2 ;
[0061] Fig.15 A scenario diagram of a method for displaying multimedia resources provided in an embodiment of the present application Figure 3 ;
[0062] Fig.16 A schematic diagram of a process for synchronizing multimedia resources in a media data center provided in an embodiment of the present application Figure 3 ;
[0063] Fig.17 A scenario diagram of a method for displaying multimedia resources provided in an embodiment of the present application Figure 4 ;
[0064] Fig.18 A scenario diagram of a method for displaying multimedia resources provided in an embodiment of the present application Figure 5 ;
[0065] Fig.19A scenario diagram of a method for displaying multimedia resources provided in an embodiment of the present application Figure 6 ;
[0066] Fig. 20 A flowchart of a method for displaying multimedia resources provided in an embodiment of the present application Figure 1 ;
[0067] Fig.21 A scenario diagram of a method for displaying multimedia resources provided in an embodiment of the present application Figure 7 ;
[0068] Fig. 22 A flowchart of a method for displaying multimedia resources provided in an embodiment of the present application Figure 2 ;
[0069] Fig.23 A schematic diagram of the structure of a multimedia resource display device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0070] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0071] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.
[0072] In order to clearly describe the technical solutions of the embodiments of the present application, some terms and technologies involved in the embodiments of the present application are briefly introduced below.
[0073] With the rapid development of electronic device technology, the types and number of electronic devices used in users' lives are increasing. For example, the electronic devices used by users may include mobile phones, tablet computers, etc. In the scenario where a user uses multiple electronic devices, the user often needs to view multimedia resources (such as pictures or videos, etc.) of multiple electronic devices.
[0074] Currently, when a user views multimedia resources of multiple electronic devices, the user can only view the multimedia resources of one electronic device on the electronic device, but cannot view the multimedia resources of other electronic devices on the electronic device, nor can the user view the multimedia resources of the electronic device on other electronic devices.
[0075] Specifically, the user can view the multimedia resources of the electronic device through an application program (such as an album application program) installed locally on the electronic device.
[0076] For example, combined with Figure 1 As shown, taking the electronic device as a mobile phone as an example, when a user uses the album application of the mobile phone to view multimedia resources (such as pictures or videos), the local multimedia resources, such as the "All Photos" album and the "Camera" album, can be displayed in the interface of the album application of the mobile phone. In addition, the private data of the mobile phone's gallery can also be displayed in the interface of the album application of the mobile phone, such as the "My Favorites" album, the "Portraits" album, the "Places" album, and the "Food" album.
[0077] However, the user can only view the multimedia resources stored in the mobile phone through the mobile phone, and cannot view the multimedia resources stored in other electronic devices of the user (such as other mobile phones, tablet computers or laptops, etc.) through the mobile phone. Also, the user cannot view the multimedia resources of the mobile phone through other electronic devices.
[0078] In some scenarios, if the user needs to use the mobile phone to view multimedia resources of other electronic devices, the user needs to send the multimedia resources of other electronic devices to the mobile phone through the application of other electronic devices (such as an album application or a third-party application), and then the user can view the multimedia resources of other electronic devices on the mobile phone.
[0079] Accordingly, if the user needs to use other electronic devices to view the multimedia resources of the mobile phone, the user needs to send the multimedia resources of the mobile phone to other electronic devices through the application of the mobile phone (such as the photo album application or the third-party application), and then the user can view the multimedia resources of the mobile phone on the other electronic devices. Among them, the third-party application can be a communication application, a picture editing application, a music application, an office application, etc.
[0080] Taking a specific scenario as an example, since mobile phones have many advantages such as excellent camera performance, support for multiple shooting functions, easy to carry, and simple operation, users are often accustomed to using mobile phones to take pictures or videos. However, compared with mobile phones, computers (such as tablets, laptops or desktop computers) have many advantages such as powerful image processing capabilities, larger screen sizes, higher screen resolutions, and higher screen accuracy. Users will choose to use computers to edit and process pictures or videos. However, since mobile phones and computers cannot share and synchronize multimedia resources, users cannot directly view pictures or videos on their mobile phones on the computer. Instead, they need to send the pictures or videos in the mobile phone to the computer first before they can use the computer to edit and process the pictures or videos taken by the mobile phone, resulting in a cumbersome operation process and failing to provide users with a convenient and fast experience.
[0081] To sum up, in the prior art, when a user uses multiple electronic devices, multimedia resources cannot be shared and synchronized between the multiple electronic devices, resulting in the user being unable to access and view the multimedia resources of other electronic devices through one electronic device. The user needs to view the multimedia resources on multiple electronic devices separately, and the operation process is cumbersome, which in turn leads to a low user experience.
[0082] In addition, even if an electronic device can display multimedia resources of other electronic devices, the electronic device can only view pictures or videos of other electronic devices through the photo album application. That is to say, on the one hand, users can only access and view pictures or videos of other electronic devices through electronic devices, but cannot access and view other types of multimedia resources such as audio and documents of other electronic devices, and the types of multimedia resources that can be shared are single. On the other hand, users can only access and view pictures or videos of other electronic devices through the local photo album application of the electronic device, while other applications of the electronic device (such as third-party applications) cannot access and view pictures or videos of other electronic devices, and the user experience is poor.
[0083] In response to the above problems, an embodiment of the present application provides a method for displaying multimedia resources, which can be applied to electronic devices. When a user needs to access and view the multimedia resources included in a first electronic device through a second electronic device, the first electronic device can send the multimedia resources included in it to the second electronic device, so that the second electronic device displays the multimedia resources included in the first electronic device, so that the user can access and view the multimedia resources included in the first electronic device through the second electronic device. In other words, a user can access and view the multimedia resources of other electronic devices through one electronic device, thereby achieving sharing and synchronization of multimedia resources across devices.
[0084] Furthermore, the first electronic device can send the various types of multimedia resources it includes (such as audio, video, pictures or documents, etc.) to the second electronic device, that is, the solution of the present application can support the sharing and synchronization of different types of multimedia resources, meet the usage needs of different users, and enhance the user experience.
[0085] In addition, according to the solution of the present application, users can not only view the multimedia resources of the electronic device and other electronic devices through the local album application of the electronic device, but also view the multimedia resources of the electronic device and other electronic devices through other applications of the electronic device (such as third-party applications). In this way, users can select corresponding applications according to their usage habits and the types of multimedia resources to be viewed, and can directly view the multimedia resources of the electronic device and other electronic devices through the application, which is simple to operate and can improve the user experience.
[0086] The following describes a method for displaying multimedia resources provided in an embodiment of the present application.
[0087] The multimedia resource display method provided in the embodiment of the present application can be applied to an electronic device. The electronic device can be the first electronic device mentioned above, or the second electronic device mentioned above.
[0088] In some embodiments, the electronic device may be a mobile phone, a tablet computer, a handheld computer, a personal computer (PC), a cellular phone, a personal digital assistant (PDA), a wearable device, etc. The embodiments of the present application do not limit the specific form of the electronic device.
[0089] That is, the first electronic device or the second electronic device can be a mobile phone, a tablet computer, a handheld computer, a personal computer (PC), a cellular phone, a personal digital assistant (PDA), a wearable device, etc. And the specific form of the first electronic device can be the same as or different from the specific form of the second electronic device.
[0090] For example, when the first electronic device is a mobile phone, the second electronic device may be a mobile phone, or may be a tablet computer, a handheld computer, or the like.
[0091] For example, taking the electronic device (ie, the first electronic device or the second electronic device) as a mobile phone, Figure 2 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown.
[0092] like Figure 2 As shown, the electronic device may include a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, a sensor module 280, a button 290, a motor 291, an indicator 292, a camera 293, a display screen 294, and a subscriber identification module (SIM) card interface 295, etc. Among them, the sensor module 280 may include a pressure sensor 280A, a gyroscope sensor 280B, an air pressure sensor 280C, a magnetic sensor 280D, an acceleration sensor 280E, a distance sensor 280F, a proximity light sensor 280G, a fingerprint sensor 280H, a temperature sensor 280J, a touch sensor 280K, an ambient light sensor 280L, a bone conduction sensor 280M, etc.
[0093] It is to be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device. In other embodiments, the electronic device may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0094] The processor 210 may include one or more processing units, for example, the processor 210 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0095] The controller can be the nerve center and command center of the electronic device. The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching and executing instructions.
[0096] The processor 210 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory may store instructions or data that the processor 210 has just used or cyclically used. If the processor 210 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 210, and thus improves the efficiency of the system.
[0097] In some embodiments, the processor 210 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0098] The wireless communication function of the electronic device can be implemented through antenna 1, antenna 2, mobile communication module 250, wireless communication module 260, modem processor and baseband processor.
[0099] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0100] The mobile communication module 250 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to electronic devices. The mobile communication module 250 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 250 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 250 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 250 can be set in the processor 210. In some embodiments, at least some of the functional modules of the mobile communication module 250 can be set in the same device as at least some of the modules of the processor 210.
[0101] The wireless communication module 260 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 electronic devices. The wireless communication module 260 can be one or more devices integrating at least one communication processing module. The wireless communication module 260 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 210. The wireless communication module 260 can also receive the signal to be sent from the processor 210, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0102] In some embodiments, the antenna 1 of the electronic device is coupled to the mobile communication module 250, and the antenna 2 is coupled to the wireless communication module 260, so that the electronic device can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology.
[0103] The electronic device implements the display function through a GPU, a display screen 294, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 294 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 210 may include one or more GPUs that execute program instructions to generate or change display information.
[0104] The display screen 294 is used to display pictures, videos, etc. The display screen 294 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode or an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device may include 1 or N display screens 294, where N is a positive integer greater than 1.
[0105] The electronic device can realize the shooting function through the ISP, the camera 293, the video codec, the GPU, the display screen 294 and the application processor, etc. In some embodiments, the electronic device can include 1 or N cameras 293, where N is a positive integer greater than 1.
[0106] The internal memory 221 can be used to store computer executable program codes, which include instructions. The processor 210 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 221. The internal memory 221 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, a picture playback function, etc.), etc. The data storage area may store data established during the use of the electronic device (such as audio data, a phone book, etc.), etc. In addition, the internal memory 221 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0107] The acceleration sensor 280E can periodically collect acceleration data of the electronic device at a certain frequency. For example, the acceleration magnitude of the electronic device in various directions (generally XYZ three-axis directions) can be collected.
[0108] Of course, it is understandable that the above Figure 2 The figure is only an exemplary description when the electronic device is in the form of a mobile phone. If the electronic device is in the form of a tablet computer, a handheld computer, a PC, a PDA, a wearable device (such as a smart watch, a smart bracelet), etc., the structure of the electronic device may include Figure 2 The structure shown in the figure is less than Figure 2 More structures are shown in the figure, which are not limited here.
[0109] It is understandable that, generally speaking, the realization of electronic device functions requires not only hardware support but also software cooperation.
[0110] The software system of the electronic device may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device.
[0111] Figure 3 It is a software structure block diagram of the electronic device provided in the embodiment of the present application.
[0112] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and the system library (also called the Native layer), and the kernel layer.
[0113] The application layer can include a series of application packages. Figure 3 As shown, the application package may include applications such as camera, gallery (also called album), calendar, phone, map, navigation, WLAN, Bluetooth, music, video, short message, etc. The application framework layer provides application programming interface (application programming interface, API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0114] like Figure 3 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0115] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0116] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, pictures, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0117] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0118] The phone manager is used to provide communication functions for electronic devices, such as the management of call status (including answering, hanging up, etc.).
[0119] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0120] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
[0121] The Android runtime includes the core library and the virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
[0122] The core library consists of two parts: one is the function that the Java language needs to call, and the other is The core library.
[0123] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0124] The system library may include multiple functional modules, such as a surface manager, a media library, a 3D graphics processing library (such as OpenGL ES), a 2D graphics engine (such as SGL), etc.
[0125] The surface manager is used to manage the display subsystem and provide the fusion of two-dimensional and three-dimensional layers for multiple applications.
[0126] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats.
[0127] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing.
[0128] A 2D graphics engine is a drawing engine for 2D drawings.
[0129] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
[0130] The methods in the following embodiments can all be implemented in an electronic device having the above hardware structure or software structure.
[0131] In some examples, in order to implement the method for displaying multimedia resources provided in the embodiments of the present application, Figure 3 Based on the software structure diagram of the electronic device shown in Figure 4 As shown, the application framework layer may also include a media data middle platform. It should be noted that the media data middle platform may also be located in the application layer. In the embodiment of the present application, the media data middle platform is located in the application framework layer as an example for schematic illustration.
[0132] like Figure 4 The media data middle station may be located in the media service middle station, that is, the media service middle station may include the media data middle station.
[0133] The media data platform can be a media data platform application (APP). The media data platform refers to the digital transformation of various products and services of traditional media, aggregating and integrating the massive data originally scattered in various links and business departments, and realizing the efficient use and value mining of these data by building a shared data platform.
[0134] The media data middle station can be used to obtain and store the multimedia resources of the electronic device (also called the local device) and send the multimedia resources of the electronic device to other electronic devices (also called remote devices). The media data platform can also be used to receive multimedia resources sent by other electronic devices.
[0135] That is to say, the media data middle station can serve as a transfer station for multimedia resources. On the one hand, the media data middle station of the electronic device can obtain the multimedia resources of the electronic device and store the multimedia resources of the electronic device in the database of the media data middle station, so that other electronic devices can obtain the multimedia resources of the electronic device from the database of the media data middle station of the electronic device, and then the user can access and view the multimedia resources of the electronic device through other electronic devices. On the other hand, the media data middle station of the electronic device can obtain and store the multimedia resources included in other electronic devices from the media data middle stations of other electronic devices, so that the user can access and view the multimedia resources of other electronic devices through the electronic device. That is, through the media data middle station of the electronic device, the sharing and synchronization of multimedia resources across devices can be realized, and then the access to multimedia resources across devices can be realized.
[0136] In some examples, such as Figure 4 As shown, the media data center may include a data management module and a data synchronization module. The media data center may also include a database for storing multimedia resources (ie, multimedia resources of the electronic device and multimedia resources of other electronic devices).
[0137] The data management module can provide an access interface for the multimedia resources of the media data center. The application of the electronic device (such as an album application or a third-party application) can access and view the multimedia resources stored in the media data center through the access interface of the multimedia resources of the media data center. For example, access and view the local multimedia resources, remote multimedia resources, local thumbnails (i.e., thumbnails corresponding to the multimedia resources included in the electronic device), and remote thumbnails (i.e., thumbnails corresponding to the multimedia resources included in other electronic devices) of the media data center.
[0138] The data synchronization module can be used to synchronize the multimedia resources of the electronic device (also referred to as the local device) to the media data center. That is, the data synchronization module can be used to obtain the multimedia resources included in the electronic device, and store the multimedia resources included in the electronic device in the corresponding database of the media data center. For example, the data synchronization module can be used to obtain the data in the media (MediaProvider) database of the electronic device and the data in the gallery database, and store the data in the media database of the electronic device and the data in the gallery database to the media master database of the media data center.
[0139] like Figure 4 As shown, the media business middle platform can also include a media data middle platform, a media post-processing framework and material management services.
[0140] The media post-processing framework can be a software framework for processing multimedia resources. The media post-processing framework can be used to process, convert and enhance multimedia resources such as audio, video or pictures. For example, the media post-processing framework can perform operations such as encoding and decoding, format conversion, quality optimization, filter effects, and special effects addition on videos. The media post-processing framework can also perform operations such as trimming, mixing, noise reduction, and sound effect processing on audio. The media post-processing framework can also add filters, repair, adjust colors, and adjust contrast on pictures.
[0141] A material management service may be a service for organizing, classifying, retrieving and managing media materials (such as audio, video, pictures or documents).
[0142] like Figure 4 As shown, the picture library (ie, MediaLibrary, also called media library) can be located in the media service center. That is, the media service center can also include a picture library.
[0143] The gallery can be used to store, manage and display some multimedia materials (such as pictures or videos). Native pictures and videos can also be used to store, manage and display private data. The private data can be pictures and videos generated by the processing logic of the gallery. For example, the private data can include pictures and videos collected by users, or data in classified albums (such as portrait albums, location albums or food albums, etc.).
[0144] like Figure 4 As shown, the application framework layer may also include a fusion interconnection middle station. The fusion interconnection middle station can realize the sharing of multimedia resources among multiple electronic devices. The above-mentioned media data middle station can realize the sharing and synchronization of multimedia resources across devices through the fusion interconnection middle station. That is, through the fusion interconnection middle station of the electronic device, the media data middle station of the electronic device can receive multimedia resources sent by other electronic devices (also referred to as remote devices), and send the multimedia resources of the electronic device to other electronic devices.
[0145] The fusion interconnection middle station may include a device management module, a data transmission module, a device virtualization module, and a soft resource collaboration module. Among them, the device management module can be used to manage the remote devices corresponding to the multimedia resources stored in the media data middle station. For example, the device management module can manage the remote device list displayed on the electronic device, and the remote device list can include the device names of multiple remote devices (i.e., other electronic devices other than the electronic device), and the multimedia resources of the remote devices have been stored in the corresponding database of the media data middle station of the electronic device. The data transmission module can be used for multimedia resource transmission between devices. For example, the media data middle station can receive multimedia resources sent by the remote device through the data transmission module of the fusion interconnection middle station. The media data middle station can also send the local multimedia resources to the remote device through the data transmission module of the fusion interconnection middle station. The device virtualization module can be used to abstract physical devices (such as remote devices) into virtual logical devices, so that multiple virtual devices can share and access the multimedia resources of the physical device. The soft resource collaboration module can be used to manage software resources so that software resources can be shared, interacted and collaboratively utilized in different application systems.
[0146] The application framework layer may also include system services. System services may refer to programs or processes running in the operating system to support the normal operation of the system and improve system-level functions and services. Exemplarily, a system service may be a service in the Android Open Source Project (AOSP). The service in AOSP is one of the components that provides background operation in the Android system framework layer, which can perform certain time-consuming operations, background data processing, receive notifications, etc. without the need for an interactive user interface. Developers can also use the service API in AOSP to implement their own system-level services or background services to meet the specific needs of the application.
[0147] System services may include media providers (i.e., MediaProvider), camera services, player services, codec services, audio services, and the like. Among them, the media provider may be a system-level service provided by the Android system to applications, which is mainly used to manage various media data on the device. The camera service may be used to manage the camera of an electronic device. Through the camera service, the application may call various functions and properties of the camera hardware, such as opening a preview, taking photos, or recording videos. The player service may be used to manage the multimedia resources of the electronic device. By using the player service, the application may conveniently play multimedia resources of various formats on the electronic device and implement the function of audio or video playback. The codec service may be used for encoding and decoding operations of various media formats. By using the codec service, the application may conveniently encode, decode, or transcode a variety of audio and video media files. The audio service may be used to manage and control the input and output of all audio on the electronic device. By using the audio service, the application may conveniently manage various audio resources of the electronic device, such as microphones, headphones, and the like, and perform operations such as recording, playing, and mixing on them.
[0148] like Figure 4 As shown, the application layer may also include applications such as camera, photo album, file management, video editing, music, and video.
[0149] like Figure 4 As shown, a software development kit (SDK), an audio kit (Audio Kits) and a media extension interface may also be included between the application layer and the application framework layer.
[0150] A software development kit is a collection of software development tools that assist developers in creating applications in a specific platform, operating system, software framework, or hardware environment. A software development kit may include a media store (MediaStore). A media store can be a content provider (Content Provider) that provides access to various media files (such as pictures, videos, audio, etc.) on a device. By using a media store, you can access media files, get thumbnails, query media files, and other functions.
[0151] Audio toolkit refers to a series of software libraries and tool collections for processing, editing, generating and playing audio. These tool collections can be used in audio programming to achieve functions such as visual analysis of audio signals, format conversion, special effects addition, audio repair and enhancement.
[0152] Media extension interfaces refer to a series of programming interfaces that can be used to enhance or improve media-related applications. These interfaces are usually provided on specific operating systems, frameworks or platforms, and are designed to enhance functions related to media processing and playback such as audio, video, and images, such as audio and video codecs, streaming protocol support, and image effects.
[0153] For example, the media extension interface may include a media middle platform interface, a media data middle platform interface, and a gallery provider (i.e., GalleryProvider) interface. Among them, the multimedia resources in the electronic device can be managed, processed, and called through the media middle platform interface. The upper-layer application in the electronic device can call the media data middle platform in the electronic device through the media data middle platform interface. The upper-layer application can be an application included in the application layer, such as a camera, photo album, file management, video editing, music, and video. The upper-layer application can be a system application of the electronic device or a third-party application. The gallery provider can be called through the gallery provider interface. The gallery provider refers to the function or component in the software or application that is responsible for managing and providing access to the media file library (such as pictures and videos).
[0154] like Figure 4As shown, the application framework layer can also include a security foundation platform, a converged computing platform, and a communication foundation platform. The security foundation platform refers to creating a computing environment on a computer or mobile device that is more secure than the operating system. The environment has independent processors, dedicated security kernels, strictly protected storage space, and a trusted execution environment. The converged computing platform refers to integrating and coordinating traditional computing, network, and storage resources through virtualization technology to achieve a more efficient, flexible, scalable, and secure computing environment. It can integrate data of various types and sources, and use advanced technologies such as artificial intelligence and machine learning to process and analyze these data. The communication foundation platform refers to the infrastructure used to build and manage various communication networks in the field of information and communication technology, including physical equipment, system software, security mechanisms, open interfaces, and application services. It is a platform for unified management and coordination of various communication protocols, technologies, and services, and provides the necessary technical support for communication operators and service providers to carry out business and services.
[0155] like Figure 4 As shown, a hardware abstraction layer may also be included between the application framework layer and the chip component. The hardware abstraction layer may include a hardware abstraction layer interface definition language (HAL interface definition language, HIDL) interface. The HIDL interface is a programming specification for describing a hardware abstraction layer (HAL) interface. The HIDL interface provides a connection and communication method between the HAL and the upper-level application or Android framework.
[0156] Below Figure 4 Based on the software structure diagram of the electronic device shown, combined with Figure 5 The above-mentioned media data middle platform and the database included in the media data middle platform are schematically illustrated.
[0157] like Figure 5 As shown, the media data middle station may include an application programming interface (API) interface layer. The application programming interface (API) interface layer can be used to provide relevant interfaces of the media data middle station, and the upper-layer application can call the media data middle station through the relevant interfaces of the media data middle station. Exemplarily, the application programming interface interface layer may include a media data middle station interface, that is, the media data middle station interface may be located in the application programming interface interface layer. For example, the application of the electronic device (distributed gallery application and distributed file management application) can call the media data middle station through the media data middle station interface of the application programming interface interface layer.
[0158] The media data middle platform may also include a metadata access module, a local media (Media Provider, MP) database synchronization module, a local gallery database synchronization module and a permission management module for external open interfaces.
[0159] The metadata access module can be used to obtain and operate metadata corresponding to multimedia resources. For example, the metadata access module can be used to read metadata, edit metadata, search and filter metadata, customize metadata, and parse metadata, etc. Among them, metadata can be information that describes the content, attributes, and characteristics of multimedia resources. For example, metadata can include media type, title, author, creation time, resolution, duration, geographic location, etc. The upper-level application of the electronic device can access the database of the media data middle platform through the metadata access module, that is, the upper-level application of the electronic device can obtain and operate the metadata corresponding to the multimedia resources stored in the database of the media data middle platform through the metadata access module.
[0160] In some examples, the upper-layer application of the electronic device can obtain and operate the metadata corresponding to the multimedia resources of the electronic device (also referred to as the local device) through the metadata access module, and can also obtain and operate the metadata corresponding to the multimedia resources of other electronic devices (also referred to as remote devices). The metadata corresponding to the multimedia resources of the electronic device may include the metadata corresponding to the multimedia resources stored in the media (MP) database of the electronic device and the metadata corresponding to the multimedia resources stored in the gallery database of the electronic device. The metadata corresponding to the multimedia resources stored in the remote device may also include the metadata corresponding to the multimedia resources stored in the media (MP) database of the remote device and the metadata corresponding to the multimedia resources stored in the gallery database of the remote device.
[0161] The local media database synchronization module can be used to synchronize the metadata corresponding to the multimedia resources stored in the media (MP) database of the electronic device (also referred to as the local device) to the database of the media data center. The electronic device can synchronize the multimedia resources of the media (MP) database between the electronic device (also referred to as the local device) and other electronic devices through the local media database synchronization module.
[0162] The gallery database synchronization module of the present invention can be used to synchronize metadata corresponding to multimedia resources stored in the gallery database of an electronic device (also referred to as the local device) to the database of the media data center. The electronic device can synchronize multimedia resources of the gallery database between the electronic device (also referred to as the local device) and other electronic devices through the local gallery database synchronization module.
[0163] The permission management module of the externally open interface can be used to determine whether the third-party application of the electronic device has access rights when the third-party application of the electronic device accesses the database of the media data middle platform, so that the third-party application can access the database of the media data middle platform if the third-party application has access rights.
[0164] like Figure 5 As shown, the media data middle platform can also include a device discovery and connection module, a thumbnail access capability module, a cross-end original file access module, a remote metadata synchronization module, a remote thumbnail management client, a remote thumbnail management server, and a local thumbnail management module.
[0165] like Figure 5 As shown, the media data middle platform can also include a fusion interconnection middle platform software development kit (SDK). The media data middle platform can call the fusion interconnection middle platform through the fusion interconnection middle platform software development kit, and then realize the sharing and synchronization of multimedia resources across devices through the fusion interconnection middle platform.
[0166] The Fusion Interconnection Middle Platform Software Development Kit may include device management (Device Manager) services, data collaboration services, and data transmission services. Among them, through the device management service, the device management module of the Fusion Interconnection Middle Platform can be called, and then the remote devices corresponding to the multimedia resources stored in the media data middle platform can be managed. Data collaboration services may include distributed databases and distributed file systems. Distributed databases can be used to synchronize multimedia resources between cross-end databases. Distributed file systems can be used for cross-end file system mounting and removal, as well as cross-end file access, deletion, movement, copying, etc. Data transmission services can provide basic capabilities for data transmission and reception. Through the data transmission service, the data transmission module of the Fusion Interconnection Middle Platform can be called, and then the transmission of multimedia resources between devices can be realized.
[0167] like Figure 5As shown, the media data middle station may also include multiple databases for storing metadata corresponding to multimedia resources. Specifically, the media data middle station may include a metadata master database and at least one metadata slave database. The metadata master database can be used to store metadata corresponding to multimedia resources of an electronic device (also referred to as a local device). A metadata slave database is used to store metadata corresponding to multimedia resources of another electronic device (also referred to as a remote device). That is, the media data middle station of the electronic device calls the fusion interconnection middle station through the fusion interconnection middle station software development toolkit to establish a communication connection with the media data middle station of other electronic devices (also referred to as remote devices) through the fusion interconnection middle station, and then synchronize the data of the metadata master database of other electronic devices (also referred to as remote devices) to the metadata slave database corresponding to the electronic device and other electronic devices (also referred to as remote devices).
[0168] In some examples, the media data middle station may include one metadata slave database or multiple metadata slave databases. For example, the media data middle station may include metadata slave database 1, metadata slave database 2, ..., metadata slave database N, wherein metadata slave database 1 may be used to store metadata corresponding to multimedia resources of remote device 1. Metadata slave database 2 may be used to store metadata corresponding to multimedia resources of remote device 2. Metadata slave database N may be used to store metadata corresponding to multimedia resources of remote device N.
[0169] Taking the metadata slave database N as an example, the process of obtaining metadata from the metadata slave database is schematically explained. The media data middle station of the electronic device calls the fusion interconnection middle station through the fusion interconnection middle station software development toolkit to establish a communication connection with the media data middle station of the remote device N through the fusion interconnection middle station, and then synchronize the data of the metadata master database of the remote device N to the metadata slave database N of the media data middle station of the electronic device.
[0170] like Figure 5As shown, the media data center can also include multiple databases for storing thumbnails. Specifically, the media data center can include a thumbnail key-value pair database (key-value date base, KVDB) master library and at least one thumbnail key-value pair database slave library. The thumbnail key-value pair database master library can be used to store the identifiers corresponding to the thumbnails of the multimedia resources of the electronic device (also referred to as the local device) (such as the key values corresponding to the thumbnails), that is, the thumbnail corresponding to the multimedia resource can be determined by the identifier corresponding to the thumbnail. A thumbnail key-value pair database slave library is used to store the identifiers corresponding to the thumbnails of the multimedia resources of another electronic device (also referred to as a remote device) (such as the key values corresponding to the thumbnails), that is, the thumbnail corresponding to the multimedia resource can be determined by the identifier corresponding to the thumbnail. That is, the media data middle platform of the electronic device calls the fusion interconnection middle platform through the fusion interconnection middle platform software development toolkit to establish a communication connection with the media data middle platform of other electronic devices (also called remote devices) through the fusion interconnection middle platform, and then synchronizes the identifiers corresponding to the thumbnails in the thumbnail key-value pair database master library of the other electronic devices (also called remote devices) to the thumbnail key-value pair database slave library corresponding to the electronic device and other electronic devices (also called remote devices).
[0171] In some examples, the media data middle station may include one thumbnail key-value pair database slave library, or may include multiple thumbnail key-value pair database slave libraries. For example, the media data middle station may include thumbnail key-value pair database slave library 1, thumbnail key-value pair database slave library 2, ..., thumbnail key-value pair database slave library N, wherein thumbnail key-value pair database slave library 1 can be used to store identifiers corresponding to thumbnails of multimedia resources of remote device 1. Thumbnail key-value pair database slave library 2 can be used to store identifiers corresponding to thumbnails of multimedia resources of remote device 2. Thumbnail key-value pair database slave library N can be used to store identifiers corresponding to thumbnails of multimedia resources of remote device N.
[0172] Taking the thumbnail key-value pair database slave library N as an example, the media data middle platform of the electronic device calls the fusion interconnection middle platform through the fusion interconnection middle platform software development toolkit to establish a communication connection with the media data middle platform of the remote device N through the fusion interconnection middle platform, and then synchronize the data of the thumbnail key-value pair database master library of the remote device N to the thumbnail key-value pair database slave library N of the media data middle platform of the electronic device.
[0173] Combine the following Figure 6 ,right Figure 5 The source of the metadata included in the metadata master database in the media data shown (ie, the metadata corresponding to the multimedia resources of the electronic device itself) is schematically illustrated.
[0174] like Figure 6 As shown, the metadata included in the metadata master database in the media data center can have two data sources, namely, one data source is the gallery database (that is, the database corresponding to the photo album application of the electronic device), and the other data source is the media database (that is, the database corresponding to all multimedia resources included in the electronic device).
[0175] Among them, the media database can be a database corresponding to the media provider. The media database can be used to store metadata corresponding to multimedia resources (such as audio, video, pictures or documents) generated by the media provider. For example, the metadata stored in the media database may include the identification of the picture (ie id), the storage path of the picture (ie data), the size of the picture (ie size), the timestamp corresponding to the picture (ie date_modified), the name of the picture (ie display_name), the rotation angle of the picture (ie orientation), etc. For example, when a user uses an electronic device to take a picture or share a picture with other electronic devices, the media provider obtains the metadata corresponding to the picture and stores the metadata corresponding to the picture in the media database. It should be noted that the media database may include metadata corresponding to multimedia resources generated by the system application of the electronic device, and may also include metadata corresponding to multimedia resources generated by third-party applications.
[0176] The gallery database can be used to store metadata corresponding to videos or pictures of the electronic device. Exemplarily, the metadata stored in the gallery database can be divided into basic data and extended data, wherein the basic data can be metadata corresponding to pictures and videos obtained from the media database, that is, Native pictures and videos, such as the picture identification, the storage path of the picture, the size of the picture, the timestamp corresponding to the picture, the name of the picture, and the rotation angle of the picture. Extended data can be private data generated by the processing logic of the gallery. For example, the private data can include pictures and videos collected by the user, and can also include data in classified albums (such as portrait albums, location albums, or food albums, etc.). For example, the gallery can process a portrait picture, generate portrait-related data corresponding to the portrait picture (such as facial coordinates, facial features, etc.), and store the portrait-related data corresponding to the portrait picture in the gallery database.
[0177] That is, when the media data center of the electronic device obtains the multimedia resources of the electronic device (also referred to as the local device), the metadata corresponding to the multimedia resources stored in the gallery database can be obtained, and the metadata corresponding to the multimedia resources stored in the media database can be obtained. The metadata of the gallery database is synchronized to the metadata master database, and the metadata of the media database is synchronized to the metadata master database.
[0178] In some examples, when obtaining metadata corresponding to multimedia resources stored in a media database, the media data middle station of the electronic device can monitor whether the data in the media database has changed. When it is detected that the data in the media database has changed, the media data middle station of the electronic device can synchronize the metadata of the media database to the metadata master database. That is, the media data middle station of the electronic device can obtain metadata corresponding to the multimedia resources stored in the media database, and store the obtained metadata in the metadata master database.
[0179] In some examples, when obtaining metadata corresponding to multimedia resources stored in a gallery database, the media data middle station of the electronic device can monitor whether the data in the gallery database has changed. When it is detected that the data in the gallery database has changed, the media data middle station of the electronic device can synchronize the metadata of the gallery database to the metadata master database, that is, the media data middle station of the electronic device can obtain metadata corresponding to the multimedia resources stored in the gallery database, and store the obtained metadata in the metadata master database.
[0180] Below Figure 5 Based on the software structure diagram of the media data center shown in the figure, combined with Figure 7 A schematic illustration is given of a process in which a media data center of an electronic device obtains metadata corresponding to multimedia resources of the electronic device and sends the metadata corresponding to the multimedia resources of the electronic device to other electronic devices.
[0181] First, the first media data middle station of the first electronic device is started. The first media data middle station can obtain and store metadata corresponding to the multimedia resources included in the first electronic device from the media database corresponding to the media provider of the first electronic device and the gallery database corresponding to the gallery. That is, the first media data middle station synchronizes the metadata corresponding to the local multimedia resources of the first electronic device to the local media metadata database of the first media data middle station (that is, the metadata master database of the first media data middle station).
[0182] Then, after the user opens the album application of the second electronic device, the device discovery module of the second media data center of the second electronic device obtains the remote device list, and displays the viewing control 701 of the album of the first electronic device in the interface corresponding to the album application according to the remote device list. The viewing control 701 of the album of the first electronic device can be used to request to view the multimedia resources of the first electronic device.
[0183] After the second electronic device receives the user's trigger operation on the viewing control 701 of the first electronic device's album, the album application of the second electronic device can send a synchronization request to the synchronization management module of the second media data center. After the synchronization management module of the second media data center receives the synchronization request, it can send a synchronization request to the data transmission module (also referred to as a database synchronization module) of the second fusion interconnected center of the second electronic device. After receiving the synchronization request, the data transmission module of the second fusion interconnected center can establish a communication connection with the data transmission module of the first fusion interconnected center of the first electronic device, and send a synchronization request to the data transmission module of the first fusion interconnected center of the first electronic device to obtain the metadata corresponding to the multimedia resources of the first electronic device.
[0184] After the data transmission module of the first fused interconnected middle station of the first electronic device receives the synchronization request sent by the second electronic device, the data transmission module of the first fused interconnected middle station can obtain the metadata corresponding to the multimedia resources of the first electronic device from the local media metadata database of the first media data middle station, and return the metadata corresponding to the multimedia resources of the first electronic device to the data transmission module of the second fused interconnected middle station of the second electronic device.
[0185] After the data transmission module of the second fused interconnected middle station of the second electronic device receives the metadata corresponding to the multimedia resources of the first electronic device, the data transmission module of the second fused interconnected middle station stores the metadata corresponding to the multimedia resources of the first electronic device in the remote media metadata database of the second media data middle station (also referred to as the metadata slave database corresponding to the first electronic device).
[0186] The second media data center sends the metadata corresponding to the multimedia resources of the first electronic device stored in the remote media metadata database to the album application of the second electronic device. After the album application of the second electronic device receives the metadata corresponding to the multimedia resources of the first electronic device, the second electronic device can display the multimedia resources of the first electronic device.
[0187] For example, taking the first electronic device as mobile phone 01 and the second electronic device as mobile phone 02, after the user opens the album application in mobile phone 01, the media data middle station of mobile phone 01 is started. At this time, the media data middle station of mobile phone 01 can obtain and store the metadata corresponding to the multimedia resources of mobile phone 01.
[0188] After the user opens the photo album application in mobile phone 02, combined with Figure 8As shown in (a), the mobile phone 02 can display the interface corresponding to the album application, and the interface corresponding to the album application can include pictures and videos of the mobile phone 02 (i.e., the local device), such as the "All Photos" album, the "Camera" album, the "My Favorites" album, the "Screenshots and Recordings" album, the "One Recording, Multiple Accesses" album, the "Video Editing" album, etc. The interface corresponding to the camera album application can include a viewing control 801, which can be used to request to view multimedia resources in the first electronic device (e.g., the mobile phone 01), that is, the viewing control 801 can include the identification of the mobile phone 01.
[0189] After mobile phone 02 receives the user's trigger operation on viewing control 801, the album application of mobile phone 02 can send a synchronization request for the metadata of the multimedia resources of mobile phone 01 to the media data center of mobile phone 02. After receiving the synchronization request, the media data center of mobile phone 02 can send a synchronization request to the fusion interconnection center of mobile phone 02. The fusion interconnection center of mobile phone 02 establishes a communication connection with the fusion interconnection center of mobile phone 01 according to the synchronization request to send a synchronization request to the fusion interconnection center of mobile phone 01. After receiving the synchronization request, the fusion interconnection center of mobile phone 01 can send a synchronization request to the media data center of mobile phone 01. After receiving the synchronization request, the media data center of mobile phone 01 can obtain the metadata corresponding to the multimedia resources included in mobile phone 01, such as the "camera" album, "screenshot" album, "video editing" album, "PC save" album, and "other" album included in mobile phone 01.
[0190] After the media data middle station of mobile phone 01 obtains the metadata corresponding to the multimedia resources of mobile phone 01, the media data middle station of mobile phone 01 sends the metadata corresponding to the multimedia resources of mobile phone 01 to the converged interconnected middle station of mobile phone 02 through the converged interconnected middle station of mobile phone 01. After the converged interconnected middle station of mobile phone 02 receives the metadata corresponding to the multimedia resources of mobile phone 01, it stores the metadata corresponding to the multimedia resources of mobile phone 01 in the remote media metadata database included in the media data middle station of mobile phone 02 (also referred to as the metadata slave database corresponding to mobile phone 01). In addition, the media data middle station of mobile phone 02 can send the metadata corresponding to the multimedia resources of mobile phone 01 to the album application of mobile phone 02 (that is, the metadata corresponding to the "camera" album, "screenshot and recording" album, "video editing" album, "PC end saving" album, and "other" album included in mobile phone 01). After the album application of mobile phone 02 receives the metadata corresponding to the "camera" album, "screenshot and recording" album, "video editing" album, "PC end saving" album, and "other" album included in mobile phone 01, as Figure 8As shown in (b), mobile phone 02 can display the "Camera" album, "Screenshot" album, "Video Editing" album, "PC Save" album, and "Other" album included in mobile phone 01, so that the user can view the pictures or videos included in mobile phone 01.
[0191] For example, after the user chooses to view the "Camera" album of mobile phone 01, Figure 8 As shown in (c) in FIG. 1 , mobile phone 02 can display pictures and videos in the “Camera” album of mobile phone 01. The user can further view any picture or video in the “Camera” album of mobile phone 01. For example, after the user selects the first picture in the “Camera” album of mobile phone 01, Figure 8 As shown in (d) in the figure, mobile phone 02 can display the first picture in the "Camera" album of mobile phone 01.
[0192] In this way, when the user needs to access and view the multimedia resources included in the first electronic device through the second electronic device, the first electronic device can send the multimedia resources included in it to the second electronic device, so that the second electronic device displays the multimedia resources included in the first electronic device, so that the user can access and view the multimedia resources included in the first electronic device through the second electronic device. In other words, the user can access and view the multimedia resources of other electronic devices through one electronic device, thereby realizing the sharing and synchronization of multimedia resources across devices.
[0193] It can be understood that the activation of the first media data center of the first electronic device can be when the user opens the application of the first electronic device (such as an album application or a third-party application), the first media data center of the first electronic device is activated. After the first media data center of the first electronic device is activated, the first media data center of the first electronic device can obtain metadata corresponding to the multimedia resources included in the first electronic device. The first media data center of the first electronic device can send metadata corresponding to the multimedia resources included in the first electronic device to the application of the first electronic device. After the application of the first electronic device receives the metadata corresponding to the multimedia resources included in the first electronic device, the first electronic device can display the multimedia resources included in the first electronic device. Among them, the multimedia resources of the first electronic device may include at least one of audio, video, pictures, and documents.
[0194] For example, taking the first electronic device as mobile phone 01 and the application as an image editing application, after the user opens the image editing application in mobile phone 01, the media data middle platform of mobile phone 01 is started. At this time, the media data middle platform of mobile phone 01 can obtain and store the metadata corresponding to the multimedia resources of mobile phone 01.
[0195] And, after the user opens the image editing application in the mobile phone 01, combined with Fig. 9 As shown in (a), the mobile phone 02 can display the interface corresponding to the image editing application. The interface corresponding to the image editing application can include a viewing control 901. The viewing control 901 can be used to request to view multimedia resources (such as pictures or videos) in the mobile phone 01, that is, the viewing control 901 can be a local identification.
[0196] After mobile phone 01 receives the user's trigger operation on viewing control 901, the media data middle platform of mobile phone 01 can send metadata corresponding to the multimedia resources of mobile phone 01 to the image editing application of mobile phone 01, such as metadata corresponding to the "camera" album, "screenshot" album, "video editing" album, "PC end save" album, and "other" album included in mobile phone 01. After the image editing application of mobile phone 01 receives the metadata corresponding to the "camera" album, "screenshot" album, "video editing" album, "PC end save" album, and "other" album included in mobile phone 01, combined with Fig. 9 As shown in (b), mobile phone 01 can display the "Camera" album, "Screenshot and Recording" album, "Video Editing" album, "PC Save" album, and "Other" album included in mobile phone 01, that is, the "Camera" album, "Screenshot and Recording" album, "Video Editing" album, "PC Save" album, and "Other" album included in mobile phone 01 are displayed on the interface corresponding to the image editing application, so that the user can select pictures or videos included in mobile phone 01 and edit the selected pictures or videos.
[0197] For example, taking the first electronic device as mobile phone 01 and the application as a file management application, after the user opens the file management application in mobile phone 01, the media data middle station of mobile phone 01 is started. At this time, the media data middle station of mobile phone 01 can obtain and store the metadata corresponding to the multimedia resources of mobile phone 01. After the media data middle station of mobile phone 01 can obtain and store the metadata corresponding to the multimedia resources of mobile phone 01, it can send the metadata corresponding to the multimedia resources of mobile phone 01 to the file management application of mobile phone 01, such as the metadata corresponding to the "All Photos" album, "Video" folder, "Audio" folder, and "Document" folder included in mobile phone 01. After the file management application of mobile phone 01 receives the metadata corresponding to the "All Photos" album, "Video" folder, "Audio" folder, and "Document" folder included in mobile phone 01, it combines Fig.10The shown mobile phone 01 can display the "All Photos" album, "Video" folder, "Audio" folder, and "Document" folder included in the mobile phone 01, that is, the "All Photos" album, "Video" folder, "Audio" folder, and "Document" folder included in the mobile phone 01 are displayed on the corresponding interface of the file management application, so that the user can select photos, videos, audio, or documents included in the mobile phone 01.
[0198] That is to say, after the user opens the application in mobile phone 01, the user does not need to trigger the viewing control, and can directly trigger the media data middle platform of mobile phone 01 to obtain the metadata corresponding to the multimedia resources included in mobile phone 01 through the media data middle platform of mobile phone 01.
[0199] In this way, the first electronic device can send the various types of multimedia resources it includes (such as audio, video, pictures or documents, etc.) to the second electronic device. That is, the solution of the present application can support the sharing and synchronization of different types of multimedia resources, meet the usage needs of different users, and enhance the user experience.
[0200] In addition, according to the solution of the present application, users can not only view the multimedia resources of the electronic device and other electronic devices through the local album application of the electronic device, but also view the multimedia resources of the electronic device and other electronic devices through other applications of the electronic device (such as third-party applications). In this way, users can select corresponding applications according to their usage habits and the types of multimedia resources to be viewed, and can directly view the multimedia resources of the electronic device and other electronic devices through the application, which is simple to operate and can improve the user experience.
[0201] Below Figure 5 Based on the software structure diagram of the media data center shown in the figure, combined with Fig.11 The process of obtaining metadata corresponding to multimedia resources of the electronic device by the media data center of the electronic device is schematically illustrated.
[0202] like Fig.11 As shown, the process of synchronizing metadata corresponding to the multimedia resources of the electronic device's media data center may include the following S1101-S1105.
[0203] S1101, the electronic device starts the media data middle platform.
[0204] The electronic device may be a first electronic device or a second electronic device.
[0205] In some examples, when an application of an electronic device (such as a photo album application or a third-party application) calls the media data middle platform, the media data middle platform of the electronic device is started. In this way, when the user uses the application of the electronic device, there is no need to perform cumbersome operations, and the media data middle platform of the electronic device can be called without perception, and the local multimedia resources of the electronic device and the multimedia resources of other electronic devices can be obtained through the media data middle platform of the electronic device.
[0206] For example, when a user opens an album application on an electronic device, the electronic device may display an interface corresponding to the album application, and the interface corresponding to the album application may include a viewing control. The viewing control may be used to request viewing of local multimedia resources of the electronic device, such as a “local album” control. The viewing control may also be used to request viewing of multimedia resources on other electronic devices, such as a “my tablet’s album” control. When the album application on the electronic device receives a trigger operation on the viewing control from the user, the album application on the electronic device responds to the trigger operation on the viewing control by the user and calls the media data middle platform of the electronic device through the media data middle platform interface, i.e., the media data middle platform of the electronic device is started.
[0207] For example, a user opens a third-party application (such as a picture editing application) on an electronic device. In response to the user's opening operation, the third-party application on the electronic device calls the media data middle platform of the electronic device through the media data middle platform interface. That is, the media data middle platform of the electronic device is started, and then the third-party application on the electronic device can obtain the local multimedia resources of the electronic device and the multimedia resources of other electronic devices through the media data middle platform.
[0208] The media data middle platform of the electronic device includes a local multimedia resource synchronization function. When the media data middle platform of the electronic device is started, the media data middle platform of the electronic device can obtain and store metadata corresponding to the multimedia resources of the electronic device, that is, the media data middle platform of the electronic device can obtain and store metadata corresponding to the multimedia resources in the gallery database of the electronic device and metadata corresponding to the multimedia resources in the media database of the electronic device.
[0209] In some examples, when the media data center of the electronic device is started, the media data center of the electronic device can obtain and store metadata corresponding to the multimedia resources of the electronic device. When the media data center of the electronic device is started, the media data center of the electronic device obtains and stores metadata corresponding to the multimedia resources of the electronic device. That is, when the media data center of the electronic device is started, the media data center of the electronic device actively synchronizes the metadata corresponding to the multimedia resources of the electronic device.
[0210] In other examples, when the media data center of the electronic device is started, the media data center of the electronic device can obtain and store metadata corresponding to the multimedia resources of the electronic device, and after the media data center of the electronic device is started, the media data center creates a first monitoring event for the gallery database and a second monitoring event for the media database. When the first monitoring event indicates that the data in the gallery database has changed and / or the second monitoring event indicates that the data in the media database has changed, the media data center of the electronic device obtains and stores metadata corresponding to the multimedia resources of the electronic device. That is to say, when the media data center of the electronic device is started, the media data center monitors whether the data in the gallery database and the media database have changed. When the media data center of the electronic device monitors that the data in the gallery database has changed, the media data center of the electronic device synchronizes the metadata corresponding to the multimedia resources stored in the gallery database of the electronic device. Similarly, when the media data center of the electronic device monitors that the data in the media database has changed, the media data center of the electronic device synchronizes the metadata corresponding to the multimedia resources stored in the media database of the electronic device.
[0211] Exemplarily, the media data center creates a first monitoring event to monitor whether the data in the gallery database has changed. The media data center monitors whether the URI of the gallery database has changed. When the media data center monitors that the URI of the gallery database has changed, it determines that the data in the gallery database has changed. Exemplarily, the media data center creates a second monitoring event to monitor whether the data in the media database has changed. The media data center monitors whether the URI of the media database has changed. When the media data center monitors that the URI of the media database has changed, it determines that the data in the media database has changed. Among them, URI (Uniform Resource Identifier) is a string symbol sequence that identifies and locates resources. URI can be used to uniquely identify a collection of data in ContentProvider.
[0212] For example, when the media data center of an electronic device is started, the media data of the electronic device creates a second monitoring event for the media database to monitor whether the data in the media database has changed through the second monitoring event. Afterwards, if the user uses the electronic device to take a picture, the media provider of the electronic device obtains the metadata corresponding to the picture, and stores the metadata corresponding to the picture in the media database, that is, the data in the media database has changed. At this time, the media data center of the electronic device can monitor the change of the data in the media database through the second monitoring event, and then the media data center of the electronic device can obtain and store the metadata corresponding to the multimedia resources in the media database, that is, the media data center of the electronic device synchronizes the metadata corresponding to the multimedia resources in the media database of the electronic device.
[0213] That is to say, the media data center of the electronic device has two synchronization opportunities. One synchronization opportunity is that when the media data center of the electronic device is started, the media data center obtains and stores the metadata corresponding to the multimedia resources of the electronic device, that is, when the media data center of the electronic device is started, the media data center of the electronic device actively synchronizes the metadata corresponding to the multimedia resources of the electronic device. The other synchronization opportunity is that when the media data center of the electronic device is started, the media data center respectively monitors whether the data of the gallery database and the media database have changed. When the media data center of the electronic device monitors that the data of the gallery database and / or the media database have changed, the media data center of the electronic device obtains and stores the metadata corresponding to the multimedia resources of the electronic device.
[0214] It should be noted here that in order to reduce the power consumption of electronic devices, after the media data center of the electronic device is started, if the media data center of the electronic device does not detect any changes in the data of the gallery database or the media database within a preset time period, the media data center of the electronic device stops working, that is, the media data center of the electronic device stops monitoring whether the data of the gallery database and the media database have changed. At this time, if the data of the gallery database or the media database of the electronic device changes, the media data center of the electronic device will not synchronize the metadata of the gallery database or the media database. When the media data center of the electronic device is started next time, the media data center of the electronic device can synchronize the metadata corresponding to the multimedia resources generated by the gallery database or the media database during the time period when the media data center is stopped (the time period from the moment when the media data center last stopped working to the moment when the media data center is started next time).
[0215] For example, after the media data center of an electronic device is started, if the media data center of the electronic device does not detect any data changes in the gallery database or the media database within a preset time period, the media data center of the electronic device stops working. At this time, if the user uses the electronic device to take a picture, the media data center of the electronic device cannot detect any data changes in the media database, that is, the media data center of the electronic device will not synchronize the metadata corresponding to the picture stored in the media database. Afterwards, when the media data center of the electronic device is started again, the media data center of the electronic device synchronizes the metadata corresponding to the picture stored in the media database.
[0216] S1102: The media data center of the electronic device obtains and stores metadata corresponding to multimedia resources in the gallery database.
[0217] After the media data middle station of the electronic device is started, the media data middle station of the electronic device can obtain the metadata corresponding to the multimedia resources stored in the gallery database of the electronic device, that is, the media data middle station of the electronic device can synchronize the metadata corresponding to the multimedia resources in the gallery database to the metadata master database of the media data middle station.
[0218] In some examples, when the media data center of an electronic device obtains and stores metadata corresponding to multimedia resources in a gallery database, the media data center of the electronic device can obtain the metadata corresponding to the multimedia resources from a data table in the gallery database, and store the metadata corresponding to the multimedia resources in the gallery database in a corresponding data table (i.e., a data table corresponding to the data table in the gallery database).
[0219] In some examples, when the media data center of the electronic device obtains metadata corresponding to a multimedia resource from a data table in a gallery database, metadata corresponding to the multimedia resource recorded in multiple data tables in the gallery database can be obtained. Exemplarily, multiple data tables in the gallery database may include a data table (gallery_media data table) corresponding to part of the data in the media database. When obtaining metadata corresponding to the multimedia resource recorded in the gallery_media data table, metadata of a target field in the gallery_media data table may be obtained. Among them, the target field may include local_media_id, is_hw_favorite, special_file_type, is_hw_bursh, category_id, geo_code, showDateToken, hw_rectify_offset, latitude, longitude, orientation, first_update_time, ai_video_group_id, slow_motion_video_duration, special_file_expand, thumbnail_bytes, relative_bucket_id.
[0220] The multiple data tables in the gallery database may also include album-related data tables, geographic location-related data tables, and CV-related data tables. Album-related data tables may include the gallery_album data table and the gallery_album_sort data table. The galley_album data table is used to store album information (such as album name, album id, etc.). The galley_album_sort data table is used to store information such as the sorting and location of the album in the gallery interface. Geographic location-related data tables may include the t_geo_knowledge data table and the t_geo_dictionary data table. The t_geo_knowledge data table may be used to store longitude and latitude information, gallery-customized key values, language, country, city, and specific regions (such as Haidian District). The t_geo_dictionary data table may be used to store the unique identifier (geo_code) and region name (geo_name) of the region. CV-related data tables may include the image_collection data table, the merge_face data table, and the merge_tag data table. The image_collection data table can be used to store the identification information of the image (such as hash value), the category identification of the image (category_id), etc. The category identification can be, for example, food, portrait, landscape, festival, activity, sports, animal, transportation, home, electrical appliances, art, tool, clothing, accessories, toys, etc.
[0221] That is to say, when the media data center of the electronic device obtains and stores metadata corresponding to multimedia resources in the gallery database, the media data center of the electronic device can obtain and store metadata corresponding to the multimedia resources recorded in the eight data tables of the gallery database (namely, gallery_media data table, gallery_album data table, gallery_album_sort data table, t_geo_knowledge data table, t_geo_dictionary data table, image_collection data table, merge_face data table and merge_tag data table).
[0222] It should be noted that when the media data center of the electronic device obtains and stores metadata corresponding to the multimedia resources recorded in the eight data tables of the gallery database, the metadata corresponding to the multimedia resources recorded in the above eight data tables can be obtained and stored in sequence according to a preset order, that is, the media data center of the electronic device can synchronize the above eight data tables in sequence according to a preset order.
[0223] In some examples, due to changes in the data in the gallery database, the metadata corresponding to the multimedia resources in the gallery database may be updated, or the metadata corresponding to the newly added multimedia resources may be inserted into the gallery database. Therefore, when the media data center of the electronic device obtains and stores the metadata corresponding to the multimedia resources in the gallery database, for each metadata corresponding to the multimedia resource in the gallery database (also referred to as target metadata), the media data center can determine whether there is a record corresponding to the target metadata in the metadata master database of the media data center. If there is a record corresponding to the target metadata in the metadata master database of the media data center, the record corresponding to the target metadata in the metadata master database is updated. If there is no record corresponding to the target metadata in the metadata master database of the media data center, the target metadata is inserted into the metadata master database.
[0224] It should be noted that when the media data center of an electronic device obtains and stores metadata corresponding to multimedia resources in a gallery database, the media data center of the electronic device can acquire and store metadata corresponding to multimedia resources in the gallery database in a full synchronization manner, that is, the media data center of the electronic device can acquire and store metadata corresponding to multimedia resources in the gallery database in a full synchronization manner, and synchronize the metadata corresponding to multimedia resources in the gallery database to the media data center. The media data center of an electronic device can also acquire and store metadata corresponding to multimedia resources in the gallery database in an incremental synchronization manner, that is, the media data center of the electronic device can acquire and synchronize metadata corresponding to multimedia resources in the gallery database in an incremental synchronization manner, and synchronize the metadata corresponding to multimedia resources in the gallery database to the media data center.
[0225] S1103. The media data center of the electronic device synchronously deletes the metadata corresponding to the multimedia resources stored in the media data center according to the metadata corresponding to the multimedia resources in the gallery database.
[0226] In order to ensure that the metadata corresponding to the multimedia resources stored in the media data center is consistent with the metadata corresponding to the multimedia resources stored in the gallery database, after the media data center of the electronic device obtains the metadata corresponding to the multimedia resources in the gallery database, the media data center of the electronic device can perform a full comparison of the metadata corresponding to the multimedia resources stored in the gallery database with the metadata corresponding to the multimedia resources stored in the media data center (i.e., the metadata master database) so as to delete the metadata corresponding to the multimedia resources that exist in the media data center (i.e., the metadata master database) but do not exist in the gallery database.
[0227] It should be noted that when the metadata corresponding to the multimedia resources stored in the media data center are synchronously deleted according to the metadata corresponding to the multimedia resources in the gallery database, the media data center of the electronic device can delete the metadata corresponding to the multimedia resources that exist in the data table stored in the database of the media data center (i.e., the data table corresponding to the data table in the gallery database) from the data table stored in the database of the media data center (i.e., the data table corresponding to the data table in the gallery database).
[0228] S1104: The media data center of the electronic device obtains and stores metadata corresponding to the multimedia resources in the media database.
[0229] After the media data middle station of the electronic device is started, the media data middle station of the electronic device can obtain the metadata corresponding to the multimedia resources stored in the media database of the electronic device, that is, the media data middle station of the electronic device can synchronize the metadata corresponding to the multimedia resources in the media database to the metadata master database of the media data middle station.
[0230] In some examples, when the media data center of an electronic device obtains and stores metadata corresponding to multimedia resources in a media database, the media data center of the electronic device can obtain the metadata corresponding to the multimedia resources from a data table in the media database, and store the metadata corresponding to the multimedia resources in the media database in a corresponding data table (i.e., a data table corresponding to the data table in the media database).
[0231] In some examples, when the media data center of the electronic device obtains metadata corresponding to a multimedia resource from a data table in a media database, the metadata corresponding to the multimedia resource recorded in the data table in the media database may be obtained. Exemplarily, the data table in the media database may include a files data table.
[0232] In some examples, due to changes in data in the media database, the metadata corresponding to the multimedia resources in the media database may be updated, or the metadata corresponding to the newly added multimedia resources may be inserted into the media database. Therefore, when the media data center of the electronic device obtains and stores the metadata corresponding to the multimedia resources in the media database, for each metadata corresponding to the multimedia resource in the media database (also referred to as target metadata), the media data center can determine whether there is a record corresponding to the target metadata in the metadata master database of the media data center. If there is a record corresponding to the target metadata in the metadata master database of the media data center, the record corresponding to the target metadata in the metadata master database is updated. If there is no record corresponding to the target metadata in the metadata master database of the media data center, the target metadata is inserted into the metadata master database.
[0233] It should be noted that when the media data center of an electronic device obtains and stores metadata corresponding to multimedia resources in a media database, the media data center of the electronic device can collect metadata corresponding to multimedia resources in the media database in a full synchronization manner, that is, the media data center of the electronic device can collect metadata corresponding to multimedia resources in the media database in a full synchronization manner, and synchronize the metadata corresponding to multimedia resources in the media database to the media data center. The media data center of the electronic device can also collect metadata corresponding to multimedia resources in the media database in an incremental synchronization manner, that is, the media data center of the electronic device can collect metadata corresponding to multimedia resources in the media database in an incremental synchronization manner, and synchronize the metadata corresponding to multimedia resources in the media database to the media data center.
[0234] S1105. The media data center of the electronic device synchronously deletes the metadata corresponding to the multimedia resources stored in the media data center according to the metadata corresponding to the multimedia resources in the media database.
[0235] In order to ensure that the metadata corresponding to the multimedia resources stored in the media data center is consistent with the metadata corresponding to the multimedia resources stored in the media database, after the media data center of the electronic device obtains the metadata corresponding to the multimedia resources in the media database, the media data center of the electronic device can perform a full comparison of the metadata corresponding to the multimedia resources stored in the media database with the metadata corresponding to the multimedia resources stored in the media data center (i.e., the metadata master database) so as to delete the metadata corresponding to the multimedia resources that exists in the media data center (i.e., the metadata master database) but does not exist in the media database.
[0236] It should be noted that when synchronously deleting the metadata corresponding to the multimedia resources stored in the media data center according to the metadata corresponding to the multimedia resources in the media database, the media data center of the electronic device can delete the metadata corresponding to the multimedia resources that exist in the data table stored in the database of the media data center (i.e., the data table corresponding to the data table in the media database) from the data table stored in the database of the media data center (i.e., the data table corresponding to the data table in the media database).
[0237] It should be noted that the process of synchronizing the metadata corresponding to the multimedia resources in the gallery database by the media data center is independent of the process of synchronizing the metadata corresponding to the multimedia resources in the media database by the media data center. In other words, the above S1104 and the above S1102 can be executed at the same time, and the above S1104 can also be executed before or after the above S1102. The embodiment of the present application does not limit the execution order of the above S1104 and the above S1102.
[0238] For ease of understanding, the following Fig.11 Based on the acquisition process of the metadata corresponding to the multimedia resources of the electronic device shown, combined with Fig.12 , a schematic diagram is given of a process in which a media data center of an electronic device obtains metadata corresponding to multimedia resources of the electronic device.
[0239] In this way, the media data center of the electronic device can obtain the multimedia resources of the electronic device and store the multimedia resources of the electronic device in the database of the media data center, so that other electronic devices can obtain the multimedia resources of the electronic device from the database of the media data center of the electronic device, and then the user can access and view the multimedia resources of the electronic device through other electronic devices. That is, through the media data center of the electronic device, the sharing and synchronization of multimedia resources between devices can be realized, and then the access to multimedia resources between devices can be realized.
[0240] In the above embodiment, when the media data center of the electronic device obtains and stores metadata corresponding to multimedia resources in the gallery database, the media data center of the electronic device can obtain metadata corresponding to the multimedia resources from the data table in the gallery database, and store the metadata corresponding to the multimedia resources in the gallery database in the corresponding data table.
[0241] Combine the following Fig.12 Taking any one of the eight data tables in the gallery database (hereinafter referred to as the first data table) as an example, the media data middle station of the electronic device obtains metadata corresponding to multimedia resources from the data table in the gallery database, stores the metadata corresponding to the multimedia resources in the gallery database in the corresponding data table, and schematically illustrates the process of synchronously deleting the data table stored in the database of the media data middle station.
[0242] S1201: The media data center of the electronic device creates a first monitoring event, where the first monitoring event is used to monitor whether data in a gallery database of the electronic device changes.
[0243] When the media data middle station of the electronic device is started, the media data middle station can create a first monitoring event for the gallery database to monitor whether the data in the gallery database has changed. Then, when the media data middle station monitors that the data in the gallery database has changed, the media data middle station obtains and stores (i.e., synchronizes) the metadata corresponding to the multimedia resources in the gallery database.
[0244] In some examples, the media data center creates a first monitoring event to monitor whether the data in the gallery database changes. The media data center monitors whether the URI of the gallery database changes. When the media data center monitors that the URI of the gallery database changes, it determines that the data in the gallery database has changed.
[0245] S1202: The data stored in the first data table in the gallery database changes, and the field value corresponding to the first field in the first data table is updated.
[0246] When the gallery generates metadata corresponding to multimedia resources, that is, when the data recorded in the first data table in the gallery database changes, the gallery can update the field value of the first field in the first data table in the gallery database to indicate the change of the metadata corresponding to the multimedia resources recorded in the first data table through the change of the field value of the first field, that is, to indicate the data change of the gallery database through the change of the field value of the first field.
[0247] The first data table is a data table stored in the gallery database and used to record metadata corresponding to multimedia resources generated by the gallery. For example, when a user creates a new album on an electronic device, the gallery_album data table in the gallery database is updated, that is, the first data table is the gallery_album data table. For another example, when a user uses an electronic device to take a new photo in city A, the t_geo_knowledge data table in the gallery database is updated, that is, the first data table is the t_geo_knowledge data table.
[0248] The first field in the first data table can be used to record data changes in the first data table (such as updated data or newly added data). Exemplarily, when the data in the first data table changes, the first field of the first data table is incremented. Fig.13 As shown, taking the update of data in the first data table as an example, when the second row of data in the first data table is updated from 2 to 3 (that is, the field value corresponding to field B is updated from 2 to 3), the first field of the first data table (that is, field A) is incremented, that is, the field value corresponding to the first field (that is, field A) in the second row of data in the first data table is updated from 2 to 3. In this way, the change in the field value corresponding to the first field in the first data table can indicate that the metadata recorded in the first data table has been updated.
[0249] For example, Fig.14As shown, taking the newly added data in the first data table as an example, when the third row of data is inserted into the first data table, the first field of the first data table (i.e., field A) is incremented, that is, the field value corresponding to the first field (i.e., field A) of the third row of data in the first data table is set to 3. In this way, the insertion of new metadata into the first data table can be indicated by the change in the field value corresponding to the first field in the first data table.
[0250] It should be noted here that since the metadata corresponding to the multimedia resources generated by the gallery is stored in different data tables in the gallery database, when the data in the gallery database changes, the data recorded in different data tables in the gallery database may change. Therefore, when synchronizing the gallery database data in the media data center, a new first field (such as Fig.13 or Fig.14 Field A) shown in, that is, all data tables in the gallery database that need to be synchronized can use the first field to record changes in the data in the data table. In this way, when the data in the gallery database changes, the media data middle station can synchronize the data in the gallery database based on the field value of the first field of different data tables in the gallery database, thereby ensuring that the data stored in the media data middle station is consistent with the data in the gallery database. For example, when a user uses an electronic device to take new photos in city A, the field values of the first fields of the t_geo_knowledge data table and the t_geo_dictionary data table in the gallery database both change, and then the media data middle station synchronizes the t_geo_knowledge data table and the t_geo_dictionary data table based on the field value of the first field of the t_geo_knowledge data table and the t_geo_dictionary data table, thereby synchronizing the metadata related to the new photos taken by the user in city A to the media data middle station.
[0251] In some examples, the first field may be a gallery_generation field.
[0252] S1203: The gallery database sends a first monitoring notification to the media data center, where the first monitoring notification is used to indicate that data in the gallery database has changed.
[0253] The first monitoring notification may be a monitoring result for the first monitoring event. When the data in the gallery database changes, the gallery database may send a first monitoring notification corresponding to the first monitoring event to the media data center to notify the media data center that the data in the gallery database has changed, so that the media data center synchronizes the first data table in the gallery database for recording the data changes in the gallery.
[0254] S1204. The media data center receives the first monitoring notification and determines a first field value corresponding to the first field in the second data table, wherein the second data table is a data table corresponding to the first data table and stored in the database of the media data center, and the first field value is the maximum field value of the first field in the second data table.
[0255] The second data table may be a data table stored in a database of the media data center (such as the metadata master database mentioned above). The second data table corresponds to the first data table. For example, if the first data table is the gallery_album data table stored in the gallery database, the second data table is the gallery_album data table stored in the database of the media data center. For example, if the first data table is the gallery_media data table stored in the gallery database, the second data table is the gallery_media data table stored in the database of the media data center.
[0256] The first field value may be the maximum field value of the first field in the second data table. The first field value may represent the maximum field currently synchronized in the second data table, that is, the first field value may represent the latest data currently synchronized from the first data table to the second data table.
[0257] That is to say, when the media data center detects changes in the data in the gallery database, the media data center can trigger synchronization, that is, the media data center can query the first field value of the first field corresponding to the latest data currently synchronized to the second data table, and then query the unsynchronized data in the first data table based on the first field value, that is, based on the first field value, it can query and obtain the updated or newly added data in the first data table.
[0258] For example, please refer to Table 1. Taking the latest synchronized data in the second data table as the updated data as an example, according to the data changes in the first data table, the second row of data in the second data table is updated from 2 to 3 (that is, the field value corresponding to field B is updated from 2 to 3), and the field value corresponding to the first field (that is, field A) in the second row of data in the second data table is updated from 2 to 3, that is, the latest data synchronized from the first data table to the second data table is the second row of data. At this time, the largest field synchronized in the second data table is the field value 3 corresponding to the first field (that is, field A), that is, the first field value queried by the media data center is 3.
[0259] Table 1
[0260] _id B A 1 1 1 2 3 3 … … …
[0261] For another example, please refer to Table 2. For example, taking the case where the latest data synchronized in the second data table is the newly added data, the latest data, i.e., the second row of data, is inserted into the second data table according to the data changes in the first data table. In other words, the latest data synchronized from the first data table to the second data table is the second row of data. At this time, the largest field synchronized in the second data table is the field value 2 corresponding to the first field (i.e., field A), i.e., the first field value 2 queried by the media data center.
[0262] Table 2
[0263] _id B A 1 1 1 2 2 2
[0264] S1205. The media data middle platform sends a first query request to the gallery database.
[0265] After the media data center of the electronic device determines the first field value corresponding to the first field in the second data table, the media data center of the electronic device may send a first query request to the gallery database of the electronic device, where the first query request is used to query the maximum field value of the first field in the first data table. That is, the media data center of the electronic device sends the first query request to the gallery database of the electronic device to query the field value of the first field corresponding to the latest data (such as updated data or newly added data) recorded in the first data table.
[0266] S1206. The gallery database receives the first query request and determines a second field value of the first field in the first data table, where the second field value is the maximum field value of the first field in the first data table.
[0267] After the gallery database of the electronic device receives the first query request sent by the media data center of the electronic device, the gallery database of the electronic device can determine the maximum field value of the first field in the first data table, that is, after the gallery database of the electronic device receives the first query request, the gallery database can determine the second field value. The second field value can represent the maximum field of the first data table record, that is, the second field value can represent the latest data of the first data table record. For example, Fig.13 As shown, taking the update data of the first data table as an example, the maximum field corresponding to the first field (ie, field A) in the first data table is 3, that is, the second field value is 3. For example, Fig.14 As shown, taking the newly added data in the first data table as an example, the maximum field corresponding to the first field (ie, field A) in the first data table is 3, that is, the second field value is 3.
[0268] S1207. The gallery database sends the second field value to the media data center.
[0269] S1208. The media data center receives the second field value.
[0270] After the media data center of the electronic device receives the second field value sent by the gallery database of the electronic device, the media data center of the electronic device can, based on the second field value, synchronously delete the metadata corresponding to the multimedia resources stored in the database of the media data center (i.e., the metadata master database), thereby ensuring that the metadata corresponding to the multimedia resources stored in the media data center is consistent with the metadata corresponding to the multimedia resources stored in the gallery database.
[0271] S1209. The media data middle platform sends a second query request to the gallery database, where the second query request includes the first field value.
[0272] After the media data center of the electronic device determines the first field value corresponding to the first field in the second data table, the media data center of the electronic device can send a second query request to the gallery database of the electronic device, wherein the second query request includes the first field value, and the second query request is used to query the metadata in the first data table where the field value of the first field is greater than the first field value. That is to say, after determining the currently synchronized maximum field (first field value) in the second data table stored in the database of the media data center of the electronic device, the media data center of the electronic device can send a second query request including the first field value to the gallery database of the electronic device to obtain metadata in the first data table where the field value of the first field is greater than the first field value, that is, to obtain metadata of multimedia resources updated or newly added in the first data table after recording the metadata of the multimedia resources corresponding to the first field value, that is, to obtain metadata of multimedia resources that currently exist in the first data table and are not synchronized with the second data table.
[0273] S1210. The gallery database receives the second query request, and acquires first metadata according to the second query request, where the first metadata is metadata corresponding to a multimedia resource whose field value of the first field in the first data table is greater than the first field value.
[0274] After the gallery database of the electronic device receives the second query request sent by the media data center of the electronic device, the gallery database can obtain the first metadata according to the first field value. The first metadata can be metadata corresponding to the multimedia resource whose field value of the first field in the first data table is greater than the first field value, that is, the first metadata can be metadata corresponding to the multimedia resource updated or newly added in the first data table after recording the metadata of the multimedia resource corresponding to the first field value, that is, the first metadata can be metadata corresponding to the multimedia resource that exists in the current first data table and is not synchronized with the second data table.
[0275] In some examples, the gallery database obtains the first metadata based on the second query request, and the media data middle station of the electronic device can send the second query request to the gallery database through the gallery. The gallery database receives the second query request, and in response, the gallery database compares the field value of the first field of the first data table with the first field value, and returns the metadata corresponding to the multimedia resource in the first data table whose field value of the first field is greater than the first field value to the media data middle station through the gallery.
[0276] In some examples, the first metadata may be one or more. That is, the gallery database may obtain one or more first metadata according to the second query request. Exemplarily, the first metadata may be updated data in the first data table or newly added data in the first data table.
[0277] For example, Fig.13 As shown, taking the first metadata as the data updated in the first data table as an example, the first metadata can be metadata that the field value of the first field in the first data table is greater than 2, that is, data that the field value of the first field in the first data table is 3, that is, the second row of data after update in the first data table.
[0278] For example, Fig.14 As shown, taking the first metadata as the newly added data in the first data table as an example, the first metadata can be metadata that the field value of the first field in the first data table is greater than 2, that is, data that the field value of the first field in the first data table is 3, that is, the third row of data newly added in the first data table.
[0279] S1211. The gallery database sends first metadata to the media data center.
[0280] S1212: The media data middle station receives the first metadata, and updates the second data table according to the first metadata.
[0281] After the media data center of the electronic device receives the first metadata sent by the gallery database of the electronic device, the media data center of the electronic device can update the metadata corresponding to the multimedia resources stored in the database of the media data center according to the first metadata. In other words, the media data center of the electronic device can synchronously update the updated data in the first data table to the second data table, and synchronously add the newly added data in the first data table to the second data table, that is, the media data center of the electronic device synchronizes the data in the gallery database of the electronic device to the database of the media data center. Among them, the database of the media data center can be the above-mentioned metadata master database.
[0282] In some examples, since the first metadata can be updated data in the first data table or newly added data in the first data table, when the media data center of the electronic device updates the second data table according to the first metadata, the media data center of the electronic device can determine whether there is metadata corresponding to the first metadata in the second data table. If there is metadata corresponding to the first metadata in the second data table, the metadata corresponding to the first metadata in the second data table is updated according to the first metadata. If there is no metadata corresponding to the first metadata in the second data table, the first metadata is inserted into the second data table. In this way, it can be ensured that the first metadata is synchronized to the second data table, and data duplication can be avoided while synchronizing the first metadata to the second data table.
[0283] For example, Fig.13 As shown, taking the example of the media data center synchronizing the updated data in the first data table to the second data table, the second row of data in the first data table is updated from 2 to 3 (that is, the field value corresponding to field B is updated from 2 to 3), then the field value corresponding to the first field (that is, field A) in the second row of data in the first data table is updated from 2 to 3, that is, the first metadata is the second row of data in the first data table. Afterwards, the media data center can determine that the second row of data in the second data table is the data corresponding to the second row of data in the first data table by comparing the second row of data in the first data table with the data in the second data table. At this time, according to the second row of data in the first data table, the second row of data in the second data table is updated from 2 to 3 (that is, the field value corresponding to field B is updated from 2 to 3), that is, the updated data in the first data table is synchronously updated to the second data table.
[0284] For example, Fig.14 As shown, taking the example of the media data center synchronizing the newly added data in the first data table to the second data table, the third row of data is inserted into the first data table, and the field value of the third row of data in the first data table corresponding to the first field (i.e., field A) is set to 3, that is, the first metadata is the third row of data in the first data table. Afterwards, the media data center can compare the third row of data in the first data table (first metadata) with the data in the second data table, and if it is determined that there is no data corresponding to the first metadata in the second data table, insert the first metadata into the second data table, that is, insert the third row of data into the second data table.
[0285] S1213. The media data center sends a third query request to the gallery database, where the third query request includes the second field value.
[0286] After the media data center of the electronic device updates the second data table according to the first metadata, the media data center of the electronic device may send a third query request to the gallery database of the electronic device, wherein the third query request includes the second field value, and the third query request is used to query the metadata of multimedia resources in the first data table whose field value of the first field is less than or equal to the second field value. That is to say, after the media data center of the electronic device synchronously updates the updated data in the first data table to the second data table, and synchronously adds the newly added data in the first data table to the second data table, the media data center of the electronic device may send a third query request to the gallery database of the electronic device to obtain the second metadata from the gallery database of the electronic device, and then the media data center of the electronic device synchronously deletes the metadata corresponding to the multimedia resources stored in the second data table based on the second metadata, to ensure that the data stored in the media data center is consistent with the data in the gallery database.
[0287] S1214. The gallery database receives the third query request, and acquires second metadata according to the third query request, where the second metadata is metadata corresponding to multimedia resources in which the field value of the first field in the first data table is less than or equal to the second field value.
[0288] After the gallery database of the electronic device receives the third query request sent by the media data center of the electronic device, the gallery database of the electronic device can obtain the second metadata according to the second field value. The second metadata can be metadata corresponding to multimedia resources whose field value of the first field in the first data table is less than or equal to the second field value, that is, the second metadata can be metadata corresponding to multimedia resources that have been deleted from the first data table.
[0289] In some examples, the second metadata may be one or more. That is, the gallery database of the electronic device may obtain one or more second metadata according to the third query request.
[0290] In some examples, the gallery database of the electronic device obtains the second metadata based on the third query request, and the media data middle station of the electronic device can send the third query request to the gallery database of the electronic device through the gallery. The gallery database of the electronic device receives the third query request. In response, the gallery database of the electronic device compares the field value of the first field of the first data table with the second field value, and returns the metadata corresponding to the multimedia resources in the first data table whose field value is less than or equal to the second field value to the media data middle station of the electronic device through the gallery.
[0291] S1215. The gallery database sends the second metadata to the media data center.
[0292] S1216. The media data middle station receives the second metadata, and determines and deletes the third metadata in the second data table based on the second metadata, where the third metadata is metadata corresponding to the multimedia resources that exist in the second data table and do not exist in the first data table.
[0293] In some examples, the media data center of the electronic device determines and deletes the third metadata in the second data table based on the second metadata. The media data center of the electronic device may compare the second metadata with the metadata in the second data table, determine the metadata in the second data table other than the data corresponding to the second metadata as the third metadata, and delete the third metadata in the second data table.
[0294] In some examples, the media data center of the electronic device performs synchronous deletion processing on the second data table according to the first data table, and the media data center of the electronic device can perform a full comparison of the metadata in the first data table with the metadata in the second data table to delete the metadata corresponding to the multimedia resources that exist in the second data table but do not exist in the first data table from the second data table. Fig.15 As shown, the second row of data in the first data table has been deleted. At this time, the media data center compares the data in the first data table with the data in the second data table in full to determine that the second row of data in the second data table is metadata corresponding to the multimedia resources that exist in the second data table but not in the first data table, and deletes the second row of data in the second data table.
[0295] S1217. The media data center updates the field value corresponding to the first field in the second data table according to the second field value.
[0296] After the media data center of the electronic device determines and deletes the third metadata in the second data table based on the second metadata, the media data center of the electronic device can update the field value corresponding to the first field in the second data table based on the second field value. In other words, after the media data center of the electronic device completes the synchronous addition, synchronous update, and synchronous deletion of the first data table of the gallery database of the electronic device, the media data center of the electronic device can update the field value corresponding to the first field in the second data table based on the maximum field value of the first field in the first data table.
[0297] In some examples, the media data center of the electronic device updates the field value corresponding to the first field in the second data table according to the second field value, and the media data center of the electronic device uses the second field value to cover the maximum field value of the first field in the second data table.
[0298] In this embodiment, the media data middle station of the electronic device can update the field value corresponding to the first field in the second data table according to the second field value, so that the maximum field value of the first field of the synchronized second data table is consistent with the maximum field value of the first field of the first data table. In this way, when the media data middle station of the electronic device synchronizes and adds or updates the first data table of the gallery database next time, the media data middle station of the electronic device can query the data to be synchronized based on the updated first field in the second data table, so as to avoid repeated synchronization of the same data, thereby ensuring that the data stored in the media data middle station is consistent with the data in the gallery database.
[0299] In this way, the media data middle platform of the electronic device can synchronize the metadata corresponding to the pictures and videos in the gallery database of the electronic device to the database of the media data middle platform, so that other electronic devices can obtain the metadata corresponding to the pictures and videos stored in the gallery database of the electronic device from the database of the media data middle platform of the electronic device. Then, the user can access and view the pictures and videos stored in the gallery database of the electronic device through other electronic devices, thereby realizing the sharing and synchronization of pictures and videos across devices.
[0300] In the above embodiment, when the media data center of the electronic device obtains and stores metadata corresponding to multimedia resources in the media database, the media data center of the electronic device can obtain the metadata corresponding to the multimedia resources from the data table in the media database, and store the metadata corresponding to the multimedia resources in the media database in the corresponding data table.
[0301] Combine the following Fig.16 , a schematic diagram is given of a process in which a media data middle station of an electronic device obtains metadata corresponding to multimedia resources from a data table in a media database, stores the metadata corresponding to the multimedia resources in the media database in a corresponding data table, and synchronously deletes the data table stored in the database of the media data middle station.
[0302] S1601: The media data center of the electronic device creates a second monitoring event, where the second monitoring event is used to monitor whether data in the media database of the electronic device changes.
[0303] When the media data middle station of the electronic device is started, the media data middle station can create a second monitoring event for the media database to monitor whether the data in the media database has changed. Then, when the media data middle station monitors that the data in the media database has changed, the media data middle station obtains and stores (i.e., synchronizes) the metadata corresponding to the multimedia resources in the media database.
[0304] In some examples, the media data center creates a second monitoring event to monitor whether the data in the media database has changed. The media data center monitors whether the URI of the media database has changed. When the media data center monitors that the URI of the media database has changed, it determines that the data in the media database has changed.
[0305] S1602: The data stored in the third data table in the media database changes, and the field value corresponding to the second field in the third data table is updated.
[0306] When the media provider generates multimedia resources, that is, when the data recorded in the third data table in the media database changes, the media provider can update the field value of the second field in the third data table of the media database to indicate the change of metadata corresponding to the multimedia resources recorded in the third data table through the change of the field value of the second field, that is, to indicate the data change of the media database through the change of the field value of the second field.
[0307] The third data table is a data table stored in the media database and used to record metadata corresponding to multimedia resources generated by the media provider. For example, the third data table is a files data table.
[0308] The second field in the third data table can be used to record data changes in the third data table (such as updated data or newly added data). Exemplarily, when the data in the third data table changes, the second field of the third data table is incremented. Fig.17 As shown, taking the update of data in the third data table as an example, when the second row of data in the third data table is updated from 2 to 3 (that is, the field value corresponding to field B is updated from 2 to 3), the second field of the third data table (that is, field C) is automatically incremented, that is, the field value corresponding to the second field (that is, field C) in the second row of data in the third data table is updated from 2 to 3. In this way, the change in the field value corresponding to the second field in the third data table can indicate that the metadata recorded in the third data table has been updated.
[0309] For example, Fig.18 As shown, taking the newly added data in the third data table as an example, when the third row of data is inserted into the third data table, the second field (i.e., field C) of the third data table is automatically incremented, that is, the field value corresponding to the second field (i.e., field C) of the third row of data in the third data table is set to 3. In this way, the change in the field value corresponding to the second field in the third data table can indicate the insertion of new metadata into the third data table.
[0310] In some examples, the second field may be a gallery_generation field.
[0311] S1603: The media database sends a second monitoring notification to the media data middle station, where the second monitoring notification is used to indicate that data in the media database has changed.
[0312] The second monitoring notification may be a monitoring result for the second monitoring event. When the data in the media database changes, the media database may send a second monitoring notification corresponding to the second monitoring event to the media data center to notify the media data center that the data in the media database has changed, so that the media data center synchronizes the third data table in the media database for recording data changes of the media provider.
[0313] S1604. The media data center receives the second monitoring notification and determines the third field value corresponding to the second field in the fourth data table, wherein the fourth data table is a data table corresponding to the third data table and stored in the database of the media data center, and the third field value is the maximum field value of the second field in the fourth data table.
[0314] The fourth data table may be a data table stored in a database of the media data center (such as the metadata master database mentioned above). The fourth data table corresponds to the third data table. For example, if the third data table is a files data table stored in the media database, then the fourth data table is a files data table stored in the database of the media data center.
[0315] The third field value may be the maximum field value of the second field in the fourth data table. The third field value may represent the maximum field currently synchronized in the fourth data table, that is, the third field value may represent the latest data currently synchronized from the third data table to the fourth data table.
[0316] That is to say, when the media data middle station starts monitoring changes in the data in the media database, the media data middle station can trigger synchronization, that is, the media data middle station can query the third field value of the second field corresponding to the latest data currently synchronized to the fourth data table, and then query the unsynchronized data in the third data table based on the third field value, that is, based on the third field value, it can query and obtain the updated or newly added data in the third data table.
[0317] S1605. The media data middle station sends a fourth query request to the media database.
[0318] After the media data center of the electronic device determines the third field value corresponding to the second field in the fourth data table, the media data center of the electronic device may send a fourth query request to the media database of the electronic device, and the fourth query request is used to query the maximum field value of the second field in the third data table. That is, the media data center of the electronic device queries the field value of the second field corresponding to the latest data (such as updated data or newly added data) recorded in the third data table by sending the fourth query request to the media database of the electronic device.
[0319] S1606. The media database receives the fourth query request and determines a fourth field value of the second field in the third data table, where the fourth field value is the maximum field value of the second field in the third data table.
[0320] After the media database of the electronic device receives the fourth query request sent by the media data center of the electronic device, the media database of the electronic device can determine the maximum field value of the second field in the third data table, that is, after the media database of the electronic device receives the fourth query request, the media database of the electronic device can determine the fourth field value. The fourth field value can represent the maximum field of the third data table record, that is, the fourth field value can represent the latest data recorded in the third data table. For example, Fig.17 As shown, taking the update data of the third data table as an example, the maximum field corresponding to the second field (ie, field C) in the third data table is 3, that is, the value of the fourth field is 3. For example, Fig.18 As shown, taking the newly added data in the third data table as an example, the maximum field corresponding to the second field (ie, field C) in the third data table is 3, that is, the value of the fourth field is 3.
[0321] S1607. The media database sends the fourth field value to the media data middle station.
[0322] S1608. The media data center receives the fourth field value.
[0323] After the media data center of the electronic device receives the fourth field value sent by the media database of the electronic device, the media data center of the electronic device can, based on the fourth field value, synchronously delete the metadata corresponding to the multimedia resources stored in the database of the media data center (i.e., the metadata master database), thereby ensuring that the metadata corresponding to the multimedia resources stored in the media data center is consistent with the metadata corresponding to the multimedia resources in the media database.
[0324] S1609. The media data middle station sends a fifth query request to the media database, where the fifth query request includes the third field value.
[0325] After the media data center of the electronic device determines the third field value corresponding to the second field in the fourth data table, the media data center of the electronic device may send a fifth query request to the media database of the electronic device, wherein the fifth query request includes the third field value, and the fifth query request is used to query the metadata in the third data table where the field value of the second field is greater than the third field value. That is to say, after determining the currently synchronized maximum field (third field value) in the fourth data table stored in the database of the media data center of the electronic device, the media data center of the electronic device may send a fifth query request including the third field value to the media database of the electronic device to obtain the metadata of the multimedia resources in the third data table where the field value of the second field is greater than the third field value, that is, to obtain the metadata of the multimedia resources updated or newly added in the third data table after the metadata corresponding to the third field value is recorded, that is, to obtain the metadata of the multimedia resources that exist in the current third data table and are not synchronized with the fourth data table.
[0326] S1610. The media database receives the fifth query request, and obtains fourth metadata according to the fifth query request, where the fourth metadata is metadata corresponding to the multimedia resource in which the field value of the second field in the third data table is greater than the third field value.
[0327] After the media database of the electronic device receives the fifth query request sent by the media data center of the electronic device, the media database can obtain the fourth metadata according to the third field value. The fourth metadata can be metadata corresponding to the multimedia resource in which the field value of the second field in the third data table is greater than the third field value, that is, the fourth metadata can be metadata corresponding to the multimedia resource updated or newly added in the third data table after recording the metadata corresponding to the multimedia resource corresponding to the third field value, that is, the fourth metadata can be metadata corresponding to the multimedia resource that exists in the current third data table and is not synchronized with the fourth data table.
[0328] In some examples, the media database obtains fourth metadata based on the fifth query request, and the media data middle station of the electronic device can send the fifth query request to the media database through the media provider. The media database receives the fifth query request, and in response, the media database compares the field value of the second field of the third data table with the third field value, and returns the metadata corresponding to the multimedia resource in the third data table whose field value of the second field is greater than the third field value to the media data middle station through the media provider.
[0329] In some examples, the fourth metadata may be one or more. That is, the media database may obtain one or more fourth metadata according to the fifth query request. Exemplarily, the fourth metadata may be updated data in the third data table or newly added data in the third data table.
[0330] For example, Fig.17 As shown, taking the fourth metadata as the updated data in the third data table as an example, the fourth metadata can be metadata that the field value of the second field in the third data table is greater than 2, that is, data that the field value of the second field in the third data table is 3, that is, the second row of data after update in the third data table.
[0331] For example, Fig.18 As shown, taking the fourth metadata as the newly added data in the third data table as an example, the fourth metadata can be metadata that the field value of the second field in the third data table is greater than 2, that is, data that the field value of the second field in the third data table is 3, that is, the third row of data newly added in the third data table.
[0332] S1611. The media database sends fourth metadata to the media data middle station.
[0333] S1612. The media data middle station receives the fourth metadata, and updates the fourth data table according to the fourth metadata.
[0334] After the media data center of the electronic device receives the fourth metadata sent by the media database of the electronic device, the media data center of the electronic device can update the metadata corresponding to the multimedia resources stored in the database of the media data center according to the fourth metadata. In other words, the media data center of the electronic device can synchronously update the updated data in the third data table to the fourth data table, and synchronously add the newly added data in the third data table to the fourth data table, that is, the media data center of the electronic device synchronizes the data in the media database of the electronic device to the database of the media data center. Among them, the database of the media data center can be the above-mentioned metadata master database.
[0335] In some examples, since the fourth metadata may be updated data in the third data table or newly added data in the third data table, when the media data center of the electronic device updates the fourth data table according to the fourth metadata, the media data center of the electronic device may determine whether there is metadata corresponding to the fourth metadata in the fourth data table. If there is metadata corresponding to the fourth metadata in the fourth data table, the metadata corresponding to the fourth metadata in the fourth data table is updated according to the fourth metadata. If there is no metadata corresponding to the fourth metadata in the fourth data table, the fourth metadata is inserted into the fourth data table. In this way, it is ensured that the fourth metadata is synchronized to the fourth data table, and data duplication can be avoided while synchronizing the fourth metadata to the fourth data table.
[0336] For example, Fig.17As shown, taking the case where the media data center synchronizes the updated data in the third data table to the fourth data table as an example, the second row of data in the third data table is updated from 2 to 3 (i.e., the field value corresponding to field B is updated from 2 to 3), then the field value corresponding to the second field (i.e., field C) in the second row of data in the third data table is updated from 2 to 3, i.e., the fourth metadata is the second row of data in the third data table. Afterwards, the media data center compares the second row of data in the third data table with the data in the fourth data table, and can determine that the second row of data in the fourth data table is the data corresponding to the second row of data in the third data table. At this time, according to the second row of data in the third data table, the second row of data in the third data table is updated from 2 to 3 (i.e., the field value corresponding to field B is updated from 2 to 3), i.e., the updated data in the third data table is synchronized to the fourth data table.
[0337] For example, Fig.18 As shown, taking the example of the media data center synchronizing the newly added data in the third data table to the fourth data table, the third row of data is inserted into the third data table, and the field value corresponding to the second field (i.e., field C) of the third row of data in the third data table is set to 3, that is, the fourth metadata is the third row of data in the third data table. Afterwards, the media data center can compare the third row of data in the third data table (fourth metadata) with the data in the fourth data table, and if it is determined that there is no data corresponding to the fourth metadata in the fourth data table, insert the fourth metadata into the fourth data table, that is, insert the third row of data into the fourth data table.
[0338] S1613. The media data middle station sends a sixth query request to the media database, where the sixth query request includes the fourth field value.
[0339] After the media data center of the electronic device updates the fourth data table according to the fourth metadata, the media data center of the electronic device may send a sixth query request to the media database of the electronic device, wherein the sixth query request includes the fourth field value, and the sixth query request is used to query the metadata of the multimedia resources in the third data table whose field value of the second field is less than or equal to the fourth field value. That is to say, after the media data center of the electronic device synchronously updates the updated data in the third data table to the fourth data table, and synchronously adds the newly added data in the third data table to the fourth data table, the media data center of the electronic device may send a sixth query request to the media database of the electronic device to obtain the fifth metadata from the media database of the electronic device, and then the media data center of the electronic device synchronously deletes the metadata corresponding to the multimedia resources stored in the fourth data table based on the fifth metadata, to ensure that the data stored in the media data center of the electronic device is consistent with the data in the media database of the electronic device.
[0340] S1614. The media database receives the sixth query request, and obtains fifth metadata according to the sixth query request, where the fifth metadata is metadata corresponding to the multimedia resource in which the field value of the second field in the third data table is less than or equal to the value of the fourth field.
[0341] After the media database of the electronic device receives the sixth query request sent by the media data center, the media database of the electronic device can obtain fifth metadata according to the fourth field value. The fifth metadata can be metadata corresponding to multimedia resources whose field value of the second field in the third data table is less than or equal to the fourth field value, that is, the fifth metadata can be metadata corresponding to multimedia resources that have been deleted from the third data table.
[0342] In some examples, the fifth metadata may be one or more. That is, the media database of the electronic device may obtain one or more fifth metadata according to the sixth query request.
[0343] In some examples, the media database of the electronic device obtains the fifth metadata based on the sixth query request. The media data middle station of the electronic device can send the sixth query request to the media database of the electronic device through the media provider. The media database of the electronic device receives the sixth query request. In response, the media database of the electronic device compares the field value of the second field of the third data table with the fourth field value, and returns the metadata corresponding to the multimedia resources in the third data table whose field value of the second field is less than or equal to the fourth field value to the media data middle station through the media provider.
[0344] S1615. The media database sends the fifth metadata to the media data center.
[0345] S1616. The media data middle station receives the fifth metadata, and determines and deletes the sixth metadata in the fourth data table based on the fifth metadata, where the sixth metadata is metadata corresponding to the multimedia resources that exist in the fourth data table and do not exist in the third data table.
[0346] In some examples, the media data center of the electronic device determines and deletes the sixth metadata in the fourth data table based on the fifth metadata. The media data center of the electronic device may compare the fifth metadata with the metadata in the fourth data table, determine the metadata in the fourth data table except the data corresponding to the fifth metadata as the sixth metadata, and delete the sixth metadata in the fourth data table.
[0347] In some examples, the media data center of the electronic device performs synchronous deletion processing on the fourth data table according to the third data table, and the media data center of the electronic device can perform a full comparison of the metadata in the third data table with the metadata in the fourth data table to delete the metadata corresponding to the multimedia resources that exist in the fourth data table but do not exist in the third data table from the fourth data table. Fig.19 As shown, the second row of data in the third data table has been deleted. At this time, the media data center compares the data in the third data table with the data in the fourth data table in full to determine that the second row of data in the fourth data table is metadata corresponding to the multimedia resources that exist in the fourth data table but not in the third data table, and deletes the second row of data in the fourth data table.
[0348] S1617. The media data middle station updates the field value corresponding to the second field in the fourth data table according to the fourth field value.
[0349] After the media data center of the electronic device determines and deletes the sixth metadata in the fourth data table according to the fifth metadata, the media data center of the electronic device can update the field value corresponding to the second field in the fourth data table according to the fourth field value. In other words, after the media data center of the electronic device completes the synchronous addition, synchronous update, and synchronous deletion of the third data table of the media database of the electronic device, the media data center of the electronic device can update the field value corresponding to the second field in the fourth data table according to the maximum field value of the second field in the third data table.
[0350] In some examples, the media data center of the electronic device updates the field value corresponding to the second field in the fourth data table according to the fourth field value, and the media data center of the electronic device uses the fourth field value to cover the maximum field value of the second field in the fourth data table.
[0351] In this embodiment, the media data middle station of the electronic device can update the field value corresponding to the second field in the fourth data table according to the fourth field value, so that the maximum field value of the second field in the synchronized fourth data table is consistent with the maximum field value of the second field in the third data table. In this way, when the media data middle station of the electronic device synchronizes and updates the third data table of the media database next time, the media data middle station of the electronic device can query the data to be synchronized based on the updated second field in the fourth data table, thereby avoiding repeated synchronization of the same data, and ensuring that the data stored in the media data middle station is consistent with the data in the media database.
[0352] In this way, the media data middle platform of the electronic device can synchronize the metadata corresponding to the multimedia resources in the media database of the electronic device to the database of the media data middle platform, so that other electronic devices can obtain the metadata corresponding to the multimedia resources stored in the media database of the electronic device from the database of the media data middle platform of the electronic device. Then, the user can access and view the multimedia resources stored in the media database of the electronic device through other electronic devices, thereby realizing the sharing and synchronization of multimedia resources across devices.
[0353] Furthermore, the media data middle platform of the electronic device can obtain and store various types of multimedia resources (such as audio, video, pictures or documents, etc.), that is, the solution of the present application can support the sharing and synchronization of different types of multimedia resources, meet the usage needs of different users, and enhance the user experience.
[0354] In some examples, the metadata corresponding to the multimedia resources in the gallery database of the electronic device (such as the basic data in the gallery database) is obtained from the media database of the electronic device, that is, the media database of the electronic device may be the initial data source of the multimedia resources of the electronic device, and the metadata corresponding to the multimedia resources in the gallery database of the electronic device may be obtained from the media database of the electronic device, as well as data obtained after processing the metadata corresponding to the multimedia resources obtained from the media database. That is, the gallery database of the electronic device and the media database of the electronic device store the same data. Therefore, when the media data center of the electronic device obtains the same data, there is a conflict between the process of obtaining the same data from the gallery database of the electronic device and the process of obtaining the same data from the media database of the electronic device.
[0355] For example, when a user uses an electronic device to take a picture or share a picture, the media provider of the electronic device obtains the metadata corresponding to the picture and stores the metadata corresponding to the picture in the media database. At this time, the gallery of the electronic device can monitor the URI of the media database of the electronic device. When the gallery of the electronic device monitors that the URI of the media database of the electronic device has changed, the gallery of the electronic device can obtain the metadata corresponding to the picture from the media database of the electronic device and store the metadata corresponding to the picture in the gallery database. Afterwards, when the service of the gallery of the electronic device is triggered, the gallery of the electronic device can process the metadata corresponding to the picture and store the metadata corresponding to the processed picture in the gallery database. For example, if the picture is a portrait picture, the gallery of the electronic device can obtain the portrait-related data (such as facial coordinates, facial features, etc.) corresponding to the picture after obtaining the metadata corresponding to the picture and store the portrait-related data corresponding to the picture in the gallery database. That is, the metadata corresponding to the picture is the same data stored in the gallery database of the electronic device and the media database of the electronic device. In this regard, the media data middle station of the electronic device can obtain the metadata corresponding to the image from the gallery database. At the same time, the media data middle station of the electronic device can obtain the metadata corresponding to the image from the media database, which will cause the metadata corresponding to the image to be stored repeatedly.
[0356] Therefore, in order to avoid conflicts between the process of obtaining the same data from the gallery database of the electronic device and the process of obtaining the same data from the media database of the electronic device, the following is combined with Fig. 20 , continue to take the first data table as an example, the process of the media data center of the electronic device acquiring and storing the metadata corresponding to the multimedia resources of the gallery database of the electronic device is schematically described. Fig. 20 As shown, the process of the media data center of the electronic device acquiring and storing metadata corresponding to the multimedia resources of the gallery database of the electronic device may include: S2001-S2000.
[0357] S2001. A media data center of an electronic device obtains first metadata in a first data table.
[0358] Specifically, the specific implementation method of the media data center of the electronic device in the embodiment of the present application obtaining the first metadata in the first data table can refer to the specific implementation methods in the above S1209-S1212, which will not be repeated in the embodiment of the present application.
[0359] S2002: When the first metadata satisfies a conflict condition and there is no data corresponding to the first metadata in the second data table, the media data center of the electronic device stores the first metadata in the second data table and sets the field value of the first metadata corresponding to the third field to the fifth field value.
[0360] The first metadata that meets the conflict condition may be metadata corresponding to multimedia resources obtained by the gallery database of the electronic device from the media database of the electronic device. In other words, the first metadata that meets the conflict condition may be basic data stored in the gallery database of the electronic device. Native images and videos, such as the image ID, image storage path, image size, image corresponding timestamp, image name, and image rotation angle.
[0361] When the first metadata meets the conflict condition, it indicates that the first metadata is the metadata corresponding to the multimedia resource obtained by the gallery database of the electronic device from the media database of the electronic device. Therefore, when the media data center of the electronic device stores the first metadata, the media data center of the electronic device can determine whether there is data corresponding to the first metadata in the second data table, that is, the media data center of the electronic device can determine whether the first metadata has been obtained from the media data center of the electronic device. In the case where there is no data corresponding to the first metadata in the second data table of the media data center of the electronic device, the media data center of the electronic device stores the first metadata in the second data table, and sets the field value of the first metadata corresponding to the third field to the fifth field value, that is, the fifth field value indicates that the first metadata may be stored abnormally. Afterwards, after the media data center of the electronic device obtains the first metadata from the media data center of the electronic device, the field value of the first metadata corresponding to the third field is updated to the sixth field value. In the case where the field value of the first metadata corresponding to the third field is updated to the sixth field value, the upper layer application of the electronic device (such as the photo album application or the third-party application) can access and view the first metadata, that is, the multimedia resource corresponding to the first metadata is displayed on the interface corresponding to the upper layer application of the electronic device.
[0362] That is, by setting the field value of the third field for the first metadata, it can be indicated whether the first metadata meets the display condition. Fig.21 As shown, the third field may be the mp_id field.
[0363] Specifically, by setting the fifth field value for the first metadata, it can be indicated that the first metadata does not meet the display conditions, that is, when the media data center of the electronic device obtains the first metadata of the gallery database, the media data center of the electronic device does not obtain the first metadata of the media database, indicating that the first metadata may be stored abnormally.
[0364] Exemplarily, the fifth field value may be a value less than 0. For example, the fifth field value is -1.
[0365] S2003. When the media data center of the electronic device obtains the seventh metadata from the media database, the field value of the first metadata corresponding to the third field is updated to the sixth field value, and the seventh metadata is the same metadata as the first metadata.
[0366] The seventh metadata may be metadata that is the same as the first metadata, that is, the first metadata acquired by the media data center of the electronic device from the media database.
[0367] By setting the sixth field value for the first metadata, it can be indicated that the first metadata meets the display condition. Exemplarily, the sixth field value can be a value less than 0. For example, the sixth field value is 2.
[0368] For example, Fig.21 As shown in (a), after the media data center of the electronic device obtains the second row of data of the first data table (i.e., the first metadata of the gallery database of the electronic device), it is determined whether there is metadata corresponding to the first metadata in the second data table of the database of the media data center (i.e., the metadata master database). If there is no metadata corresponding to the first metadata in the second data table of the database of the media data center, the first metadata is inserted into the second data table, and the field value of the mp_id field of the first metadata is set to a value less than 0 (i.e., the field value of the third field of the first metadata is set to the fifth field value), such as -1. At this time, when the application of the electronic device accesses and views the metadata corresponding to the multimedia resources stored in the media data center of the electronic device, the electronic device can display metadata whose field value of the mp_id field is greater than 0, and the electronic device does not display metadata whose field value of the mp_id field is less than 0, such as the first metadata.
[0369] Afterwards, if Fig.21As shown in (b), after the media data center of the electronic device obtains the second row of data in the media database (i.e., the seventh metadata in the third data table), it determines whether there is data corresponding to the second row of data in the third data table in the second data table according to the field value of the _id field of the second row of data in the third data table. When the media data center of the electronic device determines that there is data corresponding to the second row of data in the third data table in the second data table (i.e., the seventh metadata is the same metadata as the first metadata), the field value of the mp_id field of the first metadata is set to a value greater than 0 (i.e., the field value of the third field of the first metadata is updated to the sixth field value), such as 2. At this time, when the application of the electronic device accesses and views the metadata corresponding to the multimedia resources stored in the media data center of the electronic device, the electronic device can display the first metadata. In this way, it is possible to avoid conflicts between the process of obtaining the same data from the gallery database of the electronic device and the process of obtaining the same data from the media database of the electronic device, and it is possible to avoid synchronizing abnormal data in the gallery database of the electronic device to the media data center of the electronic device.
[0370] For ease of understanding, the following Fig. 22 The method for displaying multimedia resources provided in the embodiment of the present application is described. Fig. 22 As shown, the method for displaying multimedia resources may include the following S2201-S2204.
[0371] S2201. A first electronic device receives a first operation of a user on a first application.
[0372] The first electronic device may include a first application program. The first application program may be an application program having permission to call the media data center of the first electronic device, that is, the first application program may access and view multimedia resources stored in the media data center of the first electronic device.
[0373] The first application may be a system application of the first electronic device or a third-party application. For example, the first application may be a photo album application, an image editing application, a video application, a music application, a file management application, or a communication application. The type of the first application is not limited in the embodiments of the present application.
[0374] Exemplarily, the first operation may be an operation of opening the first application by the user. When the user needs to use the first application to view the multimedia resources stored in the media data center of the first electronic device, the user may open the first application on the first electronic device, that is, the first electronic device may receive the operation of opening the first application by the user.
[0375] Exemplarily, the first operation may also be a trigger operation (such as a single-click operation, a double-click operation, etc.) of the user on the viewing control of the first application. When the user needs to use the first application to view the multimedia resources stored in the media data center of the first electronic device, the user can open the first application on the first electronic device and click the viewing control displayed on the interface corresponding to the first application, that is, the first electronic device can receive the user's trigger operation on the first application.
[0376] Specifically, the specific implementation of the first electronic device receiving the first operation of the user on the first application in the embodiment of the present application can refer to the specific implementation of opening the application of the electronic device in the above S1101, which will not be repeated in the embodiment of the present application.
[0377] S2202: In response to the first operation, the first electronic device acquires and stores multimedia resources of the first electronic device, where the multimedia resources include at least one of audio, video, picture, and document.
[0378] When the first electronic device receives the first operation of the user on the first application, in response, the first electronic device can obtain and store the multimedia resources of the first electronic device.
[0379] In some examples, in response to the first operation, the first electronic device obtains and stores multimedia resources of the first electronic device, which may include: in response to the first operation, starting a first media data middle station of the first electronic device; the first media data middle station obtains the multimedia resources of the first electronic device from a target database of the first electronic device, and stores the multimedia resources of the first electronic device.
[0380] In this way, the media data middle station of the electronic device can serve as a transfer station for multimedia resources. The media data middle station of the electronic device can obtain the multimedia resources of the electronic device and store the multimedia resources of the electronic device in the database of the media data middle station, so that other electronic devices can obtain the multimedia resources of the electronic device from the database of the media data middle station of the electronic device, and then the user can access and view the multimedia resources of the electronic device through other electronic devices.
[0381] In an embodiment of the present application, when the first media data middle station of the first electronic device is started, the first media data middle station can obtain the multimedia resources of the first electronic device from the target database of the first electronic device and store the multimedia resources of the first electronic device, that is, when the first media data middle station is started, the first media data middle station actively synchronizes the metadata corresponding to the multimedia resources of the first electronic device.
[0382] Specifically, in the embodiment of the present application, the specific implementation of starting the first media data middle station of the first electronic device in response to the first operation can refer to the specific implementation in the above S1101, which will not be repeated in the embodiment of the present application.
[0383] In some examples, the target database may include a first database and a second database.
[0384] The first database may be used to store metadata corresponding to videos or pictures of the electronic device. Exemplarily, the metadata stored in the first database may be divided into basic data and extended data, wherein the basic data may be metadata corresponding to pictures and videos obtained from the second database, that is, Native pictures and videos, such as the picture's ID, the picture's storage path, the picture's size, the picture's corresponding timestamp, the picture's name, and the picture's rotation angle. Extended data can be private data generated by the processing logic of the gallery. For example, the private data can include pictures and videos collected by the user, or data in classified albums (such as portrait albums, location albums, or food albums, etc.).
[0385] In some examples, the first database may be a gallery database of the first electronic device.
[0386] Specifically, the image library database of the first electronic device in the embodiment of the present application may be Figure 6 , Fig.11 or Fig.12 A gallery database of the electronic device shown.
[0387] The second database may be a database corresponding to the media provider. The second database may be used to store metadata corresponding to multimedia resources (such as audio, video, pictures or documents) generated by the media provider. For example, the metadata stored in the second database may include the identification of the picture, the storage path of the picture, the size of the picture, the timestamp corresponding to the picture, the name of the picture, the rotation angle of the picture, etc. For example, when a user uses an electronic device to take a picture or shares a picture with other electronic devices, the media provider obtains the metadata corresponding to the picture and stores the metadata corresponding to the picture in the second database.
[0388] In some examples, the second database may be a media database of the first electronic device.
[0389] Specifically, the media database of the first electronic device in the embodiment of the present application may be Figure 6 , Fig.11 or Fig.16 A media database of the electronic device is shown.
[0390] In some examples, the first media data center obtains multimedia resources of the first electronic device from the target database of the first electronic device and stores the multimedia resources of the first electronic device, which may include: the first media data center obtains the first multimedia resources from the first database and stores the first multimedia resources; the first media data center obtains the second multimedia resources from the second database and stores the second multimedia resources. In this way, the user can view the multimedia resources of different types included in the first electronic device through the first application of the first electronic device, and the user can view the multimedia resources of different types included in the first electronic device through the first application of the second electronic device.
[0391] The first multimedia resource may include a picture or a video, that is, the first multimedia resource may be a multimedia resource stored in a gallery database of the first electronic device.
[0392] In some examples, the first media data center station obtains the first multimedia resource from the first database and stores the first multimedia resource, which may include: the first media data center station obtains metadata corresponding to the first multimedia resource from the first database, and stores the metadata corresponding to the first multimedia resource.
[0393] Specifically, in the embodiment of the present application, the first media data center obtains the metadata corresponding to the first multimedia resource from the first database, and stores the metadata corresponding to the first multimedia resource. For the specific implementation method, please refer to the specific implementation method in S1102 above, which will not be repeated in the embodiment of the present application.
[0394] The second multimedia resource may include at least one of audio, video, picture and document, that is, the second multimedia resource may be a multimedia resource stored in the media database of the first electronic device.
[0395] In some examples, the first media data center station obtains the second multimedia resource from the second database and stores the second multimedia resource, which may include: the first media data center station obtains metadata corresponding to the second multimedia resource from the second database, and stores the metadata corresponding to the second multimedia resource.
[0396] Specifically, in the embodiment of the present application, the first media data center obtains the metadata corresponding to the second multimedia resource from the second database, and stores the metadata corresponding to the second multimedia resource. For the specific implementation method, please refer to the specific implementation method in S1104 above, which will not be repeated in the embodiment of the present application.
[0397] In some examples, the first media data center obtains multimedia resources of the first electronic device from the target database of the first electronic device and stores the multimedia resources of the first electronic device, which may include: when the first media data center is started, the first media data center creates a monitoring event, and the monitoring event is used to monitor whether the data in the target database changes; when the first media data center receives a monitoring notification, the first media data center obtains the multimedia resources of the first electronic device from the target database and stores the multimedia resources of the first electronic device, wherein the monitoring notification is a monitoring notification corresponding to the monitoring event, and the monitoring notification is used to indicate that the data in the target database has changed. In this way, the first media data center can monitor the target database of the first electronic device in real time, so as to synchronize the multimedia resources in the target database of the first electronic device in a timely manner when the data in the target database of the first electronic device changes, thereby avoiding the user from being unable to obtain the multimedia resources of the first electronic device in a timely manner.
[0398] That is to say, in the embodiment of the present application, when the first media data center of the first electronic device is started, the first media data center monitors whether the data in the target database has changed. When the first media data center monitors that the data in the target database has changed, the first media data center synchronizes the metadata corresponding to the multimedia resources stored in the target database.
[0399] Exemplarily, when the target database is the first database (i.e., a gallery database), the first media data center obtains the multimedia resources of the first electronic device from the target database of the first electronic device and stores the multimedia resources of the first electronic device, which may include: when the first media data center is started, the first media data center creates a first listening event, and the first listening event is used to monitor whether the data in the first database changes; when the first media data center receives a first listening notification, the first media data center obtains the first multimedia resources of the first electronic device from the first database and stores the first multimedia resources, wherein the first listening notification is a listening notification corresponding to the first listening event, and the first listening notification is used to indicate that the data in the first database has changed.
[0400] Specifically, in the embodiment of the present application, when the first media data middle station is started, the specific implementation method of the first media data middle station creating the first listening event can refer to the above S1101, or the specific implementation method in the above S1201, which will not be repeated in the embodiment of the present application.
[0401] In the embodiment of the present application, when the first media data center receives the first monitoring notification, the first media data center obtains the first multimedia resource of the first electronic device from the first database and stores the first multimedia resource. For the specific implementation method, please refer to the above S1101-S1102, or the specific implementation method in the above S1203-S1212, which will not be repeated in the embodiment of the present application.
[0402] Exemplarily, when the target database is the second database (i.e., the media database), the first media data middle station obtains the multimedia resources of the first electronic device from the target database of the first electronic device and stores the multimedia resources of the first electronic device, which may include: when the first media data middle station is started, the first media data middle station creates a second listening event, and the second listening event is used to monitor whether the data in the second database changes; when the first media data middle station receives a second listening notification, the first media data middle station obtains the second multimedia resources of the first electronic device from the second database and stores the second multimedia resources, wherein the second listening notification is a listening notification corresponding to the second listening event, and the second listening notification is used to indicate that the data in the second database has changed.
[0403] Specifically, in the embodiment of the present application, when the first media data middle station is started, the first media data middle station creates a second monitoring event. The second monitoring event is used to monitor whether the data in the second database has changed. For the specific implementation method, please refer to the above S1101, or the specific implementation method in the above S1601, which will not be repeated in the embodiment of the present application.
[0404] In the embodiment of the present application, when the first media data center receives the second monitoring notification, the first media data center obtains the second multimedia resource of the first electronic device from the second database and stores the second multimedia resource. For the specific implementation method, please refer to the above S1101-S1102, or the specific implementation method in the above S1603-S1612, which will not be repeated in the embodiment of the present application.
[0405] In some examples, metadata corresponding to the multimedia resources of the first electronic device may be stored in the target database in the form of a data table. That is, the target database may include multiple data tables for storing metadata corresponding to multimedia resources, such as the first target data table. This facilitates the storage of metadata corresponding to multimedia resources and can improve the synchronization speed of multimedia resources.
[0406] Taking the target database including the first target data table as an example, when the first media data center obtains and stores metadata corresponding to the multimedia resources in the target database, the first media data center can obtain the metadata corresponding to the multimedia resources from the first target data table in the target database, and store the metadata corresponding to the multimedia resources in the target database in the corresponding data table (i.e., the second target data table corresponding to the first target data table).
[0407] When the target database is the first database (ie, gallery database), the first target data table may be a gallery_media data table, a gallery_album data table, a gallery_album_sort data table, a t_geo_knowledge data table, a t_geo_dictionary data table, an image_collection data table, a merge_face data table, or a merge_tag data table.
[0408] Specifically, when the target database is the first database (ie, the gallery database), the first target data table in the embodiment of the present application may be: Fig.12 The first data table in the flowchart shown, or Fig.13 , Fig.14 , Fig.15 The first data table shown in FIG. 1 is a table of the first target data. Accordingly, the second target data table in the embodiment of the present application may be Fig.12 The second data table in the flowchart shown, or Fig.13 , Fig.14 , Fig.15 The second data table is shown.
[0409] When the target database is the second database (ie, the gallery database), the first target data table may be the files data table.
[0410] Specifically, when the target database is the second database (ie, the media database), the first target data table in the embodiment of the present application may be Fig.16 The third data table in the flowchart shown, or Fig.17 , Fig.18 , Fig.19 Accordingly, the second target data table in the embodiment of the present application may be Fig.16 The fourth data table in the flowchart shown, or Fig.17 , Fig.18 , Fig.19 The fourth data table is shown.
[0411] In some examples, the first media data center obtains multimedia resources of the first electronic device from a target database and stores the multimedia resources of the first electronic device, including: the first media data center determines first identification information of a second target data table, the second target data table is a data table corresponding to the first target data table, and the first identification information is used to indicate the data volume of metadata corresponding to the multimedia resources stored in the second target data table; the first media data center obtains metadata corresponding to the multimedia resources of the first electronic device from the first target data table according to the first identification information; the first media data center stores the metadata corresponding to the multimedia resources of the first electronic device in the second target data table.
[0412] The first identification information can be used to indicate the amount of metadata corresponding to the multimedia resource stored in the second target data table, that is, the first identification information can represent the latest data currently synchronized from the first target data table to the second target data table. Exemplarily, the first identification information can be the maximum field value of the gallery_generation field in the second target data table.
[0413] Specifically, when the target database is the first database (i.e., the gallery database), the first identification information in the embodiment of the present application may be: Fig.12 When the target database is the second database (ie, the media database), the first identification information in the embodiment of the present application may be Fig.16 The third field value in the flowchart shown.
[0414] Specifically, when the target database is the first database (i.e., the gallery database), the specific implementation method of the first media data middle station determining the first identification information of the second target data table in the embodiment of the present application can refer to the specific implementation method in the above S1204, which will not be repeated in the embodiment of the present application. When the target database is the second database (i.e., the media database), the specific implementation method of the first media data middle station determining the first identification information of the second target data table in the embodiment of the present application can refer to the specific implementation method in the above S1604, which will not be repeated in the embodiment of the present application.
[0415] Specifically, when the target database is the first database (i.e., the gallery database), the specific implementation method of the first media data middle station in the embodiment of the present application obtaining the metadata corresponding to the multimedia resources of the first electronic device from the first target data table according to the first identification information can refer to the specific implementation methods in the above S1209-S1211, which will not be repeated in the embodiment of the present application. When the target database is the second database (i.e., the media database), the specific implementation method of the first media data middle station in the embodiment of the present application obtaining the metadata corresponding to the multimedia resources of the first electronic device from the first target data table according to the first identification information can refer to the specific implementation methods in the above S1609-S1611, which will not be repeated in the embodiment of the present application.
[0416] Specifically, when the target database is the first database (i.e., the gallery database), the first media data center in the embodiment of the present application stores the metadata corresponding to the multimedia resources of the first electronic device in the second target data table. For the specific implementation method, please refer to the specific implementation method in S1212 above, which will not be repeated in the embodiment of the present application. When the target database is the second database (i.e., the media database), the first media data center in the embodiment of the present application stores the metadata corresponding to the multimedia resources of the first electronic device in the second target data table. For the specific implementation method, please refer to the specific implementation method in S1612 above, which will not be repeated in the embodiment of the present application.
[0417] In some examples, since the metadata corresponding to the multimedia resources of the first electronic device may be updated data in the first target data table or newly added data in the first target data table, the first media data center stores the metadata corresponding to the multimedia resources of the first electronic device in the second target data table, which may include: when there is metadata to be updated in the second target data table, the metadata to be updated is updated according to the metadata corresponding to the multimedia resources of the first electronic device, and the metadata to be updated corresponds to the metadata corresponding to the multimedia resources of the first electronic device; when there is no metadata to be updated in the second target data table, the metadata corresponding to the multimedia resources of the first electronic device is inserted into the second target data table. In this way, when synchronizing the metadata corresponding to the multimedia resources of the first electronic device to the second target data table, data duplication can be avoided.
[0418] Specifically, when the target database is the first database (i.e., the gallery database), in an embodiment of the present application, when there is metadata to be updated in the second target data table, the metadata to be updated is updated according to the metadata corresponding to the multimedia resources of the first electronic device, and the metadata to be updated corresponds to the metadata corresponding to the multimedia resources of the first electronic device; when there is no metadata to be updated in the second target data table, the specific implementation method of inserting the metadata corresponding to the multimedia resources of the first electronic device into the second target data table can refer to the specific implementation method in S1212 above, and will not be repeated in the embodiment of the present application.
[0419] When the target database is the second database (i.e., the media database), in an embodiment of the present application, when there is metadata to be updated in the second target data table, the metadata to be updated is updated according to the metadata corresponding to the multimedia resources of the first electronic device, and the metadata to be updated corresponds to the metadata corresponding to the multimedia resources of the first electronic device; when there is no metadata to be updated in the second target data table, the specific implementation method of inserting the metadata corresponding to the multimedia resources of the first electronic device into the second target data table can refer to the specific implementation method in S1612 above, and will not be repeated in the embodiment of the present application.
[0420] In some examples, in order to make the metadata corresponding to the multimedia resources stored in the first media data station consistent with the metadata corresponding to the multimedia resources stored in the target database, after the first media data station obtains the multimedia resources of the first electronic device from the target database of the first electronic device and stores the multimedia resources of the first electronic device, the method further includes: the first media data station obtains the third multimedia resource from the target database; the first media data station determines and deletes the fourth multimedia resource based on the third multimedia resource. This ensures that the metadata corresponding to the multimedia resources stored in the first media data station is consistent with the metadata corresponding to the multimedia resources stored in the target database.
[0421] The third multimedia resource may include multimedia resources stored in the target database, and the metadata corresponding to the third multimedia resource may include metadata corresponding to all multimedia resources currently stored in the target database of the first electronic device.
[0422] The fourth multimedia resource is a multimedia resource stored in the first media data platform in addition to the third multimedia resource. The metadata corresponding to the fourth multimedia resource may be metadata corresponding to a multimedia resource that exists in the first media data platform and does not exist in the target database.
[0423] Specifically, when the target database is the first database (i.e., the gallery database), the first media data middle station in the embodiment of the present application obtains the third multimedia resource from the target database; the first media data middle station determines and deletes the fourth multimedia resource based on the third multimedia resource. The specific implementation method can refer to the specific implementation method in S1103 above, which will not be repeated in the embodiment of the present application.
[0424] When the target database is the second database (i.e., the media database), the first media data middle station in the embodiment of the present application obtains the third multimedia resource from the target database; the first media data middle station determines and deletes the fourth multimedia resource based on the third multimedia resource. The specific implementation method can refer to the specific implementation method in S1105 above, which will not be repeated in the embodiment of the present application.
[0425] In some examples, the first media data center station obtains the third multimedia resource from the target database, which may include: the first media data center station obtains second identification information of the first target data table; when the second identification information is different from the first identification information, the first media data center station obtains metadata corresponding to the third multimedia resource from the first target data table according to the second identification information.
[0426] The second identification information may be used to indicate the amount of metadata corresponding to the multimedia resource stored in the first target data table, that is, the second identification information may represent the latest data recorded in the first target data table. Exemplarily, the second identification information may be the maximum field value of the gallery_generation field in the first target data table.
[0427] Specifically, when the target database is the first database (i.e., the gallery database), the second identification information in the embodiment of the present application may be: Fig.12 When the target database is the second database (ie, the media database), the second identification information in the embodiment of the present application may be Fig.16 The fourth field value in the flowchart shown.
[0428] Specifically, when the target database is the first database (i.e., the gallery database), the specific implementation method of the first media data middle station in the embodiment of the present application for obtaining the second identification information of the first target data table can refer to the specific implementation methods in the above S1205-S1208, which will not be repeated in the embodiment of the present application. When the target database is the second database (i.e., the media database), the specific implementation method of the first media data middle station in the embodiment of the present application for obtaining the second identification information of the first target data table can refer to the specific implementation methods in the above S1605-S1608, which will not be repeated in the embodiment of the present application.
[0429] Specifically, when the target database is the first database (i.e., the gallery database), in the embodiment of the present application, when the second identification information is different from the first identification information, the first media data center obtains the metadata corresponding to the third multimedia resource from the first target data table according to the second identification information. For the specific implementation method, please refer to the specific implementation methods in S1213-S1215 above, which will not be repeated in the embodiment of the present application. When the target database is the second database (i.e., the media database), in the embodiment of the present application, when the second identification information is different from the first identification information, the first media data center obtains the metadata corresponding to the third multimedia resource from the first target data table according to the second identification information. For the specific implementation method, please refer to the specific implementation methods in S1613-S1615 above, which will not be repeated in the embodiment of the present application.
[0430] In some examples, the first media data center determines and deletes the fourth multimedia resource based on the third multimedia resource, which may include: the first media data center determines and deletes the metadata corresponding to the fourth multimedia resource from the second target data table based on the third multimedia resource. In this way, the multimedia resources of the first media data center can be synchronously deleted according to the changes of the multimedia resources in the target database, thereby ensuring that the metadata corresponding to the multimedia resources stored in the first media data center is consistent with the metadata corresponding to the multimedia resources stored in the target database.
[0431] The metadata corresponding to the fourth multimedia data is the metadata corresponding to the multimedia resources stored in the middle of the second target data table except for the metadata corresponding to the third multimedia resource.
[0432] Specifically, when the target database is the first database (i.e., the gallery database), the specific implementation method of the first media data middle station in the embodiment of the present application determining and deleting the metadata corresponding to the fourth multimedia resource from the second target data table based on the third multimedia resource can refer to the specific implementation method in the above S1216, which will not be repeated in the embodiment of the present application. When the target database is the second database (i.e., the media database), the specific implementation method of the first media data middle station in the embodiment of the present application determining and deleting the metadata corresponding to the fourth multimedia resource from the second target data table based on the third multimedia resource can refer to the specific implementation method in the above S1616, which will not be repeated in the embodiment of the present application.
[0433] In some examples, after the first media data center determines and deletes metadata corresponding to the fourth multimedia resource from the second target data table based on the third multimedia resource, the method further includes: the first media data center updates the first identification information based on the second identification information. In this way, when the first media data center synchronizes and updates the first target data table next time, the first media data center can query the data to be synchronized based on the second identification information in the second target data table, thereby avoiding repeated synchronization of the same data.
[0434] Exemplarily, the first media data middle station updates the first identification information according to the second identification information, and may use the second identification information to overwrite the first identification information in the second target data table.
[0435] In this embodiment, after the first media data center determines and deletes the metadata corresponding to the fourth multimedia resource from the second target data table based on the third multimedia resource, the first media data center updates the first identification information based on the second identification information, thereby making the maximum field value of the synchronized second target data table consistent with the maximum field value of the first target data table. In this way, when the first media data center synchronizes and updates the first target data table of the target database next time, the first media data center can query the data to be synchronized based on the second identification information in the second data table, thereby avoiding repeated synchronization of the same data, thereby ensuring that the data stored in the first media data center is consistent with the data in the target database.
[0436] Specifically, when the target database is the first database (i.e., the gallery database), the specific implementation method of the first media data middle station in the embodiment of the present application updating the first identification information according to the second identification information can refer to the specific implementation method in the above S1217, which will not be repeated in the embodiment of the present application. When the target database is the second database (i.e., the media database), the specific implementation method of the first media data middle station in the embodiment of the present application updating the first identification information according to the second identification information can refer to the specific implementation method in the above S1617, which will not be repeated in the embodiment of the present application.
[0437] In some examples, after the first media data center obtains the multimedia resources of the first electronic device from the target database of the first electronic device and stores the multimedia resources of the first electronic device, the method may also include: the first electronic device displays a first interface, and displays the multimedia resources of the first electronic device on the first interface. Thus, the user can access and view various types of multimedia resources in the first electronic device through the first application of the first electronic device, and the user experience is better.
[0438] The first interface is an interface corresponding to the first application. Specifically, the first interface can be Figure 8 The interface corresponding to the camera application shown can also be Fig. 9 The interface corresponding to the image editing application shown can also be Fig.10 The corresponding interface of the file management application shown.
[0439] The activation of the first media data center of the first electronic device may be that when the user opens the first application (such as an album application or a third-party application) of the first electronic device, the first media data center of the first electronic device is activated. After the first media data center of the first electronic device is activated, the first media data center of the first electronic device may obtain metadata corresponding to the multimedia resources included in the first electronic device. The first media data center of the first electronic device may send metadata corresponding to the multimedia resources included in the first electronic device to the first application of the first electronic device. After the first application of the first electronic device receives the metadata corresponding to the multimedia resources included in the first electronic device, the first electronic device may display the multimedia resources included in the first electronic device. Among them, the multimedia resources of the first electronic device may include at least one of audio, video, pictures, and documents. In this way, the user can select the corresponding first application according to the usage habits and the type of multimedia resources to be viewed, and can directly view the multimedia resources of the electronic device through the first application, which is simple to operate and can improve the user experience.
[0440] In some examples, since the metadata corresponding to the multimedia resources in the first database (i.e., the gallery database) of the first electronic device is obtained from the second database (media database) of the electronic device, that is, the first database (i.e., the gallery database) of the first electronic device and the second database (media database) of the first electronic device store the same data. Therefore, in order to avoid the conflict between the process of obtaining the same data from the first database (i.e., the gallery database) and the process of obtaining the same data from the first database (i.e., the gallery database) when the first media data mid-station obtains the same data, the first media data mid-station obtains the multimedia resources of the first electronic device from the target database of the first electronic device and stores the multimedia resources of the first electronic device, which may include: the first media data mid-station obtains the multimedia resources of the first electronic device from the first database; when the multimedia resources of the first electronic device meet the first preset condition and the first media data mid-station does not store the multimedia resources of the first electronic device, the first media data mid-station stores the multimedia resources of the first electronic device and sets the identification information of the preset identification of the multimedia resources of the first electronic device to the third identification information; when the first media data mid-station obtains the fifth multimedia resource from the second database, the identification information of the preset identification of the multimedia resources of the first electronic device is updated to the fourth identification information. In this way, it is possible to avoid synchronizing abnormal data in the first database to the first media data center of the first electronic device.
[0441] The first preset condition is that the multimedia resource of the first electronic device is the multimedia resource obtained by the first database from the second database. When the multimedia resource of the first electronic device meets the first preset condition, it means that the multimedia resource of the first electronic device is the metadata corresponding to the multimedia resource obtained by the first database (i.e., gallery database) of the first electronic device from the second database (i.e., media database) of the first electronic device.
[0442] Specifically, the first preset condition in the embodiment of the present application may be the conflict condition in the above S2002.
[0443] The third identification information can be used to indicate that the multimedia resource of the first electronic device does not meet the second preset condition. That is, by setting the third identification information for the multimedia resource of the first electronic device, it can be indicated that the multimedia resource of the first electronic device does not meet the second preset condition. Exemplarily, the third identification information can be a value less than 0. For example, the third identification information is -1.
[0444] Specifically, the third identification information in the embodiment of the present application may be the fifth field value in the above S2002.
[0445] Specifically, the first preset condition in the embodiment of the present application may be the display condition in the above-mentioned S2002.
[0446] Specifically, in an embodiment of the present application, when the multimedia resources of the first electronic device meet the first preset condition and the first media data center does not store the multimedia resources of the first electronic device, the first media data center stores the multimedia resources of the first electronic device and sets the identification information of the preset identification of the multimedia resources of the first electronic device to the third identification information. For the specific implementation method, reference can be made to the specific implementation method in S2002 above, which will not be repeated in the embodiment of the present application.
[0447] The fifth multimedia resource may be the same multimedia resource as the multimedia resource of the first electronic device, that is, the multimedia resource obtained by the first media data center from the second database and the same multimedia resource of the first electronic device obtained from the first database.
[0448] The fourth identification information can be used to indicate that the multimedia resource of the first electronic device meets the second preset condition. That is, by setting the fourth identification information for the multimedia resource of the first electronic device, it can be indicated that the multimedia resource of the first electronic device meets the display condition. Exemplarily, the fourth identification information can be a value less than 0. For example, the fourth identification information is 2.
[0449] Specifically, the fourth identification information in the embodiment of the present application may be the sixth field value in the above-mentioned S2003.
[0450] Specifically, in the embodiment of the present application, when the first media data center obtains the fifth multimedia resource from the second database, the specific implementation method of updating the identification information of the preset identification of the multimedia resource of the first electronic device to the fourth identification information can refer to the specific implementation method in the above S2003, which will not be repeated in the embodiment of the present application.
[0451] In some examples, displaying multimedia resources of the first electronic device on the first interface may include: displaying the multimedia resources of the first electronic device on the first interface if identification information corresponding to a preset identification of the multimedia resources of the first electronic device meets a second preset condition.
[0452] S2203: The first electronic device receives a first request sent by the second electronic device, where the first request is used to request multimedia resources of the first electronic device.
[0453] Specifically, in the embodiment of the present application, the first request may be Figure 7 The specific implementation of the first electronic device receiving the first request sent by the second electronic device in the embodiment of the present application can refer to the above Figure 7The specific implementation method of the data transmission module of the first converged interconnection middle station of the first electronic device receiving the synchronization request sent by the second electronic device in the illustrated embodiment will not be described in detail in the embodiments of the present application.
[0454] S2204: The first electronic device sends the multimedia resource of the first electronic device to the second electronic device according to the first request, so that the second electronic device displays the multimedia resource of the first electronic device.
[0455] Specifically, in the embodiment of the present application, the first electronic device sends the multimedia resource of the first electronic device to the second electronic device according to the first request, so that the second electronic device displays the multimedia resource of the first electronic device. For a specific implementation method, refer to the above Figure 7 In the embodiment shown, the data transmission module of the first fusion interconnected middle station can obtain the metadata corresponding to the multimedia resources of the first electronic device from the local media metadata database of the first media data middle station, and return the specific implementation method of the metadata corresponding to the multimedia resources of the first electronic device to the data transmission module of the second fusion interconnected middle station of the second electronic device. This will not be repeated in the embodiments of the present application.
[0456] In the solution of the present application, a user can obtain multimedia resources of the first electronic device through the first application of the first electronic device, and after the first electronic device receives the first request sent by the second electronic device, the multimedia resources of the first electronic device can be sent to the second electronic device according to the first request, so that the second electronic device displays the multimedia resources of the first electronic device, so that the user can access and view the multimedia resources included in the first electronic device through the second electronic device. In other words, the user can access and view the multimedia resources of other electronic devices through one electronic device, thereby realizing the sharing and synchronization of multimedia resources across devices.
[0457] Furthermore, the first electronic device can send the various types of multimedia resources it includes (such as audio, video, pictures or documents, etc.) to the second electronic device, that is, the solution of the present application can support the sharing and synchronization of different types of multimedia resources, meet the usage needs of different users, and enhance the user experience.
[0458] In addition, according to the solution of the present application, users can not only view the multimedia resources of the electronic device and other electronic devices through the local album application of the electronic device, but also view the multimedia resources of the electronic device and other electronic devices through other applications of the electronic device (such as third-party applications). In this way, users can select corresponding applications according to their usage habits and the types of multimedia resources to be viewed, and can directly view the multimedia resources of the electronic device and other electronic devices through the application, which is simple to operate and can improve the user experience.
[0459] Corresponding to the method in the above-mentioned embodiment, the embodiment of the present application further provides a display device for multimedia resources. The display device for multimedia resources can be applied to a first electronic device to implement the method in the above-mentioned embodiment. The function of the display device for multimedia resources can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-mentioned functions.
[0460] For example, Fig.23 A schematic diagram of the structure of a multimedia resource display device 2300 is shown. Fig.23 As shown, the multimedia resource display device 2300 may include: a receiving module 2301 , an acquiring module 2302 , a storage module 2303 and a sending module 2304 .
[0461] The receiving module 2301 may be used to receive a first operation of a user on a first application.
[0462] The acquisition module 2302 may be configured to acquire multimedia resources of the first electronic device in response to a first operation, wherein the multimedia resources include at least one of audio, video, picture, and document.
[0463] The storage module 2303 may be used to store multimedia resources of the first electronic device.
[0464] The receiving module 2301 may also be configured to receive a first request sent by the second electronic device, where the first request is used to request multimedia resources of the first electronic device.
[0465] The sending module 2304 may be configured to send the multimedia resources of the first electronic device to the second electronic device according to the first request, so that the second electronic device displays the multimedia resources of the first electronic device.
[0466] In another possible implementation, the multimedia resource display device 2300 may further include a starting module 2305 .
[0467] The starting module 2305 may be configured to start a first media data middle station of a first electronic device in response to a first operation.
[0468] The acquisition module 2302 may be specifically configured to acquire multimedia resources of the first electronic device from a target database of the first electronic device.
[0469] The storage module 2303 may be specifically configured to store multimedia resources of the first electronic device.
[0470] In another possible implementation, the multimedia resources of the first electronic device may include a first multimedia resource and a second multimedia resource, and the target database may include a first database and a second database.
[0471] The acquisition module 2302 may be specifically configured to acquire a first multimedia resource from a first database, wherein the first multimedia resource includes a picture or a video;
[0472] The storage module 2303 may be specifically configured to store the first multimedia resource.
[0473] The acquisition module 2302 may be specifically configured to acquire a second multimedia resource from a second database, wherein the second multimedia resource includes at least one of audio, video, picture, and document.
[0474] The storage module 2303 may be specifically configured to store the second multimedia resource.
[0475] In another possible implementation, the first database is a gallery database, and the second database is a media database.
[0476] In another possible implementation, the multimedia resource display device 2300 may further include a monitoring module 2306 .
[0477] The monitoring module 2306 may be used to create a monitoring event when the first media data center is started, and the monitoring event is used to monitor whether the data in the target database changes;
[0478] The acquisition module 2302 can be specifically used to obtain the multimedia resources of the first electronic device from the target database when the first media data center receives a monitoring notification, wherein the monitoring notification is a monitoring notification corresponding to a monitoring event, and the monitoring notification is used to indicate that the data in the target database has changed.
[0479] The storage module 2303 may be specifically configured to store multimedia resources of the first electronic device.
[0480] In another possible implementation, the target database may include a first target data table, and the multimedia resource display device 2300 may further include a determination module 2307 .
[0481] The determination module 2307 can be used to determine the first identification information of the second target data table, where the second target data table is a data table corresponding to the first target data table, and the first identification information is used to indicate the data volume of metadata corresponding to the multimedia resources stored in the second target data table.
[0482] The acquisition module 2302 may be specifically configured to acquire metadata corresponding to the multimedia resource of the first electronic device from the first target data table according to the first identification information.
[0483] The storage module 2303 may be specifically configured to store metadata corresponding to the multimedia resources of the first electronic device into the second target data table.
[0484] In another possible implementation, the storage module 2303 can be specifically used to update the metadata to be updated according to the metadata corresponding to the multimedia resources of the first electronic device when there is metadata to be updated in the second target data table, and the metadata to be updated corresponds to the metadata corresponding to the multimedia resources of the first electronic device; and to insert the metadata corresponding to the multimedia resources of the first electronic device into the second target data table when there is no metadata to be updated in the second target data table.
[0485] In another possible implementation, the multimedia resource display device 2300 may further include a deletion module 2308 .
[0486] The acquisition module 2302 may also be used to acquire a third multimedia resource from the target database, where the third multimedia resource includes multimedia resources stored in the target database.
[0487] The determination module 2307 may also be configured to determine a fourth multimedia resource based on the third multimedia resource, wherein the fourth multimedia resource is a multimedia resource stored in the first media data platform except for the third multimedia resource.
[0488] The deleting module 2308 may be configured to delete the fourth multimedia resource.
[0489] In another possible implementation manner, the target database may include a first target data table.
[0490] The acquisition module 2302 may be specifically used to acquire second identification information of the first target data table, where the second identification information is used to indicate the data volume of the metadata corresponding to the multimedia resource stored in the first target data table.
[0491] The acquisition module 2302 can be specifically used to obtain metadata corresponding to a third multimedia resource from a first target data table according to the second identification information when the second identification information is different from the first identification information, wherein the first identification information is used to indicate the data amount of metadata corresponding to the multimedia resource stored in the second target data table of the first media data center, and the second target data table is a data table corresponding to the first target data table.
[0492] Determination module 2307 can be specifically used to determine metadata corresponding to a fourth multimedia resource from the second target data table based on the third multimedia resource, wherein the metadata corresponding to the fourth multimedia data is metadata corresponding to multimedia resources stored in the middle of the second target data table except for the metadata corresponding to the third multimedia resource.
[0493] The deletion module 2308 may be specifically configured to delete metadata corresponding to the fourth multimedia resource.
[0494] In another possible implementation, the multimedia resource display device 2300 may further include an updating module 2309 .
[0495] The updating module 2309 may be used by the middle station to update the first identification information according to the second identification information.
[0496] In another possible implementation, the multimedia resource display device 2300 may further include a display module 2310 .
[0497] The display module 2310 may be configured to display a first interface and display multimedia resources of the first electronic device on the first interface, wherein the first interface is an interface corresponding to the first application.
[0498] In another possible implementation, the target database includes a first database and a second database. The multimedia resource display device 2300 may further include a setting module 2311 .
[0499] The acquisition module 2302 may be specifically configured to acquire multimedia resources of the first electronic device from the first database.
[0500] The storage module 2303 may be specifically configured to store the multimedia resources of the first electronic device when the multimedia resources of the first electronic device meet the first preset condition and the multimedia resources of the first electronic device are not stored in the first media data center.
[0501] The setting module 2311 may be used to set the identification information of the preset identification of the multimedia resource of the first electronic device to third identification information, wherein the third identification information is used to indicate that the multimedia resource of the first electronic device does not meet the second preset condition.
[0502] The update module 2309 can also be used to update the identification information of the preset identification of the multimedia resource of the first electronic device to the fourth identification information when the first media data center obtains the fifth multimedia resource from the second database, wherein the fifth multimedia resource is the same multimedia resource as the multimedia resource of the first electronic device, and the fourth identification information is used to indicate that the multimedia resource of the first electronic device meets the second preset condition.
[0503] In another possible implementation, the display module 2310 may be specifically configured to display the multimedia resource of the first electronic device on the first interface when the identification information corresponding to the preset identification of the multimedia resource of the first electronic device meets the second preset condition.
[0504] In another possible implementation, the first application is a photo album application, an image editing application, a video application, a music application, a file management application, or a communication application.
[0505] It should be understood that the division of units or modules (hereinafter referred to as units) in the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or physically separated. And the units in the device can all be implemented in the form of software calling through processing elements; or all in the form of hardware; or some units can be implemented in the form of software calling through processing elements, and some units can be implemented in the form of hardware.
[0506] For example, each unit can be a separately established processing element, or it can be integrated in a certain chip of the device. In addition, it can also be stored in a memory in the form of a program, and called and executed by a certain processing element of the device. In addition, all or part of these units can be integrated together, or they can be implemented independently. The processing element described here can also be called a processor, which can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each unit above can be implemented by an integrated logic circuit of hardware in the processor element or in the form of software called by a processing element.
[0507] In one example, the unit in the above apparatus may be one or more integrated circuits configured to implement the above method, such as one or more ASICs, or one or more DSPs, or one or more FPGAs, or a combination of at least two of these integrated circuit forms.
[0508] For another example, when the units in the device can be implemented in the form of a processing element scheduling program, the processing element can be a general-purpose processor, such as a CPU or other processor that can call a program. For another example, these units can be integrated together and implemented in the form of a system on a chip SOC.
[0509] In one implementation, the units of the above apparatus implementing the corresponding steps in the above method can be implemented in the form of a processing element scheduling program. For example, the apparatus may include a processing element and a storage element, and the processing element calls the program stored in the storage element to execute the method described in the above method embodiment. The storage element may be a storage element on the same chip as the processing element, that is, an on-chip storage element.
[0510] In another implementation, the program for executing the above method may be in a storage element on a different chip from the processing element, i.e., an off-chip storage element. In this case, the processing element calls or loads the program from the off-chip storage element to the on-chip storage element to call and execute the method described in the above method embodiment.
[0511] For example, an embodiment of the present application may also provide a device, such as an electronic device, which may include a processor and a memory for storing instructions executable by the processor. When the processor is configured to execute the above instructions, the electronic device implements the shortcut input method described in the above embodiment. The memory may be located inside the electronic device or outside the electronic device. And the processor includes one or more.
[0512] In another implementation, the unit of the device implementing each step in the above method may be configured as one or more processing elements, which may be arranged on the corresponding electronic device, and the processing element here may be an integrated circuit, for example: one or more ASICs, or one or more DSPs, or one or more FPGAs, or a combination of these integrated circuits. These integrated circuits may be integrated together to form a chip.
[0513] For example, the present application also provides a chip, which can be applied to the above electronic device. The chip includes one or more interface circuits and one or more processors; the interface circuit and the processor are interconnected through a line; the processor receives and executes computer instructions from the memory of the electronic device through the interface circuit to implement the method described in the above method embodiment.
[0514] An embodiment of the present application also provides a computer program product, including computer instructions executed by the above-mentioned electronic device.
[0515] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0516] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0517] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0518] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0519] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, such as a program. The software product is stored in a program product, such as a computer-readable storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.
[0520] For example, the present application embodiment may also provide a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by an electronic device, the electronic device implements the shortcut input method described in the above method embodiment.
[0521] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for displaying multimedia resources, characterized in that: Applied to a first electronic device, the first electronic device includes a first application program, and the method includes: The first electronic device receives a first operation of the user on the first application; In response to the first operation, the first electronic device acquires and stores multimedia resources of the first electronic device, wherein the multimedia resources include at least one of audio, video, picture and document; The first electronic device receives a first request sent by a second electronic device, where the first request is used to request a multimedia resource of the first electronic device; The first electronic device sends the multimedia resource of the first electronic device to the second electronic device according to the first request, so that the second electronic device displays the multimedia resource of the first electronic device.
2. The method according to claim 1, characterized in that: In response to the first operation, the first electronic device acquires and stores multimedia resources of the first electronic device, including: In response to the first operation, starting a first media data middle station of the first electronic device; The first media data center obtains multimedia resources of the first electronic device from a target database of the first electronic device, and stores the multimedia resources of the first electronic device.
3. The method according to claim 2, characterized in that The multimedia resources of the first electronic device include a first multimedia resource and a second multimedia resource, the target database includes a first database and a second database, and the first media data center obtains the multimedia resources of the first electronic device from the target database of the first electronic device and stores the multimedia resources of the first electronic device, including: The first media data middle station obtains the first multimedia resource from the first database and stores the first multimedia resource, wherein the first multimedia resource includes a picture or a video; The first media data center obtains the second multimedia resource from the second database and stores the second multimedia resource, wherein the second multimedia resource includes at least one of audio, video, picture and document.
4. The method according to claim 3, characterized in that The first database is a picture library database, and the second database is a media database.
5. The method according to claim 2, characterized in that: The first media data center obtains multimedia resources of the first electronic device from a target database of the first electronic device and stores the multimedia resources of the first electronic device, including: When the first media data middle station is started, the first media data middle station creates a monitoring event, and the monitoring event is used to monitor whether the data in the target database changes; When the first media data center receives a monitoring notification, the first media data center obtains the multimedia resources of the first electronic device from the target database and stores the multimedia resources of the first electronic device, wherein the monitoring notification is a monitoring notification corresponding to the monitoring event, and the monitoring notification is used to indicate that data in the target database has changed.
6. The method according to claim 5, characterized in that The target database includes a first target data table, and the first media data center obtains multimedia resources of the first electronic device from the target database and stores the multimedia resources of the first electronic device, including: The first media data center determines first identification information of a second target data table, where the second target data table is a data table corresponding to the first target data table, and the first identification information is used to indicate the data volume of metadata corresponding to the multimedia resources stored in the second target data table; The first media data middle station acquires metadata corresponding to the multimedia resources of the first electronic device from the first target data table according to the first identification information; The first media data center stores metadata corresponding to the multimedia resources of the first electronic device in the second target data table.
7. The method according to claim 6, characterized in that The first media data middle station stores metadata corresponding to the multimedia resources of the first electronic device in the second target data table, including: In the case where there is metadata to be updated in the second target data table, the first media data center updates the metadata to be updated according to the metadata corresponding to the multimedia resource of the first electronic device, and the metadata to be updated corresponds to the metadata corresponding to the multimedia resource of the first electronic device; When the metadata to be updated does not exist in the second target data table, the first media data center inserts the metadata corresponding to the multimedia resources of the first electronic device into the second target data table.
8. The method according to claim 2, characterized in that: After the first media data center obtains the multimedia resources of the first electronic device from the target database of the first electronic device and stores the multimedia resources of the first electronic device, the method further includes: The first media data middle station acquires a third multimedia resource from the target database, where the third multimedia resource includes multimedia resources stored in the target database; The first media data center determines and deletes a fourth multimedia resource based on the third multimedia resource, wherein the fourth multimedia resource is a multimedia resource stored in the first media data center except the third multimedia resource.
9. The method according to claim 8, characterized in that The target database includes a first target data table, and the first media data center obtains a third multimedia resource from the target database, including: The first media data middle station obtains second identification information of the first target data table, where the second identification information is used to indicate the data volume of metadata corresponding to the multimedia resources stored in the first target data table; In the case where the second identification information is different from the first identification information, the first media data center station obtains metadata corresponding to the third multimedia resource from the first target data table according to the second identification information, wherein the first identification information is used to indicate a data amount of metadata corresponding to the multimedia resource stored in a second target data table of the first media data center station, and the second target data table is a data table corresponding to the first target data table; The first media data middle station determines and deletes a fourth multimedia resource according to the third multimedia resource, including: The first media data center determines and deletes metadata corresponding to the fourth multimedia resource from the second target data table based on the third multimedia resource, wherein the metadata corresponding to the fourth multimedia data is metadata corresponding to multimedia resources stored in the center in the second target data table except for the metadata corresponding to the third multimedia resource.
10. The method according to claim 9, characterized in that After the first media data center determines and deletes metadata corresponding to the fourth multimedia resource from the second target data table according to the third multimedia resource, the method further includes: The first media data center updates the first identification information according to the second identification information.
11. The method according to claim 2, characterized in that After the first media data center obtains the multimedia resources of the first electronic device from the target database of the first electronic device and stores the multimedia resources of the first electronic device, the method further includes: The first electronic device displays a first interface, and displays multimedia resources of the first electronic device on the first interface, wherein the first interface is an interface corresponding to the first application.
12. The method according to claim 11, characterized in that The target database includes a first database and a second database, and the first media data center obtains multimedia resources of the first electronic device from the target database of the first electronic device and stores the multimedia resources of the first electronic device, including: The first media data center obtains multimedia resources of the first electronic device from the first database; In the case where the multimedia resources of the first electronic device meet the first preset condition and the first media data mid-station does not store the multimedia resources of the first electronic device, the first media data mid-station stores the multimedia resources of the first electronic device and sets the identification information of the preset identification of the multimedia resources of the first electronic device to the third identification information, wherein the third identification information is used to indicate that the multimedia resources of the first electronic device do not meet the second preset condition; In the case where the first media data center obtains the fifth multimedia resource from the second database, the first media data center updates the identification information of the preset identification of the multimedia resource of the first electronic device to fourth identification information, wherein the fifth multimedia resource is the same as the multimedia resource of the first electronic device, and the fourth identification information is used to indicate that the multimedia resource of the first electronic device satisfies the second preset condition.
13. The method according to claim 12, characterized in that The displaying the multimedia resources of the first electronic device on the first interface includes: When the identification information corresponding to the preset identification of the multimedia resource of the first electronic device meets the second preset condition, the multimedia resource of the first electronic device is displayed on the first interface.
14. The method according to any one of claims 1 to 13, characterized in that The first application is a photo album application, an image editing application, a video application, a music application, a file management application or a communication application.
15. An electronic device, characterized in that: The electronic device comprises a processor and a memory for storing instructions executable by the processor; when the processor is configured to execute the instructions, the electronic device implements the method according to any one of claims 1 to 14.
16. A computer-readable storage medium having computer program instructions stored thereon; characterized in that: When the computer program instructions are executed by an electronic device, the electronic device implements the method according to any one of claims 1 to 14.
