Multimedia data acquisition method and module and vehicle-mounted mobile multimedia system

By monitoring the mounting events of mobile media devices in the on-board mobile multimedia system, scanning and storing multimedia data in advance, the problem of time-consuming scanning during system startup is solved, and the multimedia data is quickly acquired and the user experience is improved.

CN120086392APending Publication Date: 2025-06-03CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510161282.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-13
Publication Date
2025-06-03

AI Technical Summary

Technical Problem

It takes a long time to scan and obtain multimedia data when the vehicle is started, resulting in poor user experience.

Method used

By scanning the mobile media device mount event when it is heard, multimedia data is obtained and stored in the multimedia database, it is read directly from the database and feedback when responding to the data call request of the multimedia application.

Benefits of technology

It reduces scanning and reading operations of multimedia applications during self-start, improves the acquisition speed of multimedia data, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120086392A_ABST
    Figure CN120086392A_ABST
Patent Text Reader

Abstract

The invention relates to the field of computers, and provides a multimedia data acquisition method and module and a vehicle-mounted mobile multimedia system. The method comprises the following steps: under the condition that a mounting event of the mobile media equipment is monitored, scanning the mobile media equipment to obtain multimedia data in the mobile media equipment, and storing the multimedia data in a multimedia database; and in response to a multimedia data calling request initiated by the multimedia application, if the multimedia database contains target multimedia data corresponding to the multimedia data calling request, reading the target multimedia data from the multimedia database and feeding back the target multimedia data to the multimedia application. According to the application, when the multimedia application needs to call the multimedia data, the multimedia application does not need to scan and read the mounted storage and analyze the multimedia information during self-starting, and the corresponding multimedia data can be quickly acquired and displayed to the user, so that the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computers, and particularly to a method and module for obtaining multimedia data and an in-vehicle mobile multimedia system. Background Art

[0002] An in-vehicle mobile multimedia system refers to a multimedia system embedded and installed for use in a mobile environment of a vehicle (such as a new energy vehicle, etc.), and mainly includes an in-vehicle navigation system, a driving recorder, an in-vehicle infotainment system, etc.

[0003] In related technologies, applications applied to a multimedia system (such as Gallery (picture gallery), Audio (audio), Video (video), etc.) need to spend a long time scanning and obtaining multimedia data when starting up, resulting in a poor user experience. Summary of the Invention

[0004] In view of this, embodiments of this application provide a method and module for obtaining multimedia data and an in-vehicle mobile multimedia system to solve the problem that applications applied to a multimedia system need to spend a long time scanning and obtaining multimedia data when starting up, resulting in a poor user experience in related technologies.

[0005] In the first aspect of the embodiments of this application, a method for obtaining multimedia data is provided, which is applied to an extended multimedia data providing module and includes:

[0006] When a mobile media device mounting event is monitored, scan the mobile media device to obtain multimedia data in the mobile media device, and store the multimedia data in a multimedia database;

[0007] In response to a multimedia data call request initiated by a multimedia application, if the multimedia database contains target multimedia data corresponding to the multimedia data call request, read out the target multimedia data from the multimedia database and feed it back to the multimedia application.

[0008] In the second aspect of the embodiments of this application, an extended multimedia data providing module is provided, including:

[0009] A scanning unit, when a mobile media device mounting event is monitored, scan the mobile media device to obtain multimedia data in the mobile media device, and store the multimedia data in a multimedia database;

[0010] A response unit, in response to a multimedia data call request initiated by a multimedia application, if the multimedia database contains target multimedia data corresponding to the multimedia data call request, read out the target multimedia data from the multimedia database and feed it back to the multimedia application.

[0011] In the third aspect of the embodiments of the present application, a vehicle-mounted mobile multimedia system is provided, including: an application layer, an application framework layer, a native layer, and a kernel layer;

[0012] Multimedia applications are installed in the application layer;

[0013] An extended multimedia data providing module of the second aspect is portably installed in the application framework layer, and the extended multimedia data providing module encapsulates an application function program for implementing scanning to obtain multimedia data in a mobile media device.

[0014] In the fourth aspect of the embodiments of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above method are implemented.

[0015] In the fifth aspect of the embodiments of the present application, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0016] Compared with the prior art, the beneficial effects of the embodiments of the present application at least include: when the extended multimedia data providing module monitors a mobile media device mounting event, it scans the mobile media device to obtain the multimedia data therein, and stores the scanned multimedia data in a multimedia database; when a multimedia application needs to call multimedia data, it can directly read the target multimedia data from the multimedia database and feed it back to the multimedia application. In this way, it is not necessary for the multimedia application to scan and read the mounted storage and parse multimedia information when it starts up automatically, so that the corresponding multimedia data can be quickly obtained and presented to the user, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0018] Figure 1 is a schematic diagram of the basic architecture of a vehicle-mounted mobile multimedia system provided by an embodiment of the present application;

[0019] Figure 2 is a schematic diagram of the extended architecture of a vehicle-mounted mobile multimedia system provided by an embodiment of the present application;

[0020] Figure 3 is a schematic diagram of the flowchart of a multimedia data acquisition method provided by an embodiment of the present application;

[0021] Figure 4 is a timing diagram for scanning and reading multimedia data in a mobile media device provided by an embodiment of the present application;

[0022] Figure 5 is a schematic diagram of the overall process for obtaining multimedia data provided by an embodiment of the present application;

[0023] Figure 6 is a schematic diagram of the overall process for obtaining multimedia data and the configuration file loading process provided by an embodiment of the present application;

[0024] Figure 7 is a schematic diagram of an extended multimedia data providing module provided by an embodiment of the present application;

[0025] Figure 8 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0026] In the following description, specific details such as specific system structures and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present application. However, those skilled in the art should clearly understand that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present application.

[0027] A method, apparatus, and system for obtaining multimedia data according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.

[0028] Figure 1 is a schematic diagram of the basic architecture of a vehicle-mounted mobile multimedia system provided by an embodiment of the present application.

[0029] Please refer to Figure 1 , the basic architecture of the embodiment of the present application includes a multimedia service class (MediaService), a multimedia receiver class (MediaReceiver), a multimedia data providing class (MediaProvider), and a database file (external.ab).

[0030] Among them, the multimedia service class (MediaService) is mainly used to scan media files according to a scan request and insert the scanned data into the database file of the media database.

[0031] The multimedia data providing class (MediaProvider) is mainly used to process database operation requests for media files, for example, operation requests for querying, deleting, inserting, and updating media files.

[0032] The MediaReceiver class is mainly used to receive scan requests sent from the outside world. Exemplarily, when a USB device is started, the USBManager can broadcast to enable the MediaScanner to receive the scan request.

[0033] The files in the database file (external.ab) are stored in storage in the form of files. The database contains many tables, including but not limited to the audio_playlist_map table, etc.

[0034] Figure 2 It is a schematic diagram of the extended architecture of an in-vehicle mobile multimedia system provided by an embodiment of the present application.

[0035] Please refer to Figure 2 , the extended structure of the in-vehicle mobile multimedia system provided by the embodiment of the present application is obtained by expanding on the basis of the Figure 1 basic architecture. Looking down from top to bottom, the extended architecture sequentially includes an application layer 101, an application framework layer 102, a native layer 103, and a kernel layer 104.

[0036] Among them, the application layer 101 can be the Android application layer, and a multimedia application (MediaApp) is installed on the Android application layer. The multimedia application includes but is not limited to Gallery, Audio, Video, etc.

[0037] The Application Framework Layer (Android Framework) 102 can be the Android framework layer, which is used to provide various functional interfaces (application interface APIs) and services (Service) for the upper layer (Application Layer 101). The Application Framework Layer (Android Framework) 102 includes an Extended Multimedia Data Provision Module (ExtMediaProvider), a System Storage Management Class (StorageManger), a Storage Management Service Class (StorageManagerService), a Multimedia Data Retrieval Class (MediaMetadataRetriever), and a Multimedia Playback Processing Service (MediaPlayerService). Among them, the Extended Multimedia Data Provision Module (ExtMediaProvider) includes a Multimedia Data Provision Class (MediaProvider), a Multimedia Service Class (MediaService), a Multimedia Receiver Class (MediaReceiver), and a Multimedia Data Scanning Class (MediaScanner). The System Storage Management Class (StorageManger) can provide a direct interface for the upper layer (Application Layer 101) (specifically, an application interface for directly reading multimedia data). The Storage Management Service Class (StorageManagerService) is used for the functional aggregation and implementation of the storage management service component capability interface.

[0038] In some embodiments, the method interfaces provided by the Multimedia Data Provision Class (MediaProvider) are shown in Table 1:

[0039] Table 1 Method Interfaces Provided by the Multimedia Data Provision Class (MediaProvider)

[0040]

[0041]

[0042] In some embodiments, the broadcast interfaces provided by the Multimedia Data Provision Class (MediaProvider) are shown in Table 2:

[0043] Table 2 Broadcast Interfaces Provided by the Multimedia Data Provision Class (MediaProvider)

[0044]

[0045]

[0046] The native layer (Android Native) 103 can be the Android native Hal layer. The native layer (Android Native) 103 includes the Multimedia Mounting Service (Vold) and the Multimedia Data Extraction Class (MediaExtractorService). Among them, the Multimedia Mounting Service (Vold) is mainly used to handle the mounting of disks and provide underlying capability support for the upper layer (application layer 101) to implement data reading. The Multimedia Data Extraction Class (MediaExtractorService) is mainly used to extract multimedia data from the file system (FileSystem) of the kernel layer 104.

[0047] The kernel layer (Kernal) 104 includes the file system (FileSystem), and multimedia data such as songs, pictures, and videos is stored in the file system.

[0048] Figure 3 It is a schematic flowchart of a method for obtaining multimedia data provided by an embodiment of the present application. Figure 3 The method for obtaining multimedia data can be executed by Figure 2 the extended multimedia data providing module (ExtMediaProvider). As Figure 3 shown, the method for obtaining multimedia data includes:

[0049] Step S301, when a mobile media device mounting event is monitored, scan the mobile media device to obtain multimedia data in the mobile media device, and store the multimedia data in the multimedia database.

[0050] The mobile media device can be a USB device (such as a USB flash drive), or it can be other mobile devices, such as a mobile hard disk, etc.

[0051] As an example, when a mobile media device (such as a USB device) is connected to the in-vehicle mobile multimedia system, the USBManager (USB management class) will broadcast a mobile media device mounting event (such as sending an ACTION_MEDIA_MOUNTED broadcast). When the extended multimedia data providing module (ExtMediaProvider) monitors this mobile media device mounting event, it scans the mobile media device (such as a USB device) to read the multimedia data in the mobile media device (such as a USB device), and stores the multimedia data in the multimedia database.

[0052] As another example, please refer to Figure 2When a mobile media device (such as a USB device) is connected to the in-vehicle mobile multimedia system, the file system of the kernel layer (Kernal) 104 mounts the multimedia data to the multimedia mounting service (Vold) of the native layer (AndroidNative) 103, and then writes the mounted multimedia data into the system storage management class (StorageManger) via the storage management service class (StorageManagerService).

[0053] Step S302, in response to a multimedia data call request initiated by a multimedia application, if the multimedia database contains target multimedia data corresponding to the multimedia data call request, read the target multimedia data from the multimedia database and feedback it to the multimedia application.

[0054] As an example, when a user wants to view or play multimedia data, a multimedia data call request can be initiated to the extended multimedia data providing module (ExtMediaProvider) through the multimedia application (MediaApp). The multimedia data call request includes a data type (indicating which type of multimedia data, such as songs, videos, pictures, etc.). When the extended multimedia data providing module (ExtMediaProvider) receives the multimedia data call request, it can first query whether the multimedia database contains target multimedia data corresponding to the multimedia data call request. For example, if the data type carried in the multimedia data call request is a picture, then the target multimedia data is a picture. If the multimedia database contains target multimedia data corresponding to the multimedia data call request, then the extended multimedia data providing module (ExtMediaProvider) can directly read the target multimedia data from the multimedia database and feedback it to the multimedia application (MediaApp), and then the multimedia application (MediaApp) displays these target multimedia data to the user.

[0055] In the technical solution provided by the embodiment of the present application, when the extended multimedia data providing module monitors a mobile media device mounting event, it scans the mobile media device to obtain the multimedia data therein, and stores the scanned multimedia data in the multimedia database; when the multimedia application needs to call multimedia data, it can directly read the target multimedia data from the multimedia database and feedback it to the multimedia application. In this way, it is not necessary for the multimedia application to scan and read the mounted storage and parse the multimedia information when it starts up automatically, so that the corresponding multimedia data can be quickly obtained and displayed to the user, thereby improving the user experience.

[0056] In some embodiments, when a mobile media device mounting event is monitored, the mobile media device is scanned to obtain multimedia data in the mobile media device, and the multimedia data is stored in a multimedia database, including:

[0057] The multimedia receiver class calls the multimedia data scanning class when a mobile media device mounting event is monitored;

[0058] The multimedia data scanning class scans the mobile media device to obtain multimedia data in the mobile media device, and passes the multimedia data to the multimedia service class;

[0059] The multimedia service class passes the multimedia data to the multimedia data providing class;

[0060] The multimedia data providing class stores the multimedia data in the multimedia database.

[0061] As an example, please refer to Figure 2 , when a mobile media device (such as a USB device) is connected to the in-vehicle mobile multimedia system, the USBManager (USB management class) will send an ACTION_MEDIA_MOUNTED broadcast to inform the multimedia receiver class (MediaReceiver) that there is a mobile media device (such as a USB device) connected to the in-vehicle mobile multimedia system. When the multimedia receiver class (MediaReceiver) monitors the ACTION_MEDIA_MOUNTED broadcast, it calls the multimedia service class (MediaService), calls the multimedia data scanning class (MediaScanner) to scan the mobile media device (such as a USB device) connected to the in-vehicle mobile multimedia system to read the multimedia data in the mobile media device (such as a USB device), and passes the read multimedia data to the multimedia service class (MediaService), and then the multimedia service class (MediaService) passes the multimedia data to the multimedia data providing class (MediaProvider), and the multimedia data providing class (MediaProvider) then stores these multimedia data in the multimedia database. Among them, the multimedia database can be set in the application framework layer (Android Framework) 102.

[0062] Through the mutual cooperation of the above-mentioned MediaReceiver, MediaScanner, MediaService, and MediaProvider classes, it is possible to quickly scan and read multimedia data in a mobile media device and store it in a multimedia database. When subsequent multimedia applications (MediaApp) need to call multimedia data, they can directly retrieve the relevant multimedia data from the multimedia database, without the multimedia application having to scan and read the mounted storage and parse multimedia information during self-startup, improving the efficiency of multimedia applications (MediaApp) in retrieving multimedia data and enhancing the user experience.

[0063] In some embodiments, the MediaScanner class scans the mobile media device to obtain multimedia data in the mobile media device, including:

[0064] The MediaScanner class determines the current remaining storage space of the multimedia database;

[0065] If the current remaining storage space of the multimedia database meets the preset scanning conditions, the mobile media device is scanned to obtain multimedia data in the mobile media device.

[0066] The current remaining storage space indicates how much data volume the multimedia database can currently store.

[0067] The preset scanning conditions may simultaneously meet the following conditions ① and ②: ① The remaining disk space > the current remaining storage space of the multimedia database; ② The data volume of the multimedia data in the mobile media device < the current remaining storage space of the multimedia database.

[0068] The file (external.db) in the multimedia database is stored in storage in the form of files, and there are many tables in the multimedia database.

[0069] As an example, before scanning the mobile media device, the MediaScanner class will first check whether the current remaining storage space of the multimedia database meets the preset scanning conditions, that is, whether it meets the following conditions ① and ②: ① Whether the remaining disk space is greater than the current remaining storage space of the multimedia database; ② The data volume of the multimedia data in the mobile media device < the current remaining storage space of the multimedia database. If both of the above conditions ① and ② are met, it can be confirmed that the current remaining storage space of the multimedia database meets the preset scanning conditions, and the mobile media device is scanned to obtain multimedia data in the mobile media device.

[0070] In some embodiments, after determining the current remaining storage space of the multimedia database, the multimedia data scanning class further includes:

[0071] If the current remaining storage space of the multimedia database does not meet the preset scanning condition, clean the data to be cleaned in the multimedia database that meets the preset cleaning condition, and update the multimedia database;

[0072] If the updated remaining storage space of the updated multimedia database meets the preset scanning condition, scan the mobile media device to obtain the multimedia data in the mobile media device.

[0073] The preset cleaning condition may be multimedia data that has been stored in the multimedia database for a preset time threshold and has not been called (used) currently. The preset time threshold can be flexibly set according to the actual situation. For example, it can be set to 1 hour, 1 day, etc. The embodiments of the present application do not limit this.

[0074] As an example, if one of the above conditions ① or ② is not met, it can be confirmed that the current remaining storage space of the multimedia database does not meet the preset scanning condition. Then, mark the data to be cleaned in the multimedia database that meets the preset cleaning condition. For example, the data to be cleaned may be multimedia data that has been stored in the multimedia database for a preset time threshold and has not been called (used) currently. Then, clean these data to be cleaned and update the storage space of the multimedia database at the same time. Next, determine whether the updated remaining storage space of the updated multimedia database meets the preset scanning condition; if it meets the preset scanning condition, scan the mobile media device to obtain the multimedia data in the mobile media device; if it does not meet the preset scanning condition, exit the scanning.

[0075] Figure 4 It is a timing diagram for scanning and reading multimedia data in a mobile media device provided by an embodiment of the present application.

[0076] As an example, please refer to Figure 4When the extended multimedia data providing module (ExtMediaProvider) receives the ACTION_MEDIA_MOUNTED broadcast, it triggers the processing of scanning the removable media device. Specifically, the system storage management class (StorageManger) listens for the callback of the change in the status of the storage volume (usually the volume is mounted successfully), and in the callback, it calls the query method of the multimedia receiver class (MediaReceiver) to query the multimedia data providing class (MediaProvider). The data of the multimedia data providing class (MediaProvider) comes from the multimedia service class (MediaService) which starts automatically when the system boots up, and it calls the scan method to browse the core method in the service handler class (ServiceHandler) to read the multimedia data of the removable media device (such as a USB device).

[0077] Before scanning the removable media device (such as a USB device), the multimedia receiver class (MediaReceiver) will first check whether the removable media device (such as a USB device) has been used, and update the storage table (storage table) in the multimedia database. Then, it starts the multimedia service class (MediaService) for scanning.

[0078] Before scanning the removable media device (such as a USB device), the multimedia receiver class (MediaReceiver) will first check whether the current remaining storage space in the multimedia database meets the preset scanning conditions. If the current remaining storage space in the multimedia database meets the preset scanning conditions, it scans and reads the multimedia data in the removable media device (such as a USB device). If the current remaining storage space in the multimedia database does not meet the preset scanning conditions, it clears the data to be cleaned that meets the preset cleaning conditions in the multimedia database, and updates the storage space of the multimedia database until it meets the preset scanning conditions. If it still does not meet the preset scanning conditions after clearing all the data to be cleaned that meets the preset cleaning conditions in the multimedia database, it exits the scanning.

[0079] In some embodiments, scanning the removable media device to obtain the multimedia data in the removable media device includes:

[0080] Loading the customized configuration file and extracting the scanning configuration parameters in the customized configuration file;

[0081] Based on the scanning configuration parameters, scanning the removable media device to obtain the multimedia data in the removable media device.

[0082] The customized configuration file includes scanning configuration parameters, and the scanning configuration parameters can be parameters customized by the user according to actual needs.

[0083] The scanning configuration parameters include, but are not limited to: 1) Configuration parameters related to whether to support scanning of built-in extended storage; 2) Configuration parameters related to the backup method of used multimedia data; 3) Configuration parameters related to the scanning depth; 4) Configuration parameters related to filtering media file formats.

[0084] As an example, scanning of mobile media devices (such as USB drives) is supported by default. Whether to support scanning of built-in extended storage can be configured through the runtime resource overlay method according to actual needs. A configuration file scan_config.xml can be added under the res directory, and the configuration file contains some customizable parameters, such as the formats supported by the files. Customization can be achieved by modifying scan_config.xml under the overlay repository.

[0085] Exemplarily, the configuration parameters related to whether to support scanning of built-in extended storage are as follows:

[0086] overlay apk: ext-mediaprovider-overlay.apk

[0087] Configuration file: res / values / scan_config.xml

[0088] Configuration value: <bool name="support_emulated_storage">false

[0089] When support_emulated_storage is true, it means that scanning of built-in extended storage is supported;

[0090] When support_emulated_storage is false, it means that scanning of built-in extended storage is not supported. The default value is false.

[0091] As an example, the configuration parameters related to the backup method of used multimedia data include, but are not limited to: the number of multimedia data (USB drive data) supported for backup; the maximum storage period of multimedia data (USB drive data); the maximum storage space of the multimedia database. The scanning optimization function of used mobile media devices (such as USB drives) can retain the multimedia data in the used mobile media devices (such as USB drives). The configuration parameters related to the backup method of used multimedia data can be configured through the runtime resource overlay method according to needs.

[0092] Exemplarily, the relevant configuration parameters for the backup method of used multimedia data are as follows:

[0093] overlay apk: ext-mediaprovider-overlay.apk

[0094] Configuration file: res / values / scan_config.xml

[0095] Configuration value: <integer name="storage_max_count">3

[0096] The maximum number of multimedia data (USB drive data) supported for backup, with a default value of 3.

[0097] Configuration value: <integer name="storage_max_no_used_time">180

[0098] The maximum storage period of multimedia data (USB drive data), in days, with a default value of 180 days.

[0099] Configuration value: <integer name="default_storage_space">104857600

[0100] The maximum storage space of the multimedia database, in bytes, with a default value of 100M.

[0101] As an example, the configuration parameters related to the scan depth include but are not limited to: supporting customization of the maximum number of scanned directory levels, etc. The configuration parameters related to the scan depth can be configured through the runtime resource overlay method as needed.

[0102] Exemplarily, the configuration parameters related to the scan depth are as follows:

[0103] overlay apk: ext-mediaprovider-overlay.apk

[0104] Configuration file: res / values / scan_config.xml

[0105] Configuration value: <integer name="scan_max_depth">6

[0106] The maximum number of directory levels supported by scanning is 6 levels by default; the range of levels that can be set is (0, 12]. scan_max_depth <= 0 means there is no limit to the number of scanning levels; scan_max_depth > 12 is processed as 12 levels. (Customized, there is no limit in AOSP natively).

[0107] As an example, the relevant configuration parameters for filtering media file formats include but are not limited to: the scanning range of media file formats, etc. The scanning range of media file formats can be specified by adding the support_media_extension.conf file, and the default is true. When set to false, it will be filtered out and no longer scanned.

[0108] Exemplarily, the scanning range of media file formats is as follows:

[0109] .mp3 = true |.mp4 = true |.m4a = true |.3gp = true |.3gpp = true |.3g2 = true |.3gpp2 = true |.mpeg = true |.ogg = true |.mid = true

[0110] .smf = true |.imy = true |.wma = true |.aac = true |.wav = true |.amr = true |.midi = true |.xmf = true |.rtttl = true |.rtx = true

[0111] .ota = true |.mkv = true |.mka = true |.webm = true |.ts = true |.fl = true |.flac = true |.mxmf = true |.avi = true |.mpeg = true

[0112] .mpg = true |.awb = true |.mpga = true |.mov = true |.asf = true |.m4v = true |.oga = true |.wmv = true |.aiff = true |.divx = true |.xvid = true |.flv = true |.ape = true |.jpg = true |.png = true, etc.

[0113] In the above embodiments, the user can customize the scanning configuration parameters according to actual needs. When the extended multimedia data providing module is triggered to scan the mobile media device, it can load the customized configuration file and extract the scanning configuration parameters therein, and scan the mobile media device based on the scanning configuration parameters. This can not only obtain multimedia data that meets the personalized needs of the user and improve the user experience, but also improve the scanning efficiency of the mobile media device.

[0114] In some embodiments, the extended multimedia data providing module can be portably installed in an in-vehicle mobile multimedia system, and the extended multimedia data providing module encapsulates an application function program for implementing the scanning and obtaining of multimedia data in the mobile media device.

[0115] The extended multimedia data providing module of the embodiment of the present application can be portably installed in an in-vehicle mobile multimedia system, has good versatility, good encapsulation, less external dependence, and a high degree of configuration. The user can completely ignore the code implementation and only need to configure the desired function set according to the easy-to-understand configuration file.

[0116] In some embodiments, the above method further includes:

[0117] If the target multimedia data corresponding to the multimedia data call request is not included in the multimedia database, then call the multimedia data extraction class to extract the target multimedia data corresponding to the multimedia data call request from the file system of the in-vehicle mobile multimedia system;

[0118] Return the target multimedia data to the multimedia application.

[0119] As an example, please refer to Figure 2, if the target multimedia data corresponding to the multimedia data call request is not included in the multimedia database, the extended multimedia data providing module (ExtMediaProvider) sends a retrieval request to the multimedia data retrieval class (MediaMetadataRetriever). After receiving the retrieval request, the multimedia data retrieval class (MediaMetadataRetriever) calls the multimedia playback processing service (MediaPlayerService), and the multimedia playback processing service (MediaPlayerService) calls the multimedia data extraction class (MediaExtractorService); the multimedia data extraction class (MediaExtractorService) extracts the target multimedia data corresponding to the multimedia data call request from the file system (FileSystem) of the kernel layer 104 and returns it to the multimedia playback processing service (MediaPlayerService), and then returns it to the extended multimedia data providing module (ExtMediaProvider) via the multimedia playback processing service (MediaPlayerService) and the multimedia data retrieval class (MediaMetadataRetriever). Finally, the extended multimedia data providing module (ExtMediaProvider) returns the target multimedia data to the multimedia application.

[0120] In some embodiments, before the multimedia data extraction class (MediaExtractorService) extracts the target multimedia data corresponding to the multimedia data call request from the file system (FileSystem) of the kernel layer 104, it may load and obtain the above-mentioned customized configuration file and extract the scanning configuration parameters therein, and then based on the scanning configuration parameters, extract the target multimedia data corresponding to the multimedia data call request from the file system (FileSystem) of the kernel layer 104. In this way, not only can multimedia data that meets the user's personalized needs be obtained, enhancing the user experience, but also the scanning efficiency of the mobile media device can be improved.

[0121] In some embodiments, the android.intent.action.MEDIA_SCANNER_CHANGED broadcast can be added, and this broadcast is sent once every 10 * 2 n multimedia data scanned. For example, this broadcast can be sent once every 500 multimedia data scanned, and the scanned multimedia data is stored in the multimedia database.

[0122] In some embodiments, before the MediaScannerService scans the multimedia data in a mobile media device (such as a USB flash drive) and stores it in the multimedia database, it can load a customized configuration file, read the scanning configuration parameters in the customized configuration file, and then, based on the scanning configuration parameters, scan the multimedia data in the mobile media device (such as a USB flash drive) and store it in the multimedia database.

[0123] In other embodiments, before the MediaScannerService reads the target multimedia data from the multimedia database, it can load a customized configuration file, read the scanning configuration parameters in the customized configuration file, and then, based on the scanning configuration parameters, read the target multimedia data from the multimedia database.

[0124] Figure 5 It is a schematic diagram of the overall process of obtaining multimedia data provided by an embodiment of the present application.

[0125] As an example, please refer to Figure 5 , the overall process of obtaining multimedia data in the embodiment of the present application mainly includes the following steps:

[0126] Step S501, the MediaScannerService prepares for scanning.

[0127] Step S502, the MediaScannerService determines whether there is target multimedia data corresponding to the multimedia data call request stored in the multimedia database. If there is target multimedia data corresponding to the multimedia data call request, it jumps to step S503. If there is no target multimedia data corresponding to the multimedia data call request, it jumps to step S505.

[0128] Step S503, the MediaScannerService reads the customized configuration file, the MediaPlayerService initializes the Retriever method, the MediaExtractorService initializes the Extractor method, and the MediaExtractorService loads the customized configuration file and reads the scanning configuration parameters in the customized configuration file. Specifically, the MediaExtractorService can obtain the scanning configuration parameters by reading and parsing the Metadata field in the customized configuration file.

[0129] Step S504: The Media Scanner Service reads target multimedia data from the file system based on the scan configuration parameters obtained in the above step S503.

[0130] Step S505: End the scan.

[0131] Figure 6 It is a schematic diagram of the overall process of obtaining multimedia data and the configuration file loading process provided by an embodiment of the present application.

[0132] Please refer to Figure 6 , first, the Media Scanner Service prepares for scanning; the Media Scanner Service determines whether there is target multimedia data corresponding to the multimedia data call request stored in the multimedia database. If there is target multimedia data corresponding to the multimedia data call request stored in the multimedia database, the customized configuration file is read. If there is no target multimedia data corresponding to the multimedia data call request stored in the multimedia database, the scan is ended. The Media Player Service initializes the Retriever method, and the Media Extractor Service initializes the Extractor method. The Media Extractor Service parses the Metadata field in the customized configuration file to obtain the scan configuration parameters. The Media Scanner Service determines whether there is a Metadata field. If there is a Metadata field, the Metadata field is obtained. If there is no Metadata field, the Metadata field parsed by the Media Extractor Service from the customized configuration file is cached. Then, the Media Scanner Service determines whether the number of multimedia files exceeds a preset number of files (which can be flexibly set according to the actual situation, for example, it can be set to 500 files, etc.). If the number of multimedia files exceeds the preset number of files, the multimedia data obtained by the scan is stored in the multimedia database. If the number of media files does not exceed the preset number of files, the step of determining whether there is target multimedia data corresponding to the multimedia data call request in the multimedia database is returned.

[0133] All of the above optional technical solutions can be combined arbitrarily to form optional embodiments of the present application, which will not be elaborated one by one here.

[0134] The following is an embodiment of the device of the present application, which can be used to execute the method embodiment of the present application. For details not disclosed in the device embodiment of the present application, please refer to the method embodiment of the present application.

[0135] Figure 7 It is a schematic diagram of an extended multimedia data providing module provided by an embodiment of the present application. As Figure 7 shown, the extended multimedia data providing module includes:

[0136] A scanning unit 701, which scans the mobile media device to obtain the multimedia data in the mobile media device and stores the multimedia data in the multimedia database when a mobile media device mounting event is monitored;

[0137] A response unit 702, which, in response to a multimedia data call request initiated by a multimedia application, reads the target multimedia data from the multimedia database and feeds it back to the multimedia application if the target multimedia data corresponding to the multimedia data call request is included in the multimedia database.

[0138] According to the technical solution provided by the embodiment of the present application, the scanning unit scans the mobile media device to obtain the multimedia data therein and stores the scanned multimedia data in the multimedia database when a mobile media device mounting event is monitored; when the multimedia application needs to call multimedia data, the response unit can directly read the target multimedia data from the multimedia database and feed it back to the multimedia application, so that the multimedia application does not need to scan and read the mounted storage and parse the multimedia information when it starts up, so that the corresponding multimedia data can be quickly obtained and displayed to the user, thereby improving the user experience.

[0139] In some embodiments, the extended multimedia data providing module includes a multimedia data providing class, a multimedia service class, a multimedia receiver class, and a multimedia data scanning class.

[0140] The multimedia receiver class calls the multimedia data scanning class when a mobile media device mounting event is monitored;

[0141] The multimedia data scanning class scans the mobile media device to obtain the multimedia data in the mobile media device and passes the multimedia data to the multimedia service class;

[0142] The multimedia service class passes the multimedia data to the multimedia data providing class;

[0143] The multimedia data providing class stores the multimedia data in the multimedia database.

[0144] In some embodiments, the multimedia data scanning class scans a mobile media device to obtain multimedia data in the mobile media device, including:

[0145] The multimedia data scanning class determines the current remaining storage space of the multimedia database;

[0146] If the current remaining storage space of the multimedia database meets the preset scanning condition, the mobile media device is scanned to obtain the multimedia data in the mobile media device.

[0147] In some embodiments, after the multimedia data scanning class determines the current remaining storage space of the multimedia database, it further includes:

[0148] If the current remaining storage space of the multimedia database does not meet the preset scanning condition, the data to be cleared that meets the preset clearing condition in the multimedia database is cleared, and the multimedia database is updated;

[0149] If the updated remaining storage space of the updated multimedia database meets the preset scanning condition, the mobile media device is scanned to obtain the multimedia data in the mobile media device.

[0150] In some embodiments, the above scanning unit 701 includes:

[0151] A loading component that loads a custom configuration file and extracts scanning configuration parameters from the custom configuration file;

[0152] A scanning component that scans the mobile media device based on the scanning configuration parameters to obtain the multimedia data in the mobile media device.

[0153] In some embodiments, the extended multimedia data providing module can be portably installed in an in-vehicle mobile multimedia system, and the extended multimedia data providing module encapsulates an application function program for implementing scanning to obtain multimedia data in a mobile media device.

[0154] In some embodiments, the above extended multimedia data providing module further includes:

[0155] An extraction unit that, if the target multimedia data corresponding to the multimedia data call request is not included in the multimedia database, calls the multimedia data extraction class to extract the target multimedia data corresponding to the multimedia data call request from the file system of the in-vehicle mobile multimedia system;

[0156] A feedback unit that returns the target multimedia data to the multimedia application.

[0157] It should be understood that the sequence numbers of the steps in the above embodiments do not mean the order of execution. The execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

[0158] Figure 8 is a schematic diagram of the electronic device 800 provided by the embodiment of the present application. As Figure 8 shown, the electronic device 800 of this embodiment includes: a processor 801, a memory 802, and a computer program 803 stored in the memory 802 and executable on the processor 801. When the processor 801 executes the computer program 803, it implements the steps in each of the above method embodiments. Alternatively, when the processor 801 executes the computer program 803, it implements the functions of each module / unit in each of the above device embodiments.

[0159] The electronic device 800 may be a desktop computer, a notebook, a palm computer, a cloud server, or other electronic devices. The electronic device 800 may include, but is not limited to, the processor 801 and the memory 802. Those skilled in the art can understand that Figure 8 merely examples of the electronic device 800, and do not constitute a limitation to the electronic device 800. It may include more or fewer components than shown in the figure, or different components.

[0160] The processor 801 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0161] The memory 802 may be an internal storage unit of the electronic device 800. For example, the hard disk or memory of the electronic device 800. The memory 802 may also be an external storage device of the electronic device 800. For example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 800. The memory 802 may also include both the internal storage unit and the external storage device of the electronic device 800. The memory 802 is used to store computer programs and other programs and data required by the electronic device.

[0162] Those skilled in the art can clearly understand that, for the convenience and conciseness of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0163] If the integrated module / 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, to implement all or part of the processes in the above-mentioned embodiment methods of this application, it can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in the readable storage medium. When the computer program is executed by a processor, the steps of the above-mentioned various method embodiments can be implemented. The computer program can include computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device that can carry the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.

[0164] The above embodiments are only used to illustrate the technical solutions of this application, rather than to limit them; although this application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of this application, and should all be included in the protection scope of this application.

Claims

1. A method for acquiring multimedia data, characterized in that: Used to extend the multimedia data provision module, including: When a mobile media device mounting event is detected, scanning the mobile media device to obtain multimedia data in the mobile media device, and storing the multimedia data in a multimedia database; In response to a multimedia data call request initiated by a multimedia application, if the multimedia database contains target multimedia data corresponding to the multimedia data call request, the target multimedia data is read from the multimedia database and fed back to the multimedia application.

2. The method according to claim 1, characterized in that The extended multimedia data providing module includes a multimedia data providing class, a multimedia service class, a multimedia receiver class and a multimedia data scanning class; In the case of monitoring a mobile media device mounting event, scanning the mobile media device to obtain multimedia data in the mobile media device, and storing the multimedia data in a multimedia database, including: The multimedia receiver class calls the multimedia data scanning class when monitoring the mobile media device mounting event; The multimedia data scanning class scans the mobile media device to obtain multimedia data in the mobile media device, and transmits the multimedia data to the multimedia service class; The multimedia service class transmits the multimedia data to the multimedia data providing class; The multimedia data providing class stores the multimedia data in a multimedia database.

3. The method according to claim 2, characterized in that The multimedia data scanning class scans the mobile media device to obtain multimedia data in the mobile media device, including: The multimedia data scanning class determines the current remaining storage space of the multimedia database; If the current remaining storage space of the multimedia database meets the preset scanning condition, the mobile media device is scanned to obtain the multimedia data in the mobile media device.

4. The method according to claim 3, characterized in that After the multimedia data scanning class determines the current remaining storage space of the multimedia database, the method further includes: If the current remaining storage space of the multimedia database does not meet the preset scanning condition, clearing the to-be-cleared data in the multimedia database that meets the preset clearing condition, and updating the multimedia database; If the updated remaining storage space of the updated multimedia database meets the preset scanning condition, the mobile media device is scanned to obtain the multimedia data in the mobile media device.

5. The method according to any one of claims 2 to 4, characterized in that: Scanning a mobile media device to obtain multimedia data in the mobile media device includes: Loading a customized configuration file and extracting scanning configuration parameters in the customized configuration file; Based on the scanning configuration parameters, the mobile media device is scanned to obtain multimedia data in the mobile media device.

6. The method according to claim 1, characterized in that The extended multimedia data providing module can be transplanted and installed in a vehicle-mounted mobile multimedia system. The extended multimedia data providing module encapsulates an application function program for scanning and acquiring multimedia data in a mobile media device.

7. The method according to claim 2, characterized in that The method further comprises: If the multimedia database does not contain the target multimedia data corresponding to the multimedia data call request, calling the multimedia data extraction class to extract the target multimedia data corresponding to the multimedia data call request from the file system of the vehicle-mounted mobile multimedia system; The target multimedia data is returned to the multimedia application.

8. An extended multimedia data providing module, characterized in that: include: a scanning unit, which scans the mobile media device to obtain multimedia data in the mobile media device and stores the multimedia data in a multimedia database when a mobile media device mounting event is detected; The response unit responds to the multimedia data call request initiated by the multimedia application, and if the multimedia database contains target multimedia data corresponding to the multimedia data call request, reads the target multimedia data from the multimedia database and feeds it back to the multimedia application.

9. A vehicle-mounted mobile multimedia system, characterized in that: include: Application layer, application framework layer, native layer and kernel layer; The application layer is installed with multimedia applications; The application framework layer is portable and installed with the extended multimedia data providing module as claimed in claim 8, and the extended multimedia data providing module encapsulates an application function program for realizing scanning and acquiring multimedia data in a mobile media device.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.