Method, device and storage medium for managing media files
By processing media library resource files within the iTunes process, the problem of iTunes media management software failing to parse the files was resolved, enabling cross-device management and playback of media files.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN MAIFENG TECH CO LTD
- Filing Date
- 2023-08-22
- Publication Date
- 2026-04-17
AI Technical Summary
Existing iTunes media file management software is prone to failure when parsing data, making it impossible to save and manage users' files to iTunes media.
By creating an iTunes process, media information from media library resource files is obtained, media information is added or deleted, and the original data is deserialized, encrypted, and compressed to generate new media library resource files.
It enables successful parsing of media files in iTunes media management software, allowing media files to be imported into other devices or local storage, and supports playback on offline devices or other terminal devices.
Smart Images

Figure CN117251409B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of media file management, and more particularly to a method, apparatus and storage medium for managing media files. Background Technology
[0002] The managed media files can be audio. For some players, audio downloaded to the local device cannot be played in other players. For example, iTunes is a media player, media library, internet radio, mobile device management, and iTunes Store client application developed by Apple Inc. It is used to play and manage digital music and video files and is one of the most popular tools for managing files on iPod and iOS devices.
[0003] Currently, if there are too many media files in iTunes, parsing the data media files will fail, thus preventing the user's files from being saved and managed in iTunes media. Summary of the Invention
[0004] The main objective of this invention is to solve the technical problem that the parsing of data media files fails, thus preventing the user's files from being saved and managed in iTunes media.
[0005] The first aspect of the present invention provides a method for managing media files, the method comprising:
[0006] Create an iTunes process;
[0007] Obtain media information stored in the media library resource files in the pre-installed iTunes media management software, wherein the media information includes: raw data and version information corresponding to the raw data;
[0008] Adding and / or deleting media information to the original data yields the processed original data;
[0009] The processed original data is deserialized to obtain deserialized data, and the deserialized data is encrypted using a first key to generate encrypted data;
[0010] The encrypted data is compressed to obtain compressed encrypted data, and the compressed encrypted data is concatenated according to the version information corresponding to the original data to generate a new media library resource file.
[0011] Optionally, in a first implementation of the first aspect of the present invention, obtaining the media information stored in the media library resource files in the pre-installed iTunes media management software includes:
[0012] The media library resource files are parsed to obtain the compressed raw data;
[0013] The compressed raw data is decompressed to obtain decompressed data;
[0014] The decompressed data is decrypted using AES based on a preset second key to obtain the original data.
[0015] Optionally, in a second implementation of the first aspect of the present invention, after obtaining the media information stored in the media library resource file in the preset iTunes media management software, and before adding and / or deleting media information to the original data to obtain the processed original data, the method further includes:
[0016] The storage format of the decompressed data is read, wherein the storage format includes: feature fields of media information.
[0017] Optionally, in a third implementation of the first aspect of the present invention, the feature fields include: music name, playlist, video, and home theater.
[0018] Optionally, in a fourth implementation of the first aspect of the present invention, the step of adding and / or deleting media information from the original data to obtain processed original data includes:
[0019] When the feature field is a music name, a music media information block is added to the original data and the statistical value is updated synchronously to obtain the processed original data, wherein the statistical value is the value of adding or subtracting media information.
[0020] Optionally, in a fifth implementation of the first aspect of the present invention, the step of adding and / or deleting media information from the original data to obtain processed original data includes:
[0021] When the feature field is a music name, a music media information block is deleted from the original data and the statistical value is updated synchronously to obtain the processed original data.
[0022] Optionally, in a sixth implementation of the first aspect of the present invention, the step of creating the iTunes process includes:
[0023] Query the pre-installed registry to obtain the installation path of the pre-installed iTunes media management software;
[0024] Create the iTunes process based on the installation path.
[0025] Optionally, in a seventh implementation of the first aspect of the present invention, the media information further includes cover data and comment data corresponding to the original data.
[0026] A second aspect of the present invention provides a media file management device, comprising: a memory and at least one processor, wherein the memory stores instructions, and the memory and the at least one processor are interconnected via a circuit; the at least one processor invokes the instructions in the memory to cause the media file management device to perform the media file management method described above.
[0027] A third aspect of the present invention provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the above-described method for managing media files.
[0028] In this embodiment of the invention, by processing the raw data using this method, users can manage media resources on the iTunes media management software. Even if there are many media files in the iTunes media management software, the media library resource files can be successfully parsed, enabling the addition or deletion of media information. Other media files can be imported to other devices or local storage so that the music can be played offline or on any other terminal device that supports audio playback. Attached Figure Description
[0029] Figure 1 This is a schematic diagram of the first embodiment of the media file management method in this invention;
[0030] Figure 2 This is a schematic diagram of a second embodiment of the media file management method in this invention;
[0031] Figure 3 This is a schematic diagram of one embodiment of managing media file devices according to the present invention. Detailed Implementation
[0032] This invention provides a method, device, and storage medium for managing media files.
[0033] The embodiments of the present invention will now be described in more detail with reference to the accompanying drawings. While some embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the accompanying drawings and embodiments are for illustrative purposes only and are not intended to limit the scope of protection of the present invention.
[0034] In the description of the embodiments disclosed in this invention, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc., may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0035] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 One embodiment of the media file management method in this invention includes:
[0036] First, ensure that iTunes media management software is installed on your computer to generate import media names, which will be used to parse media library resource files later.
[0037] 101. Create the iTunes process;
[0038] iTunes is a free digital media player application for Mac and PC that manages and plays digital music and videos. It was launched by Apple Computer on January 10, 2001, at Macworld Expo in San Francisco. The iTunes program manages the content on Apple's iPod digital media player. In addition, iTunes can connect to the iTunes Store (if an internet connection is available) to download purchased digital music, music videos, TV shows, iPod games, various podcasts, and feature-length movies. Creating an iTunes process launches iTunes.
[0039] Optionally, the step of creating the iTunes process includes: querying the pre-installed registry to obtain the installation path of the pre-installed iTunes media management software; and creating the iTunes process according to the installation path. The media file management method creates the iTunes process in a suspended manner.
[0040] Specifically, the specific work steps for 101 are as follows:
[0041] 1011: Query the registry:
[0042] If the registry path HKEY_LOCAL_MACHINE\SOFTWARE\Classes\iTunes\DefaultIcon does not exist, execute 1012; otherwise, execute 1013.
[0043] 1012: Query the registry:
[0044] SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\AppPaths\\iTunes.exe;
[0045] 1013: Read the value of this registry key to obtain the installation path of iTunes;
[0046] 1014: Using the iTunes installation path obtained in 1011 as input, use WindowsAPICreateProcess to create the iTunes process in a suspended manner.
[0047] In the Windows API CreateProcess, the sixth parameter dwCreationFlags is set to CREATE_SUSPENDED.
[0048] 102. Obtain media information stored in the media library resource files in the pre-installed iTunes media management software, wherein the media information includes: raw data and version information corresponding to the raw data;
[0049] The media library resource file, also known as iTunes Library.itl, is the filename for the iTunes media management software. As the main database file of iTunes, it stores metadata information for various media (such as music, movies, TV shows, podcasts, etc.), and also includes playlists, album art, comments, and other data. Through the iTunes Library.itl file, users can quickly find the music and playlists they want to listen to. Furthermore, iTunes Library.itl supports interaction between iTunes and other applications.
[0050] 103. Add media information and / or delete media information to the original data to obtain the processed original data;
[0051] 104. Deserialize the processed original data to obtain deserialized data, and encrypt the deserialized data using the first key to generate encrypted data;
[0052] Deserialization is the process by which a client obtains a serialized object byte stream from a file or network, and then reconstructs the object based on the object's state and descriptive information stored in the byte stream. When two processes, one with iTunes media management software installed and the other with another device, need to communicate remotely, they can send various types of data, such as text, images, audio, and video. This data is transmitted over the network in binary sequence form, and Java serialization and deserialization are used to achieve the inter-process object transfer.
[0053] The reason for deserializing the processed raw data is that in network communication, data is often transmitted in serialized form for transmission across the network. The receiver needs to convert the serialized data back into objects or data for local use or further processing.
[0054] Serialization saves objects or data to disk, databases, or other persistent storage media. When this data needs to be read and used, the deserialization process restores it to the object or data in memory. In distributed systems, different nodes need to share data. By serializing data and transmitting it over a network, data can be easily transferred between different nodes, and the receiving end can then use deserialization to restore the data to a usable object or data. In short, deserialization is the process of converting serialized data back into the original object or data, facilitating data transfer, persistent storage, and data sharing in distributed systems.
[0055] 105. Compress the encrypted data to obtain compressed encrypted data, and concatenate the compressed encrypted data according to the version information corresponding to the original data to generate a new media library resource file.
[0056] The new media library resource files can be imported to other devices or local storage.
[0057] The compressed encrypted data is concatenated, that is, the header version information is concatenated with the compressed encrypted data. In the above process, the version information is not processed.
[0058] Please see Figure 2 , Figure 2 In a second embodiment of the media file management method of the present invention, the following steps may be performed in step 102:
[0059] 1021. Parse the media library resource files to obtain the compressed raw data;
[0060] 1022. Decompress the compressed raw data to obtain decompressed data;
[0061] 1023. Based on the preset second key, perform AES decryption on the decompressed data to obtain the original data.
[0062] In steps 1021-1023, since the media information consists of version information and compressed information, to obtain and parse the media information content, the compressed raw data must first be decompressed. The decompressed raw data is AES encrypted. The raw data storing the media information needs to be parsed using the second key. After these steps, media information can be flexibly added to and / or deleted from the raw data. AES encryption is a very powerful encryption algorithm that can be used to ensure the security of raw data transmission. Its security can be measured by its key length; a 128-bit key can resist most attacks, while 192-bit and 256-bit keys can resist all attacks. Therefore, the AES encryption algorithm provides very high security. Decompressing the compressed raw data saves storage space. Raw data compression involves compressing the raw data using a compression algorithm, reducing the storage space occupied by the raw data and thus saving storage space. During the transmission and storage of raw data, compressing the raw data can reduce transmission and storage time and costs, and improve transmission and storage efficiency.
[0063] Compressing raw data involves encrypting it with a key to protect its security. During transmission and storage, encrypted compressed raw data prevents unauthorized access and tampering, protecting its integrity and confidentiality. Compressed raw data also facilitates management and backup. In media file management, compressed raw data facilitates backup and recovery. During raw data transmission, compressed raw data reduces the amount of raw data transmitted, simplifying management and transmission.
[0064] In this embodiment, after obtaining the media information stored in the media library resource file in the preset iTunes media management software, and before adding and / or deleting media information to the original data to obtain the processed original data, the method further includes:
[0065] 1024. Read the storage format of the decompressed data, wherein the storage format includes: a feature field of media information, the feature field corresponding to the media name.
[0066] In step 1024, the decompressed data has a certain storage format, and some characteristic fields explicitly indicate that media information is stored. The data needs to be parsed out according to the decompression data storage rules. The storage format has the following uses when decompressing data:
[0067] Data compression: Storage formats can compress raw data, reducing the storage space it occupies. By using compression algorithms, data can be compressed into a smaller size, thus saving disk space or network bandwidth. During decompression, the storage format can restore the compressed data to its original format.
[0068] Data transmission: Compressing data using storage formats reduces its size during network transmission, thereby improving transmission efficiency. Smaller data volumes can be sent and received faster, reducing transmission latency and lowering network bandwidth requirements.
[0069] Speed optimization: Some storage formats can offer faster processing speeds during decompression. By employing efficient algorithms and data structures, storage formats can accelerate data decompression, thereby improving the efficiency of data reading and processing.
[0070] Cross-platform compatibility: The storage format provides cross-platform compatibility, enabling different operating systems, programming languages, or applications to parse and process the same compressed data. This compatibility makes data sharing and transfer in different environments more convenient and reliable.
[0071] Data protection: Certain storage formats can provide protection for data integrity and security. By adding mechanisms such as checksums, digital signatures, or encryption, storage formats can prevent data from being tampered with or accessed during transmission or storage.
[0072] The appropriate storage format needs to be selected based on the specific application scenario and requirements in order to balance the requirements of compression ratio, decompression speed and compatibility.
[0073] In this embodiment, the feature fields include: music name, playlist, video, and home theater; different feature fields can be used to process the raw data in different ways, making media file management more flexible.
[0074] Specifically, the following steps can be performed in step 103:
[0075] 1031. When the feature field is a music name, add a music media information block to the original data and update the statistical value synchronously to obtain the processed original data, wherein the statistical value is the value of adding or reducing media information.
[0076] Specifically, the following steps can also be performed in step 103:
[0077] 1032. When the feature field is a music name, delete a music media information block from the original data and update the statistical value synchronously to obtain the processed original data.
[0078] In this embodiment, the media information also includes cover data and comment data corresponding to the original data.
[0079] In this embodiment of the invention, the method of processing the raw data can help users manage media resources on the iTunes media management software. Even if there are many media files in the iTunes media management software, the data media files can be successfully parsed, and other media files can be imported to other devices or local storage so that the music can be played offline or on any other terminal device that supports audio playback.
[0080] Figure 3 This is a schematic diagram of a media file management device 500 provided in an embodiment of the present invention. The media file management device 500 can vary significantly due to different configurations or performance characteristics. It may include one or more central processing units (CPUs) 510 (e.g., one or more processors) and a memory 520, and one or more storage media 530 (e.g., one or more mass storage devices) for storing application programs 533 or data 532. The memory 520 and storage media 530 can be temporary or persistent storage. The program stored in the storage media 530 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the media file management device 500. Furthermore, the processor 510 may be configured to communicate with the storage media 530 and execute the series of instruction operations on the storage media 530 on the media file management device 500.
[0081] The media file management device 500 may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input / output interfaces 560, and / or one or more operating systems 531, such as Windows Server, Mac OS X, Unix, Linux, Free BSD, etc. Those skilled in the art will understand that... Figure 3 The illustrated structure of the media file management device does not constitute a limitation on the media file management device and may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.
[0082] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the steps of the method for managing media files.
[0083] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or apparatus. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0084] Furthermore, although the operations are described in a specific order, this should be understood as requiring that such operations be performed in the specific order shown or in sequential order, or requiring that all illustrated operations be performed to achieve the desired result. In certain environments, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single implementation. Conversely, various features described in the context of a single implementation may also be implemented individually or in any suitable sub-combination in multiple implementations.
[0085] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A method for managing media files, characterized in that, The method for managing media files includes: Create an iTunes process; The media information stored in the media library resource file in the pre-installed iTunes media management software is obtained. The media library resource file includes the media file iTunes Library.itl. The media information includes: the original data and the version information corresponding to the original data. Adding and / or deleting media information to the original data yields the processed original data; The processed original data is deserialized to obtain deserialized data, and the deserialized data is encrypted using a first key to generate encrypted data; The encrypted data is compressed to obtain compressed encrypted data. Based on the version information corresponding to the original data, the compressed encrypted data is concatenated to generate a new media library resource file.
2. The method for managing media files according to claim 1, characterized in that, The process of obtaining media information stored in the media library resource files of the pre-installed iTunes media management software includes: The media library resource files are parsed to obtain the compressed raw data; The compressed raw data is decompressed to obtain decompressed data; The decompressed data is decrypted using AES based on a preset second key to obtain the original data.
3. The method for managing media files according to claim 2, characterized in that, After obtaining the media information stored in the media library resource files in the pre-installed iTunes media management software, and before adding and / or deleting media information from the original data to obtain the processed original data, the method further includes: The storage format of the decompressed data is read, wherein the storage format includes: feature fields of media information.
4. The method for managing media files according to claim 3, characterized in that, The feature fields include: music name, playlist, video, and home theater.
5. The method for managing media files according to claim 4, characterized in that, The process of adding and / or deleting media information from the original data to obtain processed original data includes: When the feature field is a music name, a music media information block is added to the original data and the statistical value is updated synchronously to obtain the processed original data, wherein the statistical value is the value of adding or subtracting media information.
6. The method for managing media files according to claim 5, characterized in that, The process of adding and / or deleting media information from the original data to obtain processed original data includes: When the feature field is a music name, a music media information block is deleted from the original data and the statistical value is updated synchronously to obtain the processed original data.
7. The method for managing media files according to claim 1, characterized in that, The steps for creating the iTunes process include: Query the pre-installed registry to obtain the installation path of the pre-installed iTunes media management software; Create the iTunes process based on the installation path.
8. The method for managing media files according to claim 1, characterized in that, The media information also includes cover data and comment data corresponding to the original data.
9. A media file management device, characterized in that, The media file management device includes: a memory and at least one processor, wherein the memory stores instructions, and the memory and the at least one processor are interconnected via a line; The at least one processor invokes the instructions in the memory to cause the media file management device to perform the media file management method as described in any one of claims 1-8.
10. A computer-readable storage medium storing a computer program thereon, characterized in that, When the computer program is executed by a processor, it implements the method for managing media files as described in any one of claims 1-8.
Citation Information
Patent Citations
Memo backup method based on iOS system and related equipment
CN113505153A
APP formatted file offline storage method and device, equipment and storage medium
CN116501700A