Text color processing method, device, storage medium and electronic device

By determining the target text read aloud based on voice data and performing color gradient, the problem of unnatural changes in text colors in the prior art is solved, smooth gradient is achieved, and user experience is improved.

CN119741910APending Publication Date: 2025-04-01GUANGZHOU SHIZHEN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311264797.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-25
Publication Date
2025-04-01

AI Technical Summary

Technical Problem

In the prior art, the change in text color is unnatural, resulting in poor presentation effect and affecting the user experience.

Method used

By obtaining the voice data of the reading text, the target text is determined and the reading is gradient from the first preset color to the second preset color, so as to achieve smooth color changes.

Benefits of technology

It realizes smooth gradient in text color, enhances the user experience, enables users to clarify the specific location of reading aloud, and avoids the abruptness of color changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119741910A_ABST
    Figure CN119741910A_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a text color processing method, device, storage medium and electronic device, the method comprising: displaying a text to be read aloud; wherein the text to be read aloud includes a number of characters of a first preset color; obtaining voice data of the text to be read aloud, and determining the target characters to be read aloud in the text to be read aloud according to the voice data; and gradually changing the target characters in the text to be read aloud from the first preset color to the second preset color. The present application determines the target characters to be read aloud based on the voice data, and gradually changes the color of the target characters to be read aloud, which not only allows the user to know the specific position of the reading aloud, but also realizes the smooth gradual change of the color of the target characters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular, to a text color processing method, device, storage medium, and electronic device. Background Art

[0002] With the development of Internet technology, people can read texts through applications on various terminals (such as mobile phones and computers, etc.). During the running of the application, the text presentation effect can be enriched by changing the color of the text.

[0003] In the related art, the characters in the text are changed one by one, which makes the change of the text color abrupt and unnatural, affecting the presentation effect of the text. Summary of the invention

[0004] In order to overcome the problems existing in the related art, the present application provides a text color processing method, device, storage medium and electronic device, which can make the text color change smoothly.

[0005] According to a first aspect of an embodiment of the present application, a text color processing method is provided, comprising the following steps:

[0006] Displaying a text to be read aloud; wherein the text to be read aloud includes a plurality of characters in a first preset color;

[0007] Acquire voice data of the read text, and determine the target text to be read in the read text according to the voice data;

[0008] The target text in the read text is gradually changed from a first preset color to a second preset color.

[0009] According to a second aspect of an embodiment of the present application, a text color processing device is provided, comprising:

[0010] A reading text display module, used to display the reading text; wherein the reading text includes a plurality of characters in a first preset color;

[0011] The target text determination module is used to obtain the voice data of the read text, and determine the target text read in the read text according to the voice data;

[0012] The text color gradient module is used to gradually change the target text in the read text from a first preset color to a second preset color.

[0013] According to a third aspect of an embodiment of the present application, there is provided an electronic device, including a display, a processor and a memory; the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the text color processing method as described above.

[0014] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the text color processing method as described above is implemented.

[0015] The embodiment of the present application displays a text to be read aloud; wherein the text to be read aloud includes a number of characters in a first preset color; voice data of the text to be read aloud is obtained, and according to the voice data, a target character to be read aloud in the text to be read aloud is determined; and the target character in the text to be read aloud is gradually changed from the first preset color to the second preset color. The present application determines the target character to be read aloud based on the voice data, and gradually changes the color of the target character to be read aloud, so that the user can know the specific position of the reading aloud, and also realizes a smooth gradual change of the color of the target character.

[0016] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application.

[0017] For better understanding and implementation, the present invention is described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 This is a flowchart of a text color processing method shown in one embodiment of the present application;

[0019] Figure 2 This is a flowchart of step S10 in the text color processing method shown in one embodiment of the present application;

[0020] Figure 3 This is a schematic diagram of displaying a text read aloud in a text color processing method according to an embodiment of the present application;

[0021] Figure 4 This is a flowchart of step S20 in the text color processing method shown in one embodiment of the present application;

[0022] Figure 5 This is a flowchart of step S30 in the text color processing method shown in one embodiment of the present application;

[0023] Figure 6 A schematic diagram of color gradient of read text in a text color processing method shown in one embodiment of the present application;

[0024] Figure 7 This is a flowchart of step S312 in the text color processing method shown in one embodiment of the present application;

[0025] Figure 8 This is a flowchart of step S312 in the text color processing method according to another embodiment of the present application;

[0026] Fig. 9This is a schematic block diagram of the structure of a text color processing device shown in one embodiment of the present application;

[0027] Fig.10 The present invention is a block diagram showing the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0028] In order to make the objectives, technical solutions and advantages of the present application more clear, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.

[0029] It should be clear that the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the embodiments of the present application.

[0030] When the following description relates to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. In the description of the present application, it should be understood that the terms "first", "second", "third", etc. are only used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances. The singular forms of "a", "said" and "the" used in the present application and the appended claims are also intended to include the majority form, unless the context clearly indicates other meanings. The words "if" / "if" used herein can be interpreted as "at the time of" or "when" or "in response to determination".

[0031] In addition, in the description of this application, unless otherwise specified, "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.

[0032] The application environment of the text color processing method provided in the embodiment of the present application includes a text color processing device.

[0033] The text color processing method provided in the embodiments of the present application can be executed by a text color processing device, which can be implemented by software and / or hardware, and can be composed of two or more physical entities or one physical entity. The text color processing device can be any electronic device with a text color processing application installed, and the electronic device can be a computer, a mobile phone, a tablet or an interactive tablet and other smart devices.

[0034] The text color processing method of the embodiment of the present application can be applied to the bank account opening scenario. In the process of realizing the present invention, the inventor found that when a user opens a bank account on a mobile phone or an intelligent terminal for handling banking business, a robot is required to read an account opening notice agreement. In order to let the user know where the robot has read, the text that has been read needs to be marked in one color, and the text that has not been read needs to be marked in another color.

[0035] However, in the related art, the color of the text that has been read is changed word by word, and the color of the text changes suddenly.

[0036] To this end, the present application determines the target text to be read aloud based on the voice data, and performs a color gradient on the target text to be read aloud, which not only allows the user to know the specific location of the reading, but also achieves a smooth gradient of the target text color.

[0037] Based on this, the present application proposes a text color processing method, device, storage medium and electronic device.

[0038] See also Figure 1 The text color processing method provided in the embodiment of the present application comprises the following steps:

[0039] S10: Displaying a text to be read aloud; wherein the text to be read aloud includes a plurality of characters in a first preset color.

[0040] The reading text is the text to be read aloud, and the reading text includes a number of characters, and the number of characters are displayed in lines or paragraphs.

[0041] The first preset color is the display color of the text. For example, the first preset color is black.

[0042] In the embodiment of the present application, the read text is displayed on the display screen of the text color processing device. For example, the read text is displayed on the screen of a mobile phone, and the read text is an account opening notice agreement for a user to open an account in a bank.

[0043] S20: Acquire voice data of the read text, and determine the target text to be read in the read text according to the voice data.

[0044] The voice data of the text read aloud may be collected by a sound collection module, which includes a microphone, a voice recorder, a sound card, and the like.

[0045] In the embodiments of the present application, the sound collection module can be built into the text color processing device or can be connected to the text color processing device through wired or wireless means. During the process of the robot reading aloud the text to be read, the voice data of the robot is collected in real time through the sound collection module. By performing speech recognition on the voice data, the target text read in the text to be read can be determined. For example, if the text to be read is "Read the instructions. The conditions that users need to meet for opening an account are as follows:", and the robot reads "open", then the target text read is "Read the instructions. The users open".

[0046] S30: Gradually change the target text in the text to be read from the first preset color to the second preset color.

[0047] Among them, the second preset color is different from the first preset color. For example, the second preset color is red.

[0048] In the embodiments of the present application, for each character in the target text, the character is gradually changed from the first preset color to the second preset color along a preset direction, rather than changing the color of the entire character at the same time. Specifically, the target text in the text to be read is gradually changed from the first preset color to the second preset color along the horizontal direction, vertical direction or diagonal direction of the character. For example, the character "zhi" is gradually changed from black to red along the horizontal direction, that is, the left half of "zhi" becomes red and the right half of "zhi" is black. Then, the right half of "zhi" also becomes red.

[0049] When the text to be read is not being read, it remains the first preset color. For example, the text to be read is black. After the robot reads the text to be read, the target text of the text to be read will change color word by word. Each character does not change the color of the whole character at once, but first changes a part and then changes the remaining part. By making the color of the read target text (for example, changed to red) different from the color of the unread text (for example, still black), the user can know which position the robot is reading the account opening instructions agreement to. At the same time, by performing partial gradual change on the read target text, the smooth gradual change of the color of the target text is realized, and it is no longer abrupt.

[0050] Applying the embodiments of the present application, by displaying the text to be read; wherein, the text to be read includes several characters of the first preset color; obtaining the voice data of the read text to be read, and determining the target text read in the text to be read according to the voice data; gradually changing the target text in the text to be read from the first preset color to the second preset color. Based on the voice data, the present application determines the read target text and performs color gradual change on the read target text, which can not only let the user know the specific position of the reading, but also realize the smooth gradual change of the color of the target text.

[0051] In an alternative embodiment, please refer to Figure 2, step S10, including steps S101 to S102, are as follows:

[0052] S101: Generate a first canvas, a second canvas and a third canvas; wherein the background of the first canvas is a first preset color; the second canvas is drawn with a reading text, and the background of the second canvas is transparent; the background of the third canvas is a third preset color; the first preset color is used to determine the color of several characters in the reading text; the third preset color is used to determine the background color of the reading text.

[0053] The canvas is a rectangular area, including a number of pixels. The pixel value of each pixel includes four channel values, namely R, G, B, and Alpha values, representing red, green, blue, and transparency, respectively. For example, if the background of the canvas is white, the pixel value of the pixel of the canvas is (255,255,255,1); if the background of the canvas is black, the pixel value of the pixel of the canvas is (0,0,0,1); if the background of the canvas is transparent, the pixel value of the pixel of the canvas is (0,0,0,0).

[0054] In the embodiment of the present application, the text to be read aloud is drawn on the second canvas, that is, the pixel values ​​of the pixels on the second canvas are changed according to the color of the text to be read aloud, and the second canvas includes a transparent background and an opaque text to be read aloud.

[0055] S102: Setting the first canvas on the second canvas, and setting the second canvas on the third canvas, so as to merge the first canvas, the second canvas and the third canvas to display the reading text.

[0056] In the embodiments of this application, please refer to Figure 3 , the first canvas 1, the second canvas 2 and the third canvas 3 are merged to obtain a merged canvas 4, wherein the merged canvas 4 includes a reading text 41 of a first preset color and a background 42 of a third preset color. For example, the merged canvas includes a reading text 41 of a first preset color and a background 42 of a third preset color. For example, the merged canvas includes a black reading text and a white background.

[0057] By generating the first canvas, the second canvas and the third canvas, the reading text can be automatically and quickly displayed.

[0058] In an alternative embodiment, see Figure 4 , step S20, including steps S201 to S202, are as follows:

[0059] S201: Perform voice recognition on the voice data to obtain voice text;

[0060] S202: Determine the target text to be read aloud in the read aloud text according to the voice text.

[0061] In the embodiment of the present application, the existing speech recognition technology can be used to perform speech recognition on the speech data, and the speech data can be converted into speech text. The speech text is compared with the read text to determine the target text read in the read text.

[0062] By performing speech recognition on the speech data, the target words read aloud and the unread words in the read text can be automatically and quickly identified.

[0063] In an alternative embodiment, see Figure 5 , step S30, including steps S311 to S312, are as follows:

[0064] S311: Acquire a first area occupied by the target text in the second canvas, and determine a corresponding second area in the first canvas according to the first area.

[0065] In an embodiment of the present application, the first canvas is located above the second canvas, and each pixel point in the first area in the second canvas is traversed, and the corresponding pixel point is searched from the first canvas, and the second area in the first canvas is determined according to the corresponding pixel point.

[0066] S312: Gradually changing the background color of the second area of ​​the first canvas from the first preset color to the second preset color at a preset color changing rate. While the background color of the second area changes, the first canvas, the second canvas, and the third canvas are merged at a preset fusion frequency, so that the target text in the read text gradually changes from the first preset color to the second preset color.

[0067] The preset color change rate is used to indicate how fast the background color changes. The slower the color changes, the smoother the change. The preset color change rate can be a preset fixed rate or a dynamically changing rate.

[0068] The preset fusion frequency is used to indicate the number of times the first canvas, the second canvas and the third canvas are fused within a unit time.

[0069] In the embodiments of this application, please refer to Figure 6 , the background color of the second area 11 of the first canvas 1 changes gradually, and the pixel value of each pixel in the second area 11 changes accordingly. For example, the background of the second area 11 changes from black to red. Based on the pixel value of each pixel in the second area, the pixel value of each pixel in the second canvas, and the pixel value of each pixel in the third canvas, the first canvas 1, the second canvas 2, and the third canvas 3 are fused to obtain a fused canvas 4, and the target text 411 of the read text 41 in the fused canvas 4 changes gradually from the first preset color to the second preset color.

[0070] By gradually changing the background color of the second area in the first canvas, the color gradient of the target text can be automatically and quickly achieved.

[0071] In an alternative embodiment, see Figure 7 , step S312 includes steps S313 to S314, which are specifically as follows:

[0072] S313: Detecting the speech rate of reading aloud the text;

[0073] S314: Using the speech rate as a preset color change rate, the background of the second area of ​​the first canvas is gradually changed from a first preset color to a second preset color according to the preset color change rate.

[0074] In the embodiment of the present application, the speech rate is used to indicate the speed at which the robot reads the text. After the voice data is collected by the sound collection module, the text color processing device can extract the voice parameters from the voice data to obtain the speech rate. The voice parameters include the speech interval time and the speech rate.

[0075] By using the voice rate as the preset color change rate, the color gradient rate of the target text can be kept consistent with the robot's reading voice rate, thereby presenting an effect in which the text changes color synchronously with the robot's reading.

[0076] In an alternative embodiment, see Figure 8 Step S312 includes steps S3121 to S3124, which are as follows:

[0077] S3121: traverse the first pixel point in the first canvas, and determine whether the transparency of the second pixel point at the position corresponding to the first pixel point in the second canvas is zero.

[0078] The first canvas includes a plurality of first pixels, the second canvas includes a plurality of second pixels, and the second canvas has the same size as the first canvas and includes the same number of pixels. For each first pixel, a unique second pixel corresponding to the first pixel can be found in the second canvas. For example, the position of the first pixel in the first canvas is (1, 1), and the position of the second pixel in the second canvas is also (1, 1).

[0079] In the embodiment of the present application, the second canvas includes a transparent background and an opaque text to be read aloud, the transparency of the second pixel point belonging to the background is 0, and the transparency of the second pixel point belonging to the text to be read aloud is not 0.

[0080] S3122: When the transparency of the second pixel at the corresponding position is zero, the transparency of the third pixel at the corresponding position of the first pixel in the third canvas is used as the transparency of the fused pixel, and the color value of the third pixel at the corresponding position of the first pixel in the third canvas is used as the color value of the fused pixel; wherein the fused pixel is obtained by fusing the first pixel, the second pixel and the third pixel.

[0081] The third canvas includes a plurality of third pixels, and the third canvas has the same size as the first canvas and includes the same number of pixels. For each first pixel, a unique third pixel corresponding to the first pixel can be found in the third canvas. For example, the position of the first pixel in the first canvas is (1, 1), and the position of the second pixel in the third canvas is also (1, 1).

[0082] After the first canvas, the second canvas and the third canvas are fused, a fused canvas is obtained, and the fused canvas includes a plurality of fused pixels. Specifically, after a plurality of first pixels, a second pixel at a position corresponding to each first pixel, and a third pixel at a position corresponding to each first pixel are fused, a plurality of fused pixels are obtained. For example, the position of the first pixel in the first canvas is (1, 1), and the position of the fused pixel in the fused canvas is also (1, 1).

[0083] In the embodiment of the present application, the third canvas includes a background of a third preset color, the transparency of all third pixels is not 0, and the color values ​​of all third pixels indicate the third preset color. For the second pixel belonging to the transparent background, after the first canvas, the second canvas, and the third canvas are fused, the transparency and color value of the corresponding fused pixel remain consistent with the corresponding third pixel.

[0084] S3123: When the transparency of the second pixel at the corresponding position is not zero, the transparency of the first pixel is used as the transparency of the fused pixel, and the color value of the first pixel is used as the color value of the fused pixel.

[0085] In the embodiment of the present application, for the second pixel point belonging to the read-aloud text, after the first canvas, the second canvas and the third canvas are fused, the transparency and color value of the corresponding fused pixel point remain consistent with the corresponding first pixel point.

[0086] S3124: According to the transparency of the fused pixel point and the color value of the fused pixel point, the target text in the read text is gradually changed from the first preset color to the second preset color.

[0087] In the embodiment of the present application, according to the transparency and color value of the fused pixel determined in steps S3122 and S3123, the target text in the read text can be gradually changed from the first preset color to the second preset color. For example, the target text in the read text is gradually changed from black to red, and the background remains white.

[0088] The pixel value of each fused pixel in the fused canvas can be determined by the pixel value of each pixel in the first canvas, the second canvas, and the third canvas, thereby achieving a gradual change in the color of the target text.

[0089] The present application also provides a device embodiment, which can be used to execute the content of the text color processing method in the embodiment of the present application. For details not disclosed in the device embodiment of the present application, please refer to the content of the text color processing method in the embodiment of the present application.

[0090] See also Fig. 9 , a text color processing device 4 disclosed in an embodiment of the present application includes:

[0091] The reading text display module 41 is used to display the reading text; wherein the reading text includes a plurality of characters in a first preset color;

[0092] The target text determination module 42 is used to obtain the voice data of the read text, and determine the target text read in the read text according to the voice data;

[0093] The text color gradient module 43 is used to gradiently change the target text in the read text from a first preset color to a second preset color.

[0094] The text color processing device provided in the above embodiment and the text color processing method provided in the embodiment of the present application belong to the same concept. For details on the implementation process, please refer to steps S10 to S30 of the method embodiment, which will not be repeated here.

[0095] The present application also provides a device embodiment that can be used to execute the content of the text color processing method in the embodiment of the present application. For details not disclosed in the device embodiment of the present application, please refer to the content of the text color processing method in the embodiment of the present application.

[0096] See also Fig.10 The present application further provides an electronic device 300, which may be a computer, a text color processing device, etc. In an exemplary embodiment of the present application, the electronic device 300 is a text color processing device, which includes: at least one processor 301, at least one memory 302, at least one display, at least one network interface 303, a user interface 304, and at least one communication bus 305.

[0097] The user interface 304 is mainly used to provide an input interface for the user and obtain data input by the user. Optionally, the user interface may also include a standard wired interface or a wireless interface.

[0098] The network interface 303 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0099] The communication bus 305 is used to realize the connection and communication between these components.

[0100] Among them, the processor 301 may include one or more processing cores. The processor uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions of the electronic device and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory, and calling data stored in the memory. Optionally, the processor can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor can integrate one or more combinations of central processing unit (Central Processing Unit, CPU), image processor (Graphics Processing Unit, GPU) and modem. Among them, the CPU mainly processes the operating system, user interface and application program, etc.; the GPU is responsible for rendering and drawing the content to be displayed by the display layer; the modem is used to process wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor, but implemented by a single chip.

[0101] Among them, the memory 302 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory includes a non-transitory computer-readable storage medium. The memory can be used to store instructions, programs, codes, code sets or instruction sets. The memory may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned method embodiments, etc.; the data storage area may store data involved in the above-mentioned method embodiments, etc. The memory may also be optionally at least one storage device located away from the aforementioned processor. As Fig.10 As shown, the memory as a computer storage medium may include an operating system, a network communication module, a user interface module, and an operating application program.

[0102] The processor can be used to call the application of the text color processing method of the text color processing device stored in the memory, and specifically execute the method steps of the above-mentioned embodiment. The specific execution process can refer to the specific description shown in the method embodiment, which will not be repeated here.

[0103] The present application also provides a computer-readable storage medium on which a computer program is stored, and the instructions are suitable for being loaded by a processor and executing the method steps of the above-mentioned embodiment. The specific execution process can refer to the specific description shown in the embodiment, and will not be repeated here. The device where the storage medium is located can be a personal computer, a laptop computer, a smart phone, a tablet computer, a picture director device and other electronic devices.

[0104] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are merely schematic, wherein the components described as separate parts may or may not be physically separated, and the parts displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.

[0105] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0106] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the function selected in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 function selected in a box or multiple boxes.

[0107] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 steps for the function selected in a box or multiple boxes.

[0108] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0109] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0110] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0111] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0112] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A text color processing method, characterized in that: The steps include: Displaying a text to be read aloud; wherein the text to be read aloud includes a plurality of characters in a first preset color; Acquire voice data of reading the reading text, and determine the target text read in the reading text according to the voice data; The target text in the read text is gradually changed from the first preset color to the second preset color.

2. The text color processing method according to claim 1, characterized in that: The step of displaying the read text includes: Generate a first canvas, a second canvas, and a third canvas; wherein the background of the first canvas is the first preset color; the second canvas is drawn with the read text, and the background of the second canvas is transparent; the background of the third canvas is the third preset color; the first preset color is used to determine the color of several characters in the read text; the third preset color is used to determine the background color of the read text; The first canvas is set on the second canvas, and the second canvas is set on the third canvas, so as to merge the first canvas, the second canvas and the third canvas to display the reading text.

3. The text color processing method according to claim 2, characterized in that: The step of gradually changing the target text in the read text from the first preset color to the second preset color comprises: Acquire a first area occupied by the target text in the second canvas, and determine a corresponding second area in the first canvas according to the first area; The background of the second area of ​​the first canvas is gradually changed from the first preset color to the second preset color at a preset color change rate. While the background color of the second area changes, the first canvas, the second canvas and the third canvas are fused at a preset fusion frequency, so that the target text in the read text gradually changes from the first preset color to the second preset color.

4. The text color processing method according to claim 3, characterized in that: The step of fusing the first canvas, the second canvas, and the third canvas according to a preset fusing frequency so that the target text in the read text gradually changes from the first preset color to the second preset color includes: Traversing a first pixel point in the first canvas, and determining whether the transparency of a second pixel point at a position corresponding to the first pixel point in the second canvas is zero; When the transparency of the second pixel at the corresponding position is zero, the transparency of the third pixel at the corresponding position of the first pixel in the third canvas is used as the transparency of the fused pixel, and the color value of the third pixel at the corresponding position of the first pixel in the third canvas is used as the color value of the fused pixel; wherein the fused pixel is obtained by fusion of the first pixel, the second pixel and the third pixel; When the transparency of the second pixel at the corresponding position is not zero, the transparency of the first pixel is used as the transparency of the fused pixel, and the color value of the first pixel is used as the color value of the fused pixel; According to the transparency of the fused pixel point and the color value of the fused pixel point, the target text in the read text is gradually changed from the first preset color to the second preset color.

5. The text color processing method according to claim 3, characterized in that: The step of gradually changing the background of the second area of ​​the first canvas from the first preset color to the second preset color at a preset color changing rate comprises: detecting a speech rate of reading the reading text; The speech rate is used as the preset color change rate, and the background of the second area of ​​the first canvas is gradually changed from the first preset color to the second preset color according to the preset color change rate.

6. The text color processing method according to any one of claims 1 to 5, characterized in that: The step of gradually changing the target text in the read text from the first preset color to the second preset color comprises: The target text in the read text is gradually changed from the first preset color to the second preset color along the horizontal direction, the vertical direction or the diagonal direction of the text.

7. The text color processing method according to any one of claims 1 to 5, characterized in that: The step of determining the target text read aloud in the read aloud text according to the voice data comprises: Performing speech recognition on the speech data to obtain speech text; According to the voice text, the target text read aloud in the read aloud text is determined.

8. A text color processing device, characterized in that: include: A reading text display module, used to display the reading text; wherein the reading text includes a plurality of characters in a first preset color; A target text determination module, used for acquiring voice data of reading the text aloud, and determining the target text read aloud in the text aloud according to the voice data; The text color gradient module is used to gradually change the target text in the read text from the first preset color to the second preset color.

9. An electronic device comprising a display, a processor and a memory; characterized in that: The memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the text color processing method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the text color processing method according to any one of claims 1 to 7 is implemented.