Store music playing method, device and system
By developing embedded music playback software in store music playback equipment, it can parse and execute playback tasks, solving the problems of high operation and low efficiency in the existing technology, and achieving more efficient store music playback management.
Patent Information
- Application Number
- CN202411379073.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-02-14
AI Technical Summary
The existing store music playback equipment can only be processed and executed by the browser playback plug-in, resulting in high operational management costs and low efficiency.
Develop embedded music playback software in playback devices, allowing it to parse playback tasks, download audio materials, and perform playback, reducing dependence on browser plug-ins.
It reduces store operation management costs, improves management efficiency, and realizes the independent audio playback capabilities of the playback equipment.
Smart Images

Figure CN119441590A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of audio playback, and in particular to a store music playback method, a store music playback device, and a store music playback system. Background Art
[0002] Music playback is essential for retail chain stores. Existing in-store music playback methods primarily rely on server-side decoding, browser plugins downloading audio material, and then playback on the playback device. Existing in-store music playback devices can only play audio material, with the browser plugin handling both playback tasks and audio material downloading. This undoubtedly increases store operating costs and reduces operational efficiency. Summary of the Invention
[0003] The purpose of the present invention is to provide a store music playing method, which increases the function of the playing device by developing embedded music playing software in the playing device, so that the playing device can parse playing tasks, download audio materials and execute audio material playback.
[0004] In order to solve the above technical problems, the present invention provides a store music playing method, comprising:
[0005] The playback device registers the virtual device on the server;
[0006] Send playback tasks to the playback device through the server;
[0007] The playback device receives the playback task, downloads the audio material in the playback task and adds it to the playback queue;
[0008] The playback device plays audio materials based on the playback queue.
[0009] Optionally, registering the virtual device specifically includes: the server recording the store information and physical information of the playback device, and generating a unique identifier corresponding to the playback device based on the MAC address reported by the playback device.
[0010] Optionally, the WEB end sends instructions for managing playback tasks to the playback device end through the server end, and the instructions at least include adding, deleting, inserting and pausing.
[0011] Optionally, the playback task includes audio material and playback rules, and the playback rules are specifically:
[0012] A preset playback time period is used to allow a preset playback device to play the audio material in a loop or in sequence at a preset frequency during the playback time period.
[0013] Optionally, the playback device includes a real-time communication protocol, and the functions of the real-time communication protocol include at least one of the following:
[0014] Connect to the server;
[0015] Receive instructions and manage playback tasks according to the instructions;
[0016] Feedback the current playback status and content to the server.
[0017] Optionally, the server determines the health status of the playback device based on the current playback status and playback content.
[0018] Optionally, the playback device further includes a task control module, which is used to download music materials and generate a playback queue. The process is as follows:
[0019] Receive playback tasks;
[0020] Determine whether the audio material is downloaded, and if not, add the audio material to the download queue;
[0021] Based on the playback rules, the downloaded audio material is set to play at a scheduled time to generate a playback queue.
[0022] Optionally, the playback device further includes a playback thread, which is used to play audio material. The process is as follows:
[0023] Receive playback queue;
[0024] Determine the format of audio material and parse the audio material;
[0025] Select the device to play the audio material.
[0026] In addition, the present invention also discloses a store music playing device for implementing the store music playing method as described above, the device comprising:
[0027] The virtual device registration module is used for the playback device to register the virtual device on the server;
[0028] The playback task sending module is used to send playback tasks from the WEB end to the playback device end through the server end;
[0029] The playback task control module is used to receive the playback task on the playback device side, download the audio material in the playback task and add it to the playback queue;
[0030] The audio material playback module is used to play audio materials based on the playback queue on the playback device side.
[0031] In addition, the present invention also discloses a store music playing system, comprising a WEB end, a server end and a playing device end, wherein the WEB end, the server end and the playing device end cooperate to implement the store music playing method as described above;
[0032] The WEB terminal includes an operation page for:
[0033] Add or delete playback tasks to the playback device through the server;
[0034] The server includes a real-time communication protocol service for:
[0035] Register the virtual device,
[0036] Enable the real-time communication protocol service.
[0037] Query and send playback tasks to the playback device, or delete playback tasks from the playback device.
[0038] Feedback the current playback status and content to the WEB client;
[0039] The playback device end includes one or more playback devices, each of which is embedded with music playback software for:
[0040] Receive playback tasks,
[0041] Download the audio material in the playback task and add it to the playback queue.
[0042] Play audio material based on the play queue.
[0043] The in-store music playing method provided by the present invention increases the functionality of the playing device by developing embedded music playing software in the playing device, so that the playing device can parse playing tasks, download audio materials, and execute audio material playback.
[0044] The present invention also provides a store music playing device and a store music playing system, which also have the above-mentioned beneficial effects and will not be described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0046] Figure 1 A flowchart of a store music playing method provided by an embodiment of the present invention;
[0047] Figure 2 This is a structural block diagram of a store music playback device provided by an embodiment of the present invention;
[0048] Figure 3 This is a structural block diagram of a store music playback system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0049] The core of this invention is to provide a method for playing music in stores. In the prior art, store playback primarily relies on server-side decoding, browser plugins downloading audio material, and then execution by the playback device. Existing store music playback devices can only play audio material, with the browser plugin handling both playback tasks and downloading audio material. This undoubtedly increases store operating and management costs and reduces operational efficiency.
[0050] The present invention provides a store music playback method, which includes registering a virtual device on a server side by a playback device; sending a playback task to the playback device side through the server side; the playback device side receives the playback task, downloads the audio material in the playback task and adds it to a playback queue; and the playback device side plays the audio material based on the playback queue.
[0051] The method of the present invention develops a set of embedded music playback software on the playback device end, and then sends the audio and music playback rules of the cloud server to the playback device end through a real-time communication protocol. When the device on the playback device end receives the communication, it starts to download the audio material and parses and plays it according to certain rules, thereby realizing the integration of the audio playback capability of the playback device end and achieving the goal of integrating the video storage capability and music playback capability of the playback device end itself.
[0052] In order to enable those skilled in the art to better understand the present invention, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0053] Before the detailed description, the present invention explains the relevant terms:
[0054] Playback task: A playback task is to send multiple audio files and specify the play date, time period, etc. The sent audio files are played in rotation within the specified play date and time period.
[0055] Backend: A service is deployed on the server side, and the store equipment involved will communicate with the backend through websocket and http.
[0056] Scheduled: When a task is issued, it may not be triggered immediately. You need to wait for the scheduled date and time period to trigger the playback.
[0057] Insert: When a normal task is playing, a higher priority task is inserted. Generally, the task will only be played once. The software will stop the current playback and play the current inserted task first. After the inserted task is finished, the normal task before it is played.
[0058] Delete: After the playback task is issued, the background can delete the task, and the task issued to the store device will stop playing and be deleted.
[0059] Please refer to Figure 1 , Figure 1 This is a flowchart of the store music playing method provided by an embodiment of the present invention.
[0060] See also Figure 1 In an embodiment of the present invention, the store music playing method includes:
[0061] S1: The playback device registers a virtual device on the server.
[0062] Furthermore, registering a virtual device specifically involves the server recording the store information and physical information of the playback device, and generating a unique identifier corresponding to the playback device based on the MAC address reported by the playback device. The above process is called device registration. Device registration is the process of recording the store and physical information of the device when the device is first activated. In this embodiment, the playback device can be multiple playback devices, and each store can have one or more playback devices. Each playback device needs to report a MAC address to generate a corresponding unique identifier. The playback device in this embodiment is an NVR (Network Video Recorder, which is the storage and forwarding function of a network video surveillance system), and the music playback software is integrated into the ARM processor of the NVR device.
[0063] It should be noted that when the NVR device is first registered, it sends the device's MAC address to the server. The server will use the MAC address it reports as a unique identifier to generate a virtual music player. Users can use this virtual music player to distribute and manage audio files.
[0064] S2: Send the playback task to the playback device through the server.
[0065] Furthermore, the web client sends instructions for managing playback tasks to the playback device through the server. These instructions include at least adding, deleting, inserting, and pausing. Specifically, when a user adds or deletes a playback task through the web client, the web client sends a request to the server via HTTP. After receiving the task, the server connects to the store's music playback software through a real-time communication protocol (WEBSocket) and sends the corresponding task to the playback software.
[0066] The playback device includes a real-time communication protocol, and the functions of the real-time communication protocol include at least one of the following:
[0067] Connect to the server;
[0068] Receive instructions and manage playback tasks according to the instructions;
[0069] Feedback the current playback status and content to the server.
[0070] In this embodiment, the playback task includes audio material and playback rules. The playback rule is specifically: a preset playback time period, during which a preset playback device is allowed to play the audio material cyclically or sequentially at a preset frequency.
[0071] It should be noted that the server can determine the health of the playback device based on the current playback status and playback content fed back by the playback device. Specifically, the current playback status includes at least starting playback, playing, paused, playback failure, and playback completed. The playback content includes at least the name and ID of the audio material and the playback progress of the audio material. Users can query and manage the playback of store devices through communication between the web and the server.
[0072] Specifically, the server feedback on the current playback status and playback content includes:
[0073] 1) Callback to the backend when the audio material being played changes. The callback is when the store device notifies the backend of the status and progress of the audio material being played via websocket communication. The status is the playback state, i.e., started, playing, failed, ended, etc.
[0074] 2) When playing audio material, the audio material is parsed to obtain the playing time and current playing progress. The callback is to call back the audio material id being played, the total length of the audio material and the current playing time to the background when the audio material is playing.
[0075] It should be noted that audio materials have fixed parameters such as audio format, sampling rate, and channels. The music playback software in this embodiment will analyze the audio material to obtain the total playback time of the audio material, and will calculate the current playback time during audio playback. The current playback time / total duration is the progress of the audio material.
[0076] S3: The playback device receives the playback task, downloads the audio material in the playback task and adds it to the playback queue.
[0077] Specifically, the playback device further includes a task control module, which is used to download music materials and generate a playback queue. The process is as follows:
[0078] Receive playback tasks;
[0079] Determine whether the audio material is downloaded, and if not, add the audio material to the download queue;
[0080] Based on the playing rules described in S2, the downloaded audio material is set to be played at a scheduled time to generate a playing queue.
[0081] S4: The playback device plays the audio material based on the playback queue.
[0082] Furthermore, the playback device also includes a playback thread, which is used to play audio materials. The process is as follows:
[0083] Receive playback queue;
[0084] Determine the format of the audio material and parse the audio material. Specifically, in this embodiment, for example, wav format files are parsed using miniAudio, while mp3 format files are decoded using miniMp3. For audio materials in other formats, this embodiment can also use corresponding decoding methods.
[0085] Select the NVR device to play the audio material.
[0086] The embodiment of the present invention provides a method for playing music in a store. By developing embedded music playing software in the playing device, a virtual device is registered on the server and bound to the playing device. Tasks can be issued individually according to the store, and audio files can be downloaded automatically. The method of this embodiment uses a real-time communication protocol to achieve three-party communication between the WEB end, the server end, and the client end to control the music playing process in real time, and remotely handle abnormal playback. Timed polling provides timed playback of ordinary tasks and temporary insert playback tasks, etc., thereby improving the efficiency of store music playing management. By applying the method disclosed in the embodiment of the present invention, the music playing capability is successfully integrated into the NVR device, and the original one monitoring device and one music playing device are compressed into the same device, which greatly reduces the company's procurement cost, management cost, and maintenance cost.
[0087] A store music playing device provided by an embodiment of the present invention is introduced below. The store music playing device described below and the store music playing method described above can be referred to each other.
[0088] Please refer to Figure 2 , Figure 2 This is a structural block diagram of a store music player provided by an embodiment of the present invention. Figure 2 , the device comprises:
[0089] The virtual device registration module 100 is used for the playback device to register the virtual device on the server;
[0090] The playback task sending module 200 is used for sending the playback task from the WEB end to the playback device end through the server end;
[0091] The playback task control module 300 is used for receiving the playback task at the playback device end, downloading the audio material in the playback task and adding it to the playback queue;
[0092] The audio material playing module 400 is used for playing audio materials based on the playing queue on the playing device side.
[0093] The store music playback device of this embodiment is used to implement the aforementioned store music playback method. Therefore, the specific implementation methods of the store music playback device can be seen in the embodiment part of the store music playback method in the previous text. For example, the virtual device registration module 100, the playback task issuance module 200, the playback task control module 300, and the audio material playback module 400 are respectively used to implement steps S1 to S4 in the above-mentioned store music playback method. Therefore, its specific implementation methods can refer to the descriptions of the corresponding embodiments of each part and will not be repeated here.
[0094] A store music playing system provided by an embodiment of the present invention is introduced below. The store music playing system described below and the store music playing method and store music playing device described above can be referenced to each other.
[0095] Please refer to Figure 3 , Figure 3 This is a structural diagram of a store music playing system provided by an embodiment of the present invention. Figure 3 , a store music playing system, including a WEB end 11, a server end 12 and a playing device end 13, wherein the WEB end 11, the server end 12 and the playing device end 13 cooperate to implement the store music playing method as described above;
[0096] The WEB terminal 11 includes an operation page for:
[0097] Add or delete playback tasks to the playback device 13 via the server 12;
[0098] The server 12 includes a real-time communication protocol service for:
[0099] Register the virtual device,
[0100] Enable the real-time communication protocol service.
[0101] Query and send the playback task to the playback device terminal 13, or delete the playback task to the playback device terminal 13,
[0102] Feedback the current playback status and playback content to the WEB terminal 11;
[0103] The playback device end 13 includes one or more playback devices, each of which is embedded with music playback software for:
[0104] Receive playback tasks,
[0105] Download the audio material in the playback task and add it to the playback queue, and play the audio material based on the playback queue.
[0106] The store music playback system of this embodiment is used to implement the aforementioned store music playback method. Therefore, the specific implementation method of the store music playback system can be seen in the embodiment part of the store music playback method in the previous text. Therefore, its specific implementation method can refer to the description of the corresponding embodiments of each part and will not be repeated here.
[0107] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from the other embodiments. Reference can be made to the descriptions of the identical or similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and the relevant parts can be referred to the descriptions of the methods.
[0108] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0109] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0110] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0111] The above is a detailed introduction to a store music playing method, a store music playing device, and a store music playing system provided by the present invention. This article uses specific examples to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, the present invention can also be improved and modified in several ways, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.
Claims
1. A method for playing music in a store, characterized in that: include: The playback device registers the virtual device on the server; Send playback tasks to playback devices through the server; The playback device receives the playback task, downloads the audio material in the playback task and adds it to the playback queue; The playback device plays audio materials based on the playback queue.
2. The store music playing method according to claim 1, characterized in that: Registering a virtual device specifically involves: the server recording the store information and physical information of the playback device, and generating a unique identifier corresponding to the playback device based on the MAC address reported by the playback device.
3. The store music playing method according to claim 2, characterized in that: The WEB end sends instructions for managing playback tasks to the playback device end through the server end, and the instructions at least include adding, deleting, inserting and pausing.
4. The store music playing method according to claim 3, characterized in that: The playback task includes audio material and playback rules, and the playback rules are specifically: A preset playback time period is used to allow a preset playback device to play the audio material in a loop or in sequence at a preset frequency during the playback time period.
5. The store music playing method according to claim 4, characterized in that: The playback device includes a real-time communication protocol, and the functions of the real-time communication protocol include at least one of the following: Connect to the server; Receive instructions and manage playback tasks according to the instructions; Feedback the current playback status and playback content to the server.
6. The store music playing method according to claim 5, characterized in that: The server determines the health status of the playback device based on the current playback status and playback content.
7. The store music playing method according to claim 5, characterized in that: The playback device also includes a task control module, which is used to download music materials and generate a playback queue. The process is as follows: Receive playback tasks; Determine whether the audio material is downloaded, and if not, add the audio material to the download queue; Based on the playback rules, the downloaded audio material is set to play at a scheduled time to generate a playback queue.
8. The store music playing method according to claim 7, characterized in that: The playback device also includes a playback thread, which is used to play audio material. The process is as follows: Receive the playback queue; Determine the format of the audio material and parse the audio material; Select the device to play the audio material.
9. A store music player, characterized in that: Used to implement the store music playing method according to any one of claims 1 to 8, the device comprises: A virtual device registration module is used for the playback device to register the virtual device on the server; The playback task sending module is used for the WEB end to send the playback task to the playback device end through the server end; The playback task control module is used for receiving the playback task at the playback device end, downloading the audio material in the playback task and adding it to the playback queue; The audio material playback module is used to play audio materials based on the playback queue on the playback device side.
10. A store music playing system, characterized in that: It includes a WEB end, a server end and a playback device end, and the WEB end, the server end and the playback device end cooperate to implement the store music playback method according to any one of claims 1 to 8; The WEB terminal includes an operation page for: Add or delete playback tasks to the playback device through the server; The server includes a real-time communication protocol service for: Register the virtual device. Enable the real-time communication protocol service. Query and send playback tasks to the playback device, or delete playback tasks from the playback device. Feedback the current playback status and playback content to the WEB end; The playback device end includes one or more playback devices, and the playback device is embedded with music playback software for: Receive playback tasks, Download the audio material in the playback task and add it to the playback queue. Play audio material based on the play queue.