Summary of the invention
The purpose of the present invention is to provide a kind of method and system of the audio file in intelligent sound box broadcasting memory,
It may be implemented when the interface for reading the audio file in audio storage equipment is not present in intelligent sound box, it also can broadcasting memory
In audio file.
The purpose of the present invention is achieved through the following technical solutions:
A kind of method of audio file in intelligent sound box broadcasting memory, includes the following steps:
When storage equipment establishes connection by connection equipment and controlling terminal, the file of the connection equipment carry is scanned
System obtains the file path of the audio file in the storage equipment;
File access corresponding with audio file address is generated according to the file path;
When pushing the audio file to intelligent sound box, the file access address is sent to intelligent sound box, wherein
The file access address is accessed by the intelligent sound box, the audio file is obtained and plays out.
A kind of system of audio file in intelligent sound box broadcasting memory, comprising:
Path obtains module, when storage equipment establishes connection by connection equipment and controlling terminal, scans the connection
The file system of equipment carry obtains the file path of the audio file in the storage equipment;
Address generation module, for according to file path generation file access corresponding with the audio file
Location;
Delivery module, for when pushing the audio file to intelligent sound box, the file access address to be sent to
Intelligent sound box, wherein the file access address is accessed by the intelligent sound box, the audio file is obtained and plays out.
According to the scheme of aforementioned present invention, be when storing equipment and establishing connection by connection equipment and controlling terminal,
The file system for scanning the connection equipment carry obtains the file path of the audio file in the storage equipment, according to institute
It states file path and generates file access corresponding with audio file address, pushing the audio file to intelligent sound box
When, it sends the file access address to intelligent sound box, and the file access address is accessed by the intelligent sound box, obtains
The audio file plays out, due to being that will store equipment to establish connection with controlling terminal, without having on intelligent sound box
The standby interface for reading the audio file in audio storage equipment, not will increase the hardware and software cost of intelligent sound box, simultaneously because root
Corresponding file access address is generated according to the file path of the audio file in storage equipment, intelligent sound box can access institute
It states the corresponding audio file of file access address progress to play out, may be implemented to be not present in intelligent sound box and read audio storage
It, also can audio file in broadcasting memory when the interface of the audio file in equipment.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention more comprehensible, with reference to the accompanying drawings and embodiments, to this
Invention is described in further detail.It should be appreciated that the specific embodiments described herein are only used to explain the present invention,
And the scope of protection of the present invention is not limited.
In the following description, first against the method for the audio file in intelligent sound box broadcasting memory of the invention
Embodiment is illustrated, then to each embodiment of the system of the audio file in intelligent sound box broadcasting memory of the invention into
Row explanation.
It is shown in Figure 1, it is the embodiment of the method for the audio file in intelligent sound box broadcasting memory of the invention
Flow diagram.As shown in Figure 1, the method for the audio file in intelligent sound box broadcasting memory in the present embodiment includes such as
Lower step:
Step S101: when storage equipment establishes connection by connection equipment and controlling terminal, the connection equipment is scanned
The file system of carry obtains the file path of the audio file in the storage equipment;
Here, the controlling terminal includes smart phone (Smart Phone), tablet computer, laptop or a
Personal digital assistant etc.;The APP that audio file is played for controlling intelligent sound box can be installed in the controlling terminal;
The storage equipment includes USB device in one of the embodiments, USB device include USB flash disk (USB flash drive,
USB flash disk), the connection equipment includes OTG (On-The-Go) data line, and OTG data line is for various differences
Equipment or mobile device between connection, carry out the data line of data exchange;
Wherein, the mode of the file system of scanning connection equipment carry can be realized using existing way, not superfluous herein
It states, by the available file directory to All Files therein of file system of scanning connection equipment carry, then described
The audio file is searched in file directory, is obtained the file path of the audio file, is obtained in one of the embodiments,
The process of the file path of audio file in the storage equipment specifically may is that according to preset file suffixes name screening with
The file destination that this document suffix name matches obtains the file path of the file destination, wherein the audio file includes
The file destination;
Here, file suffixes name is the suffix name that has of file of audio types, can be set according to the actual situation,
And generally require the file of the corresponding audio types of the file suffixes name that can play on intelligent sound box;
Step S102: file access corresponding with audio file address is generated according to the file path;
Here, file access address includes URL (Uniform Resoure Locator, uniform resource locator);
The mode that file path is converted into file access address can be using existing mode, and it will not be described here;
In one of the embodiments, with generating file access corresponding with the audio file according to the file path
The process of location can specifically include: will be in the server that pre-establishes of file path deposit, wherein by the service according to
The file path generates file access corresponding with audio file address, that is to say, that server can be pre-established,
The file path is stored in the server, then is converted into the file path and the audio file pair by the service
The file access address answered, wherein the server includes HTTP (Hyper Text Transfer Protocol, hypertext
Transport protocol) server;
Due to generating the corresponding file access address of the audio file, can be visited for other clients
It asks, to obtain the audio file;
Step S103: when pushing the audio file to intelligent sound box, the file access address is sent to intelligence
Speaker, wherein the file access address is accessed by the intelligent sound box, the audio file is obtained and plays out;
Specifically, the file access address can be packaged into messaging to intelligent sound box, intelligent sound box receives
After the message, parsing is carried out to the message and obtains the file access address therein, intelligent sound box accesses institute as client
This document access address, it is available to arrive the audio file since file access address corresponds to the audio file, and to this
Audio file plays out.
The scheme of aforementioned present invention can be applied in controlling terminal, or can be used in and broadcast for controlling intelligent sound box
In the APP of playback frequency file, the file system of the connection equipment carry is scanned by controlling terminal or the APP, obtains institute
The file path for stating the audio file in storage equipment, generates the file access address of audio file, the life of file access address
At can be executed by the server that pre-establishes, wherein the systematic function of the file access address of server belongs to the control
The partial function of terminal or the APP.
It accordingly, is to establish to connect by connection equipment and controlling terminal in storage equipment according to above-mentioned this embodiment scheme
When connecing, the file system of the connection equipment carry is scanned, obtains the file path of the audio file in the storage equipment, root
File access corresponding with audio file address is generated according to the file path, is pushing the audio text to intelligent sound box
When part, sends the file access address to intelligent sound box, and the file access address is accessed by the intelligent sound box, obtain
The audio file is taken to play out, due to being that will store equipment to establish connection with controlling terminal, without on intelligent sound box
Have the interface for reading the audio file in audio storage equipment, not will increase the hardware and software cost of intelligent sound box, simultaneously because
Corresponding file access address is generated according to the file path of the audio file in storage equipment, intelligent sound box can access
The file access address carries out corresponding audio file and plays out, and may be implemented to deposit in intelligent sound box there is no audio is read
It, also can audio file in broadcasting memory when storing up the interface of the audio file in equipment
Scheme to facilitate the understanding of the present invention is illustrated below by way of a specific example.In the specific example
In be USB device, the connection equipment by the storage equipment be to be for OTG data line, the controlling terminal are mobile phones
It is illustrated, but this does not constitute the restriction to the present invention program.
USB device is attached by OTG and mobile phone, by the file system mounted use on mobile phone, on mobile phone of USB device
The file system on carry is then scanned in the APP that control intelligent sound box plays audio file, searches out the audio that can be played
File source (is equivalent to above-mentioned file path), and these audio file sources are put into HTTP server, generates corresponding
URL allows HTTP client to access, and realizes the function for the audio file that intelligent sound box plays in USB device, Yong Huke
By OTG connection mobile phone, to share the audio file in USB device whenever and wherever possible.
According to the method for the audio file in the intelligent sound box broadcasting memory of aforementioned present invention, the present invention also provides one
The system of audio file in kind intelligent sound box broadcasting memory, below just in intelligent sound box broadcasting memory of the invention
The embodiment of system of audio file be described in detail.Intelligent sound box broadcasting memory of the invention is shown in Fig. 2
In audio file system embodiment structural schematic diagram.For ease of description, it is merely illustrated in Fig. 2 and phase of the present invention
The part of pass.
As shown in Fig. 2, the system of the audio file in the intelligent sound box broadcasting memory of the present embodiment comprising path
Obtain module 201, address generation module 202, delivery module 203, in which:
Path obtains module 201, when storage equipment establishes connection by connection equipment and controlling terminal, scans the company
The file system of equipment carry is connect, the file path of the audio file in the storage equipment is obtained;
Address generation module 202, for generating file access corresponding with the audio file according to the file path
Address;
Delivery module 203, for when pushing the audio file to intelligent sound box, the file access address to be transmitted
To intelligent sound box, wherein access the file access address by the intelligent sound box, obtain the audio file and play out.
The storage equipment may include USB device in one of the embodiments, and the connection equipment may include
OTG data line.
Path acquisition module 201 can be according to the screening of preset file suffixes name and this article in one of the embodiments,
The file destination that part suffix name matches obtains the file path of the file destination, wherein the audio file includes described
File destination.
The file path can be stored in the clothes pre-established by address generation module 202 in one of the embodiments,
It is engaged in device, wherein file access corresponding with audio file address is generated according to the file path by the service.
The file access address may include uniform resource locator in one of the embodiments,.
The system of audio file in intelligent sound box broadcasting memory of the invention and intelligent sound box of the invention play
The method for storing the audio file in equipment corresponds, the side of the audio file in above-mentioned intelligent sound box broadcasting memory
Audio file in the suitable intelligent sound box broadcasting memory of the technical characteristic and its advantages that the embodiment of method illustrates is
In the embodiment of system, hereby give notice that.
Each technical characteristic of embodiment described above can be combined arbitrarily, for simplicity of description, not to above-mentioned reality
It applies all possible combination of each technical characteristic in example to be all described, as long as however, the combination of these technical characteristics is not deposited
In contradiction, all should be considered as described in this specification.
The embodiments described above only express several embodiments of the present invention, and the description thereof is more specific and detailed, but simultaneously
It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art
It says, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to protection of the invention
Range.Therefore, the scope of protection of the patent of the invention shall be subject to the appended claims.