CN106649297A - Method, browser and server for playing webpage audio file - Google Patents

Method, browser and server for playing webpage audio file Download PDF

Info

Publication number
CN106649297A
CN106649297A CN201510430691.3A CN201510430691A CN106649297A CN 106649297 A CN106649297 A CN 106649297A CN 201510430691 A CN201510430691 A CN 201510430691A CN 106649297 A CN106649297 A CN 106649297A
Authority
CN
China
Prior art keywords
audio
combining
tag
browser
page
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.)
Granted
Application number
CN201510430691.3A
Other languages
Chinese (zh)
Other versions
CN106649297B (en
Inventor
韦伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201510430691.3A priority Critical patent/CN106649297B/en
Publication of CN106649297A publication Critical patent/CN106649297A/en
Application granted granted Critical
Publication of CN106649297B publication Critical patent/CN106649297B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/951Indexing; Web crawling techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/60Information retrieval; Database structures therefor; File system structures therefor of audio data
    • G06F16/68Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Multimedia (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method for playing a webpage audio file. The method comprises the following steps of: a browser receives an audio tag triggering instruction, and obtains an audio tag which is triggered at present time in a current page; when combined audio corresponding to the audio tag which is triggered at present time is loaded, the corresponding time period of the audio tag which is triggered at present time in the combined audio is searched; and the audio data of the corresponding time period in the combined audio is played. The invention also discloses a browser and a server for playing the webpage audio file. By use of the browser, the audio data of the corresponding time period is directly searched and played in the combined audio of the loaded current page, and the combined audio is formed in advance in a way that the server arranges the audio data of a plurality of original audio files of the current page in sequence, and then, the audio data is edited and combined again according to a time sequence. Therefore, the browser does not need to send a loading request to the server, time for waiting for loading is effectively shortened, and audio playing delay is avoided.

Description

Method, browser and server that web-page audio file is played
Technical field
The present invention relates to Internet technical field, be related specifically to the broadcasting of web-page audio file method, Browser and server.
Background technology
At present, the browser of terminal may automatically play audio frequency after a webpage is opened on the webpage Or according to user's selection playing audio frequency, play every time before an audio file, all can automatic or manual The audio tag of the audio file is triggered, now, terminal is carried by the browser or client of system Browser to the server of webpage sends http (HyperText Transfer Protocol, Hyper text transfer association View) to ask, browser starts to load and play currently to be touched after the response for receiving server return The audio file corresponding to audio tag sent out.Can deposit due to sending request and loading the process of audio file Postpone in the regular hour, after some audio tag is triggered, after needing to wait for a bit of time, The audio file can be played.If the page has multiple different audio frequency, an audio frequency mark is triggered every time After label, browser is required for sending http request to server, and request every time is required for waiting one section after sending Time, just can complete to load and play audio frequency, the time to be loaded such as this undoubtedly increased, and cause audio frequency Playout-delay.
The content of the invention
The embodiment of the present invention provides method, the browser and server that a kind of web-page audio file is played, Webpage effectively reduces the time of wait when playing audio file, it is to avoid audio frequency playout-delay.
The embodiment of the present invention proposes a kind of method that web-page audio file is played, including step:
Browser receives audio tag triggering command, obtains the audio tag of this triggering in current page;
When the corresponding combining audio of the audio tag that this is triggered is loaded, the audio frequency of this triggering is searched Corresponding time period of the label in the combining audio;
Play the voice data of correspondence time period in the combining audio.
The embodiment of the present invention also proposes a kind of method that web-page audio file is played, including step:
Server obtains the corresponding original audio text of each audio tag on current page in database Part;
The voice data of multiple original audio files is arranged in order, and is compiled again sequentially in time Collect and merge into an audio file, as the combining audio of current page;
According to the duration of each original audio file, determine that each described original audio file exists The corresponding time period in the combining audio;
Corresponding time period of each described original audio file in the combining audio is original with described The audio tag of audio file sets up mapping relations.
The embodiment of the present invention also proposes the browser that a kind of web-page audio file is played, including:
Instruction module, for receiving audio tag triggering command, obtains the sound of this triggering in current page Frequency marking label;
Searching modul, for when the corresponding combining audio of the audio tag that this is triggered is loaded, searching Corresponding time period of the audio tag of this triggering in the combining audio;
Playing module, for playing the combining audio in correspondence the time period voice data.
The embodiment of the present invention also proposes the server that a kind of web-page audio file is played, including:
Editor module, it is corresponding original for obtaining each audio tag on current page in database Audio file;The voice data of multiple original audio files is arranged in order, and sequentially in time Update and merge into an audio file, as the combining audio of current page;
Mapping block, for according to the duration of each original audio file, determining described in each Corresponding time period of the original audio file in the combining audio;By each original audio file The corresponding time period in the combining audio sets up mapping pass with the audio tag of the original audio file System.
The browser of the embodiment of the present invention directly exists when the audio tag triggered according to this plays audio frequency Search in the combining audio of the current page for having loaded the audio tag corresponding time period of this triggering, and The voice data of correspondence time period in combining audio is played, the combining audio is in advance will be current by server The voice data of original multiple original audio files is arranged in order in the page, and sequentially in time again The audio file that editor merges, includes all audio tags of current page in combining audio No matter corresponding voice data, which audio tag of current page triggered, as long as browser has been carried Before be loaded with the combining audio of current page, browser just need not send load request, have to server again Effect the time to be loaded such as reduces, it is to avoid audio frequency playout-delay.
Description of the drawings
Fig. 1 is that the browser place terminal that web-page audio file is played in the embodiment of the present invention is handed over server Mutual running environment figure;
Fig. 2 is total line chart of the browser place terminal that web-page audio file is played in the embodiment of the present invention;
Fig. 3 is the flow process of the first embodiment that browser of the present invention realizes the method that web-page audio file is played Figure;
Fig. 4 is the flow process of the second embodiment that browser of the present invention realizes the method that web-page audio file is played Figure;
Fig. 5 is the flow process of the 3rd embodiment that browser of the present invention realizes the method that web-page audio file is played Figure;
Fig. 6 is the flow process of the first embodiment that server of the present invention realizes the method that web-page audio file is played Figure;
Fig. 7 is the flow process of the second embodiment that server of the present invention realizes the method that web-page audio file is played Figure;
Fig. 8 is the flow process of the 3rd embodiment that server of the present invention realizes the method that web-page audio file is played Figure;
Fig. 9 is the module diagram of the first embodiment of the browser that web-page audio file of the present invention is played;
Figure 10 is the module diagram of the second embodiment of the browser that web-page audio file of the present invention is played;
Figure 11 is the module diagram of the first embodiment of the server that web-page audio file of the present invention is played;
Figure 12 is the module diagram of the second embodiment of the server that web-page audio file of the present invention is played;
Figure 13 a are to generate the first embodiment of combining audio by multiple audio files in the embodiment of the present invention Schematic diagram;
Figure 13 b are to generate the second embodiment of combining audio by multiple audio files in the embodiment of the present invention Schematic diagram.
The realization of the object of the invention, functional characteristics and advantage will be done referring to the drawings further in conjunction with the embodiments Explanation.
Specific embodiment
It should be appreciated that specific embodiment described herein is not used to limit only to explain the present invention The fixed present invention.
With reference to Fig. 1, the browser that the web-page audio file that the present invention is provided is played is arranged on the terminal 100, Terminal 100 can be computer, PAD, mobile phone etc., and browser can be that the independent of installation in terminal 100 is browsed Device, alternatively installs the browser that application program on the terminal 100 is carried, and server 200 can be webpage Corresponding server, or the server for recoding to other webpages.The number that browser passes through terminal 100 It is connected with server 200 according to modes such as network, wifi, cable networks, realizes the interaction of data.
With reference to Fig. 2, Fig. 2 is the browser place terminal that web-page audio file is played in the embodiment of the present invention Total line chart, the terminal can include:At least one processor 101, such as CPU, at least one network connects Mouth 104, user interface 103, memory 105, at least one communication bus 102.Wherein, communication bus 102 are used to realize the connection communication between these components.Wherein, user interface 103 can include display screen (Display), keyboard (Keyboard), can also include wireline interface, the wave point of standard.Net Network interface 104 can include wireline interface, the wave point (such as WIFI interface) of standard.Memory 105 Can be high-speed RAM memory, or non-labile memory (non-volatile memory), For example, at least one magnetic disc store.Memory 105 can also be that at least one is located remotely from aforementioned processor 101 storage browser.Can be including operation as in a kind of memory 105 of computer-readable storage medium System, network communication module, Subscriber Interface Module SIM and web-page audio file playing program.
Shown in Fig. 2 web-page audio file play browser institute in the terminal, network interface 104 is led It is used for connection server or other-end, with server or other-end row data communication is entered;And user Interface 103 is mainly used in receive user instruction, and interacts with user;And processor 101 can be used In the web-page audio file playing program for calling storage in memory 105, and perform following operation:
Audio tag triggering command is received by user interface 103, this triggering in current page is obtained Audio tag;
When the corresponding combining audio of the audio tag that this is triggered is loaded, the audio frequency of this triggering is searched Corresponding time period of the label in combining audio;
Play the voice data of correspondence time period in combining audio.
In one embodiment, processor 101 calls the web-page audio file stored in memory 105 to play Program can also carry out following operation:
After into current page, the group of current page is loaded to server request by network interface 104 Synaeresis frequency;
The combining audio of the current page returned by the reception server of network interface 104.
In one embodiment, processor 101 calls the web-page audio file stored in memory 105 to play Program can also carry out following operation:
When the corresponding combining audio of the audio tag that this is triggered is not loaded, by network interface 104 to Server request loads combining audio;
The corresponding combination tone of audio tag of this triggering returned by the reception server of network interface 104 Frequently.
In the browser and server that web-page audio file described by the present embodiment Fig. 1 and Fig. 2 is played, Browser when the audio tag that triggered according to this plays audio frequency, directly in the current page for having loaded Search in combining audio the audio tag corresponding time period of this triggering, and play correspondence in combining audio The voice data of time period, the combining audio is in advance by server by original multiple originals in current page The voice data of beginning audio file is arranged in order, and updates for merging sequentially in time Audio file, includes the corresponding voice data of all audio tags of current page, nothing in combining audio By which audio tag of this triggering current page, as long as browser has been loaded with advance current page The combining audio in face, browser just need not send load request to server again, effectively reduce etc. to be added The time of load, it is to avoid audio frequency playout-delay.
As shown in figure 3, Fig. 3 is browser of the present invention realizing the first of the method that web-page audio file is played The flow chart of embodiment.The method that the web-page audio file that the present embodiment is mentioned is played, including:
Step S110, browser receives audio tag triggering command, obtains this triggering in current page Audio tag;
The present embodiment loads current page by the browser of terminal, if had in current page to be played Audio frequency, then have the audio tag corresponding to some audio frequency in the current page for loading, treats if multiple The audio frequency of broadcasting, then include multiple audio tags in the page.When some audio frequency is triggered, for example Audio tag " audio2 ", then browser get the information of the audio tag, mainly including the audio frequency mark Sign corresponding audio frequency ID " audio2 ".
Step S120, when the corresponding combining audio of the audio tag that this is triggered is loaded, searches this Corresponding time period of the audio tag of triggering in combining audio;
The corresponding audio frequency of each audio tag on current page is not independent multiple audio files, But in advance successively arranged the voice data of original multiple original audio files in current page by server Arrange, and update merging sequentially in time and form an audio file, i.e. combining audio, such as Figure 13 a It is shown.The data of multiple audio frequency on current page are included in the combining audio, according to each audio frequency Duration, determines corresponding time period of each audio frequency in combining audio.Browser get this touch Whether after the audio tag sent out, searching in the data for currently having loaded has the corresponding combination tone of the audio tag Frequently, if the combining audio is loaded, the audio tag that correspondence is triggered with this in combining audio is searched Time period.For example in Figure 13 a, the corresponding combining audio of audio tag " audio2 " is sprite1.mp3, The corresponding time period in combining audio is 8~14s.
Step S130, plays the voice data of correspondence time period in combining audio.
Browser plays combining audio after corresponding time period of the audio tag in combining audio is got In the voice data of the time period, the voice data of 8~14s such as in above-mentioned embodiment sprite1.mp3 should Data are the corresponding voice data of audio tag " audio2 " of this triggering, and finish playing the time period Voice data after, browser automatic pause play.If additionally, the duration of multiple audio frequency, goes back Can with data of being plugged a gap by the way of being left white, make each section audio data in combining audio it is initial when Between interval or terminate time interval it is all equal, as illustrated in fig. 13b, the initial time of each section audio data Time interval it is equal, be conducive to browser play audio frequency when be quickly found out this triggering audio tag Initial time, improve playing efficiency.
The browser of the present embodiment directly adds when the audio tag triggered according to this plays audio frequency The audio tag corresponding time period of this triggering is searched in the combining audio of the current page of load, and is played The voice data of correspondence time period in combining audio, the combining audio is in advance by server by current page In the voice data of original multiple original audio files be arranged in order, and update sequentially in time The audio file for merging, includes all audio tags correspondence of current page in combining audio Voice data, which audio tag of current page no matter triggered, as long as browser in advance plus The combining audio of current page is carried, browser just need not send load request, effectively subtract to server again The time to be loaded such as lack, it is to avoid audio frequency playout-delay.
As shown in figure 4, Fig. 4 is browser of the present invention realizing the second of the method that web-page audio file is played The flow chart of embodiment.The present embodiment includes all steps in embodiment illustrated in fig. 3, in step S110 Also include before:
Step S141, browser loads the group of current page after into current page to server request Synaeresis frequency;
Step S142, the combining audio of the current page that the reception server is returned.
In the present embodiment, browser checks on current page whether need to be broadcast after current page has been loaded The audio frequency put, if it has, in order to reduce the time waited during loading, browser sends to server and loads Request, loads in advance the combining audio of current page.Because server is in advance by current page Central Plains The voice data of the multiple original audio files having is arranged in order, and updates merging sequentially in time An audio file, therefore browser need not respectively send repeatedly for multiple original audio files Load request, repeated loading audio file, and only need to send load request successively, load a combination Audio frequency, effectively reduces time and the number of times of audio frequency loading.Meanwhile, after triggering audio tag, Browser only needs to the voice data of broadcasting audio tag correspondence time period in combining audio, without Again load request is sent to server, the time to be loaded such as effectively reduce, it is to avoid audio frequency broadcasting Postpone.
As shown in figure 5, Fig. 5 is browser of the present invention realizing the 3rd of the method that web-page audio file is played The flow chart of embodiment.The present embodiment includes all steps in embodiment illustrated in fig. 3, in step S110 Also include afterwards:
Step S151, when the corresponding combining audio of the audio tag that this is triggered is not loaded, to server Request of loading combining audio;
Step S152, the corresponding combining audio of audio tag of this triggering that the reception server is returned, and Execution step S120.
In the present embodiment, browser when current page is loaded, if other programs or current page Other assemblies take network, or current network is temporarily unstable, or user closes in advance loading group immediately The function of synaeresis frequency, or browser detects current page and temporarily switchs to running background, then browser can be temporary When be not loaded with the combining audio of current page, be conducive to avoiding in loading procedure in advance, taking current Internet resources, or load is caused to terminal.If browser is receiving the instruction that audio tag is triggered Afterwards, browser does not find the corresponding combining audio of audio tag, and now browser again please to server Loading combining audio is sought, if subsequently there are other audio tags to be triggered, due to being loaded with combination Audio frequency, browser only needs to play the audio tag being triggered again in combining audio the correspondence time period Voice data, without to server load request is sent again, when effectively reducing etc. to be loaded Between, it is to avoid audio frequency playout-delay.
As shown in fig. 6, Fig. 6 is server of the present invention realizing the first of the method that web-page audio file is played The flow chart of embodiment.The method that the web-page audio file that the present embodiment is mentioned is played, including step:
Step S210, server obtains the corresponding original of each audio tag on current page in database Beginning audio file;
The server of the present embodiment can be the corresponding server of current web page, or for other The server that webpage is recoded.It is each in original webpage when having audio frequency to be played in current web page The corresponding respective audio file of individual audio tag, i.e. original audio file in the present embodiment, these audio frequency File be stored in the database of server or the database of the original corresponding server of current web page in, clothes Business device gets the corresponding original audio file of these audio tags, an audio tag pair from database Answer an original audio file, such as audio1.mp3, audio2.mp3 shown in Figure 13 a and Figure 13 b, audio3.mp3。
Step S220, the voice data of multiple original audio files is arranged in order, and sequentially in time Update and merge into an audio file, as the combining audio of current page;
Server is arranged in order the voice data of the multiple original audio files in current page, and according to Time sequencing updates merging and forms an audio file, i.e. combining audio, such as Figure 13 a and Figure 13 b Shown sprite1.mp3.Audio combination mode can be processed using special audio editing instrument.
Step S230, according to the duration of each original audio file, determines each original audio file The corresponding time period in combining audio;
Step S240, the corresponding time period by each original audio file in combining audio and original sound The audio tag of frequency file sets up mapping relations.
The data of multiple audio frequency on current page are included in combining audio after updating, according to each The duration of individual audio frequency, determines corresponding time period of each audio frequency in combining audio, and sets up audio frequency mark Sign the mapping relations with the corresponding time period.For example in Figure 13 a, the corresponding combination of audio tag " audio3 " The time period of audio frequency is 14~22 seconds of sprite1.mp3.Consequently, it is possible to work as browser touched according to this When the audio tag sent out plays audio frequency, the sound of this triggering is directly searched in the combining audio of current page The frequency marking label corresponding time period, and the voice data of correspondence time period in combining audio is played, no matter trigger Which audio tag of current page, as long as browser has been loaded with advance the combination tone of current page Frequently, browser just need not send load request to server again, the time to be loaded such as effectively reduce, Avoid audio frequency playout-delay.
As shown in fig. 7, Fig. 7 is server of the present invention realizing the second of the method that web-page audio file is played The flow chart of embodiment.The present embodiment includes all steps in embodiment illustrated in fig. 6, in step S220 Also include afterwards:
Step S221, when corresponding time period of each original audio file in combining audio is unequal, Add clear data before correspondence time period shorter voice data in combining audio, in making combining audio The time interval of the termination time of adjacent two section audios data is equal;Or in the combining audio to correspondence when Between add clear data after the shorter voice data of section, make adjacent two section audios number in the combining audio According to initial time time interval it is equal.
In the present embodiment, if the duration of multiple audio frequency, can be being plugged a gap by the way of being left white Data, make the initial time interval of each section audio data in combining audio or termination time interval all equal, As illustrated in fig. 13b, the time period of the corresponding combining audio of audio tag " audio3 " is sprite1.mp3 16~24 seconds.The time interval of the initial time of each section audio data is equal, is conducive to browser to exist The initial time of the audio tag of this triggering is quickly found out when playing audio frequency, playing efficiency is improved.
As shown in figure 8, Fig. 8 is server of the present invention realizing the 3rd of the method that web-page audio file is played The flow chart of embodiment.The present embodiment includes all steps in embodiment illustrated in fig. 6, in step S240 Also include afterwards:
Step S251, receives the request of the combining audio of the loading current page that browser sends;
Step S252, the combining audio of current page and the audio frequency mark of current page are returned to browser Sign and the mapping relations between the corresponding time period of combining audio.
In the present embodiment, when server receives the load request of the combining audio of browser transmission, clothes The combining audio recombinated in advance is sent to browser by business device, while also sending audio tag to browser And its mapping relations in combining audio between the correspondence time period.Consequently, it is possible in this triggering audio frequency After label, browser only needs to play the audio tag of this triggering correspondence time period in combining audio Voice data, without to server load request is sent again, when effectively reducing etc. to be loaded Between, it is to avoid audio frequency playout-delay.
As shown in figure 9, Fig. 9 is the first embodiment of the browser that web-page audio file of the present invention is played Module diagram.The browser that the web-page audio file that the present embodiment is mentioned is played, including:
Instruction module 310, for receiving audio tag triggering command, obtains this triggering in current page Audio tag;
Searching modul 320, for when the corresponding combining audio of the audio tag that this is triggered is loaded, looking into Look for corresponding time period of the audio tag of this triggering in combining audio;
Playing module 330, for playing combining audio in correspondence the time period voice data.
The present embodiment loads current page by the browser of terminal, if had in current page to be played Audio frequency, then have the audio tag corresponding to some audio frequency in the current page for loading, treats if multiple The audio frequency of broadcasting, then include multiple audio tags in the page.When some audio frequency is triggered, for example Audio tag " audio2 ", then browser get the information of the audio tag, mainly including the audio frequency mark Sign corresponding audio frequency ID " audio2 ".
The corresponding audio frequency of each audio tag on current page is not independent multiple audio files, But in advance successively arranged the voice data of original multiple original audio files in current page by server Arrange, and update merging sequentially in time and form an audio file, i.e. combining audio, such as Figure 13 a It is shown.The data of multiple audio frequency on current page are included in the combining audio, according to each audio frequency Duration, determines corresponding time period of each audio frequency in combining audio.Browser get this touch Whether after the audio tag sent out, searching in the data for currently having loaded has the corresponding combination tone of the audio tag Frequently, if the combining audio is loaded, the audio tag that correspondence is triggered with this in combining audio is searched Time period.For example in Figure 13 a, the corresponding combining audio of audio tag " audio2 " is sprite1.mp3, The corresponding time period in combining audio is 8~14s.
Browser plays combining audio after corresponding time period of the audio tag in combining audio is got In the voice data of the time period, the voice data of 8~14s such as in above-mentioned embodiment sprite1.mp3 should Data are the corresponding voice data of audio tag " audio2 " of this triggering, and finish playing the time period Voice data after, browser automatic pause play.If additionally, the duration of multiple audio frequency, goes back Can with data of being plugged a gap by the way of being left white, make each section audio data in combining audio it is initial when Between interval or terminate time interval it is all equal, as illustrated in fig. 13b, the initial time of each section audio data Time interval it is equal, be conducive to browser play audio frequency when be quickly found out this triggering audio tag Initial time, improve playing efficiency.
The browser of the present embodiment directly adds when the audio tag triggered according to this plays audio frequency The audio tag corresponding time period of this triggering is searched in the combining audio of the current page of load, and is played The voice data of correspondence time period in combining audio, the combining audio is in advance by server by current page In the voice data of original multiple original audio files be arranged in order, and update sequentially in time The audio file for merging, includes all audio tags correspondence of current page in combining audio Voice data, which audio tag of current page no matter triggered, as long as browser in advance plus The combining audio of current page is carried, browser just need not send load request, effectively subtract to server again The time to be loaded such as lack, it is to avoid audio frequency playout-delay.
As shown in Figure 10, Figure 10 is the second embodiment of the browser that web-page audio file of the present invention is played Module diagram.The present embodiment includes all modules in embodiment illustrated in fig. 9, also including browser Mixed-media network modules mixed-media 340, is used for:
After into current page, to server request the combining audio of current page is loaded;
The combining audio of the current page that the reception server is returned.
In the present embodiment, browser checks on current page whether need to be broadcast after current page has been loaded The audio frequency put, if it has, in order to reduce the time waited during loading, browser sends to server and loads Request, loads in advance the combining audio of current page.Because server is in advance by current page Central Plains The voice data of the multiple original audio files having is arranged in order, and updates merging sequentially in time An audio file, therefore browser need not respectively send repeatedly for multiple original audio files Load request, repeated loading audio file, and only need to send load request successively, load a combination Audio frequency, effectively reduces time and the number of times of audio frequency loading.Meanwhile, after triggering audio tag, Browser only needs to the voice data of broadcasting audio tag correspondence time period in combining audio, without Again load request is sent to server, the time to be loaded such as effectively reduce, it is to avoid audio frequency broadcasting Postpone.
Further, browser mixed-media network modules mixed-media 340 is additionally operable to:
When the corresponding combining audio of the audio tag that this is triggered is not loaded, to server request loading group Synaeresis frequency;
The corresponding combining audio of audio tag of this triggering that the reception server is returned.
In the present embodiment, browser when current page is loaded, if other programs or current page Other assemblies take network, or current network is temporarily unstable, or user closes in advance loading group immediately The function of synaeresis frequency, or browser detects current page and temporarily switchs to running background, then browser can be temporary When be not loaded with the combining audio of current page, be conducive to avoiding in loading procedure in advance, taking current Internet resources, or load is caused to terminal.If browser is receiving the instruction that audio tag is triggered Afterwards, browser does not find the corresponding combining audio of audio tag, and now browser again please to server Loading combining audio is sought, if subsequently there are other audio tags to be triggered, due to being loaded with combination Audio frequency, browser only needs to play the audio tag being triggered again in combining audio the correspondence time period Voice data, without to server load request is sent again, when effectively reducing etc. to be loaded Between, it is to avoid audio frequency playout-delay.
As shown in figure 11, Figure 11 is the first embodiment of the server that web-page audio file of the present invention is played Module diagram.The server that the web-page audio file that the present embodiment is mentioned is played, including:
Editor module 210, for obtaining the corresponding original of each audio tag on current page in database Beginning audio file;The voice data of multiple original audio files is arranged in order, and is weighed sequentially in time New edited merges into an audio file, used as the combining audio of current page;
Mapping block 220, for according to the duration of each original audio file, determining each original sound Corresponding time period of the frequency file in combining audio;By each original audio file in combining audio The correspondence time period sets up mapping relations with the audio tag of original audio file.
The server of the present embodiment can be the corresponding server of current web page, or for other The server that webpage is recoded.It is each in original webpage when having audio frequency to be played in current web page The corresponding respective audio file of individual audio tag, i.e. original audio file in the present embodiment, these audio frequency File be stored in the database of server or the database of the original corresponding server of current web page in, clothes Business device gets the corresponding original audio file of these audio tags, an audio tag pair from database Answer an original audio file, such as audio1.mp3, audio2.mp3 shown in Figure 13 a and Figure 13 b, audio3.mp3。
Server is arranged in order the voice data of the multiple original audio files in current page, and according to Time sequencing updates merging and forms an audio file, i.e. combining audio, such as Figure 13 a and Figure 13 b Shown sprite1.mp3.Audio combination mode can be processed using special audio editing instrument.
The data of multiple audio frequency on current page are included in combining audio after updating, according to each The duration of individual audio frequency, determines corresponding time period of each audio frequency in combining audio, and sets up audio frequency mark Sign the mapping relations with the corresponding time period.For example in Figure 13 a, the corresponding combination of audio tag " audio3 " The time period of audio frequency is 14~22 seconds of sprite1.mp3.Consequently, it is possible to work as browser touched according to this When the audio tag sent out plays audio frequency, the sound of this triggering is directly searched in the combining audio of current page The frequency marking label corresponding time period, and the voice data of correspondence time period in combining audio is played, no matter trigger Which audio tag of current page, as long as browser has been loaded with advance the combination tone of current page Frequently, browser just need not send load request to server again, the time to be loaded such as effectively reduce, Avoid audio frequency playout-delay.
Further, editor module 210 is additionally operable to, when each described original audio file is in the combination When the corresponding time period in audio frequency is unequal, the correspondence time period shorter audio frequency number in the combining audio According to clear data is added before, make adjacent two section audios data in the combining audio the termination time when Between be spaced it is equal;Or addition is blank after correspondence time period shorter voice data in the combining audio Data, make the time interval of the initial time of adjacent two section audios data in the combining audio equal.
In the present embodiment, if the duration of multiple audio frequency, can be being plugged a gap by the way of being left white Data, make the initial time interval of each section audio data in combining audio or termination time interval all equal, As illustrated in fig. 13b, the time period of the corresponding combining audio of audio tag " audio3 " is sprite1.mp3 16~24 seconds.The time interval of the initial time of each section audio data is equal, is conducive to browser to exist The initial time of the audio tag of this triggering is quickly found out when playing audio frequency, playing efficiency is improved.
As shown in figure 12, Figure 12 is the second embodiment of the server that web-page audio file of the present invention is played Module diagram.The present embodiment includes all modules in embodiment illustrated in fig. 11, also including server Mixed-media network modules mixed-media 230, is used for:
Receive the request of the combining audio of the loading current page that browser sends;
The combining audio of current page and the audio tag and combination tone of current page are returned to browser Mapping relations between the corresponding time period of frequency.
In the present embodiment, when server receives the load request of the combining audio of browser transmission, clothes The combining audio recombinated in advance is sent to browser by business device, while also sending audio tag to browser And its mapping relations in combining audio between the correspondence time period.Consequently, it is possible in this triggering audio frequency After label, browser only needs to play the audio tag of this triggering correspondence time period in combining audio Voice data, without to server load request is sent again, when effectively reducing etc. to be loaded Between, it is to avoid audio frequency playout-delay.
It should be noted that herein, term " including ", "comprising" or its any other variant Be intended to including for nonexcludability so that process, method, article including a series of key elements or Person's browser not only includes those key elements, but also including other key elements being not expressly set out, or Also include the key element intrinsic for this process, method, article or browser.Without more restrictions In the case of, the key element limited by sentence "including a ...", it is not excluded that including the key element Also there is other identical element in process, method, article or browser.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that above-mentioned Embodiment method can add the mode of required general hardware platform to realize by software, naturally it is also possible to logical Cross hardware, but in many cases the former is more preferably embodiment.It is of the invention based on such understanding The part that technical scheme substantially contributes in other words to prior art can in the form of software product body Reveal and, the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disc, light Disk) in, including some instructions are used so that a station terminal equipment (can be mobile phone, computer is serviced Device, or the network equipment etc.) perform method described in each embodiment of the invention.
The preferred embodiments of the present invention are the foregoing is only, the scope of the claims of the present invention is not thereby limited, Equivalent structure or equivalent flow conversion that every utilization description of the invention and accompanying drawing content are made, or directly Or other related technical fields are used in indirectly, it is included within the scope of the present invention.

Claims (14)

1. a kind of method that web-page audio file is played, it is characterised in that including step:
Browser receives audio tag triggering command, obtains the audio tag of this triggering in current page;
When the corresponding combining audio of the audio tag that this is triggered is loaded, the audio frequency of this triggering is searched Corresponding time period of the label in the combining audio;
Play the voice data of correspondence time period in the combining audio.
2. the method that web-page audio file as claimed in claim 1 is played, it is characterised in that described group Synaeresis frequency is to be arranged in order by the voice data of multiple original audio files in current page and suitable according to the time Sequence updates the audio file for merging.
3. the method that web-page audio file as claimed in claim 2 is played, it is characterised in that described clear Device of looking at receive audio tag triggering command, obtain current page in this triggering audio tag the step of it It is front also to include:
Browser loads the combining audio of current page after into current page to server request;
The combining audio of the current page that the reception server is returned.
4. the method that web-page audio file as claimed in claim 2 or claim 3 is played, it is characterised in that institute State browser and receive audio tag triggering command, obtain the step of the audio tag of this triggering in current page Also include after rapid:
When the corresponding combining audio of the audio tag that this is triggered is not loaded, to server request institute is loaded State combining audio;
The corresponding combining audio of audio tag of this triggering that the reception server is returned, and look into described in performing The step of looking for corresponding time period of the audio tag of this triggering in the combining audio.
5. a kind of method that web-page audio file is played, it is characterised in that including step:
Server obtains the corresponding original audio text of each audio tag on current page in database Part;
The voice data of multiple original audio files is arranged in order, and is compiled again sequentially in time Collect and merge into an audio file, as the combining audio of current page;
According to the duration of each original audio file, determine that each described original audio file exists The corresponding time period in the combining audio;
Corresponding time period of each described original audio file in the combining audio is original with described The audio tag of audio file sets up mapping relations.
6. the method that web-page audio file as claimed in claim 5 is played, it is characterised in that described to incite somebody to action The voice data of multiple original audio files is arranged in order, and updates merging sequentially in time For an audio file the step of after also include:
When corresponding time period of each described original audio file in the combining audio is unequal, Add clear data before correspondence time period shorter voice data in the combining audio, make the combination The time interval of the termination time of adjacent two section audios data is equal in audio frequency;Or in the combining audio Add clear data after correspondence time period shorter voice data, make adjacent two sections in the combining audio The time interval of the initial time of voice data is equal.
7. the method that the web-page audio file as described in claim 5 or 6 is played, it is characterised in that institute State the corresponding time period by each original audio file in the combining audio and the original sound Also include after the step of audio tag of frequency file sets up mapping relations:
Receive the request of the combining audio of the loading current page that browser sends;
The combining audio of current page and audio tag and the institute of current page are returned to the browser Mapping relations between the corresponding time period for stating combining audio.
8. the browser that a kind of web-page audio file is played, it is characterised in that include:
Instruction module, for receiving audio tag triggering command, obtains the sound of this triggering in current page Frequency marking label;
Searching modul, for when the corresponding combining audio of the audio tag that this is triggered is loaded, searching Corresponding time period of the audio tag of this triggering in the combining audio;
Playing module, for playing the combining audio in correspondence the time period voice data.
9. the browser that web-page audio file as claimed in claim 8 is played, it is characterised in that described Combining audio was arranged in order by the voice data of multiple original audio files in current page and according to the time Order updates the audio file for merging.
10. the browser that web-page audio file as claimed in claim 9 is played, it is characterised in that also Including browser mixed-media network modules mixed-media, it is used for:
After into current page, to server request the combining audio of current page is loaded;
The combining audio of the current page that the reception server is returned.
The browser that 11. web-page audio files as claimed in claim 10 are played, it is characterised in that institute State browser mixed-media network modules mixed-media to be additionally operable to:
When the corresponding combining audio of the audio tag that this is triggered is not loaded, to server request institute is loaded State combining audio;
The corresponding combining audio of audio tag of this triggering that the reception server is returned.
The server that a kind of 12. web-page audio files are played, it is characterised in that include:
Editor module, it is corresponding original for obtaining each audio tag on current page in database Audio file;The voice data of multiple original audio files is arranged in order, and sequentially in time Update and merge into an audio file, as the combining audio of current page;
Mapping block, for according to the duration of each original audio file, determining described in each Corresponding time period of the original audio file in the combining audio;By each original audio file The corresponding time period in the combining audio sets up mapping pass with the audio tag of the original audio file System.
The server that 13. web-page audio files as claimed in claim 12 are played, it is characterised in that institute State editor module to be additionally operable to:
When corresponding time period of each described original audio file in the combining audio is unequal, Add clear data before correspondence time period shorter voice data in the combining audio, make the combination The time interval of the termination time of adjacent two section audios data is equal in audio frequency;Or in the combining audio Add clear data after correspondence time period shorter voice data, make adjacent two sections in the combining audio The time interval of the initial time of voice data is equal.
The server that the 14. web-page audio files as described in claim 12 or 13 are played, its feature exists In also including server network module, being used for:
Receive the request of the combining audio of the loading current page that browser sends;
The combining audio of current page and audio tag and the institute of current page are returned to the browser Mapping relations between the corresponding time period for stating combining audio.
CN201510430691.3A 2015-07-21 2015-07-21 Method for playing webpage audio file, browser and server Active CN106649297B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510430691.3A CN106649297B (en) 2015-07-21 2015-07-21 Method for playing webpage audio file, browser and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510430691.3A CN106649297B (en) 2015-07-21 2015-07-21 Method for playing webpage audio file, browser and server

Publications (2)

Publication Number Publication Date
CN106649297A true CN106649297A (en) 2017-05-10
CN106649297B CN106649297B (en) 2021-06-25

Family

ID=58815128

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510430691.3A Active CN106649297B (en) 2015-07-21 2015-07-21 Method for playing webpage audio file, browser and server

Country Status (1)

Country Link
CN (1) CN106649297B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112579039A (en) * 2020-12-25 2021-03-30 福州掌中云科技有限公司 Method and equipment for automatically playing audio of H5 page based on WeChat
CN115357211A (en) * 2022-10-19 2022-11-18 北京尽微致广信息技术有限公司 Audio playing method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000043999A2 (en) * 1999-01-22 2000-07-27 Sony Electronics, Inc. Method and apparatus for synchronizing playback of multiple media types over networks having different transmission characteristics
CN102156713A (en) * 2011-03-11 2011-08-17 上海全景数字技术有限公司 Multimedia playing method based on embedded equipment
CN102812452A (en) * 2010-09-07 2012-12-05 Sk普兰尼特有限公司 System for displaying cached webpages, a server therefor, a terminal therefor, a method therefor and a computer-readable recording medium on which the method is recorded
CN102929971A (en) * 2012-10-15 2013-02-13 长春指南针科技有限公司 Multimedia information playing method and system
CN103618942A (en) * 2013-12-16 2014-03-05 乐视致新电子科技(天津)有限公司 Smart television, as well as method and device for playing browser webpage video of smart television
CN104410914A (en) * 2014-11-03 2015-03-11 乐视网信息技术(北京)股份有限公司 Method, device and terminal for playing multimedia contents

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000043999A2 (en) * 1999-01-22 2000-07-27 Sony Electronics, Inc. Method and apparatus for synchronizing playback of multiple media types over networks having different transmission characteristics
CN102812452A (en) * 2010-09-07 2012-12-05 Sk普兰尼特有限公司 System for displaying cached webpages, a server therefor, a terminal therefor, a method therefor and a computer-readable recording medium on which the method is recorded
CN102156713A (en) * 2011-03-11 2011-08-17 上海全景数字技术有限公司 Multimedia playing method based on embedded equipment
CN102929971A (en) * 2012-10-15 2013-02-13 长春指南针科技有限公司 Multimedia information playing method and system
CN103618942A (en) * 2013-12-16 2014-03-05 乐视致新电子科技(天津)有限公司 Smart television, as well as method and device for playing browser webpage video of smart television
CN104410914A (en) * 2014-11-03 2015-03-11 乐视网信息技术(北京)股份有限公司 Method, device and terminal for playing multimedia contents

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112579039A (en) * 2020-12-25 2021-03-30 福州掌中云科技有限公司 Method and equipment for automatically playing audio of H5 page based on WeChat
CN115357211A (en) * 2022-10-19 2022-11-18 北京尽微致广信息技术有限公司 Audio playing method and device

Also Published As

Publication number Publication date
CN106649297B (en) 2021-06-25

Similar Documents

Publication Publication Date Title
US10839038B2 (en) Generating configuration information for obtaining web resources
US8468145B2 (en) Indexing of URLs with fragments
CN107944025A (en) Information-pushing method and device
CN107688488B (en) Metadata-based task scheduling optimization method and device
CN113055451B (en) Resource downloading method and device, electronic equipment and storage medium
US11310066B2 (en) Method and apparatus for pushing information
CN107276842B (en) Interface test method and device and electronic equipment
WO2017107831A1 (en) Application based broadcasting method, device and electronic device
CN104199851A (en) Method for extracting telephone numbers according to yellow page information and cloud server
CN107832100A (en) A kind of loading method and its terminal of APK plug-in units
CN103618936A (en) Smart television, as well as method and device for pre-downloading link pages in browser of smart television
CN105867714A (en) Application downloading method, apparatus and system
CN103699554A (en) Webpage data calling method and device
WO2016173185A1 (en) Information pushing method and apparatus
CN101103341A (en) Electronic document display device and method
CN109308337A (en) Page sharing method and device
CN104598571A (en) Method and device for playing multimedia resource
CN103593233A (en) Method and system for pushing software information
CN104699795A (en) Method and device for pushing videos
CN104753922A (en) Method for pre-loading, server side, client and system
CN104536974B (en) The method and browser client of information are searched in a browser
CN109343908A (en) A kind of method and apparatus of delay loading JS script
CN103123651A (en) Method of rapidly searching multiple same-kind paper, device and mobile equipment
CN106649297A (en) Method, browser and server for playing webpage audio file
CN105989152A (en) Search engine service quality monitoring methods, apparatus and system

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
GR01 Patent grant
GR01 Patent grant