Voice broadcast method and device
By identifying and deleting invalid content, the voice broadcast function of the electronic device can broadcast the main content according to user needs, solving the problem of messy information in the prior art, and improving user experience and device accessibility.
Patent Information
- Application Number
- CN202110131882.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-30
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2041-01-30
AI Technical Summary
In the prior art, the voice broadcasting function of electronic devices cannot distinguish between effective and invalid content based on user needs, making it difficult for users to obtain truly useful information.
By detecting user operations, the electronic device recognizes the current page content, deletes invalid content and uses the corresponding voice broadcast template to broadcast the main content, including identifying the invalid text library and the voice broadcast template corresponding to the application scenario.
Improve the quality of voice broadcasts, enable users to obtain useful information more conveniently, and improve user experience and device accessibility.
Smart Images

Figure CN114840166B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of mobile terminals, and in particular, to a voice broadcast method and apparatus. Background Art
[0002] With the development of mobile Internet technology, the functions of electronic devices have become increasingly rich. Among them, the proposed voice broadcast function enables users with poor eyesight, as well as users who are cooking, driving, or have both hands occupied and have no time to browse their mobile phones, to obtain and understand the page information displayed on the electronic device without having to stare at the screen.
[0003] Currently, an electronic device can directly broadcast all the content displayed on the display screen, but the content heard by the user is extensive and chaotic, making it difficult to obtain the truly effective content therefrom. How to perform voice broadcast according to user needs so that users can conveniently obtain effective content is an urgent problem to be solved currently. Summary of the Invention
[0004] Embodiments of this application provide a voice broadcast method and apparatus, and an electronic device can broadcast content that meets user needs, improving the quality of voice broadcast.
[0005] In a first aspect, embodiments of this application provide a voice broadcast method. This method is applied to an electronic device and includes the following steps: detecting a first operation; in response to the first operation, starting a first application program and displaying a first user interface; obtaining first page content, where the first page content includes: the content in the first page provided by the first application program in the first user interface; determining the application scenario corresponding to the first page; determining the main content, where the main content includes the content in the first page content except for the invalid content; the invalid content includes: the content in the first page content that is included in the first invalid text library; the first invalid text library corresponds to the application scenario; and voice broadcasting the main content.
[0006] Implementing the method provided in the first aspect enables a user to learn the content displayed on the electronic device without having to view the electronic device, improving the accessibility of the electronic device. Moreover, the electronic device voice broadcasts content that better meets user needs, thereby enhancing the user's voice broadcast experience.
[0007] In combination with the first aspect, in some embodiments, the first user interface may include a first page, a system notification bar, and a navigation bar; wherein, the first page content displayed in the first page may include: text, lists, pictures, links, videos, gifs, and so on.
[0008] In combination with the first aspect, in some embodiments, the electronic device may use a voice broadcast template corresponding to the first application scenario to broadcast the main content.
[0009] Combined with the above embodiments, the voice broadcast template can be pre-set by the electronic device or pre-set by the server and then sent to the electronic device.
[0010] Combined with the first aspect, in some embodiments, the electronic device can first determine the characters included in the main content, and according to the correspondence between the characters and the words representing the meanings of the characters, replace the characters in the main content with the corresponding words and then voice broadcast the main content. Combined with the above embodiments, the correspondence between the characters and the words representing the meanings of the characters can be: the character ":“”" represents the word "say", the character " ” represents the word "Renminbi", the character "@" represents the word "mentioned", etc.
[0011] In this way, voice broadcast is carried out by a method that is easy for users to understand, the quality of the voice broadcast content is improved, and thus the user voice broadcast experience is improved, and the accessibility of the electronic device is improved.
[0012] Combined with the first aspect, in some embodiments, the electronic device stores invalid word libraries corresponding to different application scenarios. In addition, the application scenario determined by the electronic device corresponds to the first page in the first application or corresponds to the first application. Combined with the first aspect, in some embodiments, the above invalid content can be the content belonging to the first category in the first page content, and the first category includes one or more of advertisements or links.
[0013] Combined with the above embodiments, the first category can be pre-set by the electronic device or pre-set by the server and then sent to the electronic device.
[0014] Combined with the first aspect, in some embodiments, the above invalid content can also be the repeated content in the first page content. Specifically, when the first page content includes the first content and the second content and the first content and the second content are repeated content, the invalid content also includes the second content.
[0015] Combined with the above embodiments, the repeated content can be the repeated content in the text content of the first page or the repeated content in the picture and text content of the first page.
[0016] In this way, the electronic device can voice broadcast content that better meets the user's needs, and thus improve the user voice broadcast experience.
[0017] Combined with the first aspect, in some embodiments, the first operation can be a voice command.
[0018] In combination with the first aspect, in some embodiments, before obtaining the first page content, the electronic device can detect a second operation, and the second operation is used to trigger the electronic device to obtain the first page content, determine the application scenario, determine the main content, and voice broadcast the main content.
[0019] In combination with the above embodiments, the second operation can be a voice command, or a user operation on a first control displayed on the first user interface.
[0020] In this way, the user can input different trigger operations according to personal needs to trigger the electronic device to voice broadcast the main content.
[0021] In combination with the first aspect, in some embodiments, the electronic device can take a screenshot of the first user interface to obtain a first image, and use image recognition technology to obtain the first page content in the first image. In other embodiments, the electronic device can obtain a first page description document, and obtain the first page content according to the first page description document, where the first page description document indicates the content included in the first page and the attributes of each content.
[0022] In combination with the above embodiments, the attributes of each content may include: category (such as picture, list, picture, link, video, animated picture, article title, text body, user name, article author, etc.), format (such as position, size, font of text, color), and so on.
[0023] In a second aspect, an embodiment of the present application provides an electronic device, which includes: a display screen, a memory, and one or more processors; the display screen, the memory are coupled to the one or more processors, and the memory is used to store computer program code, and the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to perform the following operations:
[0024] The electronic device starts a first application program and displays a first user interface; the electronic device obtains first page content, and the first page content includes: detecting a first operation; in response to the first operation, starting the first application program and displaying the first user interface; obtaining the first page content, and the first page content includes: the content in the first page provided by the first application program in the first user interface; determining the application scenario corresponding to the first page; determining the main content, and the main content includes the content in the first page content except for the invalid content; the invalid content includes: the content included in the first invalid text library in the first page content; the first invalid text library corresponds to the application scenario; voice broadcasting the main content.
[0025] Implementing the method provided in the second aspect enables the user to know the content displayed on the electronic device without looking at the electronic device, improving the accessibility of the electronic device. Moreover, the electronic device can voice-play the content that better meets the user's needs, thereby enhancing the user's voice-playing experience.
[0026] In combination with the second aspect, in some embodiments, the above-mentioned first user interface may include a first page, a system notification bar, and a navigation bar; wherein, the first page content displayed on the first page may include: text, lists, pictures, links, videos, gifs, and so on.
[0027] In combination with the second aspect, in some embodiments, the above-mentioned one or more processors are specifically configured to call the above-mentioned computer instructions to enable the electronic device to use a voice-playing template corresponding to the above-mentioned first application scenario to play the above-mentioned main content.
[0028] In combination with the above embodiments, the voice-playing template may be pre-set by the electronic device or pre-set by the server and then sent to the electronic device.
[0029] In combination with the second aspect, in some embodiments, the above-mentioned one or more processors are specifically configured to call the above-mentioned computer instructions to enable the electronic device to perform: determining the characters included in the main content, and according to the correspondence between the characters and the words representing the meanings of the characters, replacing the characters in the above-mentioned main content with the corresponding words and then voice-playing the main content.
[0030] In combination with the above embodiments, the correspondence between the characters and the words representing the meanings of the characters may be: the character “:” represents the word “said”, the character “ ” represents the word “Renminbi”, the character “@” represents the word “mentioned”, etc.
[0031] In this way, voice-playing is performed using a method that is easy for the user to understand, improving the quality of the voice-played content, thereby enhancing the user's voice-playing experience and the accessibility of the electronic device.
[0032] In combination with the second aspect, in some embodiments, the electronic device stores invalid word libraries corresponding to different application scenarios. In addition, the application scenario determined by the electronic device corresponds to the first page in the first application or to the first application.
[0033] In combination with the second aspect, in some embodiments, the above-mentioned invalid content may be the content in the first page content that belongs to the first category, and the first category includes one or more of advertisements or links.
[0034] In combination with the above embodiments, the content of the first category may be pre-set by the electronic device or pre-set by the server and then sent to the electronic device.
[0035] In combination with the second aspect, in some embodiments, the above invalid content may also be duplicate content in the first page content. Specifically, the first page content includes first content and second content, and when the first content and the second content are duplicate content, the invalid content further includes the second content.
[0036] In combination with the above embodiments, the duplicate content may be duplicate content in the text content of the first page, or duplicate content in the picture and text content of the first page.
[0037] In this way, the electronic device can voice broadcast content that better meets the user's needs, thereby improving the user's voice broadcast experience.
[0038] In combination with the second aspect, in some embodiments, the first operation may be a voice command.
[0039] In combination with the second aspect, in some embodiments, the above one or more processors are specifically configured to call the above computer instructions to cause the electronic device to perform: before obtaining the first page content, detecting a second operation, where the second operation is used to trigger the electronic device to obtain the first page content, determine the application scenario, determine the main content, and voice broadcast the main content.
[0040] In combination with the above embodiments, where the second operation may be a voice command, or a user operation on a first control displayed on the first user interface.
[0041] In this way, the user can input different trigger operations according to personal needs to trigger the electronic device to voice broadcast the main content.
[0042] In combination with the second aspect, in some embodiments, the above one or more processors are specifically configured to call computer instructions to cause the electronic device to take a screenshot of the first user interface to obtain a first image, and use image recognition technology to obtain the first page content in the first image; or, obtain a first page description document, and obtain the first page content according to the first page description document, where the first page description document indicates the content included in the first page and the attributes of each content.
[0043] In combination with the above embodiments, the attributes of each content may include: category (such as picture, list, picture, link, video, animated picture, article title, body text, user name, article author, etc.), format (such as position, size, font, color of text), and so on.
[0044] In a third aspect, an embodiment of the present application provides a computer program product including instructions, which, when the computer program product runs on an electronic device, cause the electronic device to execute the method described in the first aspect or any one of the implementation manners of the first aspect.
[0045] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium including instructions, which, when the instructions run on an electronic device, cause the electronic device to execute the method described in the first aspect or any one of the implementation manners of the first aspect.
[0046] By implementing the technical solution provided by the present application, an electronic device can obtain the page content in the currently displayed user interface, delete the invalid content that the user does not need in the page content to obtain the main content that the user needs, and then broadcast the main content. By implementing this method, the electronic device can broadcast content that better meets the user's needs, improve the quality of voice broadcast, and thus enhance the user experience. Description of the Drawings
[0047] Figure 1 It is a flowchart of a voice broadcast method;
[0048] Figure 2 It is a schematic diagram of the hardware structure of the electronic device provided by an embodiment of the present application;
[0049] Figure 3 It is a schematic diagram of the software structure of the electronic device provided by an embodiment of the present application;
[0050] Figure 4 It is a schematic flowchart of a voice broadcast method provided by an embodiment of the present application;
[0051] Figures 5A - 5H It is a set of user interfaces implemented on the electronic device provided by an embodiment of the present application;
[0052] Figure 6 It is another user interface implemented on the electronic device provided by an embodiment of the present application;
[0053] Figure 7 It is another user interface implemented on the electronic device provided by an embodiment of the present application;
[0054] Figures 8A - 8B It is another set of user interfaces implemented on the electronic device provided by an embodiment of the present application. Detailed Embodiments
[0055] The technical solutions in the embodiments of the present application will be clearly and elaborately described below in conjunction with the accompanying drawings. Among them, in the description of the embodiments of the present application, unless otherwise specified, " / " means "or". For example, A / B may mean A or B; "and / or" in the text is only a relationship describing associated objects, indicating that there can be three relationships. For example, A and / or B may mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality of" means two or more than two.
[0056] Hereinafter, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as implying or suggesting relative importance or implicitly indicating the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of the present application, unless otherwise specified, the meaning of "a plurality of" is two or more than two.
[0057] The term "user interface (UI)" in the following embodiments of the present application is a media interface for interaction and information exchange between an application program or an operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The user interface is source code written in a specific computer language such as Java, Extensible Markup Language (XML), etc. The interface source code is parsed and rendered on an electronic device and finally presented as content recognizable by the user. The common manifestation form of the user interface is the graphical user interface (GUI), which refers to the user interface related to computer operations displayed in a graphical manner. It can be visual interface elements such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, Widgets, etc. displayed on the display screen of an electronic device.
[0058] The user interface is presented as content recognizable by the user, such as controls like pictures, texts, buttons, etc. Controls (also known as widgets) are the basic elements of the user interface. Typical controls include toolbars, menu bars, text boxes, buttons, scroll bars, pictures, and texts. The attributes and contents of the controls in the interface are defined through tags or nodes. For example, XML passes through <textview> 、 <imgview> 、 <videoview>The nodes are used to define the controls contained in the interface. A node corresponds to a control or attribute in the interface. After parsing and rendering, the node is presented as user-visible content.
[0059] In the embodiment of the present application, the voice broadcast function is used when the user is interacting with the electronic device and it is inconvenient for the user to read the page content. For example, when the user is driving, cooking, exercising, etc., or when the user is a special group with reading disabilities such as the blind, the elderly, etc., the electronic device can obtain the current page content by using the voice broadcast function, and then voice broadcast the content displayed on the page, so that the user can still enjoy the convenience brought by the electronic device when he cannot or has no time to read the screen, freeing the user's eyes and hands.
[0060] Figure 1 This is a flow chart of a method for realizing the voice broadcast function. The method may include the following steps:
[0061] 1. When the electronic device detects a voice broadcast operation, the electronic device performs a screenshot operation on the user interface currently displayed on the display screen and obtains a screenshot image. The voice broadcast operation may be an operation in which the user clicks a voice broadcast button or inputs a voice broadcast instruction.
[0062] 2. The electronic device recognizes the content in the screenshot.
[0063] 3. The electronic device voice broadcasts the recognized content.
[0064] In the above process, the electronic device takes a screenshot, then uses image recognition technology to read the text in the current page, and then broadcasts all the read text. It can be seen that with such a voice broadcast function, the voice broadcast content of the electronic device will not distinguish between the main content and invalid content in the page content, but only mechanically broadcasts all the text that can be recognized in the current page, including some advertising information displayed on the page, and the function key text of the APP, such as home page, return, click to follow, next page, etc., making the voice interaction between the user and the electronic device very difficult. Therefore, the voice broadcast function only blindly broadcasts all the recognized text. Such voice broadcast content not only does not conform to the natural language accustomed to users, but also does not meet the needs of users, which will affect the user's understanding of the page content.
[0065] To this end, an embodiment of the present application proposes a voice broadcast method. In this method, in response to an operation to enable the voice broadcast function, the electronic device deletes the invalid content that the user does not need in the current page, obtains the main content that the user needs, and then broadcasts the main content. It can be seen that after adopting the voice broadcast method proposed by the embodiment of the present application, the electronic device can broadcast content that better meets the user's needs. In addition, the quality of the voice broadcast content is improved, which is convenient for the user to understand, thereby improving the user's voice broadcast experience and the accessibility of the electronic device.
[0066] In an embodiment of the present application, a page is a form of information expression composed of basic elements such as text, images, and tables. Specifically, a page refers to the source code written in a specific computer language, such as hypertext markup language (HTML), cascading style sheets (CSS), JavaScript (JS), etc. The page source code can be loaded and displayed by a browser or a page display component similar to the browser function as content recognizable by the user, such as text, images, tables, etc. The specific content in the above page is also defined by tags or nodes in the page source code. For example, HTML passes 、 、 <video> 、 <canvas>Define the elements and attributes of the page. In addition, hypertext links can be established between each page for users to browse.
[0067] In some embodiments, the page can be provided by a third-party application or a system application, where the third-party application can include, but is not limited to, instant messaging applications, social interaction applications, shopping applications, etc.
[0068] In some embodiments, the page may not include interface elements provided by the system application, such as the system navigation bar, system navigation bar, etc.
[0069] To introduce the voice broadcast method provided by the embodiments of the present application more clearly and in detail, the software and hardware structures of the devices involved in the embodiments of the present application will be introduced first.
[0070] Figure 2 Shows a schematic structural diagram of the electronic device 100.
[0071] The electronic device 100 can be a portable terminal device equipped with or other operating systems, such as mobile phones, televisions, tablet computers, desktop computers, laptop computers, handheld computers, notebook computers, ultra-mobile personal computers (UMPCs), netbooks, as well as cellular phones, personal digital assistants (PDAs), augmented reality (AR) devices, virtual reality (VR) devices, artificial intelligence (AI) devices, wearable devices, in-vehicle devices, smart home devices, and / or smart city devices. The specific type of the electronic device in the embodiments of the present application is not particularly limited.
[0072] The electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0073] It can be understood that the structure illustrated in the embodiments of this application does not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than those illustrated, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0074] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.
[0075] Among them, the controller may be the nerve center and command center of the electronic device 100. The controller may generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching instructions and executing instructions.
[0076] A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store the instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0077] In the embodiments of the present application, the processor 100 can respond to an operation input by a user, start a first application program, and instruct the display screen to display a first user interface. After that, the processor 100 can obtain the first page content in the first user interface, delete the invalid content in the first page content, and obtain the main content. Finally, it instructs the audio device to perform voice broadcast on the main content. Specifically, please refer to the detailed description in the subsequent method embodiments of the present application, which will not be elaborated here.
[0078] The wireless communication function of the electronic device 100 can be implemented by the antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modulation and demodulation processor, and baseband processor, etc.
[0079] The antenna 1 and the antenna 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example: the antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0080] The mobile communication module 150 can provide solutions for wireless communications such as 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 can include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves by the antenna 1, filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor and convert it into electromagnetic waves through the antenna 1 for radiation. In some embodiments, at least some functional modules of the mobile communication module 150 can be provided in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 can be provided in the same device.
[0081] The wireless communication module 160 may provide solutions for wireless communications applied to the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite systems (GNSSs), frequency modulation (FM), near field communication (NFC), infrared technology (IR), and so on. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, demodulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 may also receive signals to be sent from the processor 110, perform frequency modulation and amplification on them, and convert them into electromagnetic waves through the antenna 2 for radiation.
[0082] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, such that electronic device 100 can communicate with a network and other devices through wireless communication technologies. The wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), beidou navigation satellite system (BDS), quasi-zenith satellite system (QZSS), and / or satellite based augmentation systems (SBAS).
[0083] In the embodiments of the present application, electronic device 100 can load and display a page from a network through mobile communication module 150 and wireless communication module 160. Moreover, the electronic device can also download an invalid character library, a voice broadcast template, etc. from the network through mobile communication module 150 and wireless communication module 160. The definitions of the invalid character library and the voice broadcast template can refer to the detailed description later, and will not be elaborated here for the time being.
[0084] Electronic device 100 implements a display function through a GPU, display screen 194, and an application processor, etc. The GPU is a microprocessor for image processing, and is connected to display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
[0085] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can adopt a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.
[0086] In the embodiments of the present application, the display screen 194 can be used to display a page. For example, it can display the page provided by any one of the application programs installed in the electronic device 100. The content displayed on the display screen 194 can refer to the relevant descriptions in the subsequent UI embodiments, which will not be elaborated here for the time being. The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).
[0087] The random access memory may include a static random-access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth-generation DDR SDRAM is generally called DDR5 SDRAM), etc.;
[0088] The non-volatile memory may include a disk storage device and a flash memory.
[0089] The random access memory can be directly read from and written to by the processor 110. It can be used to store the operating system or executable programs (such as machine instructions) of other running programs, and can also be used to store data of users and application programs, etc.
[0090] The non-volatile memory can also store executable programs and data of users and application programs, etc. It can be pre-loaded into the random access memory for direct reading from and writing to by the processor 110.
[0091] The external memory interface 120 can be used to connect to an external non-volatile memory to expand the storage capacity of the electronic device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement the data storage function. For example, files such as music and videos are saved in the external non-volatile memory.
[0092] In the embodiments of the present application, the internal memory 121 or the external memory can be used to store the invalid character library and the voice broadcast template. The definitions of the invalid character library and the voice broadcast template can refer to the detailed description later and will not be elaborated here.
[0093] The electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor, etc. For example, music playback, recording, etc.
[0094] The audio module 170 is used to convert digital audio information into an analog audio signal for output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 can be disposed in the processor 110, or some functional modules of the audio module 170 can be disposed in the processor 110.
[0095] The speaker 170A, also called the "loudspeaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or hands-free calls through the speaker 170A.
[0096] The receiver 170B, also called the "earpiece", is used to convert an audio electrical signal into a sound signal. When the electronic device 100 answers a call or a voice message, the receiver 170B can be placed close to the ear to listen to the voice.
[0097] In the embodiments of the present application, the electronic device 100 can convert an audio electrical signal into a sound signal through the speaker 170A or the receiver 170B. For example, when the electronic device 100 performs voice playback on page content, the user can listen to the page content through the speaker 170A, or can listen to the page content through the receiver 170B.
[0098] The microphone 170C, also known as the "microphone" or "transmitter", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak close to the microphone 170C with the mouth to input the sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In some other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also implement a noise reduction function. In some other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C, which can collect sound signals, reduce noise, identify the sound source, and implement functions such as directional recording.
[0099] In the embodiments of the present application, the electronic device 100 can convert a sound signal into an electrical signal through the microphone 170C. For example, when the electronic device 100 receives a voice command input by the user, the user can speak close to the microphone 170C with the mouth to input the sound into the microphone 170C.
[0100] The headphone jack 170D is used to connect a wired headphone. The headphone jack 170D can be a USB interface 130, or a 3.5 mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0101] In the embodiments of the present application, the electronic device 100 can connect a wired headphone through the headphone jack 170D, so that when the electronic device 100 performs voice broadcast of page content, the user can listen to the page content by wearing the headphone.
[0102] The touch sensor 180K, also known as the "touch panel". The touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also known as the "touch screen". The touch sensor 180K is used to detect a touch operation acting thereon or nearby. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In some other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, at a different position from that of the display screen 194.
[0103] In the embodiments of the present application, the touch sensor 180K can detect a touch operation, such as a touch operation for an event of opening an application program.
[0104] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. In the embodiments of this application, taking the system as an example, the software structure of the electronic device 100 will be exemplarily described.
[0105] Figure 3 is the software structure block diagram of the electronic device 100 in the embodiments of this application.
[0106] The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, namely the application layer, the application framework layer, Android runtime ( runtime), and the system libraries, as well as the kernel layer.
[0107] The application layer may include a series of application packages.
[0108] As Figure 3 shown, the application packages may include shopping applications, social interaction applications, system applications such as maps, navigation, WLAN, Bluetooth, music, video, short messages and other applications.
[0109] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications in the application layer. The application framework layer includes some predefined functions.
[0110] As Figure 3 shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, etc.
[0111] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0112] The content provider is used to store and obtain data, and make this data accessible to applications. The data may include videos, images, audio, incoming and outgoing calls, browsing history and bookmarks, phone books, etc.
[0113] The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a short message notification icon may include a view for displaying text and a view for displaying pictures.
[0114] The phone manager is used to provide the communication functions of the electronic device 100. For example, the management of call states (including answering, hanging up, etc.).
[0115] The resource manager provides various resources for applications, such as localized strings, icons, pictures, layout files, video files, and so on.
[0116] The notification manager enables applications to display notification information in the status bar. It can be used to convey message types that inform, and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to inform that the download is completed, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as the notification of a background running application, or a notification that appears in the form of a dialogue window on the screen. For example, it prompts text information in the status bar, emits a prompt sound, the electronic device vibrates, the indicator light flashes, etc.
[0117] Runtime includes core libraries and a virtual machine. Runtime is responsible for the scheduling and management of the Android system.
[0118] The core libraries contain two parts: one part is the functional functions that the Java language needs to call, and the other part is the core libraries of Android.
[0119] The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as the management of object life cycles, stack management, thread management, security and exception management, and garbage collection.
[0120] The system libraries can include multiple functional modules. For example: surface manager, Media Libraries, 3D graphics processing library (e.g., OpenGL ES), 2D graphics engine (e.g., SGL), etc.
[0121] The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
[0122] The media library supports the playback and recording of multiple common audio and video formats, as well as static image files, etc. The media library can support multiple audio and video coding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0123] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing, etc.
[0124] The 2D graphics engine is a graphics engine for 2D drawing.
[0125] The kernel layer is the layer between hardware and software. The kernel layer includes at least a display driver, a camera driver, an audio driver, and a sensor driver.
[0126] In the voice broadcast method proposed in the embodiments of this application, in response to an operation to enable the voice broadcast function, the electronic device deletes the invalid content that the user does not need on the current page, obtains the main content that the user needs, and then broadcasts the main content. It can be seen that after adopting the voice broadcast method proposed in the embodiments of this application, the electronic device can broadcast content that better meets the user's needs. In addition, the quality of the voice broadcast content is improved, which is convenient for the user to understand, thereby improving the user's voice broadcast experience and the accessibility of the electronic device.
[0127] The voice broadcast method of the embodiments of this application can be applied to various scenarios, such as social interaction, shopping, reading and other application scenarios. When the electronic device 100 detects an operation to enable the voice broadcast function, in response to this operation, the electronic device 100 can delete the invalid content that does not meet the user's needs according to the application scenario of the current page, obtain the main content, and then broadcast the main content that the user needs according to the voice broadcast template corresponding to the application scenario. The voice broadcast method involved in the embodiments of this application will be introduced below in combination with specific application scenarios.
[0128] 1. Social interaction application scenario:
[0129] When the electronic device 100 displays a page provided by a social interaction application program, the main content that the user is concerned about is content sharing, interactive discussion, etc., and the invalid content that the user is not interested in includes the text or icons on the APP's built-in function keys, statistical information text, advertisement pictures, advertisement links, and repeated content, etc. The text on the APP's built-in function keys includes, but is not limited to, "Search, Return, Follow, Private Message, Featured, Fan Group", etc., and the statistical information text includes "From ** device, Number of comments, Number of likes, Post time", etc.
[0130] In the following embodiments of this application, a function key refers to a control that can receive user operations, and the electronic device can execute corresponding functions (such as jumping to a page, returning to the previous page, commenting, liking, etc.) in response to an operation on the function key. The function key can be implemented as an icon, text, or other forms. For the sake of concise description, the text on the function key can be called function key text later, and the icon on the function key can be called function key icon.
[0131] Therefore, when the electronic device 100 detects an operation to enable the voice broadcast function, the electronic device 100 deletes the above-mentioned invalid content that does not meet the user's needs in the current page content, and obtains the main content that the user is interested in, and then uses the voice broadcast template corresponding to the social interaction application scenario to broadcast the main content. In this way, the electronic device 100 meets the user's reading needs in the social interaction scenario, enabling the user to obtain concise and smooth social interaction information without hearing meaningless function keys, shopping advertisements and other information.
[0132] 2. Shopping application scenario:
[0133] When the electronic device 100 displays a page provided by a shopping application program, the main content that the user is concerned about is different from that in the social interaction scenario. For example, product descriptions, discounts and prices, shipping locations, etc. are the main content that the user needs, while in the social interaction scenario, these shopping information are regarded as invalid content. At this time, the interactive comments and other information that the user needs in the social interaction scenario are invalid content that the user does not need in the shopping scenario. The invalid content that the user does not need in the shopping application scenario also includes advertisement pictures, advertisement links and repetitive content.
[0134] Therefore, when the electronic device 100 detects an operation to enable the voice broadcast function, the electronic device 100 deletes the above-mentioned invalid content that does not meet the user's needs in the current page content in the shopping scenario, and obtains the main content that the user is interested in, and then uses the voice broadcast template corresponding to the shopping scenario to broadcast the main content. In this way, the electronic device 100 meets the user's reading needs in the shopping scenario, enabling the user to obtain concise and smooth shopping information without hearing meaningless function keys, interactive discussions and other information.
[0135] 3. Reading application scenario:
[0136] When the electronic device 100 displays a page provided by a reading application program, what the user needs to know is the main content of the article, while the text of the APP's own function keys such as "Search, Return, Reward, Click to Follow the Author, Next Page", as well as the interactive comments that the user is concerned about in the social interaction scenario, and the shopping information that the user is concerned about in the shopping scenario are regarded as invalid content that the user is not interested in. The invalid content that the user does not need in the reading application scenario also includes advertisement pictures, advertisement links and repetitive content.
[0137] Therefore, when the electronic device 100 detects an operation to enable the voice broadcast function, the electronic device 100 deletes the above-mentioned invalid content that does not meet the user's needs in the current page content in the shopping scenario, and obtains the main content that the user is interested in, and then uses the voice broadcast template corresponding to the reading scenario to broadcast the main content. In this way, the electronic device 100 meets the user's reading needs in the shopping scenario, enabling the user to obtain concise and smooth reading information without hearing meaningless function keys, interactive discussions, shopping advertisements, and other information.
[0138] According to the above introduction of different application scenarios, it can be seen that after adopting the voice broadcast method proposed in the embodiment of the present application, the electronic device 100 can, according to the needs of the user in different application scenarios, voice broadcast the content in the page that meets the user's needs in that scenario. In addition, the electronic device 100 can use the voice broadcast template corresponding to the application scenario of the page to output logical voice information, making the voice interaction process between the user and the intelligent device smoother, more intelligent, and in line with the user's daily natural voice interaction habits.
[0139] It can be understood that the above application scenarios are only examples, and the application scenarios of the page displayed by the electronic device 100 can also have other scenarios, such as education and learning, etc.
[0140] Next, in combination with the flowchart of the voice broadcast method provided in the embodiment of the present application and a series of user interfaces, the voice broadcast method provided in the embodiment of the present application will be described in detail.
[0141] Figure 4 Exemplarily shows the process of the voice broadcast method provided in the embodiment of the present application. Specifically as follows:
[0142] S101, the electronic device 100 detects a first operation, and in response to the first operation, displays a first user interface.
[0143] In some embodiments, the first operation may include two operations: an operation for triggering the electronic device 100 to open / display the first user interface, and an operation for triggering the electronic device 100 to perform a voice broadcast on the first user interface.
[0144] Among them, the operation for triggering the electronic device 100 to display the first user interface may be: an operation received by the electronic device 100 acting on an application program icon on the desktop, or a voice command received by the electronic device 100 for starting an application program. In response to this operation, the electronic device 100 displays the first user interface.
[0145] Reference Figures 5A - 5D , Figures 5A - 5D Exemplarily shows the first user interface of the operation for triggering the electronic device 100 to display the first user interface.
[0146] Figure 5A Exemplarily shown is a user interface 510 for displaying the applications installed on the electronic device 100. As Figure 5A shown, the user interface 510 includes: application icons corresponding to the applications installed on the electronic device 100, such as the icon 511 of social application A, the icon 512 of shopping application B, the icon 513 of reading application C, and so on.
[0147] As Figure 5A shown, when the electronic device 100 displays Figure 5A the user interface 510 shown, when it can detect the wake-up word of the voice assistant input by the user (such as "Xiaoyi"), in response to the wake-up word, the electronic device 100 starts the voice assistant. In addition to starting the voice assistant by inputting the wake-up word, the user can also start the voice assistant by long pressing the power button of the electronic device 100 or other means. Not limited to Figure 5A the user interface 510 shown, the electronic device 100 can also start the voice assistant in response to user operations when displaying any other user interface.
[0148] Here, the voice assistant is an application for parsing the voice commands input by the user. The voice assistant usually corresponds to a wake-up word. After the electronic device 100 detects the wake-up word, it can start the voice assistant. For example, the wake-up word of the voice assistant in a Huawei mobile phone is "Xiaoyi". After the electronic device 100 starts the voice assistant, it can detect the voice commands input by the user, perform semantic analysis on the voice commands, determine the operations corresponding to the voice commands, and then execute the corresponding operations of the application.
[0149] After the electronic device 100 starts the voice assistant, it can display a window 514 as Figure 5B shown.
[0150] As Figure 5B shown, the window 514 includes: a voice assistant icon 514A and a voice recognition bar 514B. Among them, the voice assistant icon 514A is used to prompt the user that the electronic device 100 has currently started the voice assistant. The voice recognition bar 514B is used to display the voice commands input by the user recognized by the electronic device 100. When the electronic device 100 does not receive a voice command, the voice recognition bar 514B can display "Listening".
[0151] Figure 5C Exemplarily shown is the user interface 510 displayed by the electronic device 100 after recognizing the voice commands input by the user. Here, the voice commands input by the user can be, for example, "Open social application A".
[0152] As Figure 5C As shown, the voice recognition bar 514B in the window 514 displays the voice command recognized by the electronic device 100, that is, the text "Open social application A".
[0153] After the electronic device 100 recognizes the voice command input by the user (such as "Open social application A"), it can perform semantic analysis on the voice command to determine that the operation corresponding to the voice command is to start the social application A, and then start the social application A and display the first user interface.
[0154] Figure 5D Exemplarily shows a possible first user interface, that is, the user interface 520. The user interface 520 is provided by the social application A. The user interface 520 can be the main page provided by the social application A or any other page. In some embodiments, if the electronic device 100 last opened the social application A and displayed a certain page, and then the electronic device 100 switched the social application A to run in the background, when the electronic device 100 responds to Figure 5C the voice command shown in to start the social application A again, the first user interface displayed is the user interface displayed when the social application A was exited last time.
[0155] Figures 5E - 5F Exemplarily shows an operation for triggering the electronic device 100 to perform voice broadcast on the first user interface.
[0156] In some embodiments, when the electronic device 100 displays Figure 5D the user interface 520 shown, the user can also trigger the electronic device 100 to start the voice assistant again by inputting a wake-up word. After that, referring to Figure 5E , the electronic device 100 can detect a voice command for triggering the electronic device 100 to perform voice broadcast on the first user interface, such as "Read the current page", display the window 514, and perform the corresponding operation in response to the voice command.
[0157] Referring to Figure 5F , after the electronic device 100 detects Figure 5E the voice command shown in, it stops displaying the window 514 and displays the first user interface, that is, the user interface 520. After that, the electronic device 100 performs voice broadcast on the first user interface, that is, performs the subsequent steps S102 - S104.
[0158] In other embodiments, referring to Figure 5D , Figure 5D The user interface 520 shown also includes a voice broadcast control 522. The electronic device 100 can detect a user operation acting on the voice broadcast control 522, and in response to the user operation, perform a voice broadcast on the first user interface, that is, execute the subsequent steps S102 - S104. In some other embodiments, the voice broadcast control 522 can be floatingly displayed on any page of the electronic device 100, or displayed in the drop-down notification bar at the top of the electronic device 100. The embodiments of the present application do not limit this.
[0159] When the above first operation includes two operations, the operation for triggering the electronic device 100 to perform a voice broadcast on the first user interface can be referred to as a second operation.
[0160] The above Figure 5D The shown voice broadcast control 522 can be referred to as a first control.
[0161] In some other embodiments of the present application, the above first operation can be one operation. For example, the operation for triggering the electronic device 100 to open / display the first user interface and the operation for triggering the electronic device 100 to perform a voice broadcast on the first user interface can be combined into one operation. This first operation can be a voice command.
[0162] Reference Figure 5G , Figure 5G exemplarily shows a possible first operation.
[0163] As Figure 5G shown, after the electronic device 100 starts the voice assistant, it can detect a voice command input by the user. This voice command is used to start a certain application program and perform a voice broadcast on the first user interface provided by the application program. Here, this voice command can be, for example, "Read the page of social application A". The first user interface is the Figure 5H user interface 520 in. After that, the electronic device 100 responds to the voice command and performs a voice broadcast on the first user interface, that is, executes the subsequent steps S102 - S104.
[0164] It should be noted that not limited to the above-mentioned voice assistant, in some other embodiments, after the electronic device 100 turns on the blind mode or the accessibility mode, the same functions as the voice assistant can be achieved. That is, after the electronic device 100 turns on the blind mode or the accessibility mode, it can detect the user's voice command, analyze the voice command, and execute the corresponding operation.
[0165] Not limited to the above Figures 5A - 5H shown social interaction application scenario, the method provided by the embodiments of the present application can also be applied to other scenarios.
[0166] Exemplarily, referring to Figure 6 the user interface 610 shown, the user interface 610 may be the first user interface displayed by the electronic device 100 in response to a first operation in a shopping application scenario.
[0167] Exemplarily, referring to Figure 7 the user interface 710 shown, the user interface 710 may be the first user interface displayed by the electronic device 100 in response to a first operation in a reading application scenario.
[0168] In the embodiments of the present application, the application program started by the electronic device 100 in S101 may be referred to as the first application program. For example, Figures 5A - 5H the social application A shown in
[0169] S102, the electronic device 100 obtains the first page content in the first user interface.
[0170] Specifically, the first user interface is the user interface displayed by the electronic device 100 in response to the first operation. For example, Figure 5H the user interface 520 shown in Figure 6 the user interface 610 shown in Figure 7 the user interface 710 shown in
[0171] In the embodiments of the present application, the first user interface includes a first page. The first page is provided by the application program currently running in the foreground of the electronic device 100 and does not include the content provided by the system applications of the electronic device 100, such as the status bar, navigation bar, etc. For example, the first page is Figure 5H 521 in the user interface 520 shown, or may also be Figure 6 611 in the user interface 610 shown in Figure 7 711 in the user interface 710 shown in
[0172] The content included in the first page is the first page content. The embodiments of the present application do not limit the elements in the first page content. The first page content depends on the application program currently started by the electronic device 100 and the first user interface displayed. Exemplarily, the first page content may include, but is not limited to: text, lists, pictures, links, videos, gifs, etc.
[0173] In the embodiments of the present application, the manner in which the electronic device 100 obtains the first page content may be as follows:
[0174] 1. The electronic device 100 takes a screenshot of the first user interface and then recognizes the first page content in the screenshot.
[0175] Specifically, the electronic device 100 first takes a screenshot of all the user interfaces displayed on the display screen, and then uses image recognition technology to identify the content in the screenshot. After that, the electronic device 100 can distinguish the content provided by system applications, such as the status bar and navigation bar, and the remaining content in the recognition result. Here, the content in the screenshot except for the content provided by system applications, such as the status bar and navigation bar, is the content of the first page. Here, the screenshot obtained by the electronic device 100 by taking a screenshot of the user interface displayed on the display screen can be called the first image.
[0176] Furthermore, the electronic device 100 uses image recognition technology to identify the attributes of each piece of content in the first page content. The attributes of each piece of content may include: category (such as picture, list, picture, link, video, animated picture, article title, body text, user name, article author, etc.), format (such as position, size, font of text, color), and so on.
[0177] 2. The electronic device 100 obtains the first page content through a specific algorithm.
[0178] First, the electronic device 100 first obtains a page description document according to the specific algorithm. Among them, the page description document is a file that uses assembly languages such as HTML, CSS, and JS to define the layout of the page. The page description document indicates one or more of the following: the content contained in the page, and the attributes of each piece of content. The attributes of the content may include: category (such as picture, list, picture, link, video, animated picture 、 article title, body text, user name, article author, etc.), format (such as position, size, font of text, color), and so on.
[0179] The way the page description document indicates the above one or more items may be: first define the label of the content, and then insert the specific content after the label. Among them, there are multiple content labels, which are shown in a hierarchical form. Different labels represent different content attributes. For example, the label in an HTML document indicates that the category of the content behind it is the main content.
[0180] An example of an HTML document defined using HTML assembly language is as follows:
[0181]
[0182] Taking the above HTML document as an example,...< / canvas> < / video> Tags such as are HTML tags in HTML files. Specifically, the code between the two defines the HTML document, and the code between the two tags, the two <title>The code between the tags defines the title of the page, two < / title> tags defines the main content of the page. The two The code between the tags defines the content of a paragraph in the page.
[0183] After that, the electronic device 100 can read the first page content from the page description document of the obtained first page. In the embodiments of the present application, the page description document of the first page can be referred to as the first page description document. Specifically, the electronic device 100 can identify the tags in the page description document through technologies such as keyword recognition, and then obtain the content defined after the tag. Here, the tags corresponding to each content represent the format of the content. That is to say, the electronic device 100 can not only identify the first page content, but also know the attributes of each content in the first page content.
[0184] For example, after the electronic device 100 obtains the above HTML document, it can identify each HTML tag by identifying keywords, and then identify the content defined by the tag, and finally obtain the first page content.
[0185] Next, taking Figure 5H 、 Figure 6 and Figure 7 as the examples exemplarily shown below, the first page content will be introduced in detail.
[0186] Referring to Figure 5H , the first page content recognized by the electronic device 100 is as follows:
[0187] Text: Function key text "Back, Forward, Comment, Like", statistical information text "From Android" 524, text "User A#Winter vacation travel#Where to go during winter vacation".
[0188] Icon: Voice broadcast control 522.
[0189] Picture: Picture containing text "Where to go during winter vacation" 256B, picture containing text "Advertisement" 525.
[0190] Referring to Figure 6 , the first page content recognized by the electronic device 100 is as follows: Text: Function key text "Buy now, Share, Coupon, Comment, Favorite" 612, text "C Home Flagship Store, C Home Quilt: Universal for all seasons, ¥159".
[0191] Picture: Picture containing text "Universal for all seasons" 614B, picture containing text "Advertisement" 613.
[0192] Referring to Figure 7 , the first page content recognized by the electronic device 100 is as follows:
[0193] Text: Function key text "Back, Read Original Text, Share, Favorite, Like" 712, text "Learn about VR in 1 minute, original by Lisa, September 22nd, VR experience, full of fun, VR technology is developing rapidly, VR experience, very interesting".
[0194] Image: An image containing the text "Advertisement" 713.
[0195] S103, the electronic device 100 deletes the invalid content in the first page content to obtain the main content.
[0196] In the embodiments of the present application, the invalid content in the first page content may include the following types:
[0197] First, the invalid content is the content in the first page content that is the same as that in the first invalid text library.
[0198] Specifically, the method for the electronic device 100 to delete the above first type of invalid content includes the following three steps:
[0199] 1. Set in advance the application scenarios corresponding to the frequently used pages, and preset the invalid text libraries corresponding to different application scenarios.
[0200] Specifically, in the embodiments of the present application, an application scenario can be set for each page. The corresponding relationship between the page and the application scenario can be preset by the electronic device 100, or can be preset by the server and sent to the electronic device 100. Among them, there are the following two methods for setting the application scenario corresponding to the page:
[0201] (1) Set the corresponding application scenario for each page according to the content and use of each page. Multiple pages of the same application can correspond to different application scenarios.
[0202] Some application programs can provide multiple functions, such as shopping function, reading function, social function, etc. Therefore, the pages provided by the application program can be divided into different application scenarios according to their main functions. Table 1 exemplarily shows the application scenarios corresponding to several provided pages.
[0203]
[0204] Table 1
[0205] (2) Set the application scenario of the page according to the type of the APP, that is, all the pages provided by the same type of APP belong to the application scenario corresponding to this type of APP. Table 2 exemplarily shows the application scenarios corresponding to several different types of APPs.
[0206] Application Scenario APP Type Social Interaction Social Interaction APP Shopping Shopping APP Reading Reading APP
[0207] Table 2
[0208] It can be understood that the application scenarios of the page include other categories such as instant messaging in addition to the above-mentioned social interaction, shopping, reading, etc. The present application does not limit this.
[0209] 2. The electronic device 100 determines the first application scenario corresponding to the first page.
[0210] If the above-mentioned first method is used to define the application scenarios of each page, the electronic device 100 first identifies the first page currently displayed according to the page description document as which page of the application program currently running in the foreground, and then determines the first application scenario of the first page according to the corresponding relationship between each page and the application scenario in the application program.
[0211] If the above-mentioned second method is used to define the application scenarios of each page, the electronic device 100 first identifies the type of the application program currently running in the foreground, and then determines the first application scenario of the first page according to the corresponding relationship between the type of the application program and the application scenario. The first application scenario is the application scenario corresponding to the type of the application program.
[0212] 3. The electronic device 100 matches the corresponding first invalid text library according to the first application scenario, deletes the invalid content in the first page content, and obtains the main content.
[0213] In the embodiments of the present application, the electronic device 100 may store multiple invalid text libraries, and each invalid text library contains one or more words or characters. Different invalid text libraries correspond to different application scenarios. Table 3 exemplarily shows the corresponding relationship between possible invalid text libraries and application scenarios.
[0214]
[0215] Table 3
[0216] The multiple invalid text libraries stored in the electronic device 100 may be set by default in the electronic device 100, or may be set independently by the user.
[0217] The first invalid text library is the invalid text library corresponding to the first application scenario.
[0218] Specifically, the electronic device 100 compares the recognized first page content with the first invalid text library, and deletes the content that is the same as that in the first invalid text library, that is, the invalid content.
[0219] The following will describe in detail the deletion of invalid content using the first method in the embodiments of the present application in combination with the user interface:
[0220] As Figure 5H shown, 524 in the first page 521 is invalid content. This invalid content includes: the content in the invalid text library corresponding to the social application interaction scenario. For example, function key text and statistical information text such as "Back, Forward, Comment, Like, and from Android" 524, etc.
[0221] As Figure 6 shown, 612 in the first page 611 is invalid content. This invalid content includes: the content in the invalid text library corresponding to the shopping application scenario. For example, function key text such as "Share, Coupon, Comment, Favorite, Buy Now" 612, etc.
[0222] As Figure 7 shown, 712 in the first page 711 is invalid content. This invalid content includes: the content in the invalid text library corresponding to the reading application scenario. For example, function key text such as "Back, Read Original, Share, Favorite, Like" 712, etc.
[0223] It can be understood that the invalid content included in the first page in the above different application scenarios is only an example, and the present application does not make any restrictions on this.
[0224] II. The invalid content is the content of a specific category in the content of the first page.
[0225] Specifically, when the invalid content in the content of the first page includes the second type above, the method for the electronic device 100 to delete the invalid content includes the following steps:
[0226] First, the electronic device 100 pre - sets an intelligent classification model such as a machine learning or deep learning model in advance, and uses this intelligent classification model to classify the content of the first page. The intelligent classification model can obtain the font, size, color, format (indentation, line break, centering), etc. of each content in the content of the first page according to the page description document of the first page, and then classify the content of the first page. The classification results may include: content of categories such as advertising pictures, advertising links, picture charts, function key icons, article titles, article texts, etc. For example, the content of the advertising picture category usually contains text, and the text uses a prominent font (such as bold) and color, so it can be recognized according to the font and color. Another example is that the content of categories such as products, songs, videos, and location sharing contains links to jump to the original platform, and such information can be recognized by extracting the jump links in the page description document. Another example is that the content of the picture chart category can be recognized by extracting the page description document. Another example is that article titles, texts, etc. can be recognized according to the font size, format (indentation, line break, centering), etc.
[0227] Then, the electronic device 100 deletes the content of a specific category from the classification result of the content of the first page to obtain the main content. Among them, the content of the specific category is the invalid content that does not meet the user's needs. For example, advertising pictures, advertising links, function key icons, etc. can be used as the content of the specific category. The content of the specific category can be set in advance by the electronic device 100, or set in advance by the server and then sent to the electronic device 100. Among them, the main content is the remaining content after deleting the content of the specific category on the first page.
[0228] In the embodiment of the present application, the specific category in the second type of invalid content can be called the first category.
[0229] Reference Figure 5H , 525 in the first page 521 is invalid content. For example, a picture containing the text "Advertisement" 525
[0230] Reference Figure 6 , 613 in the first page 611 is invalid content. For example, a picture containing the text "Advertisement" 613.
[0231] Reference Figure 7 , 713 in the first page 711 is invalid content. For example, a picture containing the text "Advertisement" 713.
[0232] It can be understood that the invalid content obtained after classifying the first page for the above different application scenarios is only an example. In addition to the above Figure 5H , Figure 6 , Figure 7 example advertising picture content, it may also include but is not limited to: location information, music sharing, jump links for video sharing, etc. This application does not impose any restrictions on this.
[0233] Third, the invalid content in the first page content is the duplicate content in the first page content.
[0234] Specifically, when the invalid content in the first page content includes the above third type, the method for the electronic device 100 to delete the invalid content includes the following two:
[0235] 1. The electronic device 100 directly performs context comparison on the text content in the first page and deletes the duplicate content.
[0236] 2. The electronic device 100 first classifies the first page content to obtain picture content and text content, and then performs context comparison on these two types of content to delete the duplicate content in the picture content and text content.
[0237] Specifically, when the first page content contains the first content and the second content, and the first content and the second content are duplicate content, the electronic device 100 can delete any one of the first content or the second content.
[0238] The above duplicate content is the invalid content, which can be content with repeated words or content with repeated semantics. Among them, to determine whether the words are the same, the electronic device 100 can determine whether there are two sentences in the first page content that contain the same number of words and the words in each position are the same. To determine whether the semantics are the same, the electronic device 100 can perform semantic analysis on the first page content to determine whether their semantics are the same. Specific examples are as follows:
[0239] As Figure 5H shown, the text content 526A and the picture content 526B are displayed in the first page 521. Since the content "Where to go during winter vacation" referred to by 526A and 526B is content with the same words, 526A and 526B are duplicate content in the first page content. The electronic device 100 will delete any one of the duplicate content of 526A and 526B to obtain the remaining main content.
[0240] As Figure 6 As shown, text content 614A and picture content 614B are displayed on the first page 611. Since the content referred to by 614A and 614B, "universal for all seasons", is the same text, 614A and 614B are duplicate content on the first page. The electronic device 100 will delete any one of the duplicate content in 614A and 614B to obtain the remaining main content.
[0241] As Figure 7 As shown, text content 714A and 714B are displayed on the first page 711. Since the content shown by 714A and 714B, "VR experience, full of fun" and "VR experience, very interesting", has the same semantics, 714A and 714B are duplicate content in the first page content. The electronic device 100 will delete any one of the duplicate content in 714A and 714B to obtain the remaining main content.
[0242] It can be understood that the invalid content in the embodiments of this application may include any one or more of the above three types. When including multiple types of the above invalid content, the electronic device 100 can combine multiple methods to delete the invalid content in the first page content. And when the electronic device 100 simultaneously uses multiple methods to delete the invalid content in the first page, the order of the multiple deletion methods is not limited. Moreover, when the electronic device 100 first uses one deletion method and then uses another deletion method, it performs a further deletion operation on the remaining content obtained after the previous deletion operation.
[0243] For example, the electronic device 100 can first delete the content in the first page content that is the same as the first invalid text library, then the electronic device 100 classifies the remaining content, deletes the content of a specific class, then deletes the duplicate content in the remaining content, and finally obtains the main content.
[0244] For example, the electronic device 100 can first classify the first page content, delete the content of a specific class, then delete the duplicate content in the remaining content, and then delete the content in the remaining content that is the same as the first invalid text library, and finally obtain the main content.
[0245] S104, the electronic device 100 performs voice broadcast on the main content.
[0246] The electronic device 100 performs voice broadcast on the main content, and specifically can perform the broadcast in the following three ways.
[0247] 1. The electronic device 100 directly broadcasts the main content.
[0248] When the electronic device 100 broadcasts the main content on the first page 521 as Figure 5H shown, the voice broadcast result of the electronic device 100 is: User A#Winter vacation travel#Where to go during winter vacation
[0249] When the electronic device 100 broadcasts the main content in the first page 611 as shown Figure 6 below, the voice broadcast result of the electronic device 100 is: C Home Flagship Store, C Home Quilt, Suitable for All Seasons, 159.
[0250] When the electronic device 100 broadcasts the main content in the first page 711 as shown Figure 7 below, the voice broadcast result of the electronic device 100 is: Understand VR Technology in 1 Minute, Original by Lisa, September 22nd. VR technology has developed rapidly. VR experience is very interesting.
[0251] 2. The electronic device 100 adopts a voice broadcast template matching the first application scenario corresponding to the first page to broadcast the main content.
[0252] When the electronic device 100 uses the voice broadcast template corresponding to the first application scenario to perform voice broadcast on the content of the first page, the electronic device must determine the first application scenario corresponding to the first page. The method for determining the application scenario of the first page can refer to step S103 in the previous text. The voice broadcast template can be set in advance by the electronic device 100 or set in advance by the server and then sent to the electronic device 100. Among them, the voice broadcast templates corresponding to different application scenarios are shown in Table 4:
[0253] Application Scenario Voice Announcement Template Social Interaction User () posts content under topic (), and the content is () Shopping The store name is (), the product name is (), the item description is (), and the price is () Reading The article title is (), the article author is (), the article was published on (), and the article content is ().
[0254] Table 4
[0255] The voice broadcast templates shown in Table 4 above include: fixed words, the spaces corresponding to the fixed words, and conjunctions.
[0256] Among them, the fixed words and conjunctions can be set in advance by the developer. For example, the fixed words in the voice broadcast template corresponding to the social interaction application scenario include but are not limited to: user, topic, posted content, content. The conjunctions include but are not limited to: in, under, for. Another example, the fixed words in the voice broadcast template corresponding to the shopping application scenario include but are not limited to: store name, product name, item description, price. The conjunctions include but are not limited to: for. Another example, the fixed words in the voice broadcast template corresponding to the reading application scenario include but are not limited to: article title, article author, article publication, article content. The conjunctions include but are not limited to: for, on.
[0257] Among them, the space is located after the fixed word, and the electronic device 100 needs to fill in the content in this space. The content filled in the space is the content in the main content that belongs to the category corresponding to the fixed word.
[0258] Among them, different fixed words correspond to different categories of content, and the categories corresponding to different fixed words can be set in advance by developers. For example, the fixed word "user" corresponds to the content belonging to the category of this fixed word (i.e., user name), and the fixed word "article title" corresponds to the content belonging to the category of this fixed word (i.e., article title).
[0259] Among them, the categories of each content in the main content can be judged according to the following two methods:
[0260] In some embodiments, the electronic device 100 identifies the tags of each content in the main content according to the above HTML document, then determines the category of each content, and fills different contents into the spaces of the corresponding categories in the voice broadcast template shown in Table 4 respectively.
[0261] In other embodiments, the electronic device 100 can identify the attributes of each content in the main content according to the above image recognition technology, then determine the category of each content, and fill different contents into the spaces of the corresponding categories in the voice broadcast template shown in Table 4 respectively.
[0262] Next, the result of using the voice broadcast template to broadcast the main content will be further described. In different application scenarios, specific examples of the electronic device 100 voice-broadcasting the content of the first page are as follows:
[0263] Refer to Figure 5H , when the electronic device 100 displays the first page 521 with the application scenario of social interaction, the electronic device 100 uses the voice broadcast template matching the social interaction scenario to broadcast the main content. For example, user A posts content under the topic of winter vacation travel, and the content is where to go during the winter vacation.
[0264] Refer to Figure 6 , when the electronic device 100 displays the first page 611 with the application scenario of shopping, the electronic device 100 uses the voice broadcast template matching the shopping scenario to broadcast the main content. For example, the store name is C Home Furnishing Flagship Store, the product name is C Home Furnishing Quilt, the item description is suitable for all seasons, and the price is 159.
[0265] Refer to Figure 7 , when the electronic device 100 displays the first page 711 with the application scenario of reading, the electronic device 100 uses the voice broadcast template matching the reading scenario to broadcast the main content. For example, the article title is "Get to Know VR Technology in 1 Minute", the article author is lisa, the article was published on September 22nd, and the article content is that VR technology is developing rapidly and VR experience is very interesting.
[0266] It can be understood that the above description of using the corresponding voice broadcast templates in different application scenarios to broadcast the content of the third subject is only an example, and the present application does not impose any restrictions on this.
[0267] 3. The electronic device 100 uses a method of translating special characters for broadcasting.
[0268] Some characters represent specific meanings. For example, ":" represents "say", " ” represents "Renminbi", "@" represents "mention", etc. For users, when seeing these special characters, they can understand the specific meanings of these symbols. However, when broadcasting by voice, if these characters are directly broadcast, users cannot understand the meanings represented by these characters. Therefore, the electronic device 100 can translate these special characters into words that users can understand for voice broadcasting.
[0269] In the embodiments of the present application, the specific characters may include but are not limited to: letters, numbers, Chinese characters, etc., and there is no limitation here.
[0270] Specifically, the electronic device 100 can, according to the pre-set corresponding relationships between some characters and their specific meanings, translate these characters into corresponding words for voice broadcasting during voice broadcasting. The corresponding relationships between the characters and the translated words can be referred to in Table 5 shown below:
[0271]
[0272] Table 5
[0273] In some embodiments, during the process of the electronic device 100 voice-broadcasting the content of the first page, the user can operate the electronic device 100 to pause / continue the voice-broadcasting of the content of the first page.
[0274] Refer to Figure 8A the user interface 520 shown. The user interface 520 displays a window 527, and the window 527 includes a pause / continue control 527A and window indication information 527B.
[0275] Among them, the pause / continue control 527A is used to receive the click operation of the user, so that the electronic device 100 pauses / continues to broadcast the current page. When the electronic device 100 detects the operation of clicking the voice broadcast pause / continue control 527A, in response to this operation, the electronic device 100 will continue / pause the voice broadcast of the current page.
[0276] The window indication information 527B is used to prompt the user that the electronic device 100 is performing voice broadcast on the current page content, or the electronic device 100 has paused the voice broadcast on the current page. When the electronic device 100 is performing voice broadcast on the current page, the window indication information 527B displays "Voice broadcasting". When the electronic device 100 pauses the voice broadcast on the current page, the window indication information 527B displays "Pause voice broadcast".
[0277] In some embodiments, after the electronic device finishes voice broadcast, it can also receive suggestions feedback by the user, and customize the content of the voice broadcast for the user according to the user's feedback.
[0278] Referring to Figure 8B the user interface 520 shown, the user interface 520 displays a window 528, and the window 528 includes an evaluation option 528A, a text edit box 528B, a cancel control 528C, and a submit control 528D.
[0279] Among them, the rating option 528A includes 5 star options. The user can click on the star options to rate the current voice broadcast. The more star options clicked, the higher the degree of satisfaction of the user with the current voice broadcast. The text edit box 528B is used to receive suggestions from the user for the current voice broadcast. The user can enter suggestions for the content of the current voice broadcast through the text edit box 526B. The submit control 528D is used to determine the submission of the rating and feedback for the current voice broadcast. The cancel control 528C is used to cancel the rating and feedback for the current voice broadcast.
[0280] The user can edit suggestions for the current voice broadcast in the text edit box 528B. For example, "the number of comments or the number of forwards of social content", etc. After the electronic device 100 receives the feedback suggestions from the user, it can delete "the number of comments or the number of forwards of social content" from the invalid text library, so that the number of comments or the number of forwards of social content, etc. are included in the subsequent voice broadcasts, meeting the personalized needs of the user.
[0281] It can be understood that Figure 8B The user interface shown is only an example. The electronic device 100 can also receive suggestions from the user for this voice broadcast in other ways. For example, when the voice broadcast of the electronic device 100 is completed, an opinion feedback option is directly displayed. The opinion feedback option can include options corresponding to specific opinions such as the number of comments on the social content broadcast, the time of Weibo post broadcast, and not broadcasting the user name. The user can provide feedback on this voice broadcast by clicking on the above options. Another example is that when the electronic device 100 detects that the voice broadcast of the content on the first page is completed, it can continue to broadcast "Are you satisfied with this voice broadcast?". When the electronic device 100 receives the voice input of "satisfied" or "not satisfied" from the user, the electronic device 100 can continue to broadcast "Do you want to continue to broadcast the number of comments and the number of forwards during the next voice broadcast?", and the user can input the voice of "yes" or "no" according to their own needs, so as to realize the feedback on this voice broadcast through the voice interaction between the user and the electronic device 100.
[0282] In summary, an embodiment of the present application proposes a voice broadcast method. In response to an operation to enable the voice broadcast function, the electronic device deletes the invalid content that the user does not need in the first page currently displayed, obtains the main content that the user needs, and then broadcasts the main content. It can be seen that after adopting the voice broadcast method proposed in the embodiment of the present application, the electronic device can broadcast content that better meets the user's needs. In addition, the quality of the voice broadcast content is improved, which is convenient for the user to understand, thereby improving the user's voice broadcast experience and the accessibility of the electronic device.
[0283] The various embodiments of the present application can be combined arbitrarily to achieve different technical effects.
[0284] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that the computer can access or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid-state disk Solid State Disk), etc.
[0285] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware with a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above method embodiments. The aforementioned storage medium includes various media that can store program codes, such as ROM or random access memory RAM, magnetic disks, or optical discs.
[0286] In summary, the above are only embodiments of the technical solutions of the present invention and are not intended to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made according to the disclosure of the present invention shall be included within the protection scope of the present invention.< / videoview> < / imgview> < / textview>
Claims
1. A voice broadcast method, the method is applied to an electronic device, characterized in that, The method includes: Detecting a first operation; In response to the first operation, starting a first application program and displaying a first user interface; Obtaining first page content, where the first page content includes: the content in the first page provided by the first application program in the first user interface; Determining the application scenario corresponding to the first page; Determining the main content, where the main content includes the content in the first page content except for the invalid content; the invalid content includes: the content in the first page content that is included in a first invalid text library; the first invalid text library corresponds to the application scenario; Using a voice broadcast template corresponding to the application scenario to voice broadcast the main content, where the voice broadcast template includes fixed words, spaces corresponding to the fixed words, and connecting words, and the spaces are used to fill the main content.
2. The method according to claim 1, wherein After determining the main content, the method further includes: Determining the characters included in the first page content, According to the correspondence between the characters and the words representing the meanings of the characters, replacing the characters in the main content with the corresponding words.
3. The method according to claim 1, wherein The electronic device stores invalid text libraries corresponding to different application scenarios respectively, and the application scenario determined by the electronic device corresponds to the first page in the first application program, or corresponds to the first application program.
4. The method according to claim 1, wherein The invalid content further includes: the content in the first page content that belongs to a first category; the first category includes one or more of advertisements or links.
5. The method according to claim 1, wherein The first page content includes first content and second content, and the first content and the second content are duplicate content; The invalid content further includes the second content.
6. The method according to claim 5, wherein Before obtaining the first page content, it further includes: Detecting a second operation, where the second operation is used to trigger the electronic device to obtain the first page content, determine the application scenario, determine the main content, and voice broadcast the main content.
7. The method according to claim 6, wherein The second operation includes a voice command; Or, The first user interface includes a first control, and the second operation includes a user operation acting on the first control.
8. The method according to any one of claims 1 to 7, characterized in that Obtaining the first page content includes: Taking a screenshot of the first user interface to obtain a first image, and using image recognition technology to obtain the first page content in the first image; Or, Obtaining a first page description document, and obtaining the first page content according to the first page description document, where the first page description document indicates the content included in the first page and the attributes of each content.
9. An electronic device, characterized in that, Includes: A display screen, a memory, and one or more processors; the display screen, the memory are coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute the method according to any one of claims 1-8.
10. A computer program product comprising instructions, characterized in that, When the computer program product runs on an electronic device, the electronic device is caused to execute the method according to any one of claims 1-8.
11. A computer-readable storage medium, comprising instructions, characterized in that, When the instructions run on an electronic device, the electronic device is caused to execute the method according to any one of claims 1-8.
Citation Information
Patent Citations
Voice broadcasting method and device, mobile terminal and storage medium
CN108874356A
Reading control method and device, equipment and computer storage medium
CN110347309A
Cited By
Voice broadcasting method and apparatus
WO2022161132A1