WO2025199827A1 - 用于文本作品呈现的方法、装置、设备和存储介质 - Google Patents
用于文本作品呈现的方法、装置、设备和存储介质Info
- Publication number
- WO2025199827A1 WO2025199827A1 PCT/CN2024/084218 CN2024084218W WO2025199827A1 WO 2025199827 A1 WO2025199827 A1 WO 2025199827A1 CN 2024084218 W CN2024084218 W CN 2024084218W WO 2025199827 A1 WO2025199827 A1 WO 2025199827A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- text
- character
- image
- role
- information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
Definitions
- Example embodiments of the present disclosure generally relate to the field of computers, and more particularly, to methods, devices, apparatuses, and computer-readable storage media for presenting text works.
- e-books electronic publications
- Users can read the text content in e-books (especially text works such as novels, essays, prose, poems, and plays).
- TTS text to speech
- the text content in the e-book can be converted into voice data, and then the voice data can be played.
- voice data it is difficult for users to understand the details of the text work based on voice data alone, and it is desired to provide users with richer information.
- a method for presenting a text work includes: in an electronic book reader for reading a text work, in response to receiving a playback request for audio data corresponding to the text work, playing the audio data; and displaying an image corresponding to the text work, the image being generated based on a character in a text segment in the text work, the text segment corresponding to a playback position of the audio data.
- a device for presenting a text work includes: a playback module configured to, in an electronic book reader for reading a text work, play audio data in response to receiving a playback request for audio data corresponding to the text work; and a display module configured to display an image corresponding to the text work, the image being generated based on a character in a text segment in the text work, the text segment corresponding to a playback position of the audio data.
- an electronic device in a third aspect of the present disclosure, includes at least one processing unit; and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit. When executed by the at least one processing unit, the instructions cause the device to perform the method of the first aspect.
- a computer-readable storage medium wherein a computer program is stored on the computer-readable storage medium, and the computer program can be executed by a processor to implement the method of the first aspect.
- FIG1 shows a schematic diagram of an example environment in which embodiments of the present disclosure can be implemented
- FIG4 shows a schematic diagram of an example character image according to some embodiments of the present disclosure
- FIG5 shows a schematic diagram for storing an image according to some embodiments of the present disclosure
- FIG6 shows a flowchart of a process for text work presentation according to some embodiments of the present disclosure
- FIG7 shows a schematic structural block diagram of an apparatus for presenting a text work according to some embodiments of the present disclosure.
- FIG8 illustrates a block diagram of an electronic device in which one or more embodiments of the present disclosure may be implemented.
- the term “including” and similar terms should be understood as open inclusion, i.e., “including but not limited to”.
- the term “based on” should be understood as “based at least in part on”.
- the term “one embodiment” or “the embodiment” should be understood as “at least one embodiment”.
- the term “some embodiments” should be understood as “at least some embodiments”.
- Other explicit and implicit definitions may be included below.
- executing a step “in response to A” does not mean executing the step immediately after “A” but may include one or more intermediate steps.
- a prompt message is sent to the user to clearly remind the user that the operation requested to be performed will require obtaining and using the user's personal information, so that the user can independently choose whether to provide personal information to the electronic device, application, server or storage medium and other software or hardware that performs the operation of the technical solution of the present disclosure based on the prompt message.
- a prompt message in response to receiving a user's active request, may be sent to the user, for example, in the form of a pop-up window, in which the prompt message may be presented in text form.
- the pop-up window may also include a selection control for the user to select "agree” or “disagree” to provide personal information to the electronic device.
- model can learn the association between corresponding inputs and outputs from training data, so that after training is completed, corresponding outputs can be generated for given inputs.
- the generation of the model can be based on machine learning technology.
- Deep learning is a machine learning algorithm that processes inputs and provides corresponding outputs by using multiple layers of processing units.
- a neural network model is an example of a model based on deep learning.
- model may also be referred to as “machine learning model”, “learning model”, “machine learning network” or “learning network”, and these terms are used interchangeably in this article.
- a “neural network” is a machine learning network based on deep learning.
- a neural network is capable of processing inputs and providing corresponding outputs. It typically includes an input layer, an output layer, and one or more hidden layers between the input and output layers. Neural networks used in deep learning applications typically include many hidden layers, thereby increasing the depth of the network. The layers of a neural network are connected in sequence so that the output of the previous layer is provided as input to the next layer, where the input layer receives the input of the neural network and the output of the output layer serves as the final output of the neural network.
- Each layer of a neural network includes one or more nodes (also called processing nodes or neurons), each of which processes the input from the previous layer.
- machine learning can be roughly divided into three stages, namely the training stage, the testing stage, and the application stage (also called the inference stage).
- the training stage a given model can be trained using a large amount of training data, and the parameter values are continuously updated iteratively until the model can obtain consistent inferences that meet the expected goals from the training data.
- the model can be considered to be able to learn the association between input and output (also called input-to-output mapping) from the training data.
- the parameter values of the trained model are determined.
- the testing stage the test input is applied to the trained model to test whether the model can provide the correct output, thereby determining the performance of the model.
- the testing stage can sometimes be integrated into the training stage.
- the trained model can be used to process the actual model input based on the parameter values obtained through training to determine the corresponding model output.
- FIG1 shows a schematic diagram 100 of an example environment in which an embodiment of the present disclosure can be implemented.
- an e-book reader may provide a page 110.
- the user may select a text work that he or she wishes to play; alternatively and/or additionally, the user may select a chapter in the text work that he or she wishes to play. Further, the user may utilize the control 140 to play the corresponding audio data.
- the display area 120 may present general information of the text work, such as the name, author, the title of the chapter being played, and so on.
- audio data can only provide limited information. It is difficult for users to understand the details of the text work (for example, relevant scene information and character information, etc.) based on voice data alone. At this time, it is expected that more abundant information can be provided to users.
- FIG2 illustrates a schematic diagram 200 of a page for presenting a textual work according to some embodiments of the present disclosure.
- the following textual work is hereinafter exemplified by a novel.
- the textual work may include, but is not limited to, novels, essays, prose, poetry, and scripts.
- the method of the present disclosure can be performed by an e-book reader.
- the user can select the text work that he wants to play; alternatively and/or additionally, when the text work includes multiple chapters, the user can select the chapter that he wants to play.
- the e-book reader can provide a page 210.
- page 210 the user can use control 240 to request to play audio data.
- the audio data can be played.
- page 210 may include a display area 220, and an image 222 corresponding to the text work may be displayed in the display area 220.
- an e-book reader may be installed at an electronic device.
- the electronic device may include any computing system with computing capabilities, such as various computing devices/systems, terminal devices, server devices, etc.
- the terminal device may be any type of mobile terminal, fixed terminal or portable terminal, including a mobile phone, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a media computer, a multimedia tablet, a handheld computer, a portable game terminal, a VR/AR device, a personal communication system (PCS) device, a personal navigation device, a personal digital assistant (PDA), an audio/video player, a digital camera/camcorder, a positioning device, a television receiver, a radio broadcast receiver, an e-book device, a game device or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof.
- PCS personal communication system
- PDA personal digital assistant
- a server-side device can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks, and big data and artificial intelligence platforms.
- Server-side devices may include, for example, computing systems/servers such as mainframes, edge computing nodes, and computing devices in cloud environments.
- a pre-processing process may be performed on the text work to generate corresponding images for each text segment in the text work. These images may be stored in the electronic device or obtained by the electronic device from a remote server.
- an audio segment in the audio data corresponding to the other initial playback position is played; based on the other initial playback position and the playback time, a current playback position of the audio data is determined; a current text segment in the text work corresponding to the current playback position is determined; and a current image corresponding to the current text segment is presented.
- the user is allowed to adjust the playback position as desired. For example, the user can use a fast forward control, a fast rewind control, or a progress adjustment control to adjust the playback position, and then an image corresponding to the playback position can be accurately presented.
- the user can set the initial play position via control 250, and play the audio segment corresponding to the set initial play position in the audio data via control 240.
- the audio data can be played from the desired play position specified by the user, thereby facilitating user operation.
- Images of each text segment can be generated at the electronic device, or pre-generated images can be obtained by the electronic device from a remote server.
- images can be referred to as illustrations of text works.
- images that match each text segment in a text work can be generated with the help of a trained machine learning model.
- the machine learning model can be, for example, an image generation model.
- the machine learning model can include, for example, but is not limited to, any appropriate model such as a Transformer model, a convolutional neural network (CNN), a recurrent neural network (RNN), a deep neural network (DNN), etc.
- the machine learning model can be a model local to the electronic device, or a model installed on other electronic devices (e.g., installed on a server). In the remote device).
- the machine learning model may include multiple models, and this disclosure does not limit the number and type of models specifically included in the machine learning model.
- FIG. 3A shows a schematic diagram of an example architecture 300A for generating images for text works according to some embodiments of the present disclosure.
- Architecture 300A can be implemented at an electronic device, and Figure 3A shows an overview of the image generation process.
- the text work 301 may include multiple text segments 302-1, ..., 302-N (individually and/or collectively referred to as text segments 302).
- Descriptive information 304 of a text segment e.g., text segment 302-1
- Role information 303 of at least one character of the text work 301 can be determined, and the role information 303 includes attribute information of the character in at least one dimension.
- an image 222 of the text segment 302 can be generated based on the description information 304 of the text segment 302 and the character image 305. In this way, corresponding images can be generated for each text segment in the text work, thereby increasing the interest of readers when reading the text work.
- the text work 301 may include multiple text fragments, and the text fragments may be divided based on predetermined rules.
- the structural information of the text work may be obtained, and the text work may be divided into multiple text fragments based on the structural information.
- the structural information may include the directory structure of the text work, for example, the multiple text fragments may be determined according to the hierarchy of multi-level titles defined in the directory structure. Rules for dividing text fragments may be pre-specified, for example, a text fragment may include a "chapter", a "section", or one or more paragraphs, etc. In this way, the text fragments may be divided according to different accuracies, and an image that better matches the content of the text fragment may be generated.
- the predetermined rule may indicate the text units (e.g. For example, a maximum number of chapters, paragraphs, sentences, or words (e.g., chapters, paragraphs, sentences, or words, etc.).
- a predetermined rule may indicate that each text segment may include at most one chapter, one section, one paragraph, or 50 text units, etc.
- the entire text of the novel may be segmented (e.g., with one chapter, one section, one paragraph, or 50 text units as one text segment) to obtain multiple text segments.
- predetermined rules can adjust the text segments according to the frequency or time length of the specified switching images.
- the user can specify the frequency of switching images, for example, switching once per minute, switching once every two minutes, and so on.
- the number of words included in the text segment can be determined based on the speed information of the audio data (for example, 150 words/minute, etc.) and the switching frequency, and then the scope of the text segment can be determined.
- the architecture 300B includes a description information extraction unit 310 and a character information acquisition unit 320.
- the description information extraction unit 310 can be used, for example, to extract description information 315 (e.g., a summary, etc.) of a text fragment from a text fragment of a novel.
- the electronic device can obtain each text fragment in the novel and provide it to the description information extraction unit 310.
- the description information extraction unit 310 can perform processing on each text fragment in the novel based on a predetermined machine learning model to obtain description information of multiple text fragments.
- the description information may include environmental information of the character's environment and action information of the character.
- the description information extraction unit 310 may, for example, determine the description information 315 for the text segment by summarizing at least one character in the text segment and the environmental information and action information associated with the at least one character. For example, for text segment A "Character A got up early, made breakfast, and put away the messy toys in the living room” Okay, I mopped the floor again, took two steamed buns, and went out.”
- the description information extraction unit 310 can determine that text segment A only includes character A.
- the environmental information in the description information generated by the description information extraction unit 310 can be, for example, "home”, and the action information can be, for example, "character A gets up early to do housework.” It should be noted that not every text segment includes a character. For example, the text segment B "From now on, they will go on an AA basis, and each will pay half of any expenses" does not include any characters or actions associated with the characters. Therefore, the description information extraction unit 310 may not generate description information corresponding to text segment B. At this time, the text segment can continue to use the image of the previous text segment.
- the character information acquisition unit 320 can acquire character information 325 of at least one character.
- the at least one character here can be determined by the character information acquisition unit 320 based on the full text of the text work or the current text fragment, or it can be determined by the electronic device and provided to the character information acquisition unit 320.
- the electronic device/character information acquisition unit 320 can determine at least one character in the novel. For example, for description information including "Character A gets up early to do housework,” "Character A hears Mom and Dad arguing," and "Character A decides to go out for a walk," the electronic device/character information acquisition unit 320 can determine that the three characters include "Character A,” “Dad,” and "Mom.”
- the role information acquisition unit 320 can also determine the number of occurrences of the target role in the text segment for the target role among at least one role, and thus determine the main role in the text segment.
- the role information of the target role can be acquired in response to determining that the number of occurrences meets a predetermined condition.
- the predetermined condition here can, for example, indicate a predetermined number of times (for example, 3 times, 5 times, or any other number), and the role information acquisition unit 320 can, for example, acquire the role information of the target role in response to determining that the number of occurrences reaches a predetermined number.
- the role information of the role with a larger number of occurrences can be acquired, which can reduce the final image generation cost.
- the role information of the role can still be acquired.
- the role information 225 of at least one role may include multiple attributes of the at least one role, such as any one or more of the role's name, gender, age, occupation, appearance, demeanor, and clothing.
- the character information of the target character can be determined based on the portion of the text work associated with the target character. Furthermore, the character information of the target character can be updated based on the portion of the text segment associated with the target character. For example, the basic attributes of the character, such as name, gender, age, and occupation, can be determined from the entire text work. Furthermore, the special attributes of the character in the current segment of the text being processed, such as the current appearance, expression, and clothing, etc., can be determined.
- text segment 1 depicts a winter scene, then based on this text segment 1, the character's attire can be determined to be a "coat.” If text segment 2 depicts a summer scene, then based on this text segment 2, the character's attire can be determined to be a "dress.”
- a mapping relationship can exist between character information and each text segment in the text work. This ensures that the character information matches the character's basic characteristics and reflects the character's current state as the story progresses within the text work.
- the electronic device can receive user input from a user (e.g., a relevant staff member) and determine the attributes of the second part based on the user input. For example, the electronic device can provide a setting control for setting the second part of the multiple attributes of the character in an electronic book reader, and in response to receiving a setting operation for the setting control, set the second part of the multiple attributes based on the setting operation.
- a user e.g., a relevant staff member
- the electronic device can provide a setting control for setting the second part of the multiple attributes of the character in an electronic book reader, and in response to receiving a setting operation for the setting control, set the second part of the multiple attributes based on the setting operation.
- the electronic device can generate an image 222 of the novel based on the description information 315 of the text segment and the role information 325 of at least one character.
- the electronic device can generate the image 222 based on any appropriate method and using the description information 315 of the text segment and the role information 325 of at least one character.
- the present disclosure does not limit the specific method of generating the image.
- the electronic device and/or other devices can generate the image based on pre-acquired rules or algorithms.
- the electronic device can generate the image with the help of a trained machine learning model.
- the architecture 300B can also include a prompt word determination unit 330 and a machine learning model 370.
- FIG4 illustrates a schematic diagram of an example character image 400 according to some embodiments of the present disclosure.
- the character image determination unit 350 may, for example, generate character image 400 for character A based on character information for character A, such as "character A, 25 years old, female, curly hair, wearing a dress.”
- Character image 400 may include multiple images of character A at various angles (e.g., image 401 tilted 45 degrees to the side, a side view image 402, a front view image 403, and a back view image 404).
- the prompt word determination unit 330 can also update the prompt word 335 based on the weight index of the character model.
- the weight index can be used to indicate the similarity between the character in the image and the character image corresponding to the character. For example, if the prompt word is "Character A ⁇ Model A, 0.5> making breakfast at home", then the prompt word indicates that the similarity between the character A in the subsequently generated image and the character image corresponding to character A is 50%. It can be understood that the higher the weight index, the higher the similarity between the character in the image and the character image corresponding to the character, and the more similar the two are. Using the embodiments of the present disclosure, the character details in each image can be adjusted while ensuring the consistency of the appearance of the novel character.
- an image is generated based on: determining descriptive information of a text segment and role information of at least one character based on a text work; wherein the text work includes multiple text segments, and the role information includes attribute information of the character in at least one dimension; for a role in at least one character, generating a role image diagram of the role based on the role information of the role; and generating an image of the text segment based on the descriptive information of the text segment and the role image diagram of the character.
- At least one role is determined based on: determining the number of occurrences of a target role among multiple roles in a text work in a text segment; and in response to determining that the number of occurrences meets a predetermined condition, using the target role as a role among at least one role.
- the description information includes environmental information of the character's environment and action information of the character
- generating an image of the text fragment includes: generating a character model for describing the character based on the character image; generating prompt words for the machine learning model using the environmental information, action information and the character model; and generating an image based on the prompt words.
- the process 600 further includes: A setting control for setting a second portion of the property information of the at least one dimension is provided; and in response to receiving a setting operation for the setting control, the second portion of the property information of the at least one dimension is set based on the setting operation.
- FIG. 7 shows a schematic block diagram of a device 700 for generating an image for a text work according to some embodiments of the present disclosure.
- Device 700 can be implemented as or included in an electronic device.
- the various modules/components in device 700 can be implemented using hardware, software, firmware, or any combination thereof.
- the device 700 further includes: a designated playback module, configured to play an audio segment in the audio data corresponding to another initial playback position in response to receiving a designated request for specifying another initial playback position of the audio data; a position determination module, configured to determine the current playback position of the audio data based on another initial playback position and the playback time; a text segment determination module, configured to determine the current text segment in the text work corresponding to the current playback position; and an image presentation module, configured to present an image corresponding to the current text segment.
- a designated playback module configured to play an audio segment in the audio data corresponding to another initial playback position in response to receiving a designated request for specifying another initial playback position of the audio data
- a position determination module configured to determine the current playback position of the audio data based on another initial playback position and the playback time
- a text segment determination module configured to determine the current text segment in the text work corresponding to the current playback position
- an image presentation module configured to present an image corresponding to the current text segment.
- the apparatus 700 further comprises: a providing module configured to provide, in the electronic book reader, a method for setting the attribute information of at least one dimension; A setting control for the second part; and a property setting module configured to, in response to receiving a setting operation for the setting control, set the second part of the property information of the at least one dimension based on the setting operation.
- a providing module configured to provide, in the electronic book reader, a method for setting the attribute information of at least one dimension
- a setting control for the second part
- a property setting module configured to, in response to receiving a setting operation for the setting control, set the second part of the property information of the at least one dimension based on the setting operation.
- electronic device 800 is in the form of a general-purpose computing device.
- Components of electronic device 800 may include, but are not limited to, one or more processors or processing units 810, memory 820, storage device 830, one or more communication units 840, one or more input devices 850, and one or more output devices 860.
- Processing unit 810 may be a real or virtual processor and is capable of performing various processes according to programs stored in memory 820. In a multi-processor system, multiple processing units execute computer-executable instructions in parallel to enhance the parallel processing capabilities of electronic device 800.
- the electronic device 800 typically includes a plurality of computer storage media. Such media can be any available media that can be accessed by the electronic device 800, including but not limited to volatile and non-volatile media, removable and non-removable media.
- the memory 820 can be a volatile memory (e.g., registers, cache, random access memory (RAM)), a non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPM), etc.).
- the storage device 830 may be a removable or non-removable medium and may include a machine-readable medium such as a flash drive, a disk, or any other medium that can be used to store information and/or data and can be accessed within the electronic device 800.
- the input device 850 may be one or more input devices, such as a mouse, keyboard, or trackball.
- the output device 860 may be one or more output devices, such as a display, a speaker, or a printer.
- the electronic device 800 may also communicate with one or more external devices (not shown) via the communication unit 840 as needed, such as a storage device, a display device, or the like, with one or more devices that allow a user to interact with the electronic device 800, or with any device that allows the electronic device 800 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input/output (I/O) interface (not shown).
- I/O input/output
- These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, such that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device is generated that implements the functions/actions specified in one or more blocks in the flowchart and/or block diagram.
- These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and/or other device to operate in a specific manner.
- the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions/actions specified in one or more blocks in the flowchart and/or block diagram.
- Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions/actions specified in one or more boxes in the flowchart and/or block diagram.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
根据本公开的实施例,提供了用于文本作品呈现的方法、装置、设备和存储介质。在一种方法中,在用于阅读文本作品的电子书籍阅读器中,响应于接收到用于播放对应于文本作品的音频数据的播放请求,播放音频数据;以及显示对应于文本作品的图像,图像是基于文本作品中的文本片段中的角色来生成的,文本片段对应于音频数据的播放位置。以此方式,所显示的图像将会随着音频数据的播放位置而变化,由此在提供音频数据的同时,可以向用户提供有关文本作品的更为丰富的视觉信息。
Description
本公开的示例实施例总体涉及计算机领域,特别地涉及用于文本作品呈现的方法、装置、设备和计算机可读存储介质。
随着数字化技术的发展,越来越多的应用和网站均能够用于呈现电子出版物,也称为电子书籍。用户可以阅读电子书籍(特别是诸如小说、短文、散文、诗歌、剧本等文本作品)中的文本内容。目前已经提出了基于文本到语音(TTS)的转换方案,并且可以将电子书籍中的文本内容转换至语音数据,进而播放该语音数据。然而,用户仅基于语音数据难以了解文本作品的细节,因而期望向用户提供更为丰富的信息。
发明内容
在本公开的第一方面,提供了一种文本作品呈现方法。该方法包括:在用于阅读文本作品的电子书籍阅读器中,响应于接收到用于播放对应于文本作品的音频数据的播放请求,播放音频数据;以及显示对应于文本作品的图像,图像是基于文本作品中的文本片段中的角色来生成的,文本片段对应于音频数据的播放位置。
在本公开的第二方面,提供了一种文本作品呈现的装置。该装置包括:播放模块,被配置用于在用于阅读文本作品的电子书籍阅读器中,响应于接收到用于播放对应于文本作品的音频数据的播放请求,播放音频数据;以及显示模块,被配置用于显示对应于文本作品的图像,图像是基于文本作品中的文本片段中的角色来生成的,文本片段对应于音频数据的播放位置。
在本公开的第三方面,提供了一种电子设备。该设备包括至少一个处理单元;以及至少一个存储器,至少一个存储器被耦合到至少一个处理单元并且存储用于由至少一个处理单元执行的指令。指令在由至少一个处理单元执行时使设备执行第一方面的方法。
在本公开的第四方面,提供了一种计算机可读存储介质。该计算机可读存储介质上存储有计算机程序,计算机程序可由处理器执行以实现第一方面的方法。
应当理解,本内容部分中所描述的内容并非旨在限定本公开的实施例的关键特征或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的描述而变得容易理解。
结合附图并参考以下详细说明,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。在附图中,相同或相似的附图标记表示相同或相似的元素,其中:
图1示出了本公开的实施例能够在其中实现的示例环境的示意图;
图2示出了根据本公开的一些实施的例用于呈现文本作品的页面的示意图;
图3A和3B分别示出了根据本公开的一些实施例的用于为文本作品生成图像的示例架构的示意图;
图4示出了根据本公开的一些实施例的示例角色图像的示意图;
图5示出了根据本公开的一些实施例的用于存储图像的示意图;
图6示出了根据本公开的一些实施例的用于文本作品呈现的过程的流程图;
图7示出了根据本公开的一些实施例的用于文本作品呈现的装置的示意性结构框图;以及
图8示出了其中可以实施本公开的一个或多个实施例的电子设备的框图。
下面将参照附图更详细地描述本公开的实施例。虽然附图中示出了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反,提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。
在本公开的实施例的描述中,术语“包括”及其类似用语应当理解为开放性包含,即“包括但不限于”。术语“基于”应当理解为“至少部分地基于”。术语“一个实施例”或“该实施例”应当理解为“至少一个实施例”。术语“一些实施例”应当理解为“至少一些实施例”。下文还可能包括其他明确的和隐含的定义。
在本文中,除非明确说明,“响应于A”执行一个步骤并不意味着在“A”之后立即执行该步骤,而是可以包括一个或多个中间步骤。
可以理解的是,本技术方案所涉及的数据(包括但不限于数据本身、数据的获得或使用)应当遵循相应法律法规及相关规定的要求。
可以理解的是,在使用本公开各实施例公开的技术方案之前,均应当根据相关法律法规通过适当的方式对本公开所涉及个人信息的类型、使用范围、使用场景等告知用户并获得用户的授权。
例如,在响应于接收到用户的主动请求时,向用户发送提示信息,以明确地提示用户,其请求执行的操作将需要获得和使用到用户的个人信息,从而使得用户可以根据提示信息来自主地选择是否向执行本公开技术方案的操作的电子设备、应用程序、服务器或存储介质等软件或硬件提供个人信息。
作为一种可选的但非限制性的实现方式,响应于接收到用户的主动请求,向用户发送提示信息的方式,例如可以是弹窗的方式,弹窗中可以以文字的方式呈现提示信息。此外,弹窗中还可以承载供用户选择“同意”或“不同意”向电子设备提供个人信息的选择控件。
可以理解的是,上述通知和获得用户授权过程仅是示意性的,不
对本公开的实现方式构成限定,其他满足相关法律法规的方式也可应用于本公开的实现方式中。
如本文中所使用的,术语“模型”可以从训练数据中学习到相应的输入与输出之间的关联关系,从而在训练完成后可以针对给定的输入,生成对应的输出。模型的生成可以基于机器学习技术。深度学习是一种机器学习算法,通过使用多层处理单元来处理输入和提供相应输出。神经网络模型是基于深度学习的模型的一个示例。在本文中,“模型”也可以被称为“机器学习模型”、“学习模型”、“机器学习网络”或“学习网络”,这些术语在本文中可互换地使用。
“神经网络”是一种基于深度学习的机器学习网络。神经网络能够处理输入并且提供相应输出,其通常包括输入层和输出层以及在输入层与输出层之间的一个或多个隐藏层。在深度学习应用中使用的神经网络通常包括许多隐藏层,从而增加网络的深度。神经网络的各个层按顺序相连,从而前一层的输出被提供作为后一层的输入,其中输入层接收神经网络的输入,而输出层的输出作为神经网络的最终输出。神经网络的每个层包括一个或多个节点(也称为处理节点或神经元),每个节点处理来自上一层的输入。
通常,机器学习大致可以包括三个阶段,即训练阶段、测试阶段和应用阶段(也称为推理阶段)。在训练阶段,给定的模型可以使用大量的训练数据进行训练,不断迭代更新参数值,直到模型能够从训练数据中获得一致的满足预期目标的推理。通过训练,模型可以被认为能够从训练数据中学习从输入到输出之间的关联(也称为输入到输出的映射)。训练后的模型的参数值被确定。在测试阶段,将测试输入应用到训练后的模型,以测试模型是否能够提供正确的输出,从而确定模型的性能。测试阶段有时候可以被融合在训练阶段。在应用或推理阶段,已训练的模型可以被用于基于训练得到的参数值,对实际的模型输入进行处理,确定对应的模型输出。
如前文所简要提及的,为了便于提高用户的阅读效率,目前已经提出了基于文本到声音的转换过程,来将文本作品转换为语音数据,
继而向用户播放语音数据。参见图1描述本公开的应用环境,图1示出了本公开的实施例能够在其中实现的示例环境的示意图100。如图1所示,电子书籍阅读器可以提供页面110。用户可以选择期望播放的文本作品;备选地和/或附加地,用户可以选择文本作品中的期望播放的章节。进一步,用户可以利用控件140来播放相应的音频数据。此时,显示区域120可以呈现文本作品的一般信息,例如,名称、作者、被播放的章节标题,等等。
然而,音频数据仅能提供有限的信息,用户仅基于语音数据难以了解文本作品的细节(例如,相关的场景信息和角色信息等),此时期望可以向用户提供更为丰富的信息。
为了至少部分地解决上述问题,根据本公开的实施例,提出了一种文本作品呈现方法。在该方法中,在用于阅读文本作品的电子书籍阅读器中,响应于接收到用于播放对应于文本作品的音频数据的播放请求,播放音频数据。进一步,显示对应于文本作品的图像,图像是基于文本作品中的文本片段中的角色来生成的,文本片段对应于音频数据的播放位置。
参见图2描述本公开的实施例的概要,该图2示出了根据本公开的一些实施例的用于呈现文本作品的页面的示意图200。为了便于描述,在下文中仅以小说作为文本作品的示例。备选地和/或附加地,文本作品例如可以包括但不限于小说、短文、散文、诗歌、剧本等。
可以由电子书籍阅读器来执行本公开的方法。用户可以选择期望播放的文本作品;备选地和/或附加地,当文本作品包括多个章节的情况下,用户可以选择期望播放的章节。如图2所示,电子书籍阅读器可以提供页面210。在页面210中,用户可以利用控件240来请求播放音频数据。响应于接收到用于播放对应于文本作品的音频数据的播放请求,可以播放音频数据。进一步,页面210可以包括显示区域220,并且可以在该显示区域220中显示对应于文本作品的图像222。在此,该图像222是基于文本作品中的文本片段中的角色来生成的,该文本片段对应于音频数据的播放位置。以此方式,显示区域220中呈现的
图像将会随着音频数据的播放位置而变化。由此,在提供音频数据的同时,可以向用户提供有关文本作品的更为丰富的视觉信息。
在本公开的上下文中,电子书籍阅读器可以被安装在电子设备处。该电子设备可以包括具有计算能力的任何计算系统,例如各种计算设备/系统、终端设备、服务端设备等。终端设备可以是任意类型的移动终端、固定终端或便携式终端,包括移动手机、台式计算机、膝上型计算机、笔记本计算机、上网本计算机、平板计算机、媒体计算机、多媒体平板、掌上电脑、便携式游戏终端、VR/AR设备、个人通信系统(Personal Communication System,PCS)设备、个人导航设备、个人数字助理(Personal Digital Assistant,PDA)、音频/视频播放器、数码相机/摄像机、定位设备、电视接收器、无线电广播接收器、电子书设备、游戏设备或者前述各项的任意组合,包括这些设备的配件和外设或者其任意组合。服务端设备可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、内容分发网络、以及大数据和人工智能平台等基础云计算服务的云服务器。服务端设备例如可以包括计算系统/服务器,诸如大型机、边缘计算节点、云环境中的计算设备,等等。
在一些实施例中,可以针对文本作品执行预处理过程,进而为文本作品中的各个文本片段生成相应的图像。这些图像可以被存储在电子设备处,或者由该电子设备从远程服务器处获取。
在一些实施例中,可以获取由播放请求指定的音频数据中的初始播放位置,进而播放音频数据中的对应于该初始播放位置的音频片段(也即,音频数据中的该初始播放位置之后的部分)。用户可以按下控件240来开始播放。此时,显示区域220中将会按照播放的时间长度,逐一呈现文本作品中的各个文本片段的相对应的图像。应当理解,图像可以包括当前被播放音频数据的相应文本片段中的角色的图像。以此方式,作为当前正在播放的音频数据的补充,电子书籍阅读器可
以向用户呈现有关被播放内容的更多视觉信息,从而便于用户理解文本作品。
在一些实施例中,响应于接收到用于指定音频数据的另一初始播放位置的指定请求,播放音频数据中的对应于另一初始播放位置的音频片段;基于另一初始播放位置和播放时间,确定音频数据的当前播放位置;确定文本作品中的对应于当前播放位置的当前文本片段;以及呈现对应于当前文本片段的当前图像。以此方式,允许用户按照自身期望来调整播放位置。例如,用户可以利用快速前进控件、快速后退控件、或者进度调整控件等来调整播放位置,继而可以准确地呈现与该播放位置相对应的图像。
继续参见图2,用户可以经由控件250来设置初始播放位置,并且经由控件240,来播放音频数据中的对应于所设置的初始播放位置的音频片段。以此方式,可以从由用户指定期望播放位置播放音频数据,进而便于用户操作。
在一些实施例中,在电子书籍阅读器中显示文本片段中的文本。继续参见图2,页面210可以提供显示区域230,并且可以在该显示区域中显示当前正在被播放的文本片段中的文本。例如,可以以滚动方式来显示文本,或者可以以文本块的方式来显示文本。以此方式,作为音频数据的补充,可以向用户呈现当前正在播放的音频的相关文本,进而可以便于用户获取更多信息。例如,可以利用文本来辅助理解音频数据,尤其是音频数据中的发音不清的部分。
可以在电子设备处生成各个文本片段的图像,或者可以由电子设备从远端的服务器获取预先生成的图像。在本公开的上下文中,可以将图像称为文本作品的插图。具体地,可以借助经训练的机器学习模型来生成与文本作品中的各个文本片段相匹配的图像。机器学习模型例如可以为图像生成模型。机器学习模型例如可以包括但不限于Transformer模型、卷积神经网络(CNN)、循环神经网络(RNN)、深度神经网络(DNN)等任意适当的模型。机器学习模型可以是电子设备本地的模型,也可以是被安装在其他电子设备的模型(例如安装
在远端设备中)。需要注意的是,机器学习模型可以包括多个模型,本公开并不限定机器学习模型具体包括的模型的数目以及类型。
以此方式,可以方便快捷地生成多个图像,这可以提高生成图像的效率。此外,基于小说内容来为小说插入角色的相关图像,可以提高读者阅读小说时的趣味性。
参见图3A描述有关生成图像的更多细节,该图3A示出了根据本公开的一些实施例的用于为文本作品生成图像的示例架构300A的示意图。架构300A可以被实现在电子设备处,该图3A示出了图像生成过程的概要,文本作品301可以包括多个文本片段302-1、…、302-N(单独地和/或统称为文本片段302)。可以根据机器学习模型来确定文本片段(例如,文本片段302-1)的描述信息304。可以确定文本作品301的至少一个角色的角色信息303,该角色信息303包括角色在至少一个维度的属性信息。在此,维度例如可以包括角色的姓名、性别、年龄、职业、容貌、神态、以及服装,等等。针对至少一个角色中的角色,可以基于角色的角色信息303生成角色的角色形象图305。
进一步,可以根据文本片段302的描述信息304和角色的角色形象图305,生成文本片段302的图像222。以此方式,可以为文本作品中的各个文本片段生成相应的图像,进而提高读者阅读文本作品时的趣味性。
在一些实施例中,文本作品301可以包括多个文本片段,可以基于预定规则来划分文本片段。例如,可以获取文本作品的结构信息,并且基于结构信息来将文本作品划分为多个文本片段。在此,结构信息可以包括文本作品的目录结构,例如可以按照目录结构中定义的多级标题的层次,来确定多个文本片段。可以预先指定用于划分文本片段的规则,例如,文本片段可以包括“章”、“节”、或者包括一个或者多个段落,等等。以此方式,可以按照不同的精度来划分文本片段,并且生成更加匹配于该文本片段的内容的图像。
又例如,预定规则可以指示每个文本片段所包括的文本单元(例
如,章节、段落、句子、或者词语,等等)的最大数目。例如,预定规则可以指示每个文本片段最多可以包括一章、一节、一段、或者50个文本单元,等等。可以基于这样的预定规则,对小说的全文执行分段处理(例如以一章、一节、一段、或者50个文本单元作为一个文本片段),以获取到多个文本片段。
在一些实施例中,在已经划分的多个文本片段的基础上,预定规则可以按照指定的切换图像的频率或时间长度来调整文本片段。例如,用户可以指定切换图像的频率,例如,每分钟切换一次,两分钟切换一次,等等。此时,可以基于音频数据的速度信息(例如,150字/分钟,等等)和切换频率,来确定文本片段中所包括的文字的数量,进而确定文本片段的范围。备选地和/或附加地,可以指定文本片段不能跨越文本作品中的自然段,等等。此时将按照自然段来划分文本片段。在一些实施例中,可以考虑用户在播放期间是否启动“倍速播放”,并且基于播放的“倍速”来相应地调整文本片段的范围。以此方式,可以相应地调整图像的切换频率,从而防止过于频繁地切换图像。
参见图3B描述有关图像生成的更多细节,该图3B示出了根据本公开的一些实施例的用于为文本作品生成图像的示例架构300B的示意图。如图3B所示,架构300B包括描述信息提取单元310和角色信息获取单元320。描述信息提取单元310例如可以用于从小说的文本片段中提取文本片段的描述信息315(例如,概要等)。在一些实施例中,电子设备可以获取的小说中的各个文本片段并将其提供给描述信息提取单元310,描述信息提取单元310可以基于预定的机器学习模型对小说中各个文本片段执行处理以获取多个文本片段的描述信息。
在一些实施例中,描述信息可以包括角色所在环境的环境信息、以及角色的动作信息。描述信息提取单元310例如可以通过总结文本片段中的至少一个角色以及与这至少一个角色相关联的环境信息和动作信息,来确定针对文本片段的描述信息315。示例性地,针对文本片段A“角色A早起做好了早餐,又把客厅里乱七八糟的玩具收拾
好,再拖了地,才拿了两只蒸好的馒头,出门了”。
描述信息提取单元310可以确定文本片段A仅包括角色A。描述信息提取单元310所生成的描述信息中的环境信息例如可以为“家”,并且动作信息例如可以为“角色A早起做家务”。需要注意的是,不是每个文本片段都包括角色,例如文本片段B“从今以后,他们AA制,不管什么费用,都一人一半”,其不包括角色,也不包括与角色相关联的动作。因此,描述信息提取单元310可以不生成文本片段B对应的描述信息。此时,该文本片段可以沿用先前文本片段的图像。
角色信息获取单元320可以获取至少一个角色的角色信息325。这里的至少一个角色可以是角色信息获取单元320基于文本作品全文、或者当前文本片段来自行确定的,也可以是电子设备确定好并提供给角色信息获取单元320的。具体地,电子设备/角色信息获取单元320可以确定小说中的至少一个角色。例如,对于包括“角色A早起做家务”、“角色A听到爸爸妈妈吵架”和“角色A决定出门散心”的描述信息,电子设备/角色信息获取单元320可以确定包括“角色A”、“爸爸”和“妈妈”三个角色。
在一些实施例中,角色信息获取单元320还可以针对至少一个角色中的目标角色,确定目标角色在文本片段中的出现次数,进而可以确定文本片段中的主要角色。例如可以响应于确定出现次数满足预定条件,获取目标角色的角色信息。这里的预定条件例如可以指示预定次数(例如3次、5次等任意次数),角色信息获取单元320例如可以响应于确定出现次数达到预定次数,获取目标角色的角色信息。由此,可以仅获取出现次数较多的角色的角色信息,可以降低最后的图像生成成本。备选地和/或附加地,假设当前的文本片段仅包括一个角色并且该角色的出现次数低于预定次数,仍然可以获取该角色的角色信息。
在一些实施例中,至少一个角色的角色信息225可以包括至少一个角色的多个属性。这里的多个属性例如可以包括角色的姓名、性别、年龄、职业、容貌、神态、以及服装中的任意一项或多项。
在一些实施例中,为了确定至少一个角色的角色信息,针对目标角色,可以基于文本作品中的与目标角色相关联的部分,确定目标角色的角色信息。进一步,可以基于文本片段中的与目标角色相关联的部分,更新目标角色的角色信息。例如,可以从整个文本作品中确定角色的基础属性,例如,姓名、性别、年龄、职业。进一步,可以从当前正在处理的文本片段中确定该角色当前片段中的特殊属性,例如,当前的容貌、神态和服装,等等。
假设文本片段1涉及冬季场景,则基于该文本片段1可以确定角色的服装为“大衣”。假设文本片段2涉及夏季场景,则基于该文本片段2可以确定角色的服装为“连衣裙”。在角色信息和文本作品的各个文本片段之间可以存在映射关系。以此方式,一方面可以确保角色信息匹配于该角色的基本特征,另一方面可以确保角色信息可以随着文本作品中的故事推进反映当前状态。
在一些实施例中,按照具体确定方式,多个属性可以被分为两部分,其中的第一部分可以是从小说中直接确定的,第二部分可以是从小说中间接确定的,也可以是人工设置的。示例性地,多个属性中的角色的姓名、性别等可以为第一部分的属性。角色信息获取单元320例如可以从小说中确定第一部分的属性。需要注意的是,角色信息获取单元320可以从小说全文中获取角色A的第一部分的属性,而不会受限于当前文本片段。
示例性地,如果小说中明确记载了角色的容貌、神态、服装等属性,则可以将上述属性作为第一部分的属性。如果小说中不包括与第二部分的属性相关联的文本,电子设备可以接收用户(例如相关工作人员)的用户输入,并基于用户输入来确定第二部分的属性。例如,电子设备可以在电子书籍阅读器中提供用于设置角色的多个属性中的第二部分的设置控件,并响应于接收到针对设置控件的设置操作,基于设置操作来设置多个属性中的第二部分。
这样的设置控件例如可以为输入框。电子设备例如可以经由输入框来接收用户的用户输入,并基于用户输入确定多个属性中的第二部
分。电子设备例如可以将确定的第二部分的属性提供给角色信息获取单元320以使得角色信息获取单元320获取到第二部分的属性。以此方式,允许用户在阅读过程中按照自身的需求来指定角色的属性(例如,服装款式和颜色,等等),进而生成符合自身需求的图像。
电子设备可以基于文本片段的描述信息315和至少一个角色的角色信息325,生成小说的图像222。电子设备可以基于任意适当的方式,并利用文本片段的描述信息315和至少一个角色的角色信息325生成图像222,本公开并不对具体的生成图像的方式进行限定。例如,电子设备和/或其他设备可以基于预先获取的规则或算法来生成图像。在一些实施例中的,电子设备可以借助经训练的机器学习模型来生成图像。在这种情况下,架构300B还可以包括提示词确定单元330和机器学习模型370。
提示词确定单元330例如可以用于基于描述信息以及角色信息,生成针对机器学习模型370的提示词335。提示词确定单元330例如可以获取预定的提示词模板,并通过将描述信息以及角色信息填充至该提示词模板来生成提示词335。例如,提示词模板可以包括:环境信息、角色、动作信息,可以将获取的各种信息填充至模板的相应位置,进而生成提示词。
在一些实施例中,为了保证后续生成的图像中的角色的统一性,提示词确定单元330还可以调用角色图像确定单元250和角色模型生成单元360。在此,角色图像例如可以表示该角色的在多个角度下的角色形象图,并且角色图像确定单元350例如可以小说中至少一个角色的角色信息,确定针对至少一个角色的角色图像355。角色图像确定单元350可以采用任意适当的方式来确定角色图像355。例如,角色图像确定单元350可以借助经训练的图像生成模型来基于至少一个角色的角色信息生成针对至少一个角色的角色图像355。备选地或者附加地,在一些实施例中,角色图像确定单元350也可以直接获取用户输入的角色图像(例如插画师针对至少一个角色所绘制的角色图像)。
图4示出了根据本公开的一些实施例的示例角色图像400的示意图。角色图像确定单元350例如可以基于角色A的角色信息“角色A,25岁,女,卷发,穿连衣裙”来生成角色A的角色图像400。角色图像400可以包括角色A在多个角度下的多个图像(例如侧偏45度的图像401,侧面图像402,正面图像403和反面图像404)。
针对每个角色,角色模型生成单元360可以基于该角色对应的角色图像355,生成用于描述该角色的角色模型365。角色模型365例如可以为LoRA模型。LoRA模型可以被理解为稳定扩散(Stable Diffusion,缩写SD)模型(一种生成式模型)的一种插件,其可以使用于满足一种特定的风格,或指定的人物特征属性。
可以将基于角色图像生成角色的角色模型的过程理解为将角色图像以角色模型的形式进行存储。提示词确定单元330后续可以灵活调用不同的角色模型以调用不同的角色图像。提示词确定单元330可以获取至少一个角色各自的角色模型365,并基于角色模型365和文本片段的描述信息315来确定提示词335。例如,提示词确定单元330可以基于描述信息“角色A早起做家务”和角色A对应的角色模型A,生成提示词“角色A<模型A>在家中做早餐”。
在一些实施例中,提示词确定单元330还可以基于角色模型的权重指标,更新提示词335。权重指标可以用于指示图像中的角色和角色对应的角色图像之间的相似度。例如,若提示词为“角色A<模型A,0.5>在家中做早餐”,则该提示词指示后续生成的图像中的角色A和角色A对应的角色图像之间的相似度为50%。可以理解,权重指标越高,图像中的角色和角色对应的角色图像之间的相似度越高,二者越相像。利用本公开的实施例,可以在确保小说角色的外观一致性的情况下,调整各个图像中的角色细节。
在一些实施例中,提示词确定单元330还可以基于小说的背景环境来确定图像的风格,并基于风格来更新提示词335。例如,若小说背景为现代都市背景,则图像的风格可以被确定为“漫画风”,提示词例如可以为“角色A<模型A,0.5>在家中做早餐漫画风”。若
小说背景为古代武侠背景,则图像的风格可以被确定为“水墨风”,提示词例如可以为“角色A<模型A,0.5>在家中做早餐水墨风”。利用本公开的实施例,可以以更为灵活的方式生成具有更为丰富的视觉效果的图像。
在一些实施例中,可以在生成提示词的过程中,可以基于音频数据的声音属性来确定图像的风格,并且继而基于风格来更新提示词。假设文本作品的声音为浑厚的男声,可以指定生成粗犷风格的图像;又假设声音为甜美的女声,则可以生成精美风格的图像,等等。以此方式,可以确保图像数据的风格与声音数据的风格相匹配,以此方式,进而提供更为和谐的视觉和听觉效果。
提示词确定单元330可以将确定的提示词335提供给机器学习模型370。机器学习模型370进而可以基于获取到的提示词335来生成图像222。若提示词为“角色A<模型A,0.5>在家中做早餐”,机器学习模型120可以调用模型A,并基于权重指标0.5来生成一张内容为角色A在家中做早餐的图像。
在一些实施例中,可以在生成的图像与文本片段之间建立关联关系,并且相关联地存储图像和文本片段。可以获取至少一个角色对应的至少一个图像(每个角色可以对应于一个或者多个图像),并向小说中的与文本片段相关联的位置处插入图像。此时,生成的图像可以作为文本作品的插图,来存储在文本作品中。示例性地,可以将图像A插入文本片段A处(例如文本片段A的内部、文本片段A之前/之后等)。以此方式,在播放过程中可以搜索正在被播放的音频片段所对应的文本片段中的图像,进而呈现该图像。
备选地和/或附加地,可以在图像数据库中存储各个图像。参见图5描述更多细节,该图5示出了根据本公开的一些实施例的用于存储图像的示意图500。如图5所示,可以建立图像数据库520,并且在该图像数据库520中存储与文本作品210中的各个文本片段相对应的图像。文本作品201的音频数据510可以包括多个音频片段512,每个音频片段可以对应于一个文本片段。在本公开的上下文中,音频数
据510可以是预先录制的音频数据,可以是基于文本到音频转换生成的音频数据。
进一步,可以在文本片段201-1、基于该文本片段中的角色生成的图像222以及该文本片段202-1的音频片段510之间建立索引。在播放过程中,可以基于索引来播放音频片段并且显示相应的图像。以此方式,可以以集中方式来存储图像数据,从而便于统一管理多个图像数据。
综上所述,根据本公开的实施例,可以在保证图像质量的同时,方便快捷地基于小说的文本内容来生成多个图像,这可以提高生成图像的效率。此外,在提供音频数据的同时,可以向用户提供有关文本作品的更为丰富的视觉信息,可以提高用户听小说的兴趣。
上文已经描述了为文本作品生成图像的各个步骤的具体细节,提供了一种用于文本作品呈现的方法。图6示出了根据本公开的一些实施例的用于为文本作品生成图像的过程600的流程图。过程600可以被实现在电子设备处。
在框610处,在用于阅读文本作品的电子书籍阅读器中,响应于接收到用于播放对应于文本作品的音频数据的播放请求,播放音频数据。
在框620处,显示对应于文本作品的图像,图像是基于文本作品中的文本片段中的角色来生成的,文本片段对应于音频数据的播放位置。
在一些实施例中,播放音频数据包括:获取由播放请求指定的音频数据中的初始播放位置;以及播放音频数据中的对应于初始播放位置的音频片段。
在一些实施例中,该过程600进一步包括:响应于接收到用于指定音频数据的另一初始播放位置的指定请求,播放音频数据中的对应于另一初始播放位置的音频片段;基于另一初始播放位置和播放时间,确定音频数据的当前播放位置;确定文本作品中的对应于当前播放位置的当前文本片段;以及呈现对应于当前文本片段的图像。
在一些实施例中,该过程600进一步包括:在电子书籍阅读器中显示文本片段中的文本。
在一些实施例中,图像是基于以下来生成的:根据文本作品确定文本片段的描述信息和至少一个角色的角色信息;其中,文本作品包括多个文本片段,角色信息包括角色在至少一个维度的属性信息;针对至少一个角色中的角色,基于角色的角色信息生成角色的角色形象图;以及根据文本片段的描述信息和角色的角色形象图,生成文本片段的图像。
在一些实施例中,多个文本片段是基于以下来确定的:获取文本作品的结构信息;以及基于结构信息来将文本作品划分为多个文本片段。
在一些实施例中,至少一个角色是基于以下来确定的:针对文本作品中的多个角色中的目标角色,确定目标角色在文本片段中的出现次数;以及响应于确定出现次数满足预定条件,将目标角色作为至少一个角色中的角色。
在一些实施例中,确定至少一个角色的角色信息包括:针对目标角色,基于文本作品中的与目标角色相关联的部分,确定目标角色的角色信息;以及基于文本片段中的与目标角色相关联的部分,更新目标角色的角色信息。
在一些实施例中,描述信息包括角色所在环境的环境信息、以及角色的动作信息,并且生成文本片段的图像包括:基于角色形象图,生成用于描述角色的角色模型;利用环境信息、动作信息以及角色模型,生成机器学习模型的提示词;以及基于提示词来生成图像。
在一些实施例中,生成提示词进一步包括:基于音频数据的声音属性来确定图像的风格;以及基于风格来更新提示词。
在一些实施例中,至少一个维度的属性信息包括以下至少任一项:角色的姓名、性别、年龄、职业、容貌、神态、以及服装,至少一个维度的属性信息中的第一部分是从文本作品中确定的。
在一些实施例中,该过程600进一步包括:在电子书籍阅读器中
提供用于设置至少一个维度的属性信息中的第二部分的设置控件;以及响应于接收到针对设置控件的设置操作,基于设置操作来设置至少一个维度的属性信息中的第二部分。
根据本公开的一些实施例,还提供了一种用于文本作品呈现的装置。图7示出了根据本公开的一些实施例的用于为文本作品生成图像的装置700的示意性结构框图。装置700可以被实现为或者被包括在电子设备中。装置700中的各个模块/组件可以由硬件、软件、固件或者它们的任意组合来实现。
如图7所示,装置700包括:播放模块710,被配置用于在用于阅读文本作品的电子书籍阅读器中,响应于接收到用于播放对应于文本作品的音频数据的播放请求,播放音频数据;以及显示模块720,被配置用于显示对应于文本作品的图像,图像是基于文本作品中的文本片段中的角色来生成的,文本片段对应于音频数据的播放位置。
在一些实施例中,播放模块710进一步被配置用于:获取由播放请求指定的音频数据中的初始播放位置;以及播放音频数据中的对应于初始播放位置的音频片段。
在一些实施例中,该装置700进一步包括:基于指定的播放模块,被配置用于响应于接收到用于指定音频数据的另一初始播放位置的指定请求,播放音频数据中的对应于另一初始播放位置的音频片段;位置确定模块,被配置用于基于另一初始播放位置和播放时间,确定音频数据的当前播放位置;文本片段确定模块,被配置用于确定文本作品中的对应于当前播放位置的当前文本片段;以及图像呈现模块,被配置用于呈现对应于当前文本片段的图像。
在一些实施例中,该装置700进一步包括:文本显示模块,被配置用于在电子书籍阅读器中显示文本片段中的文本。
在一些实施例中,图像是基于以下来生成的:信息确定模块,被配置用于根据文本作品确定文本片段的描述信息和至少一个角色的角色信息;其中,文本作品包括多个文本片段,角色信息包括角色在至少一个维度的属性信息;形象生成模块,被配置用于针对至少一个
角色中的角色,基于角色的角色信息生成角色的角色形象图;以及图像生成模块,被配置用于根据文本片段的描述信息和角色的角色形象图,生成文本片段的图像。
在一些实施例中,多个文本片段是基于以下来确定的:接收获取模块,被配置用于获取文本作品的结构信息;以及划分模块,被配置用于基于结构信息来将文本作品划分为多个文本片段。
在一些实施例中,至少一个角色是基于以下来确定的:次数确定模块,被配置用于针对文本作品中的多个角色中的目标角色,确定目标角色在文本片段中的出现次数;以及角色确定模块,被配置用于响应于确定出现次数满足预定条件,将目标角色作为至少一个角色中的角色。
在一些实施例中,信息确定模块包括:基础信息确定模块,被配置用于针对目标角色,基于文本作品中的与目标角色相关联的部分,确定目标角色的角色信息;以及更新模块,被配置用于基于文本片段中的与目标角色相关联的部分,更新目标角色的角色信息。
在一些实施例中,描述信息包括角色所在环境的环境信息、以及角色的动作信息,并且图像生成模块包括:模型生成模块,被配置用于基于角色形象图,生成用于描述角色的角色模型;提示词生成模块,被配置用于利用环境信息、动作信息以及角色模型,生成机器学习模型的提示词;以及基于提示词的生成模块,被配置用于基于提示词来生成图像。
在一些实施例中,提示词生成模块进一步包括:风格确定模块,被配置用于基于音频数据的声音属性来确定图像的风格;以及提示词更新模块,被配置用于基于风格来更新提示词。
在一些实施例中,至少一个维度的属性信息包括以下至少任一项:角色的姓名、性别、年龄、职业、容貌、神态、以及服装,至少一个维度的属性信息中的第一部分是从文本作品中确定的。
在一些实施例中,该装置700进一步包括:提供模块,被配置用于在电子书籍阅读器中提供用于设置至少一个维度的属性信息中的
第二部分的设置控件;以及属性设置模块,被配置用于响应于接收到针对设置控件的设置操作,基于设置操作来设置至少一个维度的属性信息中的第二部分。
装置700中所包括的单元和/或模块可以利用各种方式来实现,包括软件、硬件、固件或其任意组合。在一些实施例中,一个或多个单元和/或模块可以使用软件和/或固件来实现,例如存储在存储介质上的机器可执行指令。除了机器可执行指令之外或者作为替代,装置700中的部分或者全部单元和/或模块可以至少部分地由一个或多个硬件逻辑组件来实现。作为示例而非限制,可以使用的示范类型的硬件逻辑组件包括现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准品(ASSP)、片上系统(SOC)、复杂可编程逻辑器件(CPLD),等等。
图8示出了其中可以实施本公开的一个或多个实施例的电子设备800的框图。应当理解,图8所示出的电子设备800仅仅是示例性的,而不应当构成对本文所描述的实施例的功能和范围的任何限制。图8所示出的电子设备800可以用于实现图1的电子设备,和/或,图6的装置600。
如图8所示,电子设备800是通用计算设备的形式。电子设备800的组件可以包括但不限于一个或多个处理器或处理单元810、存储器820、存储设备830、一个或多个通信单元840、一个或多个输入设备850以及一个或多个输出设备860。处理单元810可以是实际或虚拟处理器并且能够根据存储器820中存储的程序来执行各种处理。在多处理器系统中,多个处理单元并行执行计算机可执行指令,以提高电子设备800的并行处理能力。
电子设备800通常包括多个计算机存储介质。这样的介质可以是电子设备800可访问的任何可以获得的介质,包括但不限于易失性和非易失性介质、可拆卸和不可拆卸介质。存储器820可以是易失性存储器(例如寄存器、高速缓存、随机访问存储器(RAM))、非易失性存储器(例如,只读存储器(ROM)、电可擦除可编程只读存储器
(EEPROM)、闪存)或它们的某种组合。存储设备830可以是可拆卸或不可拆卸的介质,并且可以包括机器可读介质,诸如闪存驱动、磁盘或者任何其他介质,其可以能够用于存储信息和/或数据并且可以在电子设备800内被访问。
电子设备800可以进一步包括另外的可拆卸/不可拆卸、易失性/非易失性存储介质。尽管未在图8中示出,可以提供用于从可拆卸、非易失性磁盘(例如“软盘”)进行读取或写入的磁盘驱动和用于从可拆卸、非易失性光盘进行读取或写入的光盘驱动。在这些情况中,每个驱动可以由一个或多个数据介质接口被连接至总线(未示出)。存储器820可以包括计算机程序产品825,其具有一个或多个程序模块,这些程序模块被配置为执行本公开的各种实现方式的各种方法或动作。
通信单元840实现通过通信介质与其他计算设备进行通信。附加地,电子设备800的组件的功能可以以单个计算集群或多个计算机器来实现,这些计算机器能够通过通信连接进行通信。因此,电子设备800可以使用与一个或多个其他服务器、网络个人计算机(PC)或者另一个网络节点的逻辑连接来在联网环境中进行操作。
输入设备850可以是一个或多个输入设备,例如鼠标、键盘、追踪球等。输出设备860可以是一个或多个输出设备,例如显示器、扬声器、打印机等。电子设备800还可以根据需要通过通信单元840与一个或多个外部设备(未示出)进行通信,外部设备诸如存储设备、显示设备等,与一个或多个使得用户与电子设备800交互的设备进行通信,或者与使得电子设备800与一个或多个其他计算设备通信的任何设备(例如,网卡、调制解调器等)进行通信。这样的通信可以经由输入/输出(I/O)接口(未示出)来执行。
根据本公开的示例性实现方式,提供了一种计算机可读存储介质,其上存储有计算机可执行指令,其中计算机可执行指令被处理器执行以实现上文描述的方法。根据本公开的示例性实现方式,还提供了一种计算机程序产品,计算机程序产品被有形地存储在非瞬态计算机可
读介质上并且包括计算机可执行指令,而计算机可执行指令被处理器执行以实现上文描述的方法。
这里参照根据本公开实现的方法、装置、设备和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理单元,从而生产出一种机器,使得这些指令在通过计算机或其他可编程数据处理装置的处理单元执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。
可以把计算机可读程序指令加载到计算机、其他可编程数据处理装置、或其他设备上,使得在计算机、其他可编程数据处理装置或其他设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其他可编程数据处理装置、或其他设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。
附图中的流程图和框图显示了根据本公开的多个实现的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作
的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
以上已经描述了本公开的各实现,上述说明是示例性的,并非穷尽性的,并且也不限于所公开的各实现。在不偏离所说明的各实现的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实现的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其他普通技术人员能理解本文公开的各个实现方式。
Claims (15)
- 一种文本作品呈现方法,包括:在用于阅读文本作品的电子书籍阅读器中,响应于接收到用于播放对应于所述文本作品的音频数据的播放请求,播放所述音频数据;以及显示对应于所述文本作品的图像,所述图像是基于所述文本作品中的文本片段中的角色来生成的,所述文本片段对应于所述音频数据的播放位置。
- 根据权利要求1所述的方法,其中播放所述音频数据包括:获取由所述播放请求指定的所述音频数据中的初始播放位置;以及播放所述音频数据中的对应于所述初始播放位置的音频片段。
- 根据权利要求2所述的方法,进一步包括:响应于接收到用于指定所述音频数据的另一初始播放位置的指定请求,播放所述音频数据中的对应于所述另一初始播放位置的音频片段;基于所述另一初始播放位置和播放时间,确定所述音频数据的当前播放位置;确定所述文本作品中的对应于所述当前播放位置的当前文本片段;以及呈现对应于所述当前文本片段的图像。
- 根据权利要求1所述的方法,进一步包括:在所述电子书籍阅读器中显示所述文本片段中的文本。
- 根据权利要求1所述的方法,其中所述图像是基于以下来生成的:根据所述文本作品确定所述文本片段的描述信息和至少一个角色的角色信息;其中,所述文本作品包括多个文本片段,所述角色信息包括所述角色在至少一个维度的属性信息;针对所述至少一个角色中的角色,基于所述角色的角色信息生成所述角色的角色形象图;以及根据所述文本片段的描述信息和所述角色的角色形象图,生成所述文本片段的图像。
- 根据权利要求5所述的方法,其中所述多个文本片段是基于以下来确定的:获取所述文本作品的结构信息;以及基于所述结构信息来将所述文本作品划分为所述多个文本片段。
- 根据权利要求5所述的方法,其中所述至少一个角色是基于以下来确定的:针对所述文本作品中的多个角色中的目标角色,确定所述目标角色在所述文本片段中的出现次数;以及响应于确定所述出现次数满足预定条件,将所述目标角色作为所述至少一个角色中的角色。
- 根据权利要求7所述的方法,其中确定所述至少一个角色的所述角色信息包括:针对所述目标角色,基于所述文本作品中的与所述目标角色相关联的部分,确定所述目标角色的角色信息;以及基于所述文本片段中的与所述目标角色相关联的部分,更新所述目标角色的角色信息。
- 根据权利要求5所述的方法,其中所述描述信息包括所述角色所在环境的环境信息、以及所述角色的动作信息,并且生成所述文本片段的所述图像包括:基于所述角色形象图,生成用于描述所述角色的角色模型;利用所述环境信息、所述动作信息以及所述角色模型,生成机器学习模型的提示词;以及基于所述提示词来生成所述图像。
- 根据权利要求9所述的方法,其中生成所述提示词进一步包括:基于所述音频数据的声音属性来确定所述图像的风格;以及基于所述风格来更新所述提示词。
- 根据权利要求5所述的方法,其中所述至少一个维度的属性信息包括以下至少任一项:所述角色的姓名、性别、年龄、职业、容貌、神态、以及服装,所述至少一个维度的属性信息中的第一部分是从所述文本作品中确定的。
- 根据权利要求11所述的方法,进一步包括:在所述电子书籍阅读器中提供用于设置所述至少一个维度的属性信息中的第二部分的设置控件;以及响应于接收到针对所述设置控件的设置操作,基于所述设置操作来设置所述至少一个维度的属性信息中的第二部分。
- 一种文本作品呈现装置,包括:播放模块,被配置用于在用于阅读文本作品的电子书籍阅读器中,响应于接收到用于播放对应于所述文本作品的音频数据的播放请求,播放所述音频数据;以及显示模块,被配置用于显示对应于所述文本作品的图像,所述图像是基于所述文本作品中的文本片段中的角色来生成的,所述文本片段对应于所述音频数据的播放位置。
- 一种电子设备,包括:至少一个处理单元;以及至少一个存储器,所述至少一个存储器被耦合到所述至少一个处理单元并且存储用于由所述至少一个处理单元执行的指令,所述指令在由所述至少一个处理单元执行时使所述电子设备执行根据权利要求1至12中任一项所述的方法。
- 一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序可由处理器执行以实现根据权利要求1至12中任一项所述的方法。
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202480003603.9A CN121039620A (zh) | 2024-03-27 | 2024-03-27 | 用于文本作品呈现的方法、装置、设备和存储介质 |
| PCT/CN2024/084218 WO2025199827A1 (zh) | 2024-03-27 | 2024-03-27 | 用于文本作品呈现的方法、装置、设备和存储介质 |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2024/084218 WO2025199827A1 (zh) | 2024-03-27 | 2024-03-27 | 用于文本作品呈现的方法、装置、设备和存储介质 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2025199827A1 true WO2025199827A1 (zh) | 2025-10-02 |
Family
ID=97219121
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2024/084218 Pending WO2025199827A1 (zh) | 2024-03-27 | 2024-03-27 | 用于文本作品呈现的方法、装置、设备和存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN121039620A (zh) |
| WO (1) | WO2025199827A1 (zh) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8290777B1 (en) * | 2009-06-12 | 2012-10-16 | Amazon Technologies, Inc. | Synchronizing the playing and displaying of digital content |
| CN112328088A (zh) * | 2020-11-23 | 2021-02-05 | 北京百度网讯科技有限公司 | 图像的呈现方法和装置 |
| CN113010138A (zh) * | 2021-03-04 | 2021-06-22 | 腾讯科技(深圳)有限公司 | 文章的语音播放方法、装置、设备及计算机可读存储介质 |
| CN116894881A (zh) * | 2023-07-21 | 2023-10-17 | 河北烽联信息技术有限公司 | 图像生成方法、装置、电子设备和存储介质 |
-
2024
- 2024-03-27 CN CN202480003603.9A patent/CN121039620A/zh active Pending
- 2024-03-27 WO PCT/CN2024/084218 patent/WO2025199827A1/zh active Pending
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8290777B1 (en) * | 2009-06-12 | 2012-10-16 | Amazon Technologies, Inc. | Synchronizing the playing and displaying of digital content |
| CN112328088A (zh) * | 2020-11-23 | 2021-02-05 | 北京百度网讯科技有限公司 | 图像的呈现方法和装置 |
| CN113010138A (zh) * | 2021-03-04 | 2021-06-22 | 腾讯科技(深圳)有限公司 | 文章的语音播放方法、装置、设备及计算机可读存储介质 |
| CN116894881A (zh) * | 2023-07-21 | 2023-10-17 | 河北烽联信息技术有限公司 | 图像生成方法、装置、电子设备和存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN121039620A (zh) | 2025-11-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11383162B2 (en) | Voice skill game editing method, apparatus, device and readable storage medium | |
| US11288454B2 (en) | Article generation | |
| US11264006B2 (en) | Voice synthesis method, device and apparatus, as well as non-volatile storage medium | |
| CN114187394B (zh) | 虚拟形象生成方法、装置、电子设备以及存储介质 | |
| CN108804698A (zh) | 基于人物ip的人机交互方法、系统、介质及设备 | |
| US20240394965A1 (en) | Memories for virtual characters | |
| WO2025236828A1 (zh) | 用于视频生成的方法、装置、设备和存储介质 | |
| US12598360B2 (en) | Video captioning generation system and method | |
| WO2025067085A1 (zh) | 用于生成图像的方法、装置、设备和存储介质 | |
| WO2025251807A1 (zh) | 生成音乐的方法、装置、设备和存储介质 | |
| CN118741264A (zh) | 生成视频的方法、装置、电子设备及存储介质 | |
| WO2025227801A1 (zh) | 动画渲染方法、装置及电子设备 | |
| CN113704488B (zh) | 内容的生成方法、装置、电子设备及存储介质 | |
| CN113655895A (zh) | 应用于输入法的信息推荐方法、装置及电子设备 | |
| CN118276746A (zh) | 用于图像编辑的方法、装置、设备、介质和程序产品 | |
| CN114138929A (zh) | 问答方法及装置 | |
| US20260064957A1 (en) | Method, apparatus, medium, and program product for generating copywriting outline | |
| WO2021243985A1 (zh) | 天气预报视频的生成方法、装置、电子设备及存储介质 | |
| WO2025261521A1 (zh) | 生成媒体内容的方法、装置、设备和存储介质 | |
| WO2025199827A1 (zh) | 用于文本作品呈现的方法、装置、设备和存储介质 | |
| WO2025050994A1 (zh) | 用于图像生成的方法、装置、设备和存储介质 | |
| WO2025199829A1 (zh) | 用于插图生成的方法、装置、设备和存储介质 | |
| US20260073152A1 (en) | Method, apparatus, device, and storage medium for training model | |
| WO2026055939A1 (zh) | 视频处理的方法、装置、设备、存储介质和程序产品 | |
| WO2025200895A1 (zh) | 用于图像处理的方法、装置、设备和存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 24932405 Country of ref document: EP Kind code of ref document: A1 |