[go: up one dir, main page]

CN110286873B - Webpage audio playing method and device, computer equipment and storage medium - Google Patents

Webpage audio playing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN110286873B
CN110286873B CN201910530693.8A CN201910530693A CN110286873B CN 110286873 B CN110286873 B CN 110286873B CN 201910530693 A CN201910530693 A CN 201910530693A CN 110286873 B CN110286873 B CN 110286873B
Authority
CN
China
Prior art keywords
webpage
audio
target
playing
jump
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.)
Active
Application number
CN201910530693.8A
Other languages
Chinese (zh)
Other versions
CN110286873A (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.)
Shenzhen Micro Course Technology Co ltd
Original Assignee
Shenzhen Micro Course Technology 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 Shenzhen Micro Course Technology Co ltd filed Critical Shenzhen Micro Course Technology Co ltd
Priority to CN201910530693.8A priority Critical patent/CN110286873B/en
Publication of CN110286873A publication Critical patent/CN110286873A/en
Application granted granted Critical
Publication of CN110286873B publication Critical patent/CN110286873B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • 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/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/972Access to data in other repository systems, e.g. legacy data or dynamic Web page generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/167Audio in a user interface, e.g. using voice commands for navigating, audio feedback
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4782Web browsing, e.g. WebTV

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a webpage audio playing method, a webpage audio playing device, computer equipment and a storage medium, wherein the method comprises the following steps: when a webpage jump request is received, responding to the webpage jump request, acquiring a target element of a target webpage uniquely marked by a webpage identifier, replacing other elements in the original webpage with the target element, playing or pausing the target audio by using an audio component in the original webpage when the webpage jump request is a direct webpage jump request, and sending a waiting interface deletion instruction, an output mode, the target webpage and the target audio which is being played or paused to a client according to a playing record of a storage layer in the original webpage when the webpage jump request is an indirect webpage jump request, so that the audio can be normally played or paused when a webpage jumps to another webpage, the condition that an audio component is added in each webpage is avoided, and the labor cost is reduced.

Description

Webpage audio playing method and device, computer equipment and storage medium
Technical Field
The present invention relates to the field of data processing, and in particular, to a method and an apparatus for playing web page audio, a computer device, and a storage medium.
Background
With the continuous development of WEB technology, the functions of WEB pages are more and more improved, and especially, the function of playing audio in WEB pages is more and more improved.
In the web page adopting the HTML5 technology, a function of enabling the client to play audio without installing any audio software player is realized, but when jumping from one web page playing audio to another, the audio cannot be played normally. In the prior art, the IFRAME technology can be used to realize the normal continuous playing of audio, but the original structure of the webpage can be destroyed, and unpredictable influence is brought to the stability, so that the stability of audio playing is low, and meanwhile, an audio component needs to be added in each webpage, and the labor cost is too high.
Therefore, it is an urgent need to solve the above-mentioned problems for those skilled in the art to find a stable audio playing method with low labor cost.
Disclosure of Invention
In view of the above, it is desirable to provide an audio playing method, an audio playing apparatus, a computer device, and a storage medium, which can improve stability and reduce labor cost.
A webpage audio playing method comprises the following steps:
receiving a webpage jump request initiated in an original webpage by a user, wherein the original webpage comprises an audio component for playing a target audio, a storage layer for storing the target audio and a play record of the target audio and other elements, the other elements are elements in the original webpage except the webpage storage layer and the audio component, and the webpage jump request comprises the play record and a webpage identifier of a target webpage to be jumped;
responding to the webpage jump request, and simultaneously sending a webpage jump waiting instruction and a jump waiting interface to the client so that the client displays the jump waiting interface according to the webpage jump waiting instruction;
calling a act-router routing system, and acquiring a target element of the target webpage uniquely marked by the webpage identifier by adopting the act-router routing system;
replacing the other elements in the original webpage with the target elements to obtain the replaced original webpage as the target webpage;
determining that the webpage jump request is a direct webpage jump request or an indirect webpage jump request;
when the webpage jump request is the direct webpage jump request, the target audio is played by adopting the audio component according to the sequence from the starting node to the ending node of the target audio;
when the webpage skipping request is the indirect webpage skipping request, playing or pausing the target audio by adopting the audio component according to the playing record;
and sending a waiting interface deleting instruction, a preset output mode, the target webpage and the target audio which is being played or paused to the client, so that the client deletes the jump waiting interface according to the waiting interface deleting instruction, and simultaneously outputs the target webpage and the target audio which is being played or paused according to the output mode.
A web page audio playback apparatus, comprising:
the system comprises a receiving module, a processing module and a display module, wherein the receiving module is used for receiving a webpage jump request initiated in an original webpage by a user, the original webpage comprises an audio component used for playing a target audio, a storage layer used for storing the target audio and a playing record of the target audio and other elements, the other elements are elements in the original webpage except the webpage storage layer and the audio component, and the webpage jump request comprises the playing record and a webpage identifier of a target webpage to be jumped;
the response module is used for responding to the webpage jump request and simultaneously sending a webpage jump waiting instruction and a jump waiting interface to the client so that the client displays the jump waiting interface according to the webpage jump waiting instruction;
the acquisition module is used for calling a act-router routing system and acquiring the target element of the target webpage uniquely marked by the webpage identifier by adopting the act-router routing system;
the replacing module is used for replacing the other elements in the original webpage by the target elements to obtain the replaced original webpage as the target webpage;
the determining module is used for determining that the webpage jump request is a direct webpage jump request or an indirect webpage jump request;
the playing module is used for playing the target audio by adopting the audio component according to the sequence from the starting node to the ending node of the target audio when the webpage jump request is the direct webpage jump request;
the control module is used for playing or pausing the target audio by adopting the audio component according to the playing record when the webpage skipping request is the indirect webpage skipping request;
and the sending module is used for sending a waiting interface deleting instruction, a preset output mode, the target webpage and the target audio which is being played or paused to the client, so that the client deletes the jump waiting interface according to the waiting interface deleting instruction and outputs the target webpage and the target audio which is being played or paused according to the output mode.
A computer device comprises a memory, a processor and a computer program stored in the memory and operable on the processor, wherein the processor implements the steps of the above-mentioned web page audio playing method when executing the computer program.
A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, implements the steps of the above-mentioned web page audio playing method.
In the method, the device, the computer equipment and the storage medium for playing the webpage audio, when a webpage jump request initiated by a user in an original webpage is received, the webpage jump request is responded, a target element of a target webpage uniquely marked by a webpage identifier is acquired according to the webpage identifier in the webpage jump request, then other elements in the original webpage are replaced by the target element to obtain the target webpage, then the webpage jump request is determined to be a direct webpage jump request or an indirect webpage jump request, when the webpage jump request is the direct webpage jump request, namely, when the user sends the request by adopting a refreshing mechanism, the target audio is played by adopting an audio component in the original webpage according to the sequence from a starting node to an ending node of the target audio, when the webpage jump request is the indirect webpage jump request, namely, when the user sends the request by adopting a non-refreshing mechanism, according to the playing record of a storage layer in an original webpage, playing or pausing a target audio by adopting an audio component in the original webpage, and finally sending a waiting interface deleting instruction, an output mode, the target webpage and the playing or paused target audio to a client so that the client deletes a jump waiting interface according to the waiting interface deleting instruction and outputs the target webpage and the playing or paused target audio according to the output mode, thereby ensuring that the audio can be normally played or paused when jumping from one webpage to another webpage, avoiding the condition that the original structure and the instability of the webpage are damaged when the audio is played or paused in the traditional method, simultaneously realizing the audio playing or pausing on different webpages by only adopting one audio component, and avoiding the condition that the audio component is added in each webpage, the labor cost is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
FIG. 1 is a schematic diagram of an application environment of a method for playing web page audio according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for playing web page audio according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating the step S70 of the method for playing web page audio according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an exemplary embodiment of a web page audio playing device;
FIG. 5 is a schematic diagram of a computer device according to an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The webpage audio playing method provided by the application can be applied to the application environment shown in fig. 1, wherein the application environment comprises a server and a client, and the client communicates with the server through a wired network or a wireless network. Among other things, the client may be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented by an independent server or a server cluster composed of a plurality of servers. The client is used for sending a webpage jump request, and the server is used for responding to the webpage jump request and controlling audio playing or pausing.
In an embodiment, as shown in fig. 2, a method for playing a webpage audio is provided, which is described by taking the application of the method to the server in fig. 1 as an example, and includes the following steps:
s10, receiving a webpage jump request initiated by a user in an original webpage, wherein the original webpage comprises an audio component for playing a target audio, a storage layer for storing the target audio and a play record of the target audio and other elements, the other elements are elements in the original webpage except the webpage storage layer and the audio component, and the webpage jump request comprises the play record and a webpage identifier of a target webpage to be jumped.
Specifically, a user initiates a webpage jump request for a target webpage in an original webpage through a client, and a server receives the webpage jump request in real time or at intervals of a preset time period. The webpage jump request is a request for webpage jump, the original webpage comprises an audio component for playing target audio, a storage layer for storing the target audio and a play record of the target audio and other elements, the other elements are elements except the webpage storage layer and the audio component in the original webpage, and the webpage jump request comprises the play record and a webpage identifier of the target webpage to be jumped.
It is understood that the target audio may be music, conference recording, or the like, the play record is a record for playing the target audio, the play record includes a current play time length and a current control state, the current play time length is a time length of the played audio between a start node of the target audio and a current play node, for example, the current play time length may be 1 minute or 2 minutes, and the current control state is a current control state of the target audio, and the current control state may be a play state or a pause state. The storage layer generally refers to a component layer for storing the target audio and a playback record of the target audio in the web page, for example, the storage layer may be a header in an HTML5 web page, preferably, the header, and the Chinese name is a header entity, and in general, the header exists in an encoded form, the header is not displayed in the man-machine interaction interface, and the other elements may be body content or a navigation bar, for example, the other elements may be a body in an HTML5 web page, preferably, the body, and the Chinese name is a body, and the web page identifier is used to uniquely identify the target web page.
And S20, responding to the webpage jump request, and simultaneously sending the webpage jump waiting instruction and the jump waiting interface to the client so that the client displays the jump waiting interface according to the webpage jump waiting instruction.
Specifically, when the server receives the web page jump request in step S10, the server responds to the web page jump request, and sends the web page jump waiting instruction and the jump waiting interface to the client, and when the client receives the web page jump waiting instruction and the jump waiting interface, the client performs display processing on the jump waiting interface by using a browser or an application rendering function according to the web page jump waiting instruction, so that the user can browse the jump waiting interface through the human-computer interaction interface of the client.
It should be noted that the web page jump waiting instruction is that the jump waiting interface may be a circling waiting picture or other waiting interfaces, and the specific content of the jump waiting interface may be set according to the practical application, which is not limited herein.
S30, calling the act-router routing system, and acquiring the target element of the target webpage uniquely marked by the webpage identifier by adopting the act-router routing system.
Specifically, in order to accurately obtain the target webpage, the server invokes a act-router routing system, and uses the act-router routing system to locate the target webpage according to the correspondence between the webpage identifier of the webpage jump request received in step S10 and the target webpage, then obtains a storage path of the target element corresponding to the target webpage in a preset element database, then obtains the target element according to the storage path, that is, obtains a storage path of the target text content corresponding to the target webpage, and then obtains the target text content according to the storage path, wherein the act-router routing system is a routing system for accurately jumping to the target webpage in a browser, and when the current URL of the browser changes, the routing system can be invoked to ensure the synchronization between the current interface and the URL, the web page identification uniquely identifies the target web page.
It should be noted that the element database may be an SQL database or an oracle database, and the specific content of the element database may be set according to the actual application, which is not limited herein.
And S40, replacing other elements in the original webpage with the target elements to obtain the replaced original webpage as the target webpage.
Specifically, the server replaces other elements in the original web page with the target element obtained in step S30 to obtain a replaced original web page, and determines the replaced original web page as the target web page.
For example, assuming that the target element is "69 days of continuous learning and 7 days of cumulative record", and the other elements are "13: 03 remains to be learned and 1 credit is obtained for this learning", the server replaces "13: 03 remains to be learned and 1 credit is obtained for this learning" in the original web page by the server in step S30, and obtains the replaced original web page, and determines the replaced original web page as the target web page.
It should be noted that specific contents of the target element or other elements may be set according to practical applications, and are not limited herein.
And S50, determining the webpage jump request as a direct webpage jump request or an indirect webpage jump request.
Specifically, the server determines that the web page jump request acquired in step S10 is a direct web page jump request or an indirect web page jump request, that is, the server determines whether the web page jump request is a request sent from a web page search field or a request sent from a non-web page search field, so as to load the web page content subsequently by using different loading methods according to different request modes.
It should be noted that the direct webpage jump request can play a role in forcibly refreshing the webpage, and the indirect webpage jump request cannot embody the role in forcibly refreshing the webpage.
And S60, when the webpage jump request is a direct webpage jump request, playing the target audio by adopting an audio component according to the sequence from the start node to the end node of the target audio.
Specifically, when the web page jump request obtained in step S10 is a direct web page jump request, the server obtains all contents of the target audio from the storage layer of the original web page, and then uses the audio component in the original web page to play the target audio according to the sequence from the start node to the end node of the target audio, that is, uses the audio component in the original web page to play the target audio from the head to the tail of the target audio.
Wherein, the start node is the head of the target audio, and the end node is the tail of the target audio.
And S70, when the webpage jump request is an indirect webpage jump request, playing or pausing the target audio by adopting the audio component according to the playing record.
Specifically, when the web page jump request obtained in step S10 is an indirect web page jump request, the server uses the audio component to play or pause the target audio according to the play record in the storage layer, that is, before the user sends the web page jump request through the client, if the control state of the target audio is the play state, the server uses the audio component to play the target audio according to the play record in the storage layer, and if the control state of the target audio is the pause state, the server uses the audio component to pause the target audio according to the play record in the storage layer.
And S80, sending the command for deleting the waiting interface, the preset output mode, the target webpage and the target audio which is being played or paused to the client, so that the client deletes the jump waiting interface according to the command for deleting the waiting interface and outputs the target webpage and the target audio which is being played or paused according to the output mode.
Specifically, the server first obtains an output mode from a preset mode database, and then sends a wait interface deleting instruction, the obtained output mode, the target webpage generated in step S40 and the playing or paused target audio to the client, when the client receives the wait interface deleting instruction, the output mode, the target webpage and the playing or paused target audio, the client deletes the jump wait interface according to the wait interface deleting instruction, and simultaneously outputs the target webpage and the playing or paused target audio according to the output mode, that is, the client displays the target webpage according to the display mode, for example, displays the target webpage by using the rendering function of the browser, and outputs the sound to the playing or paused target audio according to the propagation mode, for example, starting a sound card of the computer, outputting the target audio which is playing or paused, so that the user can browse the target webpage through the man-machine interaction interface of the client, or listen to the target audio.
In the embodiment corresponding to fig. 2, through the above steps S10 to S80, when a web page jump request initiated by a user in an original web page is received, the web page jump request is responded, a target element of a target web page uniquely marked by a web page identifier is obtained according to the web page identifier in the web page jump request, then other elements in the original web page are replaced by the target element to obtain a target web page, it is determined that the web page jump request is a direct web page jump request or an indirect web page jump request, when the web page jump request is a direct web page jump request, that is, when the user issues a request by using a refresh mechanism, an audio component in the original web page is used to play a target audio according to the sequence from a start node to an end node of the target audio, when the web page jump request is an indirect web page jump request, that is, when the user issues a request by using a non-refresh, according to the playing record of a storage layer in an original webpage, playing or pausing a target audio by adopting an audio component in the original webpage, and finally sending a waiting interface deleting instruction, an output mode, the target webpage and the playing or paused target audio to a client so that the client deletes a jump waiting interface according to the waiting interface deleting instruction and outputs the target webpage and the playing or paused target audio according to the output mode, thereby ensuring that the audio can be normally played or paused when jumping from one webpage to another webpage, avoiding the condition that the original structure and the instability of the webpage are damaged when the audio is played or paused in the traditional method, simultaneously realizing the audio playing or pausing on different webpages by only adopting one audio component, and avoiding the condition that the audio component is added in each webpage, the labor cost is reduced.
In an embodiment, the playing record includes the current playing time length and the current control state of the target audio, as shown in fig. 3, step S70, that is, according to the playing record, the audio component is used to play or pause the target audio, which specifically includes the following steps:
and S701, acquiring the total duration of the target audio.
Specifically, the server first obtains a storage path of the total duration of the target audio from the duration database, and then obtains the total duration according to the storage path, so as to be used for determining the current playing position in the following, for example, the total duration is 30 minutes and the like, where the total duration is stored in the duration database in advance and is in a state of being able to be called at any time.
It is understood that the total duration is the duration of the target audio from the start node to the end node.
S702, determining the current playing position of the target audio according to the total time length and the current playing time length.
Specifically, the server first obtains the current playing time length in the playing record in the storage layer, and then determines the current playing position of the target audio according to the total time length and the current playing time length of the target audio obtained in step S701, that is, the sequence from the start time node to the end time node of the target audio, where the start time node and the target time reached by the current playing time length are the current playing position, for example, the total time length is 30 minutes, and the current playing time length is 10 minutes, then the current playing position is 30 minutes and 1 second.
And S703, playing or pausing the target audio by adopting the audio component according to the current playing position and the current control state, wherein the current control state comprises a playing state or a pausing state.
Specifically, the server first obtains a current control state from a play record in the storage layer, and then plays or pauses the target audio by using the audio component in the original web page according to the current play position and the current control state determined in step S702, that is, if the current control state is the play state, the target audio is played by using the audio component in the original web page according to the current play position and the play state determined in step S702, and if the current control state is the pause state, the target audio is paused by using the audio component in the original web page according to the current play position and the pause state determined in step S702.
In the embodiment corresponding to fig. 3, through the steps S701 to S703, the total duration of the target audio is obtained first, then the current playing position of the target audio is determined quickly according to the total duration and the current playing duration, so that the determining efficiency of the current playing position is improved, and finally, according to the current playing position and the current control state, the target audio is resumed or paused quickly by using the audio component, so that the playing or pausing efficiency for resuming the target audio is improved.
In an embodiment, in step S80, that is, after sending the waiting interface deleting instruction, the preset output mode, the target webpage and the target audio being played or paused to the client, the webpage audio playing method further includes:
s901, in a preset time period, if an operation request initiated in a target webpage by a user through a client cannot be received, calling a preset ending script in a act-router routing system, and ending the process for running the audio component.
Specifically, in a preset time period, if the server does not receive an operation request initiated by the user in the target webpage through the client, that is, it can be understood that in the preset time period, if the user does not perform any operation, the server invokes a preset end script in the act-router routing system to end the process for running the audio component, where the preset time period may be 1 minute or 3 minutes, and the act-router routing system stores scripts with different functions in advance, and is in a state of being able to be invoked at any time.
When it is determined that the user does not perform any operation, that is, when it is determined that the user is currently away, the process for running the audio component can be temporarily ended, thereby reducing consumption of a system memory and improving system running efficiency.
In an embodiment, step S20, that is, sending the web page jump waiting instruction and the jump waiting interface to the client, so that the client performs display processing on the jump waiting interface according to the web page jump waiting instruction, specifically includes the following steps:
s201, sending a picture interface and a picture display instruction preset in the exact view library to a client, so that the client displays the picture interface according to the picture display instruction.
Specifically, the server side firstly obtains a preset picture interface from a exact view library, then sends the obtained picture interface and a picture display instruction to the client side, and when the client side receives the picture interface and the picture display instruction, the picture interface is displayed according to the picture display instruction, namely, the client side displays, renders and displays the picture interface by adopting a rendering function of a browser according to the picture display instruction, so that a user can browse the picture interface through a human-computer interaction interface of the client side, wherein the exact view library is a library storing various different views which can be used for being displayed on a combustion engine interaction interface.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
In an embodiment, a web page audio playing device is provided, and the web page audio playing device corresponds to the web page audio playing method in the above embodiments one to one. As shown in fig. 4, the apparatus for playing web page audio includes a receiving module 301, a responding module 302, an obtaining module 303, a replacing module 304, a determining module 305, a playing module 306, a controlling module 307 and a sending module 308. The functional modules are explained in detail as follows:
the receiving module 301 is configured to receive a webpage jump request initiated by a user in an original webpage, where the original webpage includes an audio component for playing a target audio, a storage layer for storing the target audio and a play record of the target audio, and other elements, the other elements are elements in the original webpage except the webpage storage layer and the audio component, and the webpage jump request includes a play record and a webpage identifier of a target webpage to be jumped;
the response module 302 is configured to respond to the web page jump request, and send the web page jump waiting instruction and the jump waiting interface to the client, so that the client performs display processing on the jump waiting interface according to the web page jump waiting instruction;
the obtaining module 303 is configured to invoke a exact-router routing system, and obtain a target element of a target webpage uniquely marked by a webpage identifier by using the exact-router routing system;
a replacing module 304, configured to replace other elements in the original webpage with the target element, so as to obtain a replaced original webpage as a target webpage;
a determining module 305, configured to determine that the webpage jump request is a direct webpage jump request or an indirect webpage jump request;
the playing module 306 is configured to play the target audio by using an audio component according to the sequence from the start node to the end node of the target audio when the webpage jump request is a direct webpage jump request;
the control module 307 is configured to, when the webpage jump request is an indirect webpage jump request, play or pause the target audio by using an audio component according to the play record;
the sending module 308 is configured to send the waiting interface deletion instruction, the preset output mode, the target webpage and the currently played or paused target audio to the client, so that the client deletes the jump waiting interface according to the waiting interface deletion instruction, and simultaneously outputs the target webpage and the currently played or paused target audio according to the output mode.
Further, the control module 307 includes:
an obtaining submodule 3071, configured to obtain a total duration of the target audio;
an assertion submodule 3072, configured to determine a current playing position of the target audio according to the total duration and the current playing duration;
the dominating sub-module 3073 is configured to play or pause the target audio by using the audio component according to the current playing position and the current control state, where the current control state includes a playing state or a pausing state.
Further, after the sending module 308, the web page audio playing apparatus further includes:
the calling module 3091 is configured to, within a preset time period, call a preset end script in the act-router routing system if an operation request initiated by the user in the target webpage through the client is not received, and end the process for running the audio component.
Further, the response module 302 includes:
the transmission submodule 3021 is configured to send a picture interface and a picture display instruction preset in the exact view library to the client, so that the client performs display processing on the picture interface according to the picture display instruction.
For specific limitations of the web page audio playing apparatus, reference may be made to the above limitations on the web page audio playing method, which will not be described herein again. All or part of the modules in the webpage audio playing device can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 5. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing data related to the webpage audio playing method. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method for playing web page audio.
In one embodiment, a computer device is provided, which includes a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the steps of the web page audio playing method of the above embodiments, such as steps S10 to S80 shown in fig. 2. Alternatively, the processor, when executing the computer program, implements the functions of the modules/units of the web page audio playing apparatus in the above embodiments, such as the functions of the modules 301 to 307 shown in fig. 4. To avoid repetition, further description is omitted here.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and the computer program is executed by a processor to implement the method for playing web page audio in the above method embodiment, or the computer program is executed by the processor to implement the functions of each module/unit in the apparatus for playing web page audio in the above apparatus embodiment. To avoid repetition, further description is omitted here. It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. A webpage audio playing method is characterized by comprising the following steps:
receiving a webpage jump request initiated in an original webpage by a user, wherein the original webpage comprises an audio component for playing a target audio, a storage layer for storing the target audio and a play record of the target audio and other elements, the other elements are elements in the original webpage except the webpage storage layer and the audio component, and the webpage jump request comprises the play record and a webpage identifier of a target webpage to be jumped;
responding to the webpage jump request, and simultaneously sending a webpage jump waiting instruction and a jump waiting interface to a client so that the client displays the jump waiting interface according to the webpage jump waiting instruction;
calling a act-router routing system, and acquiring a target element of the target webpage uniquely marked by the webpage identifier by adopting the act-router routing system;
replacing the other elements in the original webpage with the target elements to obtain the replaced original webpage as the target webpage;
determining that the webpage jump request is a direct webpage jump request or an indirect webpage jump request;
when the webpage jump request is the direct webpage jump request, the target audio is played by adopting the audio component according to the sequence from the starting node to the ending node of the target audio;
when the webpage skipping request is the indirect webpage skipping request, playing or pausing the target audio by adopting the audio component according to the playing record;
and sending a waiting interface deleting instruction, a preset output mode, the target webpage and the target audio which is being played or paused to the client, so that the client deletes the jump waiting interface according to the waiting interface deleting instruction, and simultaneously outputs the target webpage and the target audio which is being played or paused according to the output mode.
2. The method for playing webpage audio according to claim 1, wherein the playing record includes a current playing duration and a current control state of the target audio, and the playing or pausing the target audio by using the audio component according to the playing record includes:
acquiring the total duration of the target audio;
determining the current playing position of the target audio according to the total time length and the current playing time length;
and playing or pausing the target audio by adopting the audio assembly according to the current playing position and the current control state, wherein the current control state comprises a playing state or a pausing state.
3. The method for playing web page audio according to claim 1, wherein after the waiting interface deleting instruction, the preset output mode, the target web page and the target audio being played or paused are sent to the client, the method for playing web page audio further comprises:
and in a preset time period, if the operation request initiated by the user in the target webpage through the client is not received, calling a preset ending script in a act-router routing system to end the process for running the audio component.
4. The method for playing webpage audio according to any one of claims 1 to 3, wherein the sending the webpage jump waiting instruction and the jump waiting interface to the client, so that the client performs display processing on the jump waiting interface according to the webpage jump waiting instruction comprises:
and sending a picture interface and a picture display instruction preset in the exact view library to the client so that the client displays the picture interface according to the picture display instruction.
5. A web page audio playing device, characterized in that the web page audio playing device comprises:
the system comprises a receiving module, a processing module and a display module, wherein the receiving module is used for receiving a webpage jump request initiated in an original webpage by a user, the original webpage comprises an audio component used for playing a target audio, a storage layer used for storing the target audio and a playing record of the target audio and other elements, the other elements are elements in the original webpage except the webpage storage layer and the audio component, and the webpage jump request comprises the playing record and a webpage identifier of a target webpage to be jumped;
the response module is used for responding to the webpage jump request and simultaneously sending a webpage jump waiting instruction and a jump waiting interface to the client so that the client displays the jump waiting interface according to the webpage jump waiting instruction;
the acquisition module is used for calling a act-router routing system and acquiring the target element of the target webpage uniquely marked by the webpage identifier by adopting the act-router routing system;
the replacing module is used for replacing the other elements in the original webpage by the target elements to obtain the replaced original webpage as the target webpage;
the determining module is used for determining that the webpage jump request is a direct webpage jump request or an indirect webpage jump request;
the playing module is used for playing the target audio by adopting the audio component according to the sequence from the starting node to the ending node of the target audio when the webpage jump request is the direct webpage jump request;
the control module is used for playing or pausing the target audio by adopting the audio component according to the playing record when the webpage skipping request is the indirect webpage skipping request;
and the sending module is used for sending a waiting interface deleting instruction, a preset output mode, the target webpage and the target audio which is being played or paused to the client, so that the client deletes the jump waiting interface according to the waiting interface deleting instruction and outputs the target webpage and the target audio which is being played or paused according to the output mode.
6. The web page audio playback apparatus of claim 5, wherein the control module comprises:
the obtaining submodule is used for obtaining the total duration of the target audio;
the judging submodule is used for determining the current playing position of the target audio according to the total time length and the current playing time length;
and the domination submodule is used for adopting the audio assembly to play or pause the target audio according to the current playing position and the current control state, wherein the current control state comprises a playing state or a pausing state.
7. The web page audio playback apparatus of claim 5, wherein the transmission module comprises:
and the calling module is used for calling a preset ending script in the act-router routing system to end the process for running the audio component if the operation request initiated by the user in the target webpage through the client cannot be received within a preset time period.
8. The web page audio playing apparatus according to any one of claims 5 to 7, wherein the response module comprises:
and the transmission submodule is used for sending a picture interface and a picture display instruction preset in the exact view library to the client so that the client can display the picture interface according to the picture display instruction.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the web page audio playing method according to any one of claims 1 to 4 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, implements the web page audio playback method according to any one of claims 1 to 4.
CN201910530693.8A 2019-06-19 2019-06-19 Webpage audio playing method and device, computer equipment and storage medium Active CN110286873B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910530693.8A CN110286873B (en) 2019-06-19 2019-06-19 Webpage audio playing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910530693.8A CN110286873B (en) 2019-06-19 2019-06-19 Webpage audio playing method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110286873A CN110286873A (en) 2019-09-27
CN110286873B true CN110286873B (en) 2020-04-14

Family

ID=68005256

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910530693.8A Active CN110286873B (en) 2019-06-19 2019-06-19 Webpage audio playing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110286873B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111008012B (en) * 2019-12-06 2024-05-03 上海米哈游网络科技股份有限公司 Prototype design method, device, electronic product and storage medium

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030140118A1 (en) * 2001-06-01 2003-07-24 Alexander Lloyd Ian George Apparatus and method for focused presentations of static and dynamic data using local storage media and networked web pages
US7657843B2 (en) * 2005-08-15 2010-02-02 At&T Intellectual Property I, L.P. Menu promotions user interface
US20080046925A1 (en) * 2006-08-17 2008-02-21 Microsoft Corporation Temporal and spatial in-video marking, indexing, and searching
US9524651B2 (en) * 2011-07-25 2016-12-20 Raymond Fix System and method for electronic communication using a voiceover in combination with user interaction events on a selected background
US20130145265A1 (en) * 2011-12-02 2013-06-06 Nicole Cunningham Bookmark with Audio Playback
US9195383B2 (en) * 2012-06-29 2015-11-24 Spotify Ab Systems and methods for multi-path control signals for media presentation devices
WO2014059650A1 (en) * 2012-10-18 2014-04-24 华为终端有限公司 Method and apparatus for managing audio file
CN103455547B (en) * 2013-07-05 2017-03-01 百度在线网络技术(北京)有限公司 A kind of method and device for webpage loading
CN104484458A (en) * 2014-12-29 2015-04-01 北京奇虎科技有限公司 Music playing method and music playing device
CN105279272A (en) * 2015-10-30 2016-01-27 南京未来网络产业创新有限公司 Content aggregation method based on distributed web crawlers
CN108388628B (en) * 2018-02-12 2022-02-22 腾讯科技(深圳)有限公司 Webpage audio playing method and device
CN109828737B (en) * 2018-12-14 2022-12-06 平安万家医疗投资管理有限责任公司 Method for controlling audio playing, terminal device and computer readable storage medium

Also Published As

Publication number Publication date
CN110286873A (en) 2019-09-27

Similar Documents

Publication Publication Date Title
TWI690812B (en) Method, device and client for dynamic layout of page elements
CN110020292B (en) Webpage content extraction method and terminal equipment
US10198410B2 (en) Method, device and mobile terminal for restoring page
US11706331B2 (en) Information processing method and apparatus, storage medium, and electronic device
US8595284B2 (en) Web application script migration
CN106484862B (en) Page control method and device
CN110062284B (en) Video playing method and device and electronic equipment
CN111639289A (en) Webpage loading method and device
WO2022068639A1 (en) Method, apparatus, and device for video-based interaction, and storage medium
WO2020206691A1 (en) Application processing method and apparatus, storage medium, and electronic device
US20140365861A1 (en) Prefetching binary data for use by a browser plugin
US9286142B2 (en) Methods and systems for supporting a rendering API using a runtime environment
JP2009211190A (en) Information processor
WO2013034094A1 (en) Webpage browsing method and device, and storage medium
CN111341315B (en) Voice control method, device, computer equipment and storage medium
US11151314B2 (en) Extensible grid layout
EP3125541A1 (en) Data acquisition and interaction method, set top box, server and multimedia system
CN110286873B (en) Webpage audio playing method and device, computer equipment and storage medium
CN112947897B (en) Cross-platform API sharing method, device, system and storage medium
CN111563213B (en) Page carousel method, device, computer equipment and readable storage medium
CN114153625B (en) Method, system, device and medium for developing games based on Golang
CN108491232B (en) Method and system for loading control on voice conversation platform
CN112579938B (en) Page loading method, device, storage medium and electronic device
US20140331117A1 (en) Application-based dependency graph
US20160259533A1 (en) Retaining user selected screen area on user equipment

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