CN112632445A - Webpage playing method, device, equipment and storage medium - Google Patents

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

Info

Publication number
CN112632445A
CN112632445A CN202011599602.5A CN202011599602A CN112632445A CN 112632445 A CN112632445 A CN 112632445A CN 202011599602 A CN202011599602 A CN 202011599602A CN 112632445 A CN112632445 A CN 112632445A
Authority
CN
China
Prior art keywords
webpage
target
web page
playing
text
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011599602.5A
Other languages
Chinese (zh)
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.)
Guangzhou Kugou Computer Technology Co Ltd
Original Assignee
Guangzhou Kugou Computer 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 Guangzhou Kugou Computer Technology Co Ltd filed Critical Guangzhou Kugou Computer Technology Co Ltd
Priority to CN202011599602.5A priority Critical patent/CN112632445A/en
Publication of CN112632445A publication Critical patent/CN112632445A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • 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/165Management of the audio stream, e.g. setting of volume, audio stream path
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/543User-generated data transfer, e.g. clipboards, dynamic data exchange [DDE], object linking and embedding [OLE]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/545Gui

Landscapes

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

Abstract

The application discloses a webpage playing method, a webpage playing device and a webpage playing storage medium, and belongs to the technical field of computers. The method comprises the following steps: in response to the copy operation, storing text copied by the copy operation in a clipboard; responding to the opening of a webpage reading interface on an application program, and acquiring a target webpage according to the text in the clipboard; responding to webpage reading operation triggered on a webpage reading interface, and extracting character information in a target webpage; and playing the voice corresponding to the text information. For the webpage without voice, the voice corresponding to the webpage can be played. A mode for flexibly playing voice corresponding to a webpage is provided.

Description

Webpage playing method, device, equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for playing a web page.
Background
The web page is one of the important ways for users to obtain information through electronic devices as a carrier of information.
At present, in order to facilitate a user to obtain information in a web page, a provider of the web page converts text information in the web page into corresponding voice in advance. When a user browses the webpage through the electronic equipment, the electronic equipment can acquire the voice corresponding to the webpage and play the voice.
For different web pages, the electronic device may not play the voice corresponding to the web page because the web page provider does not provide the voice. The voice corresponding to the webpage is played in a single mode.
Disclosure of Invention
The application provides a webpage playing method, a webpage playing device, equipment and a storage medium, and provides a mode for flexibly playing voice corresponding to a webpage. The technical scheme is as follows:
according to an aspect of the present application, there is provided a method for playing a web page, the method including:
in response to a copy operation, storing text copied by the copy operation in a clipboard;
responding to the opening of a webpage reading interface on an application program, and acquiring a target webpage according to the text in the clipboard;
responding to webpage reading operation triggered on the webpage reading interface, and extracting text information in the target webpage;
and playing the voice corresponding to the text information.
According to another aspect of the present application, there is provided a web page playing apparatus, the apparatus including:
the storage module is used for responding to the copy operation and storing the text copied by the copy operation in a clipboard;
the acquisition module is used for responding to the opening of a webpage reading interface on an application program and acquiring a target webpage according to the text in the clipboard;
the extraction module is used for responding to webpage reading operation triggered on the webpage reading interface and extracting the text information in the target webpage;
and the playing module is used for playing the voice corresponding to the text information.
Optionally, the obtaining module is configured to:
responding to the opening of the webpage reading interface, and acquiring the text in the clipboard;
identifying a first target website in the text;
and acquiring the target webpage according to the first target website.
Optionally, the obtaining module is configured to:
and filtering the text through a regular expression to obtain the first target website, wherein the regular expression is established according to a character composition rule of the website.
Optionally, the apparatus further comprises:
the display module is used for responding to the acquired target webpage and displaying a webpage playing control;
the extraction module is configured to:
and responding to the webpage reading operation triggered on the webpage playing control, and extracting the text information in the target webpage.
Optionally, a web page playing control in a first form is displayed in the web page reading interface. The display module is used for:
responding to the acquired target webpage, and displaying the webpage playing control in a second form;
the extraction module is configured to:
and responding to the webpage reading operation triggered on the webpage playing control in the second form, and extracting the text information in the target webpage.
Optionally, the apparatus further comprises:
the obtaining module is used for responding to the situation that the webpage reading interface is opened and the target webpage cannot be obtained from the clipboard, and obtaining a webpage access record;
the first determining module is used for determining the website with the maximum access times in the target time period in the webpage access record as a second target website;
and the acquisition module is used for acquiring the target webpage according to the second target website.
Optionally, the apparatus further comprises:
the obtaining module is configured to obtain user operation information in response to opening the web page reading interface and failing to obtain the target web page from the clipboard, where the user operation information includes at least one of the web page access information, the web page collection information, the web page comment information, and the web page sharing information;
the second determination module is used for determining the similarity between the user account corresponding to the user operation information and the preselected user account through a collaborative filtering algorithm based on the user according to the user operation information and the operation information of the preselected user account;
a third determining module, configured to determine the preselected user account with the similarity higher than the target value as a similar user account;
the acquisition module is used for acquiring the web pages which are not visited by the user account in the favorite web pages of the similar user accounts as the target web pages.
Optionally, the apparatus further comprises:
the obtaining module is configured to obtain a voice configuration, where the voice configuration includes at least one of a sound type, a speech rate, a tone, and a volume;
and the generating module is used for generating the voice based on a voice synthesis engine according to the voice configuration and the text information.
Optionally, the obtaining module is configured to:
determining the type of the target webpage, wherein the type is used for reflecting the industry field corresponding to the target webpage;
and acquiring the voice configuration matched with the type.
Optionally, the playing module includes:
the display submodule is used for displaying at least one piece of preselected background music;
the acquisition submodule is used for responding to the selection operation of the preselected background music and acquiring target background music;
and the playing module is used for playing the target background music in the process of playing the voice.
Optionally, the extracting module is configured to:
and extracting the text information from the target webpage through a webpage extraction algorithm based on heuristic rules.
Optionally, the display module is configured to display a website input interface in response to a triggering operation on the webpage playing control in the first form;
the acquisition module is used for responding to a key-in operation in the website input interface and acquiring an input webpage corresponding to a webpage website input by the key-in operation;
the acquisition module is used for acquiring the target webpage according to the input webpage.
According to another aspect of the present application, there is provided an electronic device comprising a processor and a memory, the memory having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by the processor to implement the web page playing method as described above.
According to another aspect of the present application, there is provided a computer-readable storage medium having stored therein at least one instruction, at least one program, code set, or set of instructions that is loaded and executed by a processor to implement a web page playing method as described above.
According to another aspect of the application, a computer program product or computer program is provided, comprising computer instructions stored in a computer readable storage medium. The processor of the electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the webpage playing method provided in the various optional implementation modes of the above aspects.
The beneficial effect that technical scheme that this application provided brought includes at least:
and acquiring a target webpage according to the text copied by the copying operation, extracting character information in the acquired target webpage when receiving webpage reading operation triggered on a webpage reading interface, and playing voice corresponding to the character information. For the webpage without voice, the voice corresponding to the webpage can be played. A mode for flexibly playing voice corresponding to a webpage is provided.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic interface diagram of an implementation process of playing a web page according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a method for playing a web page according to an embodiment of the present application;
fig. 3 is a schematic flowchart of another method for playing a web page according to an embodiment of the present application;
fig. 4 is a schematic flowchart of another webpage playing method provided in the embodiment of the present application;
fig. 5 is a schematic flowchart of another method for playing a web page according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a web page playing apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of another web page playing apparatus provided in the embodiment of the present application;
fig. 8 is a schematic structural diagram of another web page playing apparatus provided in the embodiment of the present application;
fig. 9 is a schematic structural diagram of another web page playing apparatus according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a further web page playing apparatus provided in an embodiment of the present application;
fig. 11 is a schematic structural diagram of a playing module according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a terminal according to an embodiment of the present application.
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Fig. 1 is an interface schematic diagram of an implementation process of playing a web page according to an embodiment of the present application. As shown in fig. 1, a web page reading interface 101 of the client displays a web page playing control 102 in a first form, where the web page playing control 102 is a button. The web page reading interface 101 also displays the voice readings corresponding to different text messages, the playing times corresponding to each voice reading, and a text reading button for triggering the designated text playing. In the process of displaying the web page play control 102 in the first form, the client acquires the target web page according to the text stored in the clipboard by the copy operation. Optionally, the client is further capable of acquiring the target webpage according to the webpage access record and the user operation information. After the client acquires the target webpage, the webpage playing control 103 in the second form is displayed, wherein the second form is thickened compared with the first form, and is used for prompting the user that the control can be clicked to play text information in the target webpage. When the client detects the triggering operation of the web page playing control 103 in the second form, the text information in the target web page is extracted, and the voice configuration matched with the type is obtained according to the type of the target web page. The trigger operation refers to a single-click operation on the web page play control 103 in the second form. The voice configuration includes at least one of a voice type, a voice rate, a intonation, and a volume. The client can generate voice based on Text To Speech (TTS) and play the voice according To the voice configuration and the Text information. Optionally, when playing the voice, the client can also display the playing information 104 of the voice in the web page reading interface 101. The playing information 104 includes text information, a play/pause button, and a voice playing progress control extracted from the target webpage by the client.
And acquiring a target webpage according to the text copied by the copying operation, extracting character information in the acquired target webpage when detecting the triggering operation of the webpage playing control in the second form, generating voice according to the character information and playing the voice. For the webpage without voice, the voice corresponding to the webpage can be played. A mode for flexibly playing voice corresponding to a webpage is provided.
Fig. 2 is a schematic flowchart of a webpage playing method according to an embodiment of the present application. The method may be used for an electronic device or a client on an electronic device. As shown in fig. 2, the method includes:
step 201, in response to the copy operation, storing the text copied by the copy operation in the clipboard.
The copy operation refers to an operation of selecting and copying a text by a single click, a long press on a mouse, and selecting and copying a text by a single click, a double click, and a long press on a touch screen, which is detected by an electronic device. The clipboard is a clipboard in the client, a clipboard in an input method installed in the electronic device where the client is located, or a clipboard of the electronic device system. The text includes copied Chinese characters, letters, numbers, symbols, characters in different languages, and the like. For example "open, www.1357.bcd".
Step 202, responding to the opening of the webpage reading interface on the application program, and acquiring the target webpage according to the text in the clipboard.
The webpage reading interface is used for triggering the application program to acquire the target webpage. The application is a client. The client comprises a song client, a video on demand client, a social client, a Karaoke client, a short video client and a live broadcast client. When the client displays the webpage reading interface, the target webpage is obtained according to the text in the clipboard.
Optionally. The webpage reading interface displays a webpage playing control in a first form. When the client displays the webpage playing control in the first form, the target webpage can be obtained according to the text in the clipboard. For example, the client identifies a piece of text newly stored in the clipboard, so as to obtain a target website, and obtains a target webpage according to the target website. Optionally, the client is further capable of acquiring the target webpage according to the webpage access record and the user operation information. The webpage playing control is used for triggering the client to play the voice corresponding to the webpage. Optionally, the first form of web page playing control is a button, a text, or an icon.
Step 203, responding to the webpage reading operation triggered on the webpage reading interface, and extracting the text information in the target webpage.
The target webpage refers to any webpage comprising text information. And the client acquires the target webpage according to the website of the target webpage through the electronic equipment. The client side sends the website of the target webpage to the corresponding server, and acquires the target webpage from the server. Alternatively, the server sends the target web page directly to the client.
The webpage reading operation is used for triggering the client to extract the text information in the target webpage and play corresponding voice. Optionally, when the client acquires the target webpage, the webpage playing control is displayed in the webpage reading interface. Or when the client acquires the target webpage, the webpage playing control in the first form displayed in the webpage reading interface is switched and displayed to be the webpage playing control in the second form. The second configuration is different from the first configuration. The second form of the webpage playing control is compared with the first form and used for highlighting the webpage playing control so as to remind the user. Optionally, the second form is obtained by performing bold display, highlight display, blinking display, shaking display, and adding a prompt element display on the first form.
Optionally, the web page reading operation is triggered by a touch operation on a web page playing control. The touch operation includes a single-click operation, a double-click operation, a long-press operation, a slide operation, and the like. The touch operation further includes that the client detects a specified voice instruction through the electronic device where the client is located, for example, the voice instruction is "start playing a web page". The character information in the target webpage comprises Chinese characters, letters, characters in different languages and punctuation marks in the target webpage.
Optionally, the client extracts the text information in the web page through a web page extraction algorithm based on heuristic rules. Extracting the text information through a web page extraction algorithm based on heuristic rules refers to identifying the text information in a web page through a machine learning model so as to extract the text information. The machine learning model is based on a webpage extraction algorithm of heuristic rules, and is obtained by carrying out unsupervised training on webpage samples. The web page sample comprises at least one web page comprising text information. The client can also extract the text information in the web page through the regular expression and extract the text information in the web page through a Cascading Style Sheets (CSS) selector.
And step 204, playing the voice corresponding to the text message.
And the client generates the voice corresponding to the text information based on TTS according to the extracted text information in the target webpage, thereby realizing the playing of the voice. And the client can support the conversion of characters in different languages into voice in corresponding languages. Optionally, the client is further capable of generating the voice according to a voice configuration set by the user, where the voice configuration includes at least one of a voice type, a voice speed, a tone, and a volume. When playing the voice, the client can also play the voice and the background music synchronously according to the background music set by the user.
To sum up, according to the webpage playing method provided in the embodiment of the present application, a target webpage is obtained according to a text copied by a copy operation, and when a webpage reading operation triggered on a webpage reading interface is received, text information in the obtained target webpage is extracted, and a voice corresponding to the text information is played. For the webpage without voice, the voice corresponding to the webpage can be played. A mode for flexibly playing voice corresponding to a webpage is provided.
Fig. 3 is a schematic flowchart of another webpage playing method according to an embodiment of the present application. The method may be used for an electronic device or a client on an electronic device. As shown in fig. 3, the method includes:
in step 301, in response to the copy operation, the text copied by the copy operation is stored in the clipboard.
The copy operation refers to an operation of selecting and copying a text by a single click, a long press on a mouse, and selecting and copying a text by a single click, a double click, and a long press on a touch screen, which is detected by an electronic device. The clipboard is a clipboard in the client, a clipboard in an input method installed in the electronic device where the client is located, or a clipboard of the electronic device system. The text includes copied Chinese characters, letters, numbers, symbols, characters in different languages, and the like.
Step 302, in response to opening a web page reading interface on the application program, a target web page is obtained according to the text in the clipboard.
The webpage reading interface is used for triggering the application program to acquire the target webpage. The application is a client. Optionally, a web page playing control in a first form is displayed in the web page reading interface. The first form of the webpage playing control is a button, a character or an icon. And when the client displays the webpage playing control in the first form, the target webpage is obtained according to the copying operation.
Optionally, the client opens a web page reading interface on the application program, that is, in the process of displaying the web page playing control in the first form, the client obtains the text copied by the copy operation stored in the clipboard. And identifies a first target web address in the text. And then acquiring a target webpage according to the first target website. Optionally, the client filters the text through a regular expression to obtain the first target website. Wherein, the regular expression is established according to the character composition rule of the website. When the client side obtains a plurality of first target websites through the clipboard, the client side obtains the target webpage according to the latest first target website. Or the client displays the acquired multiple first target websites in a user interface displaying the first-form webpage playing control, and acquires the target webpage according to the first target website pointed by the selection operation of the user.
Optionally, when the text copied by the copy operation stored in the clipboard acquired by the client does not include the first target website, the client may further use the copied text as a keyword, search in a search webpage according to the keyword, and determine the address of the webpage with the highest matching degree with the keyword as the first target website.
And 303, responding to the webpage reading operation triggered on the webpage reading interface, and extracting the text information in the target webpage.
The target webpage refers to any webpage comprising text information. The webpage reading operation is used for triggering the client to extract the text information in the target webpage and play corresponding voice. Optionally, when the client acquires the target webpage, the webpage playing control is displayed in the webpage reading interface. Or when the client acquires the target webpage, the webpage playing control in the first form displayed in the webpage reading interface is switched and displayed to be the webpage playing control in the second form. The second configuration is different from the first configuration. The second form of the webpage playing control is compared with the first form and used for highlighting the webpage playing control so as to remind the user. Optionally, the second form is obtained by performing bold display, highlight display, blinking display, shaking display, and adding a prompt element display on the first form. And when the client displays the webpage playing control in the second form, the client can also play a prompt tone so as to further prompt the user. Illustratively, with continued reference to fig. 1, the web page play control 103 of the second modality is displayed bolded and the display of the prompt element is also increased as compared to the web page play control 102 of the first modality.
Optionally, the web page reading operation is triggered by a touch operation on a web page playing control. The touch operation includes a single-click operation, a double-click operation, a long-press operation, a slide operation, and the like. The touch operation further includes that the client detects a specified voice instruction through the electronic device where the client is located, for example, the voice instruction is "start playing a web page". The character information in the target webpage comprises Chinese characters, letters, characters in different languages and punctuation marks in the target webpage.
Optionally, the client extracts the text information from the target webpage through a webpage extraction algorithm based on heuristic rules. For different web pages, certain rules are satisfied despite differences in design layout. The webpage extraction algorithm based on the heuristic rule can take a Document Object Model (DOM) tree corresponding to the webpage and nodes (nodes) therein as basic units for feature extraction by utilizing the rules, so that the webpage is analyzed, and various text information in the webpage can be accurately extracted. Optionally, the heuristic rules include at least one of a publication time rule, a source rule, a body rule, and a title rule. The release time rule is used for extracting the text information corresponding to the release time of the webpage and is determined according to keywords reflecting the time and the date. For example, the keywords are "issue time", "time", and "question time". The source rule is used for extracting the text information corresponding to the source of the webpage and is determined according to the keywords reflecting the source of the webpage and the specified Node (Node) in the webpage. For example, the designated node includes a node whose previous or next node is the distribution time and a node whose previous or next node is the title. The text rule is used for extracting text information corresponding to the text of the webpage and is determined according to the first text length and the specified information. For example, a first text length of a text in a node exceeds a first preset value, and the node is a node including a body. The specifying information includes a tag < p > reflecting the paragraph and a linefeed tag < br >. The title rule is used for extracting the character information corresponding to the title of the webpage and is determined according to the second text length and the designated information. For example, the second text length of the text in the node exceeds the second preset value and is less than the third preset value (the text length of the title is limited), the node including the title is determined. The specification information includes a tag < strong > reflecting font bolding, and H1, H2, H3 tags reflecting paragraphs, and the like. The webpage extraction algorithm is to extract the characteristics of each node in the input webpage and classify the nodes according to the extracted characteristics so as to extract the specified character information in the webpage. For example, only text information of the body of the web page is extracted. Specifically, the client extracts the text information from the target webpage through a machine learning model, and the machine learning model is based on the webpage extraction algorithm based on the heuristic rule. The machine learning model is obtained by carrying out unsupervised training on webpage samples. The web page sample comprises at least one web page comprising text information. The client can also extract the text information in the webpage through the regular expression and extract the text information in the webpage through the CSS selector. Extracting the text information through the regular expression refers to performing string-level retrieval in the source code of the webpage through the regular expression, so as to extract the text information. The regular expression is established based on character composition rules of natural language. Extracting the text information through the CSS selector refers to screening elements corresponding to the text information in the web page through the DOM corresponding to the web page, thereby extracting the text information.
Step 304, obtaining voice configuration.
The voice configuration includes at least one of a voice type, a voice rate, a intonation, and a volume. The sound profile is pre-established by the client. The client can generate different styles of voices through different voice configurations. The client can determine the type of the target webpage and acquire the voice configuration matched with the type. The type of the target webpage is used for reflecting the industry field corresponding to the target webpage. For example, the client determines the type of the web page according to keywords included in the web page. For scientific research web pages, the client side obtains speech configuration in a serious style, for entertainment web pages, the client side obtains speech configuration in an active style, and for fashion web pages, the client side obtains speech configuration in a female style.
Optionally, the client may further display different voice configurations, and obtain a corresponding voice configuration according to a selection operation of the user, so as to generate a voice according to the corresponding voice configuration. Or the client generates voice according to the voice configuration selected by the user last time and the voice configuration again.
Step 305, generating voice based on a voice synthesis engine according to the voice configuration and the text information.
The speech synthesis engine is based on TTS and can convert text information into corresponding speech based on speech configuration. The client can perform language processing on the character information through the speech synthesis engine, namely, the understanding process of a human to natural language is simulated, and the text normalization, word segmentation, syntactic analysis and semantic analysis are performed on the character information. And then, performing prosody processing according to the voice configuration, namely determining the characteristics of each sound segment in the generated voice corresponding to the text information, such as pitch, duration, tone intensity and the like, so that the synthesized voice can correctly and naturally express the semantic meaning. And finally, generating the voice according to the previous processing result.
And step 306, playing the voice corresponding to the text information.
After extracting the text information in the target webpage and generating the voice, the client automatically plays the voice. When the client plays the voice, at least one piece of pre-selected background music can be displayed. The background music is preset in the client. And responding to the selection operation of the pre-selected background music, the client acquires the target background music, and then plays the target background music in the process of playing the voice.
To sum up, according to the webpage playing method provided in the embodiment of the present application, a target webpage is obtained according to a text copied by a copy operation, and when a webpage reading operation triggered on a webpage reading interface is received, text information in the obtained target webpage is extracted, and a voice corresponding to the text information is played. For the webpage without voice, the voice corresponding to the webpage can be played. A mode for flexibly playing voice corresponding to a webpage is provided.
In addition, the target webpage is obtained through the clipboard, so that the operation steps of playing the voice corresponding to the webpage by the user are simplified. The target webpage is obtained through the webpage access record and the user operation information, voice corresponding to the webpage in which the user is interested can be actively played for the user, and user experience is improved. The voice corresponding to the text information is generated according to the voice configuration, the generation of voices of different styles can be realized according to the requirements of users or the types of the webpages, the background music selected by the users can be synchronously played in the voice playing process, and the user experience is improved.
Fig. 4 is a schematic flowchart of another webpage playing method according to an embodiment of the present application. The method may be used for an electronic device or a client on an electronic device. As shown in fig. 4, the method includes:
step 401, in response to the situation that the webpage reading interface is opened and the target webpage cannot be acquired from the clipboard, acquiring the target webpage according to the webpage access record.
The webpage reading interface is used for triggering the application program to acquire the target webpage. The application is a client. The client cannot acquire the target webpage from the clipboard, wherein the target webpage comprises characters which do not comprise the website in the text stored in the clipboard, and the text which is not stored in the clipboard. And at the moment, the client can acquire the target webpage according to the webpage access record. The webpage access record is obtained by the client according to the client with the webpage access function in the electronic equipment. Optionally, a web page playing control in a first form is displayed in the web page reading interface. The client side obtains the webpage access record in the process of displaying the webpage playing control in the first form, then determines the website with the highest access frequency in the webpage access record in the target time period as a second target website, and obtains the target webpage according to the second target website. Wherein the target time period is set by the client, for example, the last day, the last week or the last month. Alternatively, the target time period is determined based on the current time, e.g., the current time is 11:00, then the target time period is 10:00 to 12:00 of each day of the last month.
And 402, responding to webpage reading operation triggered on the webpage reading interface, and extracting the text information in the target webpage.
The target webpage refers to any webpage comprising text information. The webpage reading operation is used for triggering the client to extract the text information in the target webpage and play corresponding voice. Optionally, when the client acquires the target webpage, the webpage playing control is displayed in the webpage reading interface. Or when the client acquires the target webpage, the webpage playing control in the first form displayed in the webpage reading interface is switched and displayed to be the webpage playing control in the second form. The second configuration is different from the first configuration. The second form of the webpage playing control is compared with the first form and used for highlighting the webpage playing control so as to remind the user. Optionally, the second form is obtained by performing bold display, highlight display, blinking display, shaking display, and adding a prompt element display on the first form. And when the client displays the webpage playing control in the second form, the client can also play a prompt tone so as to further prompt the user. Illustratively, with continued reference to fig. 1, the web page play control 103 of the second modality is displayed bolded and the display of the prompt element is also increased as compared to the web page play control 102 of the first modality.
Optionally, the web page reading operation is triggered by a touch operation on a web page playing control. The touch operation includes a single-click operation, a double-click operation, a long-press operation, a slide operation, and the like. The touch operation further includes that the client detects a specified voice instruction through the electronic device where the client is located, for example, the voice instruction is "start playing a web page". The character information in the target webpage comprises Chinese characters, letters, characters in different languages and punctuation marks in the target webpage.
Optionally, the client extracts the text information from the target webpage through a webpage extraction algorithm based on heuristic rules. Specifically, the client extracts the text information from the target webpage through a machine learning model, and the machine learning model is based on the webpage extraction algorithm based on the heuristic rule. The machine learning model is obtained by carrying out unsupervised training on webpage samples. The web page sample comprises at least one web page comprising text information. The webpage extraction algorithm based on the heuristic rule can utilize the design layout rule of the webpage and take the DOM tree corresponding to the webpage and the nodes therein as basic units for feature extraction, so that the webpage is analyzed, and various text information in the webpage can be accurately extracted. The client can also extract the text information in the webpage through the regular expression and extract the text information in the webpage through the CSS selector. Extracting the text information through the regular expression refers to performing string-level retrieval in the source code of the webpage through the regular expression, so as to extract the text information. The regular expression is established based on character composition rules of natural language. Extracting the text information through the CSS selector refers to screening elements corresponding to the text information in the web page through the DOM corresponding to the web page, thereby extracting the text information.
And step 403, acquiring voice configuration.
The voice configuration includes at least one of a voice type, a voice rate, a intonation, and a volume. The sound profile is pre-established by the client. The client can generate different styles of voices through different voice configurations. The client can determine the type of the target webpage and acquire the voice configuration matched with the type. The type of the target webpage is used for reflecting the industry field corresponding to the target webpage. For example, the client determines the type of the web page according to keywords included in the web page. For scientific research web pages, the client side obtains speech configuration in a serious style, for entertainment web pages, the client side obtains speech configuration in an active style, and for fashion web pages, the client side obtains speech configuration in a female style.
Optionally, the client may further display different voice configurations, and obtain a corresponding voice configuration according to a selection operation of the user, so as to generate a voice according to the corresponding voice configuration. Or the client generates voice according to the voice configuration selected by the user last time and the voice configuration again.
Step 404, generating speech based on the speech synthesis engine according to the speech configuration and the text information.
The speech synthesis engine is based on TTS and can convert text information into corresponding speech based on speech configuration. The client can perform language processing on the character information through the speech synthesis engine, namely, the understanding process of a human to natural language is simulated, and the text normalization, word segmentation, syntactic analysis and semantic analysis are performed on the character information. And then, performing prosody processing according to the voice configuration, namely determining the characteristics of each sound segment in the generated voice corresponding to the text information, such as pitch, duration, tone intensity and the like, so that the synthesized voice can correctly and naturally express the semantic meaning. And finally, generating the voice according to the previous processing result.
Step 405, playing the voice corresponding to the text message.
After extracting the text information in the target webpage and generating the voice, the client automatically plays the voice. When the client plays the voice, at least one piece of pre-selected background music can be displayed. The background music is preset in the client. And responding to the selection operation of the pre-selected background music, the client acquires the target background music, and then plays the target background music in the process of playing the voice.
To sum up, according to the webpage playing method provided by the embodiment of the application, the target webpage is obtained according to the webpage access record, when the webpage reading operation triggered on the webpage reading interface is received, the text information in the obtained target webpage is extracted, and the voice corresponding to the text information is played. For the webpage without voice, the voice corresponding to the webpage can be played. A mode for flexibly playing voice corresponding to a webpage is provided.
In addition, the target webpage is obtained through the webpage access record, so that voice corresponding to the webpage in which the user is interested can be actively played for the user, and the user experience is improved. The voice corresponding to the text information is generated according to the voice configuration, the generation of voices of different styles can be realized according to the requirements of users or the types of the webpages, the background music selected by the users can be synchronously played in the voice playing process, and the user experience is improved.
Fig. 5 is a schematic flowchart of another webpage playing method according to an embodiment of the present application. The method may be used for an electronic device or a client on an electronic device. As shown in fig. 5, the method includes:
step 501, in response to the situation that the webpage reading interface is opened and the target webpage cannot be acquired from the clipboard, acquiring the target webpage according to the user operation information.
The webpage reading interface is used for triggering the application program to acquire the target webpage. The application is a client. The client cannot acquire the target webpage from the clipboard, wherein the target webpage comprises characters which do not comprise the website in the text stored in the clipboard, and the text which is not stored in the clipboard. At this time, the client can acquire the target webpage according to the user operation information. The client side can not acquire the target webpage from the clipboard and can also acquire the target webpage according to the webpage access record. When the client fails to acquire the target webpage from the clipboard, the client randomly determines the mode to acquire the target webpage. Or the client side respectively acquires the first target webpage and the second target webpage in two modes, and determines the target webpage according to the selection operation of the user. Optionally, a web page playing control in a first form is displayed in the web page reading interface. In the process of displaying the webpage playing control in the first form, the client can also acquire user operation information. The user operation information comprises at least one of webpage access information, webpage collection information, webpage comment information and webpage sharing information. The user operation information is acquired by the client according to the client with the webpage access function in the electronic equipment where the client is located. The client determines the similarity between the User account corresponding to the User operation information and the preselected User account through a User-based Collaborative Filtering (User-base CF) according to the User operation information and the operation information of the preselected User account. And determining the preselected user accounts with the similarity higher than the target value as similar user accounts. And then acquiring the web pages which are not accessed by the user accounts in the favorite web pages of the similar user accounts as target web pages. Wherein the user account is an account of a user using the client. The operation information of the preselected user account is obtained by the server corresponding to the client from other clients corresponding to the server and is sent to the client. The target value is determined by the client, for example, the similarity is a number between 0 and 1, the target value is 0.8, that is, the preselected user account with the similarity higher than 0.8 to the user account is determined by the client as the similar user account. And when the client determines a plurality of similar user accounts, determining the target webpage according to the favorite webpage of the similar user account with the highest similarity to the user account. The favorite web page refers to a web page which is like a user account to approve, love, forward, collect or visit every day.
Step 502, in response to a webpage reading operation triggered on the webpage reading interface, extracting text information in a target webpage.
The target webpage refers to any webpage comprising text information. The webpage reading operation is used for triggering the client to extract the text information in the target webpage and play corresponding voice. Optionally, when the client acquires the target webpage, the webpage playing control is displayed in the webpage reading interface. Or when the client acquires the target webpage, the webpage playing control in the first form displayed in the webpage reading interface is switched and displayed to be the webpage playing control in the second form. The second configuration is different from the first configuration. The second form of the webpage playing control is compared with the first form and used for highlighting the webpage playing control so as to remind the user. Optionally, the second form is obtained by performing bold display, highlight display, blinking display, shaking display, and adding a prompt element display on the first form. And when the client displays the webpage playing control in the second form, the client can also play a prompt tone so as to further prompt the user. Illustratively, with continued reference to fig. 1, the web page play control 103 of the second modality is displayed bolded and the display of the prompt element is also increased as compared to the web page play control 102 of the first modality.
Optionally, the web page reading operation is triggered by a touch operation on a web page playing control. The touch operation includes a single-click operation, a double-click operation, a long-press operation, a slide operation, and the like. The touch operation further includes that the client detects a specified voice instruction through the electronic device where the client is located, for example, the voice instruction is "start playing a web page". The character information in the target webpage comprises Chinese characters, letters, characters in different languages and punctuation marks in the target webpage.
Optionally, the client extracts the text information from the target webpage through a webpage extraction algorithm based on heuristic rules. Specifically, the client extracts the text information from the target webpage through a machine learning model, and the machine learning model is based on the webpage extraction algorithm based on the heuristic rule. The machine learning model is obtained by carrying out unsupervised training on webpage samples. The web page sample comprises at least one web page comprising text information. The webpage extraction algorithm based on the heuristic rule can utilize the design layout rule of the webpage and take the DOM tree corresponding to the webpage and the nodes therein as basic units for feature extraction, so that the webpage is analyzed, and various text information in the webpage can be accurately extracted. The client can also extract the text information in the webpage through the regular expression and extract the text information in the webpage through the CSS selector. Extracting the text information through the regular expression refers to performing string-level retrieval in the source code of the webpage through the regular expression, so as to extract the text information. The regular expression is established based on character composition rules of natural language. Extracting the text information through the CSS selector refers to screening elements corresponding to the text information in the web page through the DOM corresponding to the web page, thereby extracting the text information.
Step 503, obtaining voice configuration.
The voice configuration includes at least one of a voice type, a voice rate, a intonation, and a volume. The sound profile is pre-established by the client. The client can generate different styles of voices through different voice configurations. The client can determine the type of the target webpage and acquire the voice configuration matched with the type. The type of the target webpage is used for reflecting the industry field corresponding to the target webpage. For example, the client determines the type of the web page according to keywords included in the web page. For scientific research web pages, the client side obtains speech configuration in a serious style, for entertainment web pages, the client side obtains speech configuration in an active style, and for fashion web pages, the client side obtains speech configuration in a female style.
Optionally, the client may further display different voice configurations, and obtain a corresponding voice configuration according to a selection operation of the user, so as to generate a voice according to the corresponding voice configuration. Or the client generates voice according to the voice configuration selected by the user last time and the voice configuration again.
Step 504, generating speech based on the speech synthesis engine according to the speech configuration and the text information.
The speech synthesis engine is based on TTS and can convert text information into corresponding speech based on speech configuration. The client can perform language processing on the character information through the speech synthesis engine, namely, the understanding process of a human to natural language is simulated, and the text normalization, word segmentation, syntactic analysis and semantic analysis are performed on the character information. And then, performing prosody processing according to the voice configuration, namely determining the characteristics of each sound segment in the generated voice corresponding to the text information, such as pitch, duration, tone intensity and the like, so that the synthesized voice can correctly and naturally express the semantic meaning. And finally, generating the voice according to the previous processing result.
And 505, playing the voice corresponding to the text information.
After extracting the text information in the target webpage and generating the voice, the client automatically plays the voice. When the client plays the voice, at least one piece of pre-selected background music can be displayed. The background music is preset in the client. And responding to the selection operation of the pre-selected background music, the client acquires the target background music, and then plays the target background music in the process of playing the voice.
In summary, according to the webpage playing method provided in the embodiment of the present application, the target webpage is obtained according to the user operation information, when the webpage reading operation triggered on the webpage reading interface is received, the text information in the obtained target webpage is extracted, and the voice corresponding to the text information is played. For the webpage without voice, the voice corresponding to the webpage can be played. A mode for flexibly playing voice corresponding to a webpage is provided.
In addition, the target webpage is obtained through the user operation information, so that the voice corresponding to the webpage in which the user is interested can be actively played for the user, and the user experience is improved. The voice corresponding to the text information is generated according to the voice configuration, the generation of voices of different styles can be realized according to the requirements of users or the types of the webpages, the background music selected by the users can be synchronously played in the voice playing process, and the user experience is improved.
It should be noted that, in the above embodiment, the step of obtaining the target web page according to the text copied by the copy operation stored in the clipboard, the step of obtaining the target web page according to the web page access record, and the step of obtaining the target web page according to the user operation information may be implemented in a freely combined manner, or may be implemented separately, which is not limited in this embodiment of the application.
And the client can also acquire the target webpage according to the website input by the user. Optionally, a web page playing control in a first form is displayed in the web page reading interface. And responding to the triggering operation of the webpage playing control in the first form, and the client can display a website input interface. The website input interface is used for inputting a website by a user of the client. Responding to the key-in operation in the website input interface, the client side obtains an input webpage corresponding to the webpage website input by the key-in operation, and obtains a target webpage according to the input webpage.
It should be noted that, the order of the steps of the method provided in the embodiments of the present application may be appropriately adjusted, and the steps may also be increased or decreased according to the circumstances, and any method that can be easily conceived by those skilled in the art within the technical scope disclosed in the present application shall be covered by the protection scope of the present application, and therefore, the detailed description thereof is omitted.
Fig. 6 is a schematic structural diagram of a web page playing apparatus according to an embodiment of the present application. The apparatus may be used for an electronic device or a client on an electronic device. As shown in fig. 6, the apparatus 60 includes:
a storage module 601, configured to store, in a clipboard, text copied by a copy operation in response to the copy operation;
the obtaining module 602 is configured to, in response to opening a web page reading interface on an application, obtain a target web page according to a text in a clipboard.
And the extracting module 603 is configured to extract the text information in the target web page in response to the web page reading operation triggered on the web page reading interface.
The playing module 604 is configured to play a voice corresponding to the text message.
Optionally, the obtaining module 602 is configured to:
and responding to the opening of the webpage reading interface, and acquiring the text in the clipboard. A first target web address in the text is identified. And acquiring a target webpage according to the first target website.
Optionally, the obtaining module 602 is configured to:
and filtering the text through a regular expression to obtain a first target website, wherein the regular expression is established according to the character composition rule of the website.
Optionally, as shown in fig. 7, the apparatus 60 further comprises:
and the display module 605 is configured to display a web page play control in response to acquiring the target web page.
The extracting module 603 is configured to extract text information in the target web page in response to a web page reading operation triggered on the web page playing control.
Optionally, a web page playing control in a first form is displayed in the web page reading interface. The display module 605 is configured to, in response to acquiring the target webpage, display the webpage playing control in the second form. The extracting module 603 is configured to extract text information in the target web page in response to a web page reading operation triggered on the web page playing control in the second form.
Optionally, as shown in fig. 8, the apparatus 60 further comprises:
the obtaining module 602 is configured to obtain a web page access record in response to opening the web page reading interface and failing to obtain the target web page from the clipboard.
The first determining module 606 is configured to determine, as the second target website, the website with the highest access frequency in the target time period in the webpage access record.
The obtaining module 602 is configured to obtain the target web page according to the second target website.
Optionally, as shown in fig. 9, the apparatus 60 further comprises:
the obtaining module 602 is configured to, in response to opening the web page reading interface and failing to obtain the target web page from the clipboard, obtain user operation information, where the user operation information includes at least one of web page access information, web page collection information, web page comment information, and web page sharing information.
The second determining module 607 is configured to determine, according to the user operation information and the operation information of the preselected user account, a similarity between the user account corresponding to the user operation information and the preselected user account through a collaborative filtering algorithm based on the user.
And a third determining module 608, configured to determine the preselected user account with the similarity higher than the target value as a similar user account.
The acquiring module 602 is configured to acquire a web page, which is not accessed by the user account in the favorite web page of the similar user account, as a target web page.
Optionally, as shown in fig. 10, the apparatus 60 further includes:
an obtaining module 602, configured to obtain a voice configuration, where the voice configuration includes at least one of a voice type, a voice speed, a intonation, and a volume.
And a generating module 609, configured to generate a voice based on the voice synthesis engine according to the voice configuration and the text information.
Optionally, the obtaining module 602 is configured to:
and determining the type of the target webpage, wherein the type is used for reflecting the industry field corresponding to the target webpage. And acquiring the voice configuration matched with the type.
Optionally, as shown in fig. 11, the playing module 604 includes:
and a display sub-module 6041 for displaying at least one piece of pre-selected background music.
An acquisition sub-module 6042 for acquiring the target background music in response to the selection operation of the pre-selected background music.
The playing module 604 is configured to play the target background music during the process of playing the voice.
Optionally, the extracting module 603 is configured to:
and extracting the text information from the target webpage through a webpage extraction algorithm based on heuristic rules.
Optionally, the display module 605 is configured to display the website input interface in response to a triggering operation on the webpage playing control in the first form.
The obtaining module 602 is configured to, in response to a key-in operation in the website input interface, obtain an input webpage corresponding to a webpage website input by the key-in operation.
The obtaining module 602 is configured to obtain a target web page according to an input web page.
It should be noted that: the web page playing apparatus provided in the foregoing embodiment is only illustrated by dividing the functional modules, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the web page playing device and the web page playing method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
An embodiment of the present application also provides an electronic device, including: the system comprises a processor and a memory, wherein at least one instruction, at least one program, a code set or an instruction set is stored in the memory, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to realize the webpage playing method provided by the method embodiments.
Optionally, the electronic device is a terminal. Illustratively, fig. 12 is a schematic structural diagram of a terminal provided in an embodiment of the present application.
In general, terminal 1200 includes: a processor 1201 and a memory 1202.
The processor 1201 may include one or more processing cores, such as a 4-core processor, an 8-core processor, or the like. The processor 1201 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 1201 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 1201 may be integrated with a GPU (Graphics Processing Unit) that is responsible for rendering and drawing content that the display screen needs to display. In some embodiments, the processor 1201 may further include an AI (Artificial Intelligence) processor for processing a computing operation related to machine learning.
Memory 1202 may include one or more computer-readable storage media, which may be non-transitory. Memory 1202 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in the memory 1202 is used to store at least one instruction for execution by the processor 1201 to implement the web page playing method provided by the method embodiments of the present application.
In some embodiments, the terminal 1200 may further optionally include: a peripheral interface 1203 and at least one peripheral. The processor 1201, memory 1202, and peripheral interface 1203 may be connected by a bus or signal line. Various peripheral devices may be connected to peripheral interface 1203 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 1204, display 1205, camera assembly 1206, audio circuitry 1207, positioning assembly 1208, and power supply 1209.
The peripheral interface 1203 may be used to connect at least one peripheral associated with I/O (Input/Output) to the processor 1201 and the memory 1202. In some embodiments, the processor 1201, memory 1202, and peripheral interface 1203 are integrated on the same chip or circuit board; in some other embodiments, any one or both of the processor 1201, the memory 1202, and the peripheral device interface 1203 may be implemented on a single chip or circuit board, which is not limited in this application.
The Radio Frequency circuit 1204 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuit 1204 communicates with a communication network and other communication devices by electromagnetic signals. The radio frequency circuit 1204 converts an electric signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electric signal. Optionally, the radio frequency circuit 1204 comprises: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuit 1204 may communicate with other terminals through at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: the world wide web, metropolitan area networks, intranets, generations of mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 1204 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 1205 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 1205 is a touch display screen, the display screen 1205 also has the ability to acquire touch signals on or over the surface of the display screen 1205. The touch signal may be input to the processor 1201 as a control signal for processing. At this point, the display 1205 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display 1205 may be one, providing the front panel of the terminal 1200; in other embodiments, the display 1205 can be at least two, respectively disposed on different surfaces of the terminal 1200 or in a folded design; in still other embodiments, the display 1205 may be a flexible display disposed on a curved surface or on a folded surface of the terminal 1200. Even further, the display screen 1205 may be arranged in a non-rectangular irregular figure, i.e., a shaped screen. The Display panel 1205 can be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), or other materials.
Camera assembly 1206 is used to capture images or video. Optionally, camera assembly 1206 includes a front camera and a rear camera. Typically, the front camera is disposed on the front panel of the terminal 1200 and the rear camera is disposed on the rear side of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 1206 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The audio circuitry 1207 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals into the processor 1201 for processing or inputting the electric signals into the radio frequency circuit 1204 to achieve voice communication. For stereo capture or noise reduction purposes, multiple microphones may be provided at different locations of terminal 1200. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 1201 or the radio frequency circuit 1204 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, the audio circuitry 1207 may also include a headphone jack.
The positioning component 1208 is configured to locate a current geographic Location of the terminal 1200 to implement navigation or LBS (Location Based Service). The Positioning component 1208 can be a Positioning component based on the Global Positioning System (GPS) in the united states, the beidou System in china, or the galileo System in russia.
The power supply 1209 is used to provide power to various components within the terminal 1200. The power source 1209 may be alternating current, direct current, disposable or rechargeable. When the power source 1209 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. The wired rechargeable battery is a battery charged through a wired line, and the wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, terminal 1200 also includes one or more sensors 1210. The one or more sensors 1210 include, but are not limited to: acceleration sensor 1211, gyro sensor 1212, pressure sensor 1213, fingerprint sensor 1214, optical sensor 1215, and proximity sensor 1216.
The acceleration sensor 1211 can detect magnitudes of accelerations on three coordinate axes of the coordinate system established with the terminal 1200. For example, the acceleration sensor 1211 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 1201 may control the touch display 1205 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 1211. The acceleration sensor 1211 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 1212 may detect a body direction and a rotation angle of the terminal 1200, and the gyro sensor 1212 may collect a 3D motion of the user on the terminal 1200 in cooperation with the acceleration sensor 1211. The processor 1201 can implement the following functions according to the data collected by the gyro sensor 1212: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
Pressure sensors 1213 may be disposed on a side bezel of terminal 1200 and/or an underlying layer of touch display 1205. When the pressure sensor 1213 is disposed on the side frame of the terminal 1200, the user's holding signal of the terminal 1200 can be detected, and the processor 1201 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 1213. When the pressure sensor 1213 is disposed at a lower layer of the touch display screen 1205, the processor 1201 controls the operability control on the UI interface according to the pressure operation of the user on the touch display screen 1205. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 1214 is used for collecting a fingerprint of the user, and the processor 1201 identifies the user according to the fingerprint collected by the fingerprint sensor 1214, or the fingerprint sensor 1214 identifies the user according to the collected fingerprint. When the user identity is identified as a trusted identity, the processor 1201 authorizes the user to perform relevant sensitive operations, including unlocking a screen, viewing encrypted information, downloading software, paying, changing settings, and the like. The fingerprint sensor 1214 may be provided on the front, back, or side of the terminal 1200. When a physical button or vendor Logo is provided on the terminal 1200, the fingerprint sensor 1214 may be integrated with the physical button or vendor Logo.
The optical sensor 1215 is used to collect the ambient light intensity. In one embodiment, the processor 1201 may control the display brightness of the touch display 1205 according to the ambient light intensity collected by the optical sensor 1215. Specifically, when the ambient light intensity is high, the display brightness of the touch display panel 1205 is increased; when the ambient light intensity is low, the display brightness of the touch display panel 1205 is turned down. In another embodiment, processor 1201 may also dynamically adjust the camera head 1206 shooting parameters based on the ambient light intensity collected by optical sensor 1215.
A proximity sensor 1216, also known as a distance sensor, is typically disposed on the front panel of the terminal 1200. The proximity sensor 1216 is used to collect a distance between the user and the front surface of the terminal 1200. In one embodiment, when the proximity sensor 1216 detects that the distance between the user and the front surface of the terminal 1200 gradually decreases, the processor 1201 controls the touch display 1205 to switch from the bright screen state to the dark screen state; when the proximity sensor 1216 detects that the distance between the user and the front surface of the terminal 1200 gradually becomes larger, the processor 1201 controls the touch display 1205 to switch from the breath screen state to the bright screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 12 is not intended to be limiting of terminal 1200 and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
The embodiment of the present application further provides a computer-readable storage medium, where at least one instruction, at least one program, a code set, or a set of instructions is stored in the computer-readable storage medium, and when the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by a processor of an electronic device, the method for playing a web page provided by the foregoing method embodiments is implemented.
The present application also provides a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the webpage playing method provided by the method embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer readable storage medium, and the above readable storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only an example of the present application and should not be taken as limiting, and any modifications, equivalent switches, improvements, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (10)

1. A method for playing a web page, the method comprising:
in response to a copy operation, storing text copied by the copy operation in a clipboard;
responding to the opening of a webpage reading interface on an application program, and acquiring a target webpage according to the text in the clipboard;
responding to webpage reading operation triggered on the webpage reading interface, and extracting text information in the target webpage;
and playing the voice corresponding to the text information.
2. The method of claim 1, wherein the retrieving a target web page from the text in the clipboard in response to opening a web page reading interface on an application comprises:
responding to the opening of the webpage reading interface, and acquiring the text in the clipboard;
identifying a first target website in the text;
and acquiring the target webpage according to the first target website.
3. The method of claim 2, wherein the identifying the first target website in the text comprises:
and filtering the text through a regular expression to obtain the first target website, wherein the regular expression is established according to a character composition rule of the website.
4. The method according to any one of claims 1 to 3, wherein a first form of web page playing control is displayed in the web page reading interface;
after the target webpage is obtained according to the text in the clipboard in response to the opening of the webpage reading interface on the application, the method further includes:
responding to the acquired target webpage, and displaying the webpage playing control in a second form;
the step of extracting the text information in the target webpage in response to the webpage reading operation triggered on the webpage reading interface comprises the following steps:
and responding to the webpage reading operation triggered on the webpage playing control in the second form, and extracting the text information in the target webpage.
5. The method according to any one of claims 1 to 3, wherein before the extracting text information in the target web page in response to the web page read operation triggered on the web page read interface, the method further comprises:
responding to the situation that the webpage reading interface is opened and the target webpage cannot be acquired from the clipboard, and acquiring a webpage access record;
determining the website with the most access times in the target time period in the webpage access record as a second target website;
and acquiring the target webpage according to the second target website.
6. The method according to any one of claims 1 to 3, wherein before the extracting text information in the target web page in response to the web page read operation triggered on the web page read interface, the method further comprises:
in response to the webpage reading interface being opened and the target webpage being not acquired from the clipboard, acquiring user operation information, wherein the user operation information comprises at least one of the webpage access information, the webpage collection information, the webpage comment information and the webpage sharing information;
according to the user operation information and operation information of a preselected user account, determining the similarity between the user account corresponding to the user operation information and the preselected user account through a collaborative filtering algorithm based on a user;
determining the preselected user accounts with the similarity higher than a target value as similar user accounts;
and acquiring the web pages which are not accessed by the user account in the favorite web pages of the similar user accounts as the target web pages.
7. The method according to any one of claims 1 to 3, wherein after the extracting text information in the target webpage in response to the webpage speaking operation triggered on the webpage speaking interface, the method further comprises:
displaying at least one piece of pre-selected background music;
responding to the selection operation of the pre-selected background music, and acquiring target background music;
and playing the target background music in the process of playing the voice.
8. A web page playing apparatus, the apparatus comprising:
the storage module is used for responding to the copy operation and storing the text copied by the copy operation in a clipboard;
the first acquisition module is used for responding to the opening of a webpage reading interface on an application program and acquiring a target webpage according to the text in the clipboard;
the extraction module is used for responding to webpage reading operation triggered on the webpage reading interface and extracting the text information in the target webpage;
and the playing module is used for playing the voice corresponding to the text information.
9. An electronic device, comprising a processor and a memory, wherein at least one instruction, at least one program, a set of codes, or a set of instructions is stored in the memory, and the at least one instruction, the at least one program, the set of codes, or the set of instructions is loaded and executed by the processor to implement the web page playing method according to any one of claims 1 to 7.
10. A computer-readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by a processor to implement the method of playing a web page according to any one of claims 1 to 7.
CN202011599602.5A 2020-12-30 2020-12-30 Webpage playing method, device, equipment and storage medium Pending CN112632445A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011599602.5A CN112632445A (en) 2020-12-30 2020-12-30 Webpage playing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011599602.5A CN112632445A (en) 2020-12-30 2020-12-30 Webpage playing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112632445A true CN112632445A (en) 2021-04-09

Family

ID=75287621

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011599602.5A Pending CN112632445A (en) 2020-12-30 2020-12-30 Webpage playing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112632445A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113360127A (en) * 2021-05-31 2021-09-07 富途网络科技(深圳)有限公司 Audio playing method and electronic equipment
CN114449133A (en) * 2021-12-23 2022-05-06 北京达佳互联信息技术有限公司 File display method, device, equipment, storage medium and program product
CN114461171A (en) * 2022-01-27 2022-05-10 山东省城市商业银行合作联盟有限公司 Method and system for reading web bank pages
WO2022222728A1 (en) * 2021-04-20 2022-10-27 华为技术有限公司 Text reading method and device
CN115394282A (en) * 2022-06-01 2022-11-25 北京网梯科技发展有限公司 Information interaction method and device, teaching platform, electronic equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101729827A (en) * 2009-12-14 2010-06-09 深圳市同洲电子股份有限公司 Voice service method, system, digital television receiving terminal and front-end device
CN102629273A (en) * 2012-03-19 2012-08-08 奇智软件(北京)有限公司 Advertising information pushing method based on browser, device and browser system
CN102955847A (en) * 2012-10-25 2013-03-06 北京奇虎科技有限公司 System for loading website data on browser format page
CN103377238A (en) * 2012-04-26 2013-10-30 腾讯科技(深圳)有限公司 Method and browser for processing webpage information
CN104090978A (en) * 2014-07-23 2014-10-08 厦门美图之家科技有限公司 Method for quickly being access to web site
US20170013072A1 (en) * 2015-07-09 2017-01-12 Guangzhou Ucweb Computer Technology Co., Ltd. Webpage pre-reading method, apparatus and smart terminal device
CN107341162A (en) * 2016-05-03 2017-11-10 北京搜狗科技发展有限公司 Web page processing method and device, the device for Web Page Processing
CN107436893A (en) * 2016-05-26 2017-12-05 北京搜狗科技发展有限公司 A kind of webpage recommending method and device
CN108763500A (en) * 2018-05-30 2018-11-06 深圳壹账通智能科技有限公司 Voice-based Web browser method, device, equipment and storage medium
CN110347309A (en) * 2019-06-26 2019-10-18 腾讯科技(深圳)有限公司 Read aloud control method, device and equipment and computer storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101729827A (en) * 2009-12-14 2010-06-09 深圳市同洲电子股份有限公司 Voice service method, system, digital television receiving terminal and front-end device
CN102629273A (en) * 2012-03-19 2012-08-08 奇智软件(北京)有限公司 Advertising information pushing method based on browser, device and browser system
CN103377238A (en) * 2012-04-26 2013-10-30 腾讯科技(深圳)有限公司 Method and browser for processing webpage information
CN102955847A (en) * 2012-10-25 2013-03-06 北京奇虎科技有限公司 System for loading website data on browser format page
CN104090978A (en) * 2014-07-23 2014-10-08 厦门美图之家科技有限公司 Method for quickly being access to web site
US20170013072A1 (en) * 2015-07-09 2017-01-12 Guangzhou Ucweb Computer Technology Co., Ltd. Webpage pre-reading method, apparatus and smart terminal device
CN107341162A (en) * 2016-05-03 2017-11-10 北京搜狗科技发展有限公司 Web page processing method and device, the device for Web Page Processing
CN107436893A (en) * 2016-05-26 2017-12-05 北京搜狗科技发展有限公司 A kind of webpage recommending method and device
CN108763500A (en) * 2018-05-30 2018-11-06 深圳壹账通智能科技有限公司 Voice-based Web browser method, device, equipment and storage medium
CN110347309A (en) * 2019-06-26 2019-10-18 腾讯科技(深圳)有限公司 Read aloud control method, device and equipment and computer storage medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022222728A1 (en) * 2021-04-20 2022-10-27 华为技术有限公司 Text reading method and device
CN113360127A (en) * 2021-05-31 2021-09-07 富途网络科技(深圳)有限公司 Audio playing method and electronic equipment
CN113360127B (en) * 2021-05-31 2023-05-23 富途网络科技(深圳)有限公司 Audio playing method and electronic equipment
CN114449133A (en) * 2021-12-23 2022-05-06 北京达佳互联信息技术有限公司 File display method, device, equipment, storage medium and program product
CN114461171A (en) * 2022-01-27 2022-05-10 山东省城市商业银行合作联盟有限公司 Method and system for reading web bank pages
CN114461171B (en) * 2022-01-27 2023-11-28 山东省城市商业银行合作联盟有限公司 Method and system for reading online banking page
CN115394282A (en) * 2022-06-01 2022-11-25 北京网梯科技发展有限公司 Information interaction method and device, teaching platform, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN112632445A (en) Webpage playing method, device, equipment and storage medium
CN110933330A (en) Video dubbing method and device, computer equipment and computer-readable storage medium
CN108829751B (en) Method and device for generating lyrics and displaying lyrics, electronic equipment and storage medium
CN110019929B (en) Webpage content processing method and device and computer readable storage medium
CN110322760B (en) Voice data generation method, device, terminal and storage medium
CN108270794B (en) Content distribution method, device and readable medium
CN111524501B (en) Voice playing method, device, computer equipment and computer readable storage medium
CN113411680B (en) Multimedia resource playing method, device, terminal and storage medium
CN114205324A (en) Message display method, device, terminal, server and storage medium
CN112230909A (en) Data binding method, device and equipment of small program and storage medium
CN109635202B (en) Content item processing method and device, electronic equipment and storage medium
CN112068762A (en) Interface display method, device, equipment and medium of application program
CN110543350A (en) Method and device for generating page component
CN111459363A (en) Information display method, device, equipment and storage medium
CN111339938A (en) Information interaction method, device, equipment and storage medium
CN109917988B (en) Selected content display method, device, terminal and computer readable storage medium
CN111415650A (en) Text-to-speech method, device, equipment and storage medium
CN110798327B (en) Message processing method, device and storage medium
CN110245255B (en) Song display method, device, equipment and storage medium
CN111191176A (en) Website content updating method, device, terminal and storage medium
CN108416026B (en) Index generation method, content search method, device and equipment
CN111428079B (en) Text content processing method, device, computer equipment and storage medium
CN110837557B (en) Abstract generation method, device, equipment and medium
CN112069350A (en) Song recommendation method, device, equipment and computer storage medium
CN112004134B (en) Multimedia data display method, device, equipment and storage medium

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