CN114172882B - Webpage end message reminding method, device, equipment and storage medium - Google Patents
Webpage end message reminding method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN114172882B CN114172882B CN202111399581.7A CN202111399581A CN114172882B CN 114172882 B CN114172882 B CN 114172882B CN 202111399581 A CN202111399581 A CN 202111399581A CN 114172882 B CN114172882 B CN 114172882B
- Authority
- CN
- China
- Prior art keywords
- message queue
- reminded
- information
- voice
- message
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 62
- 238000004590 computer program Methods 0.000 claims description 12
- 238000006243 chemical reaction Methods 0.000 claims description 4
- 230000009286 beneficial effect Effects 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 4
- 230000006978 adaptation Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- G—PHYSICS
- G08—SIGNALLING
- G08B—SIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
- G08B21/00—Alarms responsive to a single specified undesired or abnormal condition and not otherwise provided for
- G08B21/18—Status alarms
- G08B21/24—Reminder alarms, e.g. anti-loss alarms
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Business, Economics & Management (AREA)
- Emergency Management (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a webpage end message reminding method, which is applied to a webpage end and comprises the following steps: acquiring information to be reminded sent by a server based on a WebSocket protocol; sequentially adding information to be reminded to a message queue from front to back; and taking out the information to be reminded from the head of the message queue for voice playing. By setting the message queue, the information to be reminded is sequentially added into the message queue, and the message queue strictly executes the FIFO mode to play the voice of the information to be reminded, so that the webpage information can be accurately pushed, and the castration type reminding and multi-message superposition reminding conditions are avoided. The invention also provides a webpage-end message reminding device, webpage-end message reminding equipment and a computer-readable storage medium, which also have the beneficial effects.
Description
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a web page message reminding method, a web page message reminding device, a web page message reminding apparatus, and a computer readable storage medium.
Background
The message pushing voice reminding is realized in the traditional communication architecture of the webpage end and the server end, the server end is generally used for pushing text messages to the webpage end based on the WebSocket protocol, the webpage end mainly has the following two modes for the data processing of the pushing data, if the data processing is text content, tts (text to voice) text to voice api (Application Programming Interface) built in a browser is called for message voice playing; if the voice resource file is a section of url (uniform resource locator, uniform resource location system) website, the web page end analyzes the voice resource file and plays the voice resource file.
However, in the prior art, since the server side message is in a serial multiplexing state, the web page side can receive a plurality of messages pushed from the server side at the same time in millisecond level, and then the message can be provided with castration type reminding and multi-message superposition reminding, and accurate pushing and effective reminding cannot be carried out on the message. Therefore, how to provide a method for precisely pushing webpage information is a problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The invention aims to provide a webpage end message reminding method which can accurately push webpage information; another object of the present invention is to provide a web page message reminding device, a web page message reminding apparatus, and a computer readable storage medium, which can accurately push web page information.
In order to solve the technical problems, the invention provides a webpage end message reminding method, which is applied to a webpage end and comprises the following steps:
acquiring information to be reminded sent by a server based on a WebSocket protocol;
sequentially adding the information to be reminded to a message queue from front to back;
and taking out the information to be reminded from the head of the message queue for voice playing.
Optionally, the retrieving the information to be reminded from the head of the message queue for playing the voice includes:
playing the voice corresponding to the information to be reminded at the head of the message queue;
and after the voice is played, the information to be reminded at the head part of the message queue is removed from the message queue.
Optionally, after the playing the voice corresponding to the to-be-reminded information at the head of the message queue, the method further includes:
generating a display message corresponding to the information to be reminded at the head of the message queue;
and storing the display message.
Optionally, the obtaining the information to be reminded sent by the server based on WebSocket protocol includes:
acquiring an original text file sent by a server based on a WebSocket protocol;
before the information to be reminded is added to the message queue from front to back in sequence, the method further comprises the following steps:
calling tts library to convert the original text file into an identifiable text file;
the step of sequentially adding the information to be reminded to the message queue from front to back comprises the following steps:
sequentially adding the identifiable text files to a message queue from front to back;
the step of taking out the information to be reminded from the head of the message queue for voice playing comprises the following steps:
and calling an HTML Audio tag to play the voice of the recognizable text file fetched from the head of the message queue.
Optionally, the format of the identifiable text file is base64 or mp4.
Optionally, after the tts library is called to convert the original text file into the recognizable text file, the method further includes:
when the tts library is not called to convert the original text file into the identifiable text file, the original text file is added to the message queue from front to back in sequence;
the step of taking out the information to be reminded from the head of the message queue for voice playing comprises the following steps:
calling a tts voice api built in the browser to play the voice of the original text file taken out from the head of the message queue.
Optionally, the obtaining the information to be reminded sent by the server based on WebSocket protocol includes:
acquiring a voice resource file sent by a server based on a WebSocket protocol; the voice resource file comprises at least one url website;
the step of sequentially adding the information to be reminded to the message queue from front to back comprises the following steps:
sequentially adding the voice resource files to the message queue from front to back;
the step of taking out the information to be reminded from the head of the message queue for voice playing comprises the following steps:
analyzing url websites in the voice resource file taken out from the head of the message queue so as to play the voice of the voice resource file.
The invention also provides a webpage end message reminding device, which is applied to the webpage end and comprises:
the acquisition module is used for acquiring information to be reminded sent by the server based on a WebSocket protocol;
the adding module is used for sequentially adding the information to be reminded to the message queue from front to back;
and the playing module is used for taking out the information to be reminded from the head of the message queue to play the voice.
The invention also provides a webpage end message reminding device, which is applied to the webpage end and comprises:
a memory for storing a computer program;
and the processor is used for executing the computer program to realize the steps of the webpage-side message reminding method according to any one of the above.
The invention also provides a computer readable storage medium which is applied to the webpage end, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to realize the steps of the webpage end message reminding method.
The invention provides a webpage end message reminding method, which is applied to a webpage end and comprises the following steps: acquiring information to be reminded sent by a server based on a WebSocket protocol; sequentially adding information to be reminded to a message queue from front to back; and taking out the information to be reminded from the head of the message queue for voice playing. By setting the message queue, the information to be reminded is sequentially added into the message queue, and the message queue strictly executes a first-in first-out FIFO (First Input First Output) mode to play the voice of the information to be reminded, so that the webpage information can be accurately pushed, and the castration type reminding and multi-message superposition reminding conditions are avoided.
The invention also provides a webpage-end message reminding device, webpage-end message reminding equipment and a computer-readable storage medium, which have the same beneficial effects and are not repeated here.
Drawings
For a clearer description of embodiments of the invention or of the prior art, the drawings that are used in the description of the embodiments or of the prior art will be briefly described, it being apparent that the drawings in the description below are only some embodiments of the invention, and that other drawings can be obtained from them without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for reminding a message on a web page end according to an embodiment of the present invention;
FIG. 2 is a flowchart of a specific method for reminding a message at a web page according to an embodiment of the present invention;
FIG. 3 is a flowchart of another specific method for reminding a message at a web page according to an embodiment of the present invention;
fig. 4 is a block diagram of a configuration of a web page message reminding device according to an embodiment of the present invention;
fig. 5 is a block diagram of a configuration of a web page message reminding device according to an embodiment of the present invention.
Detailed Description
The core of the invention is to provide a webpage end message reminding method. In the prior art, because the server side message is in a serial multiplexing state, the webpage side can receive a plurality of messages pushed from the server side at the same time in millisecond level, and then castration type reminding and multi-message superposition reminding can be carried out on the messages, so that accurate pushing and effective reminding can not be carried out on the messages.
The invention provides a webpage end message reminding method, which is applied to a webpage end and comprises the following steps: acquiring information to be reminded sent by a server based on a WebSocket protocol; sequentially adding information to be reminded to a message queue from front to back; and taking out the information to be reminded from the head of the message queue for voice playing. By setting the message queue, the information to be reminded is sequentially added into the message queue, and the message queue strictly executes the FIFO mode to play the voice of the information to be reminded, so that the webpage information can be accurately pushed, and the castration type reminding and multi-message superposition reminding conditions are avoided.
In order to better understand the aspects of the present invention, the present invention will be described in further detail with reference to the accompanying drawings and detailed description. It will be apparent that the described embodiments are only some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, fig. 1 is a flowchart of a method for reminding a message at a web page according to an embodiment of the invention.
Firstly, it should be noted that the method for reminding the message at the web page end provided by the embodiment of the invention is specifically applied to the web page end, and can also be called as a client end, and the web page end can receive the message pushed by the server for reminding. Referring to fig. 1, in an embodiment of the present invention, a method for reminding a webpage end message includes:
s101: and acquiring information to be reminded sent by the server based on a WebSocket protocol.
In this step, the web page end may first obtain the information to be reminded sent by the server based on WebSocket protocol. Specifically, the web page end can perform WebSocket initialization, monitor the server based on WebSocket protocol, and thus obtain information to be reminded sent by the server. The specific content of the information to be reminded can be set according to the actual situation, and is not limited in detail herein.
S102: and adding the information to be reminded to the message queue from front to back in sequence.
In this step, the information to be reminded is added to the message queue sequentially from front to back according to the sequence of obtaining the information to be reminded, that is, the information to be reminded obtained first is listed in the front of the message queue, and the information to be reminded obtained later is listed at the rear side of the message queue, so that the information to be reminded is added to the message queue sequentially from front to back according to the sequence of obtaining the information to be reminded. In general, in the embodiment of the invention, only one message queue is maintained so as to ensure that the occurrence of the multi-message superposition reminding condition is avoided.
S103: and taking out the information to be reminded from the head of the message queue for voice playing.
In this step, the information to be reminded is taken out from the head of the message queue for voice playing. The specific content of the voice playing will be described in detail in the following embodiments of the present invention, and will not be described herein. In this step, the message to be reminded at the head of the message queue is fetched, i.e. the first message to be reminded in the message queue is arranged, and the fetched message to be reminded is played in voice, i.e. the message queue needs a strict FIFO mode of executing first-in first-out to play the message to be reminded in voice. It should be noted that, after the information to be reminded at the head of the message queue is fetched, the order of the information to be reminded sequentially arranged in the message queue will advance one bit in order to ensure the normal execution of the FIFO mode.
Specifically, this step generally includes: playing the voice corresponding to the information to be reminded at the head of the message queue; and after the voice is played, the information to be reminded at the head part of the message queue is removed from the message queue. In this step, the to-be-reminded information at the head of the message queue is usually played in voice, and then the played to-be-reminded information is removed from the message queue, so as to ensure the normal playing of the to-be-reminded information.
Specifically, after this step, it may further include: generating a display message corresponding to the information to be reminded at the head of the message queue; and storing the display message. After the played information to be reminded is removed from the message queue, a record corresponding to the removed information to be reminded, namely a display message, is generated and stored, and the display message is usually required to be visible in a webpage end page view. The display information can be used for making message trace interpretation at the user end, and also can be used for making message receipt inquiry and message link buried point inquiry. The specific type of the display information can be set according to the actual situation, and is not particularly limited herein.
The webpage end message reminding method provided by the embodiment of the invention is applied to a webpage end and comprises the following steps: acquiring information to be reminded sent by a server based on a WebSocket protocol; sequentially adding information to be reminded to a message queue from front to back; and taking out the information to be reminded from the head of the message queue for voice playing. By setting the message queue, the information to be reminded is sequentially added into the message queue, and the message queue strictly executes the FIFO mode to play the voice of the information to be reminded, so that the webpage information can be accurately pushed, and the castration type reminding and multi-message superposition reminding conditions are avoided.
The specific content of the webpage-side message reminding method provided by the invention is described in detail in the following embodiments of the invention.
Referring to fig. 2, fig. 2 is a flowchart of a specific method for reminding a message at a web page according to an embodiment of the present invention.
It should be noted that, the method for reminding the webpage side message provided by the embodiment of the invention is also applied to the webpage side, referring to fig. 2, and in the embodiment of the invention, the method for reminding the webpage side message includes:
s201: and acquiring the original text file sent by the server based on the WebSocket protocol.
In this step, the obtained message to be reminded is specifically a text file, i.e. an original text file. The original text file records specific content which needs voice broadcasting. The rest of the steps are basically identical to S101, and will not be described in detail here.
S202: invoking tts library to convert the original text file into recognizable text file.
In this step, the format of the original text file is converted, and the original text file is converted into an identifiable text file. The recognizable text file may be in the format of base64 or mp4. That is, the tts library may be used in this step to convert the received text file into a base64 file or an mp4 file, typically a base64 file, so that other means may be used in subsequent steps to effect voice playback of the recognizable text file. Of course, in the embodiment of the present invention, identifiable text files with other formats may be selected, so long as voice broadcasting can be performed through HTML Audio tags or other modes with universality in subsequent steps. The HTML Audio tag is a voice file playing tag on the browser.
S203: the recognizable text files are added to the message queue sequentially from front to back.
In this step, the identifiable text file is used as one of the to-be-reminded information, that is, the identifiable text file is regarded as the to-be-reminded information, and is sequentially added to the message queue from front to back according to the acquired sequence. It should be noted that, in the embodiment of the present invention, only one message queue is usually maintained, both the identifiable file and the subsequent other files are regarded as to-be-reminded information, and the to-be-reminded information is sequentially added to the message queue from front to back according to the acquired sequence, and an independent message queue is not usually set for each to-be-reminded information.
S204: and calling the HTML Audio tag to play the voice of the recognizable text file fetched from the head of the message queue.
In this step, when the information to be reminded taken out from the head of the message queue is specifically a recognizable text file, the HTML Audio tag may be specifically called to play and remind, that is, the HTML Audio tag is called to play the recognizable text file in a voice manner. In the embodiment of the invention, the message queue also needs a strict FIFO mode for executing first-in first-out to play the voice of the information to be reminded.
S205: when the tts library is not called to convert the original text file into the identifiable text file, the original text file is added to the message queue sequentially from front to back.
In the embodiment of the invention, when the tts library is not called to convert the original text file into the identifiable text file, namely, the format of the original text file is not converted, the original text file can be directly used as the information to be reminded and sequentially added to the message queue from front to back according to the acquired sequence.
S206: calling a tts voice api built in the browser to play the voice of the original text file taken out from the head of the message queue.
In this step, when the information to be reminded taken out from the head of the message queue is specifically an original text file, tts voice api built in the browser can be specifically called to perform voice playing on the taken out original text file, and the message queue involved in this step and the message queue used in S204 are usually the same message queue, so that a FIFO mode of strictly executing first in first out is required to perform voice playing on the information to be reminded.
According to the webpage end message reminding method provided by the embodiment of the invention, the tag playing reminding is carried out through the text-to-base 64 voice file based on the Websocket text message, so that the problem of compatibility of built-in voice api of a browser is solved, and meanwhile, the access times of the webpage end to a server can be reduced.
The specific content of the webpage-side message reminding method provided by the invention is described in detail in the following embodiments of the invention.
Referring to fig. 3, fig. 3 is a flowchart of another specific method for reminding a message at a web page according to an embodiment of the present invention.
Referring to fig. 3, in an embodiment of the present invention, a method for reminding a webpage end message includes:
s301: and acquiring the voice resource file sent by the server based on the WebSocket protocol.
In the embodiment of the invention, the voice resource file comprises at least one url website.
In this step, the obtained information to be reminded is specifically a voice resource file including at least one url website, url is a uniform resource location system, and is a representation method for specifying the information position on the web service program of the internet. In the subsequent step, the resource corresponding to the url website can be obtained through analyzing the url website.
S302: and adding the voice resource files to the message queue sequentially from front to back.
In this step, the voice resource file is used as one of the to-be-reminded information, that is, the voice resource file is regarded as the to-be-reminded information, and the voice resource file is sequentially added to the message queue from front to back according to the acquired sequence. The message queue involved in this step is usually the same message queue as the message queue used in the above embodiment of the present invention, and a strict FIFO mode of executing first-in first-out is required to play the voice of the message to be reminded. That is, whether the original text file, the identifiable text file or the voice resource file is specifically obtained, the original text file, the identifiable text file or the voice resource file is regarded as unified information to be reminded and added into the message queue, and the FIFO mode of first in first out is executed strictly in the subsequent steps to play the voice of the information to be reminded.
S303: and analyzing url websites in the voice resource files taken out from the head of the message queue so as to play the voice of the voice resource files.
In the embodiment of the invention, when the information to be reminded taken out from the head of the message queue is a voice resource file, the url website in the voice resource file is specifically needed to be analyzed, and then the resource corresponding to the url website is played in a voice mode. For details, reference may be made to the prior art, and details are not described here.
It should be noted that, in the embodiment of the present invention, after the information to be reminded is obtained, popup prompt may be performed in parallel at the web page end. Parameters such as specific content and specific position of the popup window prompt can be set by itself, and are not particularly limited herein.
The webpage end message reminding method provided by the embodiment of the invention is applied to the webpage end, and the message to be reminded is sequentially added into the message queue by setting the message queue, so that the message queue strictly executes a first-in first-out (FIFO) mode to play the voice of the message to be reminded, the accurate pushing of the webpage information can be realized, and the castration type reminding and multi-message superposition reminding conditions are avoided.
The following describes a webpage-side message reminding device provided by the embodiment of the invention, and the webpage-side message reminding device described below and the webpage-side message reminding method described above can be referred to correspondingly.
The webpage end message reminding device provided by the embodiment of the invention is specifically arranged at the webpage end. Referring to fig. 4, fig. 4 is a block diagram illustrating a structure of a web page message reminding device according to an embodiment of the present invention. Referring to fig. 4, the web page-side message reminding device may include:
the acquisition module 100 is configured to acquire information to be reminded sent by the server based on WebSocket protocol.
And the adding module 200 is used for sequentially adding the information to be reminded to the message queue from front to back.
And the playing module 300 is used for taking out the information to be reminded from the head of the message queue to play the voice.
Preferably, in an embodiment of the present invention, the playing module 300 includes:
and the playing unit is used for playing the voice corresponding to the information to be reminded at the head of the message queue.
And the removing unit is used for removing the information to be reminded at the head of the message queue from the message queue after the voice is played.
Preferably, in an embodiment of the present invention, the method further includes:
the display information generation module is used for generating a display message corresponding to the information to be reminded at the head of the message queue;
and the display information storage module is used for storing the display information.
Preferably, in an embodiment of the present invention, the obtaining module 100 is configured to:
and acquiring the original text file sent by the server based on the WebSocket protocol.
Further comprises:
and the conversion module is used for calling a tts library to convert the original text file into an identifiable text file.
The adding module 200 is configured to:
and adding the identifiable text files to a message queue sequentially from front to back.
The playing module 300 is configured to:
and calling an HTML Audio tag to play the voice of the recognizable text file fetched from the head of the message queue.
Preferably, in the embodiment of the present invention, the format of the recognizable text file is base64 or mp4.
Preferably, in an embodiment of the present invention, the method further includes:
and the conversion failure module is used for adding the original text file into the message queue in sequence from front to back when the tts library is not called to convert the original text file into the identifiable text file.
The playing module 300 is configured to:
calling a tts voice api built in the browser to play the voice of the original text file taken out from the head of the message queue.
Preferably, in an embodiment of the present invention, the obtaining module 100 is configured to:
acquiring a voice resource file sent by a server based on a WebSocket protocol; the voice resource file includes at least one url site.
The adding module 200 is configured to:
and adding the voice resource files to the message queue sequentially from front to back.
The playing module 300 is configured to:
analyzing url websites in the voice resource file taken out from the head of the message queue so as to play the voice of the voice resource file.
The webpage-side message reminding device of the present embodiment is used for implementing the foregoing webpage-side message reminding method, so that the specific implementation of the webpage-side message reminding device can be seen from the foregoing example portions of the webpage-side message reminding method, for example, the obtaining module 100, the adding module 200, and the playing module 300 are respectively used for implementing steps S101 to S103 in the foregoing webpage-side message reminding method, so that the specific implementation thereof can refer to the corresponding descriptions of the examples of the various portions and is not repeated herein.
The following describes a webpage-side message reminding device provided by the embodiment of the invention, and the webpage-side message reminding device, the webpage-side message reminding method and the webpage-side message reminding device described above can be referred to correspondingly.
The webpage end message reminding equipment provided by the embodiment of the invention is specifically arranged at the webpage end. Referring to fig. 5, fig. 5 is a block diagram of a configuration of a web page message reminding device according to an embodiment of the present invention.
Referring to fig. 5, the web-side message alert device may include a processor 11 and a memory 12.
The memory 12 is used for storing a computer program; the processor 11 is configured to implement the specific content of the webpage-side message reminding method described in the above embodiment of the invention when executing the computer program.
The processor 11 in the webpage-end message reminding device of the present embodiment is configured to install the webpage-end message reminding device described in the above embodiment of the invention, and the processor 11 and the memory 12 are combined to implement the webpage-end message reminding method described in any of the above embodiments of the invention. Therefore, the specific implementation manner of the webpage-side message reminding device can be found in the foregoing example parts of the webpage-side message reminding method, and the specific implementation manner of the webpage-side message reminding device can refer to the corresponding descriptions of examples of various parts and is not repeated here.
The invention also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program realizes the webpage end message reminding method introduced in any one of the above embodiments when being executed by a processor. The remainder of this disclosure may refer to the prior art and will not be described further herein.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The method, the device, the equipment and the computer readable storage medium for reminding the webpage side message are described in detail. The principles and embodiments of the present invention have been described herein with reference to specific examples, the description of which is intended only to facilitate an understanding of the method of the present invention and its core ideas. It should be noted that it will be apparent to those skilled in the art that various modifications and adaptations of the invention can be made without departing from the principles of the invention and these modifications and adaptations are intended to be within the scope of the invention as defined in the following claims.
Claims (7)
1. The webpage end message reminding method is characterized by being applied to a webpage end and comprising the following steps of:
acquiring information to be reminded sent by a server based on a WebSocket protocol;
sequentially adding the information to be reminded to a message queue from front to back;
taking out the information to be reminded from the head of the message queue for voice playing;
the obtaining the information to be reminded sent by the server based on the WebSocket protocol comprises the following steps:
acquiring an original text file sent by a server based on a WebSocket protocol;
before the information to be reminded is added to the message queue from front to back in sequence, the method further comprises the following steps:
calling tts library to convert the original text file into an identifiable text file;
the step of sequentially adding the information to be reminded to the message queue from front to back comprises the following steps:
sequentially adding the identifiable text files to a message queue from front to back;
the step of taking out the information to be reminded from the head of the message queue for voice playing comprises the following steps:
calling an HTML Audio tag to play the voice of the identifiable text file taken out from the head of the message queue;
after calling tts library to convert the original text file into recognizable text file, the method further comprises:
when the tts library is not called to convert the original text file into the identifiable text file, the original text file is added to the message queue from front to back in sequence;
the step of taking out the information to be reminded from the head of the message queue for voice playing comprises the following steps:
calling a tts voice api built in a browser to play the voice of the original text file taken out from the head of the message queue;
the obtaining the information to be reminded sent by the server based on the WebSocket protocol comprises the following steps:
acquiring a voice resource file sent by a server based on a WebSocket protocol; the voice resource file comprises at least one url website;
the step of sequentially adding the information to be reminded to the message queue from front to back comprises the following steps:
sequentially adding the voice resource files to the message queue from front to back;
the step of taking out the information to be reminded from the head of the message queue for voice playing comprises the following steps:
analyzing url websites in the voice resource file taken out from the head of the message queue so as to play the voice of the voice resource file.
2. The method of claim 1, wherein retrieving the reminder information from the head of the message queue for voice playing comprises:
playing the voice corresponding to the information to be reminded at the head of the message queue;
and after the voice is played, the information to be reminded at the head part of the message queue is removed from the message queue.
3. The method of claim 2, further comprising, after the playing the voice corresponding to the to-be-reminded information at the head of the message queue:
generating a display message corresponding to the information to be reminded at the head of the message queue;
and storing the display message.
4. The method of claim 1, wherein the recognizable text file is in a format of base64 or mp4.
5. The webpage end message reminding device is characterized by being applied to a webpage end and comprising:
the acquisition module is used for acquiring information to be reminded sent by the server based on a WebSocket protocol;
the adding module is used for sequentially adding the information to be reminded to the message queue from front to back;
the playing module is used for taking out the information to be reminded from the head of the message queue to play the voice;
the acquisition module is used for:
acquiring an original text file sent by a server based on a WebSocket protocol;
further comprises:
the conversion module is used for calling a tts library to convert the original text file into an identifiable text file;
the adding module is used for:
sequentially adding the identifiable text files to a message queue from front to back;
the playing module is used for:
calling an HTML Audio tag to play the voice of the identifiable text file taken out from the head of the message queue;
further comprises:
the conversion failure module is used for sequentially adding the original text file into the message queue from front to back when the tts library is not called to convert the original text file into the identifiable text file;
the playing module is used for:
calling a tts voice api built in a browser to play the voice of the original text file taken out from the head of the message queue;
the acquisition module is used for:
acquiring a voice resource file sent by a server based on a WebSocket protocol; the voice resource file comprises at least one url website;
the adding module is used for:
sequentially adding the voice resource files to the message queue from front to back;
the playing module is used for:
analyzing url websites in the voice resource file taken out from the head of the message queue so as to play the voice of the voice resource file.
6. The webpage end message reminding device is characterized by being applied to a webpage end and comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of the web page-side message reminding method according to any one of claims 1 to 4.
7. A computer readable storage medium for application to a web page, the computer readable storage medium having a computer program stored therein, the computer program being executable by a processor to implement the steps of the web page message alert method according to any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111399581.7A CN114172882B (en) | 2021-11-19 | 2021-11-19 | Webpage end message reminding method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111399581.7A CN114172882B (en) | 2021-11-19 | 2021-11-19 | Webpage end message reminding method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114172882A CN114172882A (en) | 2022-03-11 |
CN114172882B true CN114172882B (en) | 2024-04-12 |
Family
ID=80480095
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111399581.7A Active CN114172882B (en) | 2021-11-19 | 2021-11-19 | Webpage end message reminding method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114172882B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115766933B (en) * | 2022-10-31 | 2024-06-21 | 中国农业银行股份有限公司 | Barrier-free mode voice broadcasting method, device, equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108023941A (en) * | 2017-11-23 | 2018-05-11 | 阿里巴巴集团控股有限公司 | Sound control method and device and electronic equipment |
CN111816190A (en) * | 2020-07-08 | 2020-10-23 | 苏州思必驰信息科技有限公司 | Voice interaction method and device for upper computer and lower computer |
CN111917687A (en) * | 2019-05-08 | 2020-11-10 | 北京京东振世信息技术有限公司 | Method and device for circularly pushing reminding message |
CN112583638A (en) * | 2020-11-25 | 2021-03-30 | 新浪网技术(中国)有限公司 | Websocket-based voice alarm method and system |
-
2021
- 2021-11-19 CN CN202111399581.7A patent/CN114172882B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108023941A (en) * | 2017-11-23 | 2018-05-11 | 阿里巴巴集团控股有限公司 | Sound control method and device and electronic equipment |
CN111917687A (en) * | 2019-05-08 | 2020-11-10 | 北京京东振世信息技术有限公司 | Method and device for circularly pushing reminding message |
CN111816190A (en) * | 2020-07-08 | 2020-10-23 | 苏州思必驰信息科技有限公司 | Voice interaction method and device for upper computer and lower computer |
CN112583638A (en) * | 2020-11-25 | 2021-03-30 | 新浪网技术(中国)有限公司 | Websocket-based voice alarm method and system |
Also Published As
Publication number | Publication date |
---|---|
CN114172882A (en) | 2022-03-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9633358B2 (en) | Interactive presentations with integrated tracking systems | |
US9130975B2 (en) | Generation of macros | |
US11706498B2 (en) | Playback method, system, device and readable storage medium of live broadcast content | |
US9876879B2 (en) | Distributed network page generation | |
US8898580B2 (en) | Definition for service interface | |
CN110955640B (en) | Cross-system data file processing method, device, server and storage medium | |
US20100058167A1 (en) | Displaying Subscribable Content | |
US20130263156A1 (en) | Operation log collection method and device | |
US9626197B1 (en) | User interface rendering performance | |
CN114172882B (en) | Webpage end message reminding method, device, equipment and storage medium | |
US11115483B2 (en) | Methods and apparatus for census and panel matching using session identifiers positioned in an HTTP header | |
CN104468248B (en) | Service performance monitoring method, reverse proxy server, statistical analysis server and system | |
CN113873288A (en) | Method and device for generating playback in live broadcast process | |
CN108287874B (en) | DB2 database management method and device | |
CN113346973A (en) | Event prompting method and device, electronic equipment and computer readable storage medium | |
CN112307384B (en) | Page snapshot display method and device, electronic equipment and storage medium | |
US20130103792A1 (en) | Methods and Systems for Transferring Client Device Data Over a Network | |
WO2013009768A1 (en) | Systems and methods for collecting multimedia form responses | |
CN111782993A (en) | Page display method and device and server | |
JP4664853B2 (en) | Content distribution method and server for realizing the method | |
WO2012047185A1 (en) | Systems and methods for gateway status information handling | |
JP5567906B2 (en) | Apparatus and method for supporting screen reproduction | |
CN108920589B (en) | Browsing hijacking identification method, device, server and storage medium | |
CN113612816A (en) | Data acquisition method, system, terminal and computer readable storage medium | |
JP2007048292A (en) | Method for creating electronic document and electronic document |
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 |