CN112532697A - Resource downloading method, system, device and medium based on text coding - Google Patents
Resource downloading method, system, device and medium based on text coding Download PDFInfo
- Publication number
- CN112532697A CN112532697A CN202011278049.5A CN202011278049A CN112532697A CN 112532697 A CN112532697 A CN 112532697A CN 202011278049 A CN202011278049 A CN 202011278049A CN 112532697 A CN112532697 A CN 112532697A
- Authority
- CN
- China
- Prior art keywords
- music
- text
- song
- instruction
- acquiring
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 61
- 230000000977 initiatory effect Effects 0.000 claims description 4
- 230000008569 process Effects 0.000 abstract description 15
- 238000006243 chemical reaction Methods 0.000 abstract description 7
- 206010063385 Intellectualisation Diseases 0.000 abstract description 4
- 230000004044 response Effects 0.000 abstract description 3
- 230000006870 function Effects 0.000 description 9
- 238000005516 engineering process Methods 0.000 description 7
- 230000008901 benefit Effects 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 4
- 238000004458 analytical method Methods 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000000605 extraction Methods 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- GNFTZDOKVXKIBK-UHFFFAOYSA-N 3-(2-methoxyethoxy)benzohydrazide Chemical compound COCCOC1=CC=CC(C(=O)NN)=C1 GNFTZDOKVXKIBK-UHFFFAOYSA-N 0.000 description 1
- 241000238557 Decapoda Species 0.000 description 1
- 230000004075 alteration Effects 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000004801 process automation Methods 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 238000013139 quantization Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/60—Information retrieval; Database structures therefor; File system structures therefor of audio data
- G06F16/63—Querying
- G06F16/638—Presentation of query results
- G06F16/639—Presentation of query results using playlists
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/955—Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention provides a resource downloading method, system, device and medium based on text coding, wherein the method comprises the steps of obtaining a song requesting instruction, and extracting first text information from the song requesting instruction; obtaining a first character string according to the original character string code of the first text information; generating a request instruction for the first character string, and acquiring a music list according to the request instruction; reading the music list, acquiring a unique identifier of the music, and generating a music link according to the unique identifier; and acquiring a data file of the music according to the music link. The method solves the problems of code conversion and resource downloading in the song ordering process through full-process automatic operation such as code conversion, song link acquisition, song file request and the like, realizes automation and intellectualization of song ordering, greatly improves the response speed and user experience of song ordering, has simple realization process, less hardware and high operability, has good transportability and practicability, and can be widely applied to the technical field of computers.
Description
Technical Field
The invention belongs to the technical field of computers, and particularly relates to a resource downloading method, system, device and medium based on text coding.
Background
Music has become an indispensable element in people's lives as an artistic form and cultural activity. With the improvement of living standard, the preference of people to music becomes more complicated and diversified, so that the song selection or song ordering is inevitably needed according to personal preference in daily life.
The song requesting technology in the prior art mainly has the following defects:
the existing voice song-ordering technology is mostly focused on the whole song-ordering process, and only provides an integral framework and an implementation scheme of the voice song-ordering, for example, specific coding and conversion problems under a Chinese text of a song are not focused specifically, and specific problems of how to acquire subsequent resource links and how to download resources and the like in a way of recognizing instructions to the text through a language recognition technology are solved. Therefore, the prior art only knows the full appearance of the prior art in the specific application process, and does not know the specific implementation and logic of the prior art, so that the accuracy, the realizability and the operability are poor.
Disclosure of Invention
In view of the above, to at least partially solve one of the above technical problems, embodiments of the present invention aim to provide an accurate, convenient and easy-to-implement resource downloading method based on text encoding, and also provide a system, an apparatus and a computer-readable storage medium capable of implementing the method.
In a first aspect, an embodiment of the present invention provides a resource downloading method based on text coding, which includes the following steps:
acquiring a song requesting instruction, and extracting first text information from the song requesting instruction; obtaining a first character string according to the original character string code of the first text information;
generating a request instruction for the first character string, and acquiring a music list according to the request instruction;
reading the music list, acquiring a unique identifier of the music, and generating a music link according to the unique identifier;
and acquiring a data file of the music according to the music link.
In some embodiments of the present invention, the resource downloading method further includes:
and extracting the data files of the music in the local resource library according to the first text information, and calling a music player to play the data files.
In some embodiments of the invention, the song request instruction comprises a voice instruction; the step of obtaining the song requesting instruction and extracting first text information from the song requesting instruction comprises the following steps:
and acquiring the voice instruction, converting the voice instruction to obtain a text instruction, and extracting to obtain the first text information according to the text instruction.
In some embodiments of the present invention, the step of generating the first character string into a request instruction, and obtaining the music list according to the request instruction includes:
saving the first character string, and reading the first character string into a local temporary variable;
generating a first URL (uniform resource locator) from the local temporary variable, and initiating a request to an open platform according to the first URL;
and acquiring a return value containing the music list according to the request result.
In some embodiments of the present invention, the step of reading the music list, obtaining a unique identifier of the music, and generating a music link according to the unique identifier includes:
reading the music list from the return value;
analyzing the music list to obtain a unique identifier of the music, and identifying the unique identifier of the music; and filling the unique identification into the first URL to generate a second URL, wherein the second URL is a music link.
In some embodiments of the present invention, the step of obtaining the data file of the music according to the music link includes:
and analyzing according to the music link to obtain a download link address of the music, and acquiring a data file of the music according to the download link address.
In some embodiments of the invention, the return value and the unique identifier are both in a data exchange format of JSON.
In a second aspect, a technical solution of the present invention further provides a resource downloading system based on text coding, including:
the command acquisition unit is used for acquiring a song requesting command and extracting first text information from the song requesting command; obtaining a first character string according to the original character string code of the first text information;
the link generation unit is used for generating a request instruction for the first character string and acquiring a music list according to the request instruction; reading the music list, acquiring a unique identifier of the music, and generating a music link according to the unique identifier;
and the file downloading unit acquires the data file of the music according to the music link.
In a third aspect, a technical solution of the present invention further provides a data processing apparatus based on a block chain, including:
at least one processor;
at least one memory for storing at least one program;
when the at least one program is executed by the at least one processor, the at least one processor is caused to implement a method of text encoding based resource download of the first aspect.
In a fourth aspect, the present invention also provides a storage medium in which a processor-executable program is stored, the processor-executable program being configured to implement the method as in the first aspect when executed by a processor.
Advantages and benefits of the present invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention:
according to the resource downloading method based on text coding, the method solves the problems of code conversion and resource downloading in the song requesting process through full-process automatic operation such as code conversion, song link acquisition, song file request and the like, so that result feedback is more accurate. The method realizes automation and intellectualization of song ordering, greatly improves the response speed and user experience of song ordering, has simple realization process, less hardware and high operability, and has good transportability and practicability.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flowchart illustrating steps of a method for downloading resources based on text encoding according to the present invention;
FIG. 2 is a flowchart illustrating the steps of a method for downloading resources based on text encoding according to a complete embodiment of the present invention;
fig. 3 is a schematic structural diagram of a resource downloading device based on text encoding according to the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention. The step numbers in the following embodiments are provided only for convenience of illustration, the order between the steps is not limited at all, and the execution order of each step in the embodiments can be adapted according to the understanding of those skilled in the art.
First, explanations are made for the related art involved in this scheme:
a URL (uniform resource locator) Uniform Resource Locator (URL) is a representation method for specifying information locations on web service programs on the internet.
ASCII Code (American Standard Code for Information exchange) American Standard Code is a set of computer coding system based on Latin letters, and is mainly used for displaying modern English and other Western European languages.
JOSN (JavaScript Object Notation), a lightweight data exchange format.
Powershell: the method is a command line shell program and script environment, so that a command line user and a script writer can utilize the powerful functions of the NET Framework.
The technical scheme of the application provides a process for simply and quickly coding and converting Chinese texts related to song ordering, splicing the Chinese texts into a specific request link, and finally obtaining song files through three times of resource requests and analysis of resource return values. And the third resource request and the analysis of the resource return value comprise the processes of code conversion, URL splicing, local storage of the intermediate return value, information extraction of the intermediate return value, URL splicing of the song resource, local storage of the song file and the like.
In a first aspect, as shown in fig. 1, the technical solution of the present invention provides a data processing method based on an embodiment system, which mainly includes steps S01-S04:
s01, acquiring a song requesting instruction, and extracting first text information from the song requesting instruction; and obtaining a first character string according to the original character string code of the first text information.
The first text information is effective information content in the song-ordering instruction, and comprises but is not limited to a song name, a singer name and the like; the original character string of the first text information is the Chinese and English character string of the information content before encoding. The method for acquiring the song-requesting instruction includes but is not limited to acquiring through an interactive interface or through a voice interaction method. According to the obtained song-requesting instruction, first text information is obtained through text content identification; the original string is then represented in corresponding binary data as ASCII encoded representation and replaced. In this embodiment, the chinese text transcoding script is called as chinese text code.ps1, and the specific calling process is as follows:
@echo off
ex PowerShell, ExecutionPolicy Unrestricted, chinese senecode, ps1 thousand years, etc
The encoding process is as follows: for example, inputting a Chinese character string "hello", taking UTF-8 and other encoding modes as examples, the UTF-8 encoding uses 3 bytes to represent each character with hexadecimal numerical value, and then "hello" is: 0xE4, 0xBD, x0a0 and 0xE5, 0xA5, x0BD, then the URL encoding is expressed as: "% e 4% bd% a 0% e 5% a 5% bd". In addition, in the encoding process, taking powershell programming as an example, assuming that a variable $ chinesetxt ═ beijing "prestores original character string data to be converted, calling the script can obtain encoded data"% e 5% 8 c% 97% e 4% ba% ac ".
In some possible embodiments, the song request instruction comprises a voice instruction; further, step S01 includes step S011:
s011, acquiring a voice instruction, converting the voice instruction to obtain a text instruction, and extracting to obtain first text information according to the text instruction.
Specifically, the voice song-requesting information sent by the user is received through the external device, wherein the external device can be a microphone of the mobile device or an external earphone microphone. And converting the received voice information into a text instruction. Specifically, the speech recognition may be performed by using an existing speech recognition method, for example, an algorithm based on dynamic time warping, a hidden markov method based on a parametric model, a vector quantization method based on a nonparametric model, an algorithm based on an artificial neural network, or the like. And then obtaining a first character string through extraction and transcoding.
And S02, generating a request instruction for the first character string, and acquiring the music list according to the request instruction.
Specifically, text data obtained by script coding is stored locally, and a request is initiated according to the stored text data to obtain feedback of a music list in a text format. Further, in an embodiment, step S02 can be further subdivided into steps S021-S023:
s021, storing the first character string, and reading the first character string into a local temporary variable;
s022, generating a first URL (uniform resource locator) from the local temporary variable, and initiating a request to the open platform according to the first URL;
s023, obtaining a return value containing the music list according to the request result.
Wherein, the first URL is the URL of the music playing platform. Specifically, text data obtained by script coding is stored to the local, then the text data is read into a local temporary variable, then the temporary variable is filled into a corresponding field in an open music platform URL based on the URL, then a request is initiated to the open platform (such as internet cloud, dried shrimp and the like), and a return value (text format) containing a song list is obtained. In the embodiment, the specific implementation procedure (program) is as follows:
echo Download media:%sn%........
set
url=http://music.163.com/api/search/get/webcsrf_token=hlpretag=&hlposttag=&s=%snEnco de%&type=1&offset=0&total=true&limit=1
curl%url%>re.json
and S03, reading the music list, acquiring the unique identifier of the music, and generating a music link according to the unique identifier.
The unique music represents the global unique ID of the music, all music in the list is read according to a music list stored in the local area, the first music in the list is selected, and the global unique ID of the music is added to a music playing platform URL to serve as a music link.
In some alternative embodiments, the return value, the unique identifier in step S03, is in a data exchange format of JSON. Further, step S03 can be subdivided into steps S031-S032:
s031, read from the return value and get the music tabulation;
s032, analyzing the music list to obtain a unique music identifier, and identifying the unique music identifier; and filling the unique identification into the first URL to generate a second URL, wherein the second URL is a music link.
Specifically, the system saves the return value (text format) locally as JSON format. The song list is next read from the JSON file. Specifically, a jq tool is used for analyzing content and acquiring first song data, a globally unique ID of a song in the first song data is acquired, then the unique ID of the song is stored in a local temporary variable, and the ID is stored locally in a JSON format.
In the implementation process, the codes of steps S031-S032 are expressed as:
jq-win64.exe".result|.songs[0]|.id"re.json>id.txt
set/p id=<id.txt
and S04, acquiring the data file of the music according to the music link.
Specifically, the saved song link is analyzed to obtain a download link address of the song, the MP3 data file of the song can be directly returned through the download link address, and finally, a request is sent to the MP3 data file, and the file is saved in a local resource library.
The code of step S04 in the embodiment is expressed as:
start iexplore http://music.163.com/song/media/outer/urlid=%id%
in some possible embodiments, the resource downloading method further includes the steps of:
and S05, extracting the data files of the music in the local resource library according to the first text information, and calling a music player to play the data files.
Specifically, for the recognized text information, firstly, judging whether a file with the same name exists in a local resource library, if so, directly calling a music player to play a local MP3 file; if not, the process proceeds to step S02.
The code of step S05 in the embodiment is expressed as:
in addition, as shown in fig. 2, in some possible embodiments, for mixed music text such as chinese and english, the english part holds original characters, and non-ASCII codes such as chinese are processed in an encoding manner to support the sharing transmission of chinese and english information. For example, "one night in Beijing," URL code is "one night in% e 5% 8 c% 97% e 4% ba% ac".
Because the Windows operating system of the PC is provided with a built-in powershell environment, the URL decoding can be directly executed, and the PC does not need to be pre-installed with any additional software, client, driver and the like, thereby realizing the plug-and-play Chinese transmission. For other operating systems such as Linux, the operation can be realized by adopting a corresponding system script language, and the principle and the mechanism are similar.
In another embodiment, the user speaks the 'shoot carving hero transmission' to the device microphone, the system automatically recognizes and converts the 'shoot carving hero transmission' into text information, then automatically enters a 'Powershell' command, and automatically creates the Powershell command and a program running environment in the target computer. Then, the following steps are performed from step S02, and the following steps include:
a) and storing the Chinese URL code into a powershell variable.
b) Judging whether the music file with the same name exists locally, if not, entering the step c), and if so, entering the step g).
c) Filling the URL code character string into a corresponding field in the URL, initiating a request to the open platform, and acquiring a text return value containing the song list.
d) And storing and writing the text return value data into a target JSON file.
e) And reading a song list, analyzing the content by using a jq tool, acquiring first song data, storing the unique ID of the song to the local, splicing the song ID into a song downloading URL (uniform resource locator), wherein the field is' ID ═ in the example, and storing the song ID to the local in a JSON format.
f) Analyzing the saved song link to obtain the download link address of the song, directly returning the MP3 data file of the song through the link address, finally sending a request to the song, and saving the file in a local resource library.
g) And calling the local music player to directly play.
In a second aspect, an embodiment of the present invention further provides a resource downloading system based on text coding, including:
the command acquisition unit is used for acquiring a song requesting command and extracting first text information from the song requesting command; obtaining a first character string according to the original character string code of the first text information;
the link generation unit is used for generating a request instruction for the first character string and acquiring a music list according to the request instruction; reading the music list, acquiring a unique identifier of the music, and generating a music link according to the unique identifier;
and the file downloading unit acquires the data file of the music according to the music link.
In a third aspect, as shown in fig. 3, an embodiment of the present invention further provides a resource downloading device based on text encoding, which includes at least one processor; at least one memory for storing at least one program; when the at least one program is executed by the at least one processor, the at least one processor is caused to implement a method of resource downloading based on text encoding as in the first aspect.
The method also relates to a hardware microphone, and the hardware microphone is plug-and-play, no driver or software is required to be installed, the automatic command is executed on a PC of the Windows operating system and executed by the Powershell of the PC, and is executed on smart phones such as android and the like by the shell of the Linux system, the execution environments are running environments, and no additional software is required to be installed.
Embodiments of the present invention also provide a storage medium, in which a program is stored, and the program is executed by a processor to perform the method according to the first aspect.
From the above specific implementation process, it can be concluded that the technical solution provided by the present invention has the following advantages or advantages compared to the prior art:
1. the Chinese text identified and converted by the voice identification technology in the method provided by the application is subjected to the Chinese text code conversion technology, the resource acquisition and downloading technology, network resources are automatically stored to the local, a local music player can be automatically called to play and other series of operations, and finally the full process automation and intellectualization of Chinese voice song ordering are realized.
2. The technical scheme of the application realizes automation and intellectualization of Chinese song requesting, greatly improves the response speed and user experience of Chinese song requesting, has simple realization process, less hardware and high operability, and has good transportability and practicability.
In alternative embodiments, the functions/acts noted in the block diagrams may occur out of the order noted in the operational illustrations. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality/acts involved. Furthermore, the embodiments presented and described in the flow charts of the present invention are provided by way of example in order to provide a more thorough understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed and in which sub-operations described as part of larger operations are performed independently.
Furthermore, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise stated to the contrary, one or more of the functions and/or features may be integrated in a single physical device and/or software module, or one or more of the functions and/or features may be implemented in a separate physical device or software module. It will also be appreciated that a detailed discussion of the actual implementation of each module is not necessary for an understanding of the present invention. Rather, the actual implementation of the various functional modules in the apparatus disclosed herein will be understood within the ordinary skill of an engineer, given the nature, function, and internal relationship of the modules. Accordingly, those skilled in the art can, using ordinary skill, practice the invention as set forth in the claims without undue experimentation. It is also to be understood that the specific concepts disclosed are merely illustrative of and not intended to limit the scope of the invention, which is defined by the appended claims and their full scope of equivalents.
Wherein the functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
While the preferred embodiments of the present invention have been illustrated and described, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.
Claims (10)
1. A resource downloading method based on text coding is characterized by comprising the following steps:
acquiring a song requesting instruction, and extracting first text information from the song requesting instruction; obtaining a first character string according to the original character string code of the first text information;
generating a request instruction for the first character string, and acquiring a music list according to the request instruction;
reading the music list, acquiring a unique identifier of the music, and generating a music link according to the unique identifier;
and acquiring a data file of the music according to the music link.
2. The resource downloading method based on text coding according to claim 1, wherein the resource downloading method further comprises:
and extracting the data files of the music in the local resource library according to the first text information, and calling a music player to play the data files.
3. The resource downloading method based on text coding of claim 1, wherein the song-requesting instruction comprises a voice instruction; the step of obtaining the song requesting instruction and extracting first text information from the song requesting instruction comprises the following steps:
and acquiring the voice instruction, converting the voice instruction to obtain a text instruction, and extracting to obtain the first text information according to the text instruction.
4. The method for downloading resource based on text coding according to claim 1, wherein the step of generating the first character string into a request command, and obtaining the music list according to the request command comprises:
saving the first character string, and reading the first character string into a local temporary variable;
generating a first URL (uniform resource locator) from the local temporary variable, and initiating a request to an open platform according to the first URL;
and acquiring a return value containing the music list according to the request result.
5. The method as claimed in claim 4, wherein the step of reading the music list, obtaining a unique identifier of music, and generating a music link according to the unique identifier includes:
reading the music list from the return value;
analyzing the music list to obtain a unique identifier of the music, and identifying the unique identifier of the music; and filling the unique identification into the first URL to generate a second URL, wherein the second URL is a music link.
6. The method as claimed in claim 5, wherein the step of obtaining the data file of the music according to the music link comprises:
and analyzing according to the music link to obtain a download link address of the music, and acquiring a data file of the music according to the download link address.
7. A method for downloading a resource based on text encoding according to any of claims 4-6, wherein the return value and the unique identifier are both in JSON data exchange format.
8. A text encoding based resource download system, comprising:
the command acquisition unit is used for acquiring a song requesting command and extracting first text information from the song requesting command; obtaining a first character string according to the original character string code of the first text information;
the link generation unit is used for generating a request instruction for the first character string and acquiring a music list according to the request instruction;
reading the music list, acquiring a unique identifier of the music, and generating a music link according to the unique identifier;
and the file downloading unit acquires the data file of the music according to the music link.
9. A text encoding-based resource downloading apparatus, comprising:
at least one processor;
at least one memory for storing at least one program;
when executed by the at least one processor, cause the at least one processor to implement a text encoding based resource download method as claimed in any one of claims 1 to 7.
10. A storage medium having stored therein a program executable by a processor, characterized in that: the processor-executable program when executed by a processor is for implementing a method for text-coding based resource downloading as claimed in any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011278049.5A CN112532697A (en) | 2020-11-16 | 2020-11-16 | Resource downloading method, system, device and medium based on text coding |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011278049.5A CN112532697A (en) | 2020-11-16 | 2020-11-16 | Resource downloading method, system, device and medium based on text coding |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112532697A true CN112532697A (en) | 2021-03-19 |
Family
ID=74980897
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011278049.5A Pending CN112532697A (en) | 2020-11-16 | 2020-11-16 | Resource downloading method, system, device and medium based on text coding |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112532697A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101206859A (en) * | 2007-11-30 | 2008-06-25 | 清华大学 | Method for ordering song by voice |
CN101650738A (en) * | 2009-09-16 | 2010-02-17 | 福州星网视易信息系统有限公司 | Omnidirectional intelligent search method for Kara OK songs |
CN102053998A (en) * | 2009-11-04 | 2011-05-11 | 周明全 | Method and system device for retrieving songs based on voice modes |
CN107247768A (en) * | 2017-06-05 | 2017-10-13 | 北京智能管家科技有限公司 | Method for ordering song by voice, device, terminal and storage medium |
CN108287831A (en) * | 2017-01-09 | 2018-07-17 | 阿里巴巴集团控股有限公司 | A kind of URL classification method and system, data processing method and system |
CN108933960A (en) * | 2018-07-19 | 2018-12-04 | 斑马音乐文化科技(深圳)有限公司 | Requesting song playback method, device, program request equipment and storage medium |
-
2020
- 2020-11-16 CN CN202011278049.5A patent/CN112532697A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101206859A (en) * | 2007-11-30 | 2008-06-25 | 清华大学 | Method for ordering song by voice |
CN101650738A (en) * | 2009-09-16 | 2010-02-17 | 福州星网视易信息系统有限公司 | Omnidirectional intelligent search method for Kara OK songs |
CN102053998A (en) * | 2009-11-04 | 2011-05-11 | 周明全 | Method and system device for retrieving songs based on voice modes |
CN108287831A (en) * | 2017-01-09 | 2018-07-17 | 阿里巴巴集团控股有限公司 | A kind of URL classification method and system, data processing method and system |
CN107247768A (en) * | 2017-06-05 | 2017-10-13 | 北京智能管家科技有限公司 | Method for ordering song by voice, device, terminal and storage medium |
CN108933960A (en) * | 2018-07-19 | 2018-12-04 | 斑马音乐文化科技(深圳)有限公司 | Requesting song playback method, device, program request equipment and storage medium |
Non-Patent Citations (2)
Title |
---|
胡玥申: "基于云计算平台的音乐专辑封面搜索应用", 《微型电脑应用》 * |
黄国超等: "基于Unicode编码的信息隐藏算法研究与设计", 《计算机技术与发展》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107657017B (en) | Method and apparatus for providing voice service | |
CN107464554B (en) | Method and device for generating speech synthesis model | |
CN111400518B (en) | Method, device, terminal, server and system for generating and editing works | |
JP6771805B2 (en) | Speech recognition methods, electronic devices, and computer storage media | |
CN110069608B (en) | Voice interaction method, device, equipment and computer storage medium | |
US9530415B2 (en) | System and method of providing speech processing in user interface | |
EP3095113B1 (en) | Digital personal assistant interaction with impersonations and rich multimedia in responses | |
JP6928642B2 (en) | Audio broadcasting method and equipment | |
CN111367490A (en) | Voice playing method and device and electronic equipment | |
CN107908743B (en) | Artificial intelligence application construction method and device | |
CN110399306B (en) | Automatic testing method and device for software module | |
CN112053692B (en) | Speech recognition processing method, device and storage medium | |
CN111178056A (en) | Deep learning based file generation method and device and electronic equipment | |
CN111210824B (en) | Voice information processing method and device, electronic equipment and storage medium | |
CN112947912A (en) | Method and device for generating code, electronic equipment and storage medium | |
CN112364653A (en) | Text analysis method, apparatus, server and medium for speech synthesis | |
JP2022518645A (en) | Video distribution aging determination method and equipment | |
CN113378579A (en) | Method, system and electronic equipment for voice input of structured data | |
CN110286910B (en) | File migration method, device, equipment and storage medium | |
CN113656763A (en) | Method and device for determining small program feature vector and electronic equipment | |
CN112532697A (en) | Resource downloading method, system, device and medium based on text coding | |
CN112328308A (en) | Method and device for recognizing text | |
CN112101023B (en) | Text processing method and device and electronic equipment | |
CN110728137B (en) | Method and device for word segmentation | |
CN108027815A (en) | A kind of voice and the personalized associated method and system of pattern |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210319 |