Method, device and equipment for updating a table, and storage medium

By detecting the music library on the hard drive and performing a full scan to obtain the target song path, and synchronizing the SD card music library to update the hard drive music library, the problem of missing song paths on the hard drive causing the song selection function to fail is solved, ensuring the normal user experience of the device.

CN116955375BActive Publication Date: 2026-01-16SKYROCKER CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310666525.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-06
Publication Date
2026-01-16
Estimated Expiration
2043-06-06

AI Technical Summary

Technical Problem

In existing technologies, if the file storing the song path on the hard drive is missing, the song path stored on the SD card will become invalid, which will prevent the device from performing the song selection function and affect the user experience.

Method used

The system checks if a music library exists on the hard drive. If not, it performs a full scan to obtain the target song paths that conform to the preset naming rules, synchronizes the song paths in the SD card music library with the target song paths, and finally copies the synchronized SD card music library to the hard drive music library to ensure the consistency of song paths.

Benefits of technology

This effectively avoids the problem of devices being unable to play songs due to missing song path files on the hard drive, ensuring the implementation of the song selection function and improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116955375B_ABST
    Figure CN116955375B_ABST
Patent Text Reader

Abstract

The application relates to the field of audio and video technologies and discloses a music library updating method, device and equipment and a storage medium. The method comprises the following steps: detecting whether a hard disk music library exists in a hard disk; if the hard disk music library does not exist, performing full-disk scanning on the hard disk to obtain all target song paths in the hard disk which meet preset naming rules; synchronizing SD card song paths in an SD card music library to the target song paths; copying the SD card music library after path synchronization to obtain a hard disk music library; and updating the hard disk music library to the hard disk. When the hard disk music library does not exist, the SD card song paths in the SD card music library are synchronized to the target song paths in the hard disk which meet the preset naming rules, the problem that a file storing the song paths in the hard disk is missing, the song paths stored in the SD card are invalid, and the device cannot realize a song ordering function is avoided, the realization of the song ordering function is effectively ensured, and the use experience of a user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of audio and video technology, and in particular to a song library updating method and device, equipment and a storage medium. BACKGROUND

[0002] With the increasing popularity of KTV, the demand for stand-alone KTV devices (referred to as stand-alone devices) has surged. In order to save traffic, a large number of song files are retained in the hard disk of the stand-alone device, and the stand-alone device also contains an SD card, which stores the path of the song in the hard disk. When the song ordering application in the stand-alone device starts, the application only needs to read the song path in the SD card to realize related operations such as singing, deleting, downloading, etc.

[0003] However, since the song ordering application only reads the song path in the SD card, if the file storing the song path in the hard disk is missing, the song path stored in the SD card will be invalid, which will cause the device to be unable to realize the song ordering function, affecting the user's experience.

[0004] The above content is only used to assist in understanding the technical solutions of the present application and does not represent the acknowledgement of the above content as prior art. SUMMARY

[0005] The main purpose of the present application is to provide a song library updating method, device, equipment and storage medium, which aims to solve the technical problem that if the file storing the song path in the hard disk is missing, the song path stored in the SD card will be invalid, which will cause the device to be unable to realize the song ordering function.

[0006] To achieve the above purpose, the present application provides a song library updating method, which comprises the following steps:

[0007] Detecting whether a hard disk song library exists in the hard disk;

[0008] If the hard disk song library does not exist, performing a full disk scan on the hard disk to obtain all target song paths in the hard disk that meet a preset naming rule;

[0009] Synchronizing the SD card song path in the SD card song library to the target song path;

[0010] Copying the SD card song library after path synchronization to obtain the hard disk song library, and updating the hard disk song library to the hard disk.

[0011] Optionally, the step of performing a full disk scan on the hard disk to obtain all target song paths in the hard disk that meet a preset naming rule comprises:

[0012] performing a full scan on the hard disk to determine whether a target file having a file name containing a preset keyword exists in each file of the hard disk;

[0013] If the target file having the file name containing the preset keyword exists in each file of the hard disk, it is determined that a target song path conforming to a preset naming rule exists in the target file, and the target song path is extracted.

[0014] Optionally, after the step of detecting whether the hard disk music library exists in the hard disk, the method further comprises:

[0015] If the hard disk music library exists, it is detected whether a hard disk song path in the hard disk music library is consistent with an SD card song path in an SD card music library.

[0016] If the hard disk song path is not consistent with the SD card song path, the SD card song path is synchronized to the hard disk song path.

[0017] Optionally, the step of detecting whether the hard disk song path in the hard disk music library is consistent with the SD card song path in the SD card music library comprises:

[0018] It is detected whether a hard disk music library identifier of the hard disk music library is consistent with an SD card music library identifier of the SD card music library.

[0019] Based on the detection result, it is determined whether the hard disk song path in the hard disk music library is consistent with the SD card song path in the SD card music library.

[0020] Optionally, after the step of synchronizing the SD card song path to the hard disk song path, the method further comprises:

[0021] The SD card music library identifier is updated, and a hard disk music library identifier is synchronized to the updated SD card music library identifier.

[0022] And / or, after the step of synchronizing the SD card song path in the SD card music library to the target song path, the method further comprises:

[0023] The SD card music library identifier is updated, and a hard disk music library identifier is synchronized to the updated SD card music library identifier.

[0024] Optionally, the step of synchronizing the SD card song path to the hard disk song path comprises:

[0025] The stored SD card song path in the SD card music library is deleted.

[0026] The hard disk song path is obtained, and the hard disk song path is inserted into the SD card music library to synchronize the SD card song path to the hard disk song path.

[0027] And / or, the step of synchronizing the SD card song path in the SD card song library as the target song path comprises:

[0028] deleting the stored SD card song path in the SD card song library;

[0029] inserting the target song path into the SD card song library to synchronize the SD card song path as the target song path;

[0030] Optionally, the step of inserting the target song path or the hard disk song path into the SD card song library comprises:

[0031] grouping the target song path or the hard disk song path to obtain a plurality of song path array sets;

[0032] sequentially inserting the plurality of song path array sets into the SD card song library.

[0033] In addition, to achieve the above object, the present application further provides a song library updating device, which comprises:

[0034] a song library detection module, configured to detect whether a hard disk song library exists in a hard disk;

[0035] a hard disk scanning module, configured to perform a full-disk scanning on the hard disk to obtain all target song paths in the hard disk which conform to a preset naming rule, if the hard disk song library does not exist;

[0036] a path synchronization module, configured to synchronize an SD card song path in an SD card song library as the target song path;

[0037] a song library updating module, configured to copy the SD card song library after path synchronization to obtain the hard disk song library, and update the hard disk song library to the hard disk.

[0038] In addition, to achieve the above object, the present application further provides a song library updating device, which comprises a memory, a processor and a song library updating program stored in the memory and executable on the processor, and the song library updating program is configured to implement the steps of the above song library updating method.

[0039] In addition, to achieve the above object, the present application further provides a storage medium, which stores a song library updating program, and the song library updating program implements the steps of the above song library updating method when executed by a processor.

[0040] The application provides a music library updating method, device, equipment and storage medium. The method comprises the following steps: detecting whether a hard disk music library exists in a hard disk; if the hard disk music library does not exist, performing full-disk scanning on the hard disk to obtain all target song paths in the hard disk which meet a preset naming rule; synchronizing an SD card song path in an SD card music library to the target song path; copying the SD card music library after the path synchronization to obtain a hard disk music library, and updating the hard disk music library to the hard disk. The application synchronizes the SD card song path in the SD card music library to the target song path in the hard disk which meets the preset naming rule when the hard disk music library does not exist, thereby avoiding the problem that if a file storing a song path in the hard disk is missing, the song path stored in the SD card is invalid, and the device cannot realize the song ordering function. The music library updating method of the application effectively ensures the realization of the song ordering function and improves the user experience. BRIEF DESCRIPTION OF DRAWINGS

[0041] Figure 1 A structure diagram of a music library updating device related to a hardware running environment of an embodiment of the application.

[0042] Figure 2 A flowchart of a first embodiment of a music library updating method of the application.

[0043] Figure 3 A flowchart of a second embodiment of a music library updating method of the application.

[0044] Figure 4 A flowchart of a third embodiment of a music library updating method of the application.

[0045] Figure 5 A whole flowchart of a music library updating method in a third embodiment of the application.

[0046] Figure 6 A structure block diagram of a first embodiment of a music library updating device of the application.

[0047] The realization, functional features and advantages of the application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION

[0048] It should be understood that the specific embodiments described herein are intended to explain the application and are not intended to limit the application.

[0049] REFERENCE Figure 1 , Figure 1 A structure diagram of a music library updating device related to a hardware running environment of an embodiment of the application.

[0050] As Figure 1As shown in the figure, the music library updating device can include a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to realize the connection and communication between the components. The user interface 1003 can include a display, an input unit such as a keyboard, and can also include a standard wired interface, a wireless interface. The network interface 1004 can optionally include a standard wired interface, a wireless interface (such as a wireless fidelity (Wi-Fi) interface). The memory 1005 can be a high-speed random access memory (RAM) or a stable non-volatile memory (NVM), such as a disk memory. The memory 1005 can also be a storage device independent of the aforementioned processor 1001.

[0051] Those skilled in the art can understand that Figure 1 The structure shown in the figure does not constitute a limitation on the music library updating device, and can include more or fewer components than the figure, or combine certain components, or different component arrangements.

[0052] As Figure 1 As shown in the figure, the memory 1005 as a storage medium can include an operating system, a network communication module, a user interface module, and a music library updating program.

[0053] In Figure 1 In the music library updating device shown in the figure, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the music library updating device of the present application can be arranged in the music library updating device, and the music library updating device calls the music library updating program stored in the memory 1005 through the processor 1001, and executes the music library updating method provided by the embodiments of the present application.

[0054] The present application provides a music library updating method, which is described with reference to Figure 2 , Figure 2 The flowchart of the first embodiment of the music library updating method of the present application is shown in the figure.

[0055] In this embodiment, the music library updating method includes the following steps:

[0056] Step S10: Detect whether a hard disk music library exists in the hard disk.

[0057] It should be noted that the execution subject of the method of the embodiment can be a computing service device with a song library updating function, a data processing function, a network communication function, and a program running function, for example, a song ordering machine, and can also be other electronic devices with the same or similar functions, such as the song library updating device described above. The following describes the embodiment and each of the following embodiments with reference to the song library updating device.

[0058] It can be understood that the hard disk song library can be a database in the hard disk storing song file information. The song file information can be song path information or path information used to describe the position of the song in the hard disk.

[0059] In a specific implementation, the song library updating device is taken as the execution subject, which can be in the stand-alone song ordering machine. If the song ordering machine is replaced with a new hard disk, there can be a situation that the hard disk song library has not been added, or the user accidentally deletes the hard disk song library, resulting in loss of the hard disk song library. Therefore, the song library updating device needs to detect whether the hard disk song library exists in the hard disk when the song ordering machine starts, to avoid the situation that the hard disk song library is missing in the hard disk, resulting in failure to implement the song ordering function.

[0060] Step S20: If the hard disk song library does not exist, performing full-disk scanning on the hard disk to obtain all target song paths in the hard disk that meet a preset naming rule.

[0061] It should be noted that the preset naming rule can be set by a technician and is a special naming mode for a song path. That is, the song path is named by the preset naming rule, and it is determined that the file is a song path when it is detected that the file name is named by the preset naming rule.

[0062] It can be understood that although the hard disk song library is missing in the hard disk, there are still actual songs that can be played in the hard disk, and the actual songs in the hard disk have corresponding paths, that is, the song paths are not in the hard disk song library but can be in other positions in the hard disk. Accordingly, the target song path can be a song path in a position in the hard disk other than the hard disk song library.

[0063] In a specific implementation, when the song library updating device detects that the hard disk song library does not exist in the hard disk, in order to ensure that the SD card song path is consistent with the hard disk song path, the hard disk is scanned to obtain the target song path that meets the preset naming rule.

[0064] Step S30: Synchronizing the SD card song path in the SD card song library to the target song path.

[0065] It should be noted that the SD card song library can be a database in the SD card storing song file information.

[0066] In a specific implementation, the song library updating device can delete the stored SD card song path in the SD card song library when detecting that the hard disk song library is missing in the hard disk, then copy the target song path, insert the copied target song path into the SD card song library, and take the target song path as the SD card song path of the SD card, thereby realizing synchronization of the SD card song path and the target song path.

[0067] Step S40: copying the path-synchronized SD card song library to obtain the hard disk song library, and updating the hard disk song library to the hard disk.

[0068] In a specific implementation, the song library updating device can copy the path-synchronized SD card song library, insert the copied SD card song library into the hard disk as the hard disk song library of the hard disk, thereby reconfiguring the hard disk song library for the hard disk, and also synchronizing the hard disk song library with the SD card song library, and ensuring implementation of the song ordering function of the jukebox.

[0069] The method includes detecting whether the hard disk song library exists in the hard disk, performing full-disk scanning on the hard disk to obtain all target song paths in the hard disk that meet a preset naming rule, synchronizing the SD card song path in the SD card song library to the target song path, copying the path-synchronized SD card song library to obtain the hard disk song library, and updating the hard disk song library to the hard disk. The method synchronizes the SD card song path in the SD card song library to the target song path in the hard disk that meets the preset naming rule when the hard disk song library does not exist, avoids a problem that, in the prior art, if a file storing a song path is missing in the hard disk, the song path stored in the SD card is invalid, and the device cannot implement the song ordering function, and effectively ensures implementation of the song ordering function, thereby improving user experience.

[0070] Reference Figure 3 , Figure 3 FIG. 2 is a flowchart of a second embodiment of the song library updating method.

[0071] Based on the first embodiment, in the present embodiment, the step of performing full-disk scanning on the hard disk to obtain all target hard disk song paths in the hard disk that meet a preset naming rule includes:

[0072] Step S201: performing full-disk scanning on the hard disk to determine whether a target file whose file name contains a preset keyword exists in each file of the hard disk.

[0073] It should be noted that the preset keyword can be a keyword for determining whether a song path exists in a song file, and the preset keyword can be a suffix of the file name.

[0074] In a specific implementation, the music library updating device can perform a full-disk scan on the hard disk, and determine whether the file name suffix of each file in the hard disk contains the preset keyword. For example, for an xxx.mp3 file, it is only necessary to determine whether the file name contains.mp3.

[0075] Step S202: If there is a target file whose file name contains the preset keyword in each file of the hard disk, it is determined that the target song path conforming to the preset naming rule is stored in the target file, and the target song path is extracted.

[0076] In a specific implementation, when the music library updating device detects that the file name of a file contains the preset keyword, it is determined that the target song path conforming to the preset naming rule is stored in the file, and the target song path is extracted accordingly. Accordingly, the file that stores the target song path conforming to the preset naming rule is the target file.

[0077] It should be understood that the existing full-disk scan method uses a song name regular matching method for searching. Regular matching involves complex calculations, for example, regular expression parsing: the regular expression itself needs to be parsed into a sequence of ordered operations to perform matching operations on the target string. Finite state automaton: the regular expression is usually interpreted as a finite state automaton (FSA), in which each character is converted into a state, and each operator in the regular expression produces some state transitions. Backtracking: when performing regular expression matching, multiple possible matches need to be considered. In some cases, the regular expression engine needs to backtrack to try different matching methods until a feasible match is found. Nested expressions: regular expressions can contain nested expressions, such as nested sub-expressions in parentheses, which may require additional calculations to perform. Pre-compilation and optimization: in practical applications, regular expressions usually need to be pre-compiled and optimized to achieve better performance when performing matching. These preprocessing and optimization processes also require some calculation cost.

[0078] It should be noted that the present embodiment uses a method of determining whether the file name suffix of a file contains a preset keyword, which is a suffix-based matching method. After the file is specified, it is only necessary to determine whether the file name contains the specified keyword, without involving complex operations of regular matching, thereby effectively improving the efficiency of full-disk scanning.

[0079] Reference Figure 4 , Figure 4 FIG. 2 is a flowchart of a music library updating method according to a third embodiment of the present application.

[0080] Based on the above embodiments, in the present embodiment, after the step S10, further comprising:

[0081] Step S20': if the hard disk song library exists, detecting whether the hard disk song path in the hard disk song library is consistent with the SD card song path in the SD card song library.

[0082] In a specific implementation, the song library updating device can determine whether the hard disk song path is consistent with the SD card song path by checking whether the hard disk song library identifier of the hard disk song library and the SD card song library identifier of the SD card song library are consistent.

[0083] Further, in the present embodiment, the step S20' comprises:

[0084] Step S201': detecting whether the hard disk song library identifier of the hard disk song library is consistent with the SD card song library identifier of the SD card song library.

[0085] It should be noted that the SD card song library identifier can be an identifier for representing the song path in the SD card song library, and is used to determine whether the song path in the SD card song library is consistent with the song path in the hard disk song library.

[0086] It can be understood that the hard disk song library identifier can be an identifier for representing the song path in the hard disk song library, and is used to determine whether the song path in the hard disk song library is consistent with the song path in the SD card song library.

[0087] It should be noted that the existing stand-alone karaoke machine system is based on an Android native system + external hard disk form. The Android native system is responsible for running the karaoke machine program, and the external hard disk (master disk) is responsible for storing song-related multimedia files. The Android system has a small capacity of SD card (not removable), and the SD card mainly saves song-related song library files. The song library saves the song path in the hard disk, which facilitates the playback of the song. When the karaoke application starts, the application reads the song information from the song library file in the SD card, performs singing, deleting, downloading, and other related operations. The above-mentioned method can avoid deleting the song resource in the hard disk directly when deleting, blacklisting, etc. For example, when deleting a song, only the song path field under the SD card needs to be deleted, and there is no need to really delete the song file under the hard disk, which effectively protects the hard disk. However, in order to ensure that the song path stored in the SD card is consistent with the actual position of the song in the hard disk, the existing method is to scan all the song paths in the hard disk song library and compare them with the song paths stored in the SD card when the device starts, which results in a long device startup time and affects the user experience.

[0088] In a specific implementation, the embodiment takes a music library updating device as an execution subject, which can be in the stand-alone jukebox. To solve the above problem, the music library updating device can generate the hard disk music library identifier based on the hard disk music library, generate the SD card music library identifier based on the SD card music library, and compare the hard disk music library identifier with the SD card music library identifier to determine whether the song paths in the SD card music library and the hard disk music library are consistent.

[0089] Step S202': determining whether the hard disk song path in the hard disk music library and the SD card song path in the SD card music library are consistent based on the detection result.

[0090] In a specific implementation, if the hard disk music library identifier and the SD card music library identifier are consistent, it can be determined that the song paths in the SD card music library and the hard disk music library are consistent, otherwise, if the hard disk music library identifier and the SD card music library identifier are inconsistent, it can be determined that the song paths in the SD card music library and the hard disk music library are inconsistent, without scanning all the song paths in the hard disk music library and comparing them with the song paths stored in the SD card, effectively reducing the device startup time and improving the user experience.

[0091] Step S30': if inconsistent, synchronizing the SD card song path to the hard disk song path.

[0092] In a specific implementation, when the determination result is that the SD card song path in the SD card music library and the hard disk song path in the hard disk music library are inconsistent, the music library updating device can update the SD card song path based on the hard disk song path in the hard disk music library, so that the SD card song path in the SD card music library is consistent with the hard disk song path.

[0093] Further, in the embodiment, after the step of synchronizing the SD card song path to the hard disk song path, the method further includes:

[0094] Step S31': updating the SD card music library identifier and synchronizing the hard disk music library identifier to the updated SD card music library identifier.

[0095] It should be noted that, since the embodiment detects whether the hard disk song path and the SD card song path are consistent through the hard disk music library identifier and the SD card music library identifier, after the synchronization of the hard disk song path and the SD card song path is completed, the hard disk music library identifier and the SD card music library identifier also need to be synchronized.

[0096] In the specific implementation, after the SD card song path in the SD card library is updated and the SD card song path in the SD card library is synchronized with the hard disk song path in the hard disk library, the SD card library identifier is updated again, and then the updated SD card library identifier is copied to the hard disk library. Correspondingly, the hard disk library identifier is replaced by the updated SD card library identifier, so that the hard disk library identifier is consistent with the SD card library identifier, and the logical implementation that the hard disk song path is consistent with the SD card song path under the condition that the hard disk library identifier is consistent with the SD card library identifier is ensured.

[0097] And / or, the step S30 further comprises:

[0098] Step S31: updating the SD card library identifier, and synchronizing the hard disk library identifier to the updated SD card library identifier.

[0099] In the specific implementation, after the synchronization of the SD card library and the hard disk library is completed, the SD card library identifier of the SD card library can be updated, and then the hard disk library identifier is synchronized to the SD card library identifier. After the jukebox is started, it is only necessary to compare whether the SD card library identifier and the hard disk library identifier are consistent to determine whether the song path in the SD library and the song path in the hard disk library are consistent, thereby effectively improving the efficiency.

[0100] It should be understood that, since the SD card library identifier and the hard disk library identifier are synchronized, it can be determined that the song path in the SD library and the song path in the hard disk library are consistent, and the jukebox can normally operate, without the need to sequentially scan the hard disk song path in the hard disk library and the SD card song path in the SD card library to sequentially compare when starting, thereby effectively improving the starting efficiency.

[0101] For the convenience of understanding, reference Figure 5 is made to the description, but the present solution is not limited thereto. Figure 5 The present solution is a library updating method and device, and a jukebox. Figure 5 In the specific implementation, after the SD card song path in the SD card library is updated and the SD card song path in the SD card library is synchronized with the hard disk song path in the hard disk library, the SD card library identifier is updated again, and then the updated SD card library identifier is copied to the hard disk library. Correspondingly, the hard disk library identifier is replaced by the updated SD card library identifier, so that the hard disk library identifier is consistent with the SD card library identifier, and the logical implementation that the hard disk song path is consistent with the SD card song path under the condition that the hard disk library identifier is consistent with the SD card library identifier is ensured.

[0102] Further, in order to ensure that different hard disks can be compatible, in the embodiment, the step of synchronizing the SD card song path to the hard disk song path comprises:

[0103] Step S301': deleting the stored SD card song path in the SD card song library.

[0104] In a specific implementation, when the hard disk song library identifier and the SD card song library identifier are detected to be inconsistent, it indicates that the currently stored SD card song path in the SD card song library is inconsistent with the hard disk song path in the hard disk song library, and the stored SD card song path in the SD card song library can be deleted to facilitate subsequent synchronization of the hard disk song path.

[0105] Step S302': obtaining the hard disk song path and inserting the hard disk song path into the SD card song library to synchronize the current SD card song path in the SD card song library to the hard disk song path.

[0106] In a specific implementation, since the hard disk song path is stored in the hard disk song library, the library updating device can extract the hard disk song library from the hard disk, query all the hard disk song paths in the hard disk song library, extract all the hard disk song paths, and re-write all the extracted hard disk song paths into the SD card song library, so that the written hard disk song path is used as a new SD card song path, thereby completing synchronization of the SD card song path and the hard disk song path.

[0107] It should be understood that the existing single-machine version jukebox hard disk is detachable, and the SD card is not detachable. If the hard disk is replaced, the hard disk song path in the new hard disk will be inconsistent with the SD card song path in the SD card song library, that is, the new hard disk is incompatible with the single-machine version jukebox. In order to solve this problem, when the hard disk song path and the SD card song path are detected to be inconsistent through the hard disk song library identifier and the SD card song library identifier, the library updating device deletes the stored SD card song path in the SD card song library, and then updates the hard disk song path queried in the hard disk song library to the SD card song library. The hard disk song path updated to the SD card song library is used as the SD card song path in the SD card song library. Different hard disks can be processed in this way, thereby avoiding the problem that the hard disk song path in the new hard disk is inconsistent with the SD card song path in the SD card song library, realizing compatibility of different hard disks, and avoiding the problem that the hard disk inserted is not the original hard disk, resulting in failure of song jukebox playing.

[0108] Correspondingly, in the embodiment, the step S30 comprises:

[0109] Step S301: deleting the stored SD card song path in the SD card library.

[0110] In a specific implementation, the operation process of synchronizing the SD card song path in the SD card library as the target song path can be consistent with the operation process of synchronizing the SD card song path as the hard disk song path in the case that the hard disk library exists in the hard disk, that is, deleting the stored SD card song path in the SD card library, so as to facilitate the subsequent hard disk song path synchronization.

[0111] Step S302: inserting the target song path into the SD card library to synchronize the SD card song path as the target song path.

[0112] In a specific implementation, since the target song path has been obtained before the operation of synchronizing the SD card song path in the SD card library as the target song path is performed in the case that the hard disk library does not exist in the hard disk, the target song path can be directly rewritten into the SD card library, and the written target song path is taken as a new SD card song path, so as to complete the synchronization of the SD card song path and the target song path.

[0113] Further, in the embodiment, the step of inserting the target song path or the hard disk song path into the SD card library comprises:

[0114] Step S3021': grouping the target song path or the hard disk song path to obtain a plurality of song path array sets.

[0115] In a specific implementation, the library updating device can slice and group the extracted target song path or the hard disk song path based on a preset rule, that is, if the target song path is obtained, the target song path is grouped, and if the hard disk song path is obtained, the hard disk song path is grouped, and the song paths in the same group are taken as a song path array set, so as to obtain a plurality of song path group sets.

[0116] It should be understood that the above-mentioned preset rule can be a rule for grouping preset by a technician. For example, two by two in the order, or ten files in a group, etc.

[0117] Step S3022': sequentially inserting the plurality of song path array sets into the SD card library.

[0118] It should be noted that the existing song path updating scheme is to scan all the hard disk song paths and insert them into the SD card library at one time. Due to the low performance of the stand-alone jukebox, reading a large amount of data at one time will consume a large amount of memory resources of the device, resulting in a decrease in the stability of the device, and due to the insufficient cache of the SD card library, the insertion efficiency will also be reduced.

[0119] In a specific implementation, the library updating device synchronizes the SD card song paths in the SD card library to the target song paths by grouping the target song paths, obtaining a plurality of groups of song path files, and then inserting the groups of song path files into the SD card library. Since the insertion is in groups, the amount of data inserted at one time is reduced, thereby reducing memory consumption, the cache of the SD card library is not full, and the insertion speed of the SD card library is improved, thereby effectively improving the efficiency of updating the target song paths.

[0120] It should be understood that the execution process of inserting the target song paths into the SD card library in the case where the hard disk does not have a hard disk library is consistent with the description in steps S3021' and S3022' in the case where the hard disk library in the hard disk is operated, and this embodiment will not be described again here.

[0121] In addition, the present embodiment also proposes a storage medium, wherein the storage medium stores a library updating program, and the library updating program is executed by a processor to implement the steps of the library updating method as described above.

[0122] Reference Figure 6 , Figure 6 is a structural block diagram of a first embodiment of the library updating device of the present application.

[0123] As Figure 6 shown, the library updating device proposed by the present embodiment comprises:

[0124] A library detection module 501 is configured to detect whether a hard disk library exists in a hard disk.

[0125] A hard disk scanning module 502 is configured to perform a full-disk scan on the hard disk to obtain all target song paths in the hard disk that meet a preset naming rule if the hard disk library does not exist.

[0126] A path synchronization module 503 is configured to synchronize the SD card song paths in the SD card library to the target song paths.

[0127] A library updating module 504 is configured to copy the SD card library after the path synchronization, obtain the hard disk library, and update the hard disk library to the hard disk.

[0128] The embodiment includes detecting whether a hard disk library exists in the hard disk by the method; if the hard disk library does not exist, performing full-disk scanning on the hard disk to obtain all target song paths in the hard disk that meet a preset naming rule; synchronizing the SD card song path in the SD card library as the target song path; copying the SD card library after the path synchronization to obtain the hard disk library, and updating the hard disk library to the hard disk. The embodiment synchronizes the SD card song path in the SD card library as the target song path in the hard disk that meets the preset naming rule when the hard disk library does not exist, avoids the problem that if the file storing the song path is missing in the hard disk, the song path stored in the SD card is invalid, and the device cannot realize the song ordering function, and the above-mentioned library updating method effectively ensures the realization of the song ordering function and improves the user experience.

[0129] Based on the first embodiment of the library updating device, the second embodiment of the library updating device is provided.

[0130] In the embodiment, the hard disk scanning module 502 is further configured to perform full-disk scanning on the hard disk to determine whether a target file with a file name containing a preset keyword exists in each file of the hard disk; if the target file with the file name containing the preset keyword exists in each file of the hard disk, it is determined that the target song path meeting the preset naming rule is stored in the target file, and the target song path is extracted.

[0131] Based on the above-mentioned embodiments of the library updating device, the third embodiment of the library updating device is provided.

[0132] In the embodiment, the library updating module 504 is further configured to, if the hard disk library exists, detect whether the hard disk song path in the hard disk library is consistent with the SD card song path in the SD card library; if not, synchronize the SD card song path as the hard disk song path.

[0133] As an implementation form, the library updating module 504 is further configured to detect whether the hard disk library identifier of the hard disk library is consistent with the SD card library identifier of the SD card library.

[0134] Based on the detection result, it is determined whether the hard disk song path in the hard disk library is consistent with the SD card song path in the SD card library.

[0135] As an implementation form, the library updating module 504 is further configured to update the SD card library identifier, and synchronize the hard disk library identifier as the updated SD card library identifier.

[0136] As an implementation, the music library updating module 504 is further configured to delete the stored SD card song path in the SD card music library; acquire the hard disk song path, and insert the hard disk song path into the SD card music library, so as to synchronize the SD card song path to the hard disk song path.

[0137] In addition, the music library updating module 504 is further configured to delete the stored SD card song path in the SD card music library; insert the target song path into the SD card music library, so as to synchronize the SD card song path to the target song path.

[0138] As an implementation, the music library updating module 504 is further configured to group the target song path or the hard disk song path to obtain a plurality of song path array sets; and insert the plurality of song path array sets into the SD card music library in sequence.

[0139] The specific implementation of the music library updating device of the present application can refer to the above-mentioned method embodiments, which will not be described here.

[0140] It should be noted that in this paper, the term "including", "containing" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or system including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or includes elements inherent to such process, method, article or system. Without more limitations, the element defined by the statement "including a" does not exclude the presence of another identical element in the process, method, article or system including the element.

[0141] The above-mentioned embodiment number of the present application is only for description, not representing the advantages and disadvantages of the embodiments.

[0142] Through the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment method can be realized by means of software and necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solutions of the present application can be embodied in the form of software product, which is stored in a storage medium (such as read-only memory / random access memory, magnetic disk, optical disk), including a plurality of instructions for making a terminal device (which can be a mobile phone, computer, server, or network device, etc.) execute the method described in each embodiment of the present application.

[0143] The above merely describes the preferred embodiments of the present application, and is not intended to limit the patent scope of the present application, and any equivalent structure or equivalent process conversion, or direct or indirect application in other related technical fields, which are made by using the content of the present application specification and drawings, are also included in the patent protection scope of the present application.

Claims

1. A method of updating a table, characterized by, The method comprises the following steps: Detecting whether a hard disk music library exists in a hard disk; If the hard disk music library does not exist, performing a full-disk scan on the hard disk to obtain all target song paths in the hard disk that meet a preset naming rule; Synchronizing an SD card song path in an SD card music library to the target song path; Copying the SD card music library after the path synchronization to obtain the hard disk music library, and updating the hard disk music library to the hard disk.

2. The table update method of claim 1, wherein, The step of performing the full-disk scan on the hard disk to obtain all target song paths in the hard disk that meet the preset naming rule comprises the following steps: Performing the full-disk scan on the hard disk to determine whether a target file whose file name contains a preset keyword exists in each file of the hard disk; If the target file whose file name contains the preset keyword exists in each file of the hard disk, it is determined that the target file contains the target song path that meets the preset naming rule, and the target song path is extracted.

3. The table update method of claim 2, wherein After the step of detecting whether the hard disk music library exists in the hard disk, the following steps are further included: If the hard disk music library exists, detecting whether a hard disk song path in the hard disk music library is consistent with an SD card song path in an SD card music library; If the hard disk song path is not consistent with the SD card song path, synchronizing the SD card song path to the hard disk song path.

4. The table update method of claim 3, wherein The step of detecting whether the hard disk song path in the hard disk music library is consistent with the SD card song path in the SD card music library comprises the following steps: Detecting whether a hard disk music library identifier of the hard disk music library is consistent with an SD card music library identifier of the SD card music library; Based on the detection result, determining whether the hard disk song path in the hard disk music library is consistent with the SD card song path in the SD card music library.

5. The table update method of claim 4, wherein After the step of synchronizing the SD card song path to the hard disk song path, the following steps are further included: Updating the SD card music library identifier, and synchronizing a hard disk music library identifier to the updated SD card music library identifier; And / or, after the step of synchronizing the SD card song path in the SD card music library to the target song path, the following steps are further included: Updating the SD card music library identifier, and synchronizing a hard disk music library identifier to the updated SD card music library identifier.

6. The table update method of claim 5, wherein, The step of synchronizing the SD card song path to the hard disk song path comprises the following steps: Deleting the SD card song path that has been stored in the SD card music library; Obtaining the hard disk song path, and inserting the hard disk song path into the SD card music library to synchronize the SD card song path to the hard disk song path; And / or, the step of synchronizing the SD card song path in the SD card music library to the target song path comprises the following steps: Deleting the SD card song path that has been stored in the SD card music library; Inserting the target song path into the SD card music library to synchronize the SD card song path to the target song path.

7. The table update method of claim 6, wherein, The step of inserting the target song path or the hard disk song path into the SD card music library comprises the following steps: Grouping the target song path or the hard disk song path to obtain a plurality of song path array sets; Inserting the plurality of song path array sets into the SD card music library in sequence.

8. A table update device characterized by comprising: The device comprises: A music library detection module is configured to detect whether a hard disk music library exists in a hard disk. A hard disk scanning module is configured to perform a full-disk scan on the hard disk if the hard disk music library does not exist, and obtain all target song paths in the hard disk that meet a preset naming rule. A path synchronization module is configured to synchronize an SD card song path in an SD card music library to the target song path. A music library updating module is configured to copy the SD card music library after path synchronization, obtain the hard disk music library, and update the hard disk music library to the hard disk.

9. A table update device characterized by comprising: The device comprises a memory, a processor, and a music library updating program stored on the memory and executable on the processor, and the music library updating program is configured to implement the steps of the music library updating method according to any one of claims 1 to 7.

10. A storage medium, characterized by The storage medium stores a music library updating program, and the music library updating program implements the steps of the music library updating method according to any one of claims 1 to 7 when executed by the processor.

Citation Information

Patent Citations

  • Method for achieving intelligent update of song information, song selecting system and song selecting server

    CN103544161A

  • Method and terminal for updating music list

    CN106506865A