Audio playback method and device

By instructing the server to parse and obtain the URL of the target audio data and send the original PCM data to the playback device, the problem of high compatibility and hardware costs of traditional players is solved, and a lower cost and high flexibility of audio playback solutions are achieved.

CN114297471BActive Publication Date: 2025-05-16SOUNDAI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111386512.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-22
Publication Date
2025-05-16
Estimated Expiration
2041-11-22

AI Technical Summary

Technical Problem

Traditional universal players need to be compatible with various network transmission protocols and audio codec formats, resulting in high hardware costs, poor flexibility, and inability to support rare communication protocols or compression formats.

Method used

By instructing the server to receive user requests, parse and obtain the URL of the target audio data, obtain audio data from the cloud resource library, and send the original PCM data to the playback device, reducing the device hardware requirements, and adding adaptation to the server side to support different protocols and formats.

Benefits of technology

It reduces the hardware cost and computing power requirements of playback equipment, improves network applicability and flexibility, and avoids the time and risk issues brought about by hardware upgrades.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114297471B_ABST
    Figure CN114297471B_ABST
Patent Text Reader

Abstract

The present invention discloses an audio playback method and device, the method comprising: a command server receives a request from a user to obtain target audio data; the command server parses the request to obtain a search instruction and a control instruction; the command server obtains a target URL of the target audio data from a cloud resource library based on the search instruction; the command server parses the target URL to obtain the target audio data, and sends the target audio data and the control instruction to a playback device. The technical solution of the present invention is that the command server sends the original PCM data to the playback device, which can reduce the hardware requirements for the playback device, reduce the processing process of the audio data by the playback device, and at the same time reduce the cost of the playback device and improve the network applicability of the playback device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of network audio playback, and in particular relates to an audio playback method and device. Background Art

[0002] The common playback scenarios in the current artificial intelligence Internet of Things field are: audio resources (such as music libraries) are stored in resource servers (can be one or more), and the command server has a data link with the resource server. When the terminal needs to play a certain resource, the command server sends the URL of the corresponding resource, and the terminal obtains the specified playback resource according to the URL; the corresponding playback control protocol is: the command server sends audio playback control commands to control the terminal's player to play, pause, continue playing at the original position, stop, etc.

[0003] Take the smart speaker as an example: the instruction server sends the audio resource URL to the speaker; the speaker sends the URL to the universal player in the speaker; the universal player (a software module that obtains resource data from the URL, and unpacks and decodes PCM data) obtains the audio data from the corresponding resource server after obtaining the URL; after receiving the audio data, the player performs unpacking / decoding to obtain the original playback data; finally, the original playback data is sent to the underlying playback hardware for playback; after obtaining the URL, the speaker only starts, pauses, stops, and other operations independently according to the status command, and autonomously queries, downloads, or closes the audio stream from the resource server.

[0004] However, since traditional general players need to be compatible with various network transmission protocols and audio codec formats, they occupy a large amount of memory and RAM resources, and decoding also requires certain computing power. Therefore, the device hardware is directly limited to meet these requirements, which is costly. In addition, if new resources have relatively rare communication protocols or compression formats, the terminal may not be able to support them and can only be supported by upgrading the device software, which requires high time cost and introduces other risks, and has poor flexibility. Summary of the invention

[0005] The present invention aims to solve one of the technical problems in the related art at least to a certain extent. To this end, one object of the present invention is to provide an audio playback method and device.

[0006] In order to solve the above technical problems, the embodiments of the present invention provide the following technical solutions:

[0007] An audio playback method, comprising:

[0008] The command server receives a request sent by a user to obtain target audio data;

[0009] The instruction server parses the request to obtain the search instruction and the control instruction;

[0010] The instruction server obtains the target URL of the target audio data from the cloud resource library based on the search instruction;

[0011] The instruction server parses the target URL, obtains target audio data, and sends the target audio data and control instructions to the playback device.

[0012] Optionally, the instruction server receives a request from a user to obtain target audio data, including:

[0013] The user sends the request for acquiring the target audio data to the instruction server through a variety of triggering modes based on the terminal.

[0014] Optionally, after the instruction server parses the request and obtains the search instruction, the following steps are further included:

[0015] The instruction server searches the cache database based on the search instruction; wherein the cache database is arranged inside the instruction server, and the cache database is used to store historical search instructions;

[0016] If the search instruction is found and the playback device has the target audio data corresponding to the search instruction cached, the instruction server sends a control instruction corresponding to the search instruction to the playback device.

[0017] Optionally, the cache database is also used to store the historical target URL corresponding to the historical search instruction and the historical target audio data corresponding to the historical target URL;

[0018] If the search instruction is found and the playback device does not cache the target audio data corresponding to the search instruction, the instruction server searches the cache database based on the search instruction; if the corresponding historical target audio data is found, the corresponding historical target audio data is sent to the playback device.

[0019] Optionally, if the corresponding historical target audio data is not found, the instruction server searches the cache database based on the search instruction; if the corresponding historical target URL is found, the instruction server parses based on the corresponding historical target URL to obtain the target audio data.

[0020] Optionally, the instruction server parses the target URL, obtains target audio data, and sends the target audio data to the playback device, including:

[0021] The command server unpacks and decodes the target audio data to obtain original PCM data;

[0022] The instruction server sends the original PCM data to the playback device.

[0023] Optionally, after the instruction server unpacks and decodes the target audio data to obtain original PCM data, it further includes any of the following:

[0024] The instruction server compresses the original PCM data to obtain compressed data;

[0025] The instruction server does not compress the original PCM data.

[0026] Optionally, the control instruction includes any one of the following:

[0027] Play; Pause; Continue playing at the original position; Stop.

[0028] An embodiment of the present invention further provides an audio playback device, comprising:

[0029] A receiving module, used for instructing the server to receive a request sent by a user to obtain target audio data;

[0030] A parsing module, used for the instruction server to parse the request and obtain search instructions and control instructions;

[0031] An acquisition module, used for the instruction server to acquire the target URL of the target audio data from the cloud resource library based on the search instruction;

[0032] The execution module is used for the instruction server to parse the target URL, obtain the target audio data, and send the target audio data and the control instruction to the playback device.

[0033] An embodiment of the present invention further provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the method described above when executing the computer program.

[0034] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the method described above.

[0035] The embodiments of the present invention have the following technical effects:

[0036] The above technical solution of the present invention, 1) the instruction server sends the original PCM data to the playback device, which can reduce the hardware requirements for the playback device, reduce the processing process of the playback device for audio data, and at the same time reduce the cost of the playback device and improve the network applicability of the playback device; in addition, if encountering some uncommon transmission protocols or encoding formats, it only needs to add adaptation to the instruction server to support playback on all playback devices, avoiding the time problem and risk introduction caused by hardware upgrades.

[0037] 2) A threshold value is preset according to actual needs. When the original PCM data obtained by the command server is greater than the preset threshold value, the command server compresses the original PCM data and then transmits it based on the network, which is conducive to reducing transmission pressure, increasing data transmission rate, and improving network applicability.

[0038] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 It is a flowchart of an audio playback method provided by an embodiment of the present invention;

[0040] Figure 2 This is an example of the audio playback method provided by an embodiment of the present invention;

[0041] Figure 3 It is a structural schematic diagram of an audio playback device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0042] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.

[0043] In order to facilitate the understanding of the embodiments by those skilled in the art, some terms are explained:

[0044] (1) URL: Uniform Resource Locator, generally refers to a link or URL.

[0045] (2) PCM: Pulse Code Modulation. The audio data is an uncompressed raw stream of audio sampling data. It is a standard digital audio data converted from an analog signal through sampling, quantization, and encoding. It is used to convert the analog signal into sound at the end of the playback link.

[0046] like Figure 1 As shown, an embodiment of the present invention provides an audio playback method, comprising:

[0047] Step S1: The instruction server receives a request from a user to obtain target audio data;

[0048] Specifically, the instruction server receives a request from a user to obtain target audio data, including:

[0049] The user sends the request for acquiring the target audio data to the instruction server through a variety of triggering modes based on the terminal.

[0050] The triggering method may be a gesture, a sound or a play button.

[0051] The terminal may specifically be a smart device, such as a playback device or a smart phone, which can send a request to obtain target audio data to a command server according to a user's trigger.

[0052] This is explained here in conjunction with an embodiment: the playback device may be a speaker. When the terminal is a smart phone, the smart phone may be loaded with a program for controlling the speaker. The user issues key commands, voice commands and other instructions through the program, and the command server parses the instructions after receiving them. When the terminal is the speaker itself, the speaker itself has the function of collecting user triggering methods. For example, when the speaker collects the user's voice, the user's voice is uploaded to the command server, and the command server performs voice recognition to obtain the instructions and parses the instructions.

[0053] Step S2: the command server parses the request to obtain a search command and a control command; for example, if the user's voice is "play a certain song", the command server performs voice recognition and parses the user's request into a search command for "a certain song" and a control command for the playback device to play "a certain song";

[0054] Specifically, after the instruction server parses the request and obtains the search instruction, it also includes:

[0055] The instruction server searches the cache database based on the search instruction; wherein the cache database is arranged inside the instruction server, and the cache database is used to store historical search instructions;

[0056] If the search instruction is found and the playback device has the target audio data corresponding to the search instruction cached, the instruction server sends a control instruction corresponding to the search instruction to the playback device.

[0057] Here is an example: if the user voice is "play a certain song", the search command is to search for "a certain song", and the control command is "play". If there is already a search for "a certain song" in the historical search command, the command server does not need to connect to the cloud resource library immediately, but connects to the speaker first. If the speaker has "a certain song" cached, the command server directly sends the control command "play" to the speaker, and the speaker starts playing "a certain song". This avoids directly connecting to the cloud resource library and wasting unnecessary download resources, and can also improve the response speed of the speaker.

[0058] Wherein, the cache database is also used to store the historical target URL corresponding to the historical search instruction and the historical target audio data corresponding to the historical target URL;

[0059] If the search instruction is found and the playback device does not cache the target audio data corresponding to the search instruction, the instruction server searches the cache database based on the search instruction, and if the corresponding historical target audio data is found, the corresponding historical target audio data is sent to the playback device.

[0060] This is explained here in conjunction with an embodiment: the user voice is "play a certain song", then the search instruction is to search for "a certain song", and the control instruction is "play". If there is already a search for "a certain song" in the historical search instruction, then the instruction server will first connect to the speaker. If the speaker has not cached "a certain song", then the instruction server will search the cache database. If "a certain song" is cached in the cache database, then the instruction server will send the audio data of "a certain song" and the control instruction "play" to the playback device, and the speaker will start playing "a certain song". This avoids directly connecting to the cloud resource library and wasting unnecessary download resources, and can also improve the response speed of the speaker.

[0061] If the corresponding historical target audio data is not found, the instruction server searches the cache database based on the search instruction. If the corresponding historical target URL is found, the instruction server parses the corresponding historical target URL to obtain the target audio data.

[0062] Here is an example: if the user voice is "play a certain song", the search command is to search for "a certain song", and the control command is "play". If there is already a search for "a certain song" in the historical search command, the speaker has not cached "a certain song", and there is no "a certain song" cached in the cache database, then the command server searches the cache database based on the search command. If the URL of "a certain song" is cached in the cache database, the command server directly parses the historical target URL, downloads the audio resource of "a certain song", and obtains the target audio data.

[0063] Step S3: the instruction server obtains the target URL of the target audio data from the cloud resource library based on the search instruction;

[0064] Here, the example is explained: the user voice is "play a certain song", the search instruction is to search for "a certain song", and the control instruction is "play". If there is no search for "a certain song" in the historical search instruction, then step S3 is executed; if there is already a search for "a certain song" in the historical search instruction, the speaker has not cached "a certain song", the cache database has not cached "a certain song", and the cache database has not cached the URL of "a certain song", then step S3 is executed.

[0065] Step S4: the instruction server parses the target URL, obtains target audio data, and sends the target audio data and control instructions to the playback device.

[0066] Specifically, the instruction server parses the target URL, obtains target audio data, and sends the target audio data to the playback device, including:

[0067] First, the audio resource of "such and such song" is downloaded according to the link or website of the target URL to obtain the target audio data. The audio resource on each link or website has a different transmission protocol or encoding standard, so the instruction server is required to unpack and decode the target audio data to obtain the original PCM data;

[0068] The instruction server sends the original PCM data to the playback device.

[0069] The command server parses and processes the target audio data at least according to the transmission protocol and the coding standard. Specifically, the command server parses and processes the audio and video resources according to at least one of the encapsulation protocol and the compression standard, as well as the transmission protocol and the coding standard, so that the terminal does not need to be compatible with multiple different encapsulation protocols and compression standards that the audio and video resources may correspond to, thereby further reducing the requirements for the terminal device hardware.

[0070] The target audio data obtained by the command server comes from a cloud resource library, which is usually a public server. The audio resources on the link or URL have different transmission protocols or coding standards. Since data transmission usually needs to follow a specific transmission protocol, the command server parses and processes the target audio data at least according to the transmission protocol, and the parsing is performed on the target audio data at least according to the transmission protocol and the coding standard. The purpose of the command server parsing and processing the target audio data is to reduce the requirements for the terminal device hardware, and avoid the playback device in the present invention from being compatible with various network transmission protocols and audio codec formats like traditional players. Ultimately, the playback device of the present invention occupies less memory and RAM resources, has low computing power requirements, and is low in cost.

[0071] In actual application scenarios, due to the actual encoding format of the target audio data or the transmission protocol involved, the command server can be set or re-adapted so that the command server can unpack and decode all target audio data, and the operation is simple, fast and low-cost.

[0072] Wherein, after the instruction server unpacks and decodes the target audio data to obtain the original PCM data, it also includes any of the following:

[0073] The instruction server compresses the original PCM data to obtain compressed data;

[0074] The instruction server does not compress the original PCM data.

[0075] Specifically, the size of the original PCM data is obtained; the size of the original PCM data is compared with a preset threshold value; if the size of the original PCM data is greater than the preset threshold value, the original PCM data is compressed to obtain compressed data; if the size of the original PCM data is less than or equal to the preset threshold value, the original PCM data is not compressed.

[0076] In actual application scenarios, the memory occupied by the original PCM data may be large or small. In order to improve network applicability, when the original PCM data obtained by the instruction server is too large, the instruction server first compresses the obtained original PCM data.

[0077] For example, after the command server obtains the original PCM data sent by the target music library, it detects the size of the original PCM data and compares the size of the original PCM data with a preset threshold value. If the original PCM data is larger than the preset threshold value, the command server compresses the original PCM data; if the original PCM data is less than or equal to the preset threshold value, the command server does not compress the original PCM data; wherein, the specific value of the preset threshold value can be set according to actual needs, for example: 10M, 20M, 100M, etc.

[0078] In an embodiment of the present invention, a threshold value is preset according to actual needs. When the original PCM data obtained by the instruction server is greater than the preset threshold value, the instruction server compresses the original PCM data and then transmits it based on the network, which is beneficial to reduce transmission pressure, increase the data transmission rate, and improve network applicability.

[0079] In an optional embodiment of the present invention, the control instruction includes any one of the following:

[0080] Play; Pause; Continue playing at the original position; Stop.

[0081] In an actual application scenario, when a playback device receives a play (PLAY) instruction sent by an instruction server, the playback device obtains original PCM data or compressed data based on the instruction server, and then plays the original PCM data;

[0082] When the playback device receives the PAUSE command sent by the command server, the playback device pauses playback;

[0083] When the playback device receives the RESUME instruction sent by the instruction server, the playback device continues to play;

[0084] When the playback device receives a stop (STOP) instruction sent by the instruction server, the playback device stops playing.

[0085] In an embodiment of the present invention, the instruction server sends the original PCM data to the playback device, which can reduce the hardware requirements for the playback device, reduce the processing process of the playback device on the audio data, and at the same time reduce the cost of the playback device and improve the network applicability of the playback device; in addition, if encountering some uncommon transmission protocols or encoding formats, it only needs to add adaptation to the instruction server to support playback on all playback devices, avoiding the time problem and risk introduction caused by hardware upgrades.

[0086] like Figure 2 As shown, the above embodiments of the present invention can be implemented by the following implementation methods:

[0087] (1) The command server obtains the search command and the control command, and obtains the target URL of the target audio data from the cloud resource library according to the search command;

[0088] (2) instructing the server to parse the target URL and obtain the target audio data;

[0089] (3) Instruct the server to decode the target audio data and obtain the original PCM data;

[0090] (4) The command server sends the PLAY command and the original PCM data to the playback device for playback;

[0091] (5) During the playback process of the playback device, the instruction server controls the working state of the playback device;

[0092] The command server sends the PAUSE / STOP command to the playback device, and the playback device PAUSE / STOPs;

[0093] (6) After the command server initiates RESUME to the playback device, the command server sends the PLAY command to the playback device, and the playback device continues to play.

[0094] like Figure 3 As shown, an embodiment of the present invention further provides an audio playback device 300, comprising:

[0095] The receiving module 301 is used to instruct the server to receive a request sent by a user to obtain target audio data;

[0096] Parsing module 302, used for the instruction server to parse the request and obtain search instructions and control instructions;

[0097] An acquisition module 303 is used for the instruction server to acquire a target URL of the target audio data from a cloud resource library based on the search instruction;

[0098] The execution module 304 is used for the instruction server to parse the target URL, obtain the target audio data, and send the target audio data and the control instruction to the playback device.

[0099] An embodiment of the present invention further provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the method described above when executing the computer program.

[0100] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the method described above.

[0101] In addition, other structures and functions of the device in the embodiment of the present invention are known to those skilled in the art and will not be described in detail here to reduce redundancy.

[0102] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0103] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0104] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0105] In the description of the present invention, it is to be understood that the terms “center”, “longitudinal”, “lateral”, “length”, “width”, “thickness”, “up”, “down”, “front”, “back”, “left”, “right”, “vertical”, “horizontal”, “top”, “bottom”, “inside”, “outside”, “clockwise”, “counterclockwise”, “axial”, “radial”, “circumferential”, etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the present invention.

[0106] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0107] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0108] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "above" or "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" or "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.

[0109] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. An audio playback method, characterized in that: include: The command server receives a request sent by a user to obtain target audio data; The instruction server parses the request to obtain the search instruction and the control instruction; The instruction server obtains the target URL of the target audio data from the cloud resource library based on the search instruction; The instruction server parses the target URL, obtains target audio data, and sends the target audio data and control instructions to the playback device; The method further comprises: The instruction server searches the cache database based on the search instruction; wherein the cache database is arranged inside the instruction server, and the cache database is used to store historical search instructions; If the search instruction is found and the playback device has the target audio data corresponding to the search instruction cached, the instruction server sends a control instruction corresponding to the search instruction to the playback device.

2. The method according to claim 1, characterized in that The instruction server receives a request sent by a user to obtain target audio data, including: The user sends the request for acquiring the target audio data to the instruction server through multiple triggering modes based on the terminal.

3. The method according to claim 1, characterized in that: The cache database is also used to store the historical target URL corresponding to the historical search instruction and the historical target audio data corresponding to the historical target URL; If the search instruction is found and the playback device does not cache the target audio data corresponding to the search instruction, the instruction server searches the cache database based on the search instruction; if the corresponding historical target audio data is found, the corresponding historical target audio data is sent to the playback device.

4. The method according to claim 3, characterized in that If the corresponding historical target audio data is not found, the instruction server searches the cache database based on the search instruction; if the corresponding historical target URL is found, the instruction server parses based on the corresponding historical target URL to obtain the target audio data.

5. The method according to claim 1, characterized in that The instruction server parses the target URL, obtains target audio data, and sends the target audio data to the playback device, including: The command server unpacks and decodes the target audio data to obtain original PCM data; The instruction server sends the original PCM data to the playback device.

6. The method according to claim 5, characterized in that The instruction server unpacks and decodes the target audio data to obtain the original PCM data, and further includes any of the following: The instruction server compresses the original PCM data to obtain compressed data; The instruction server does not compress the original PCM data.

7. The method according to claim 1, characterized in that The control instruction includes any one of the following: Play; Pause; Continue playing at the original position; Stop.

8. An audio playback device, characterized in that: include: A receiving module, used for instructing the server to receive a request sent by a user to obtain target audio data; A parsing module, used for the instruction server to parse the request and obtain search instructions and control instructions; An acquisition module, used for the instruction server to acquire the target URL of the target audio data from the cloud resource library based on the search instruction; An execution module, configured for the instruction server to parse the target URL, obtain target audio data, and send the target audio data and control instructions to a playback device; The device also includes: The instruction server searches the cache database based on the search instruction; wherein the cache database is arranged inside the instruction server, and the cache database is used to store historical search instructions; If the search instruction is found and the playback device has the target audio data corresponding to the search instruction cached, the instruction server sends a control instruction corresponding to the search instruction to the playback device.

9. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method, system and device for playing audio and video resources

    CN113596505A