Display method, device and electronic equipment for literary works

CN122963401APending Publication Date: 2026-10-23BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610902479.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-22
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0002]当前电子文学作品(如小说)的阅读界面通常采用固定式用户界面(UserInterface,简称UI)渲染方案,页面背景、字体颜色、界面氛围及交互效果在阅读过程中保持不变,其核心功能仍停留在文本展示层面,无法根据剧情发展、情绪变化及场景切换动态调整界面表现形式

Benefits of technology

[0008]根据本公开的第五方面,提供了一种计算机程序产品,包括计算机程序,所述计算机程序在被处理器执行时实现根据本公开第一方面所述的文学作品的显示方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122963401A_ABST
    Figure CN122963401A_ABST
Patent Text Reader

Abstract

The present disclosure provides a display method and device of a literary work and an electronic device, relates to the technical field of artificial intelligence, in particular to the technical field of large models, deep learning and natural language processing; the method comprises the following steps: obtaining plot state data of a current chapter content of a literary work, wherein the plot state data at least comprises plot emotion data; obtaining target control parameters of a reading interface based on the plot state data; and performing visual rendering on the reading interface based on the target control parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of artificial intelligence technology, specifically to the fields of large models, deep learning and natural language processing, and in particular to a method, apparatus and electronic device for displaying literary works. Background Technology

[0002] Currently, the reading interface of electronic literary works (such as novels) usually adopts a fixed user interface (UI) rendering scheme. The page background, font color, interface atmosphere and interactive effects remain unchanged during the reading process. Its core function is still at the level of text display, and it cannot dynamically adjust the interface presentation according to the development of the plot, changes in emotions and scene changes. Summary of the Invention

[0003] This disclosure provides a method for displaying a literary work, a display device for a literary work, an electronic device, a storage medium, and a computer program product.

[0004] According to a first aspect of this disclosure, a method for displaying a literary work is provided, comprising: acquiring plot state data of the current chapter content of the literary work, wherein the plot state data includes at least plot emotion data; acquiring target control parameters of a reading interface based on the plot state data; and performing visual rendering on the reading interface based on the target control parameters.

[0005] According to a second aspect of this disclosure, a display device for a literary work is provided, comprising: a first acquisition module for acquiring plot state data of the current chapter content of the literary work, wherein the plot state data includes at least plot emotion data; a second acquisition module for acquiring target control parameters of a reading interface based on the plot state data; and a rendering module for visually rendering the reading interface based on the target control parameters.

[0006] According to a third aspect of this disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method for displaying a literary work as described in the first aspect of this disclosure.

[0007] According to a fourth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions for causing the computer to perform the method for displaying a literary work as described in the first aspect of this disclosure.

[0008] According to a fifth aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method for displaying a literary work according to a first aspect of this disclosure.

[0009] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0010] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:

[0011] Figure 1 This is a flowchart illustrating a method for displaying a literary work according to an embodiment of the present disclosure; Figure 2 This is a flowchart illustrating a method for displaying a literary work according to an embodiment of the present disclosure; Figure 3 This is a flowchart illustrating a method for displaying a literary work according to an embodiment of the present disclosure; Figure 4 This is a schematic diagram of a method for displaying a literary work according to an embodiment of the present disclosure; Figure 5 This is a schematic diagram of a method for displaying a literary work according to an embodiment of the present disclosure; Figure 6 This is a schematic diagram of a method for displaying a literary work according to an embodiment of the present disclosure; Figure 7 This is an interactive schematic diagram illustrating a method for displaying a literary work according to an embodiment of the present disclosure; Figure 8 This is a schematic diagram of the structure of a display device for a literary work according to an embodiment of the present disclosure; Figure 9 This is a schematic block diagram of an electronic device according to an embodiment of the present disclosure. Detailed Implementation

[0012] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0013] The following is a brief description of the technical field involved in the solution disclosed herein: Artificial intelligence (AI) is the study of enabling computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It involves both hardware and software technologies. AI hardware technologies generally include computer vision, speech recognition, natural language processing, and related technologies such as deep learning, big data processing, and knowledge graphs.

[0014] Large models refer to machine learning models with a large number of parameters and high complexity. They require a lot of computing resources and storage space for training and storage, and often require distributed computing and special hardware acceleration technologies. Large models have stronger generalization and expressive capabilities.

[0015] Deep learning (DL) is a new research direction in the field of machine learning (ML), bringing it closer to its original goal—artificial intelligence. Deep learning learns the inherent laws and hierarchical representations of sample data; the information gained during this learning process greatly aids in interpreting data such as text, images, and sound. Its ultimate goal is to enable machines to possess analytical and learning capabilities like humans, capable of recognizing data such as text, images, and sound. Deep learning is a complex machine learning algorithm that has achieved results in speech and image recognition far exceeding previous related technologies.

[0016] Natural Language Processing (NLP) is an important research direction in the field of artificial intelligence. It integrates knowledge from multiple disciplines such as linguistics, computer science, machine learning, mathematics, and cognitive psychology. It is an interdisciplinary field that combines computer science, artificial intelligence, and linguistics, encompassing two main aspects: natural language understanding and natural language generation. Its research content includes multiple levels such as characters, words, phrases, sentences, paragraphs, and texts, serving as a bridge between machine language and human language. Its aim is to enable machines to understand, interpret, and generate human language, achieving effective communication between humans and machines, and enabling computers to perform tasks such as language translation, sentiment analysis, and text summarization.

[0017] It's important to note that for literary works, specifically novels, novel reading is essentially an emotion-driven content consumption experience. Users will experience emotional changes such as tension, excitement, horror, sadness, suspense, and romance as the plot unfolds. Due to a lack of ability to recognize textual semantics, plot states, and emotional characteristics in related technologies, a significant disconnect exists between the reading interface and the novel's content. For example, when users are reading chapters with high emotional fluctuations, such as horror or suspense, the reading interface maintains a fixed white-on-black-text display, failing to create a visual atmosphere and emotional feedback consistent with the plot. Furthermore, traditional static UI solutions lack dynamic visual expression capabilities, failing to generate corresponding changes in lighting and shadows, color atmospheres, dynamic animations, or scene-based interactive effects in conjunction with the plot's rhythm. This results in a monotonous reading experience, insufficient immersion, and difficulty for users to achieve a stronger emotional engagement.

[0018] Among the related technologies, (1) Fixed theme switching scheme. Allows users to manually switch between multiple reading themes preset by the system, and achieve overall changes in background color, font color and page style by switching Cascading Style Sheets (CSS) variables, theme configuration files or interface skins. This type of scheme is essentially still a static theme mechanism. The theme switching depends on the user's active operation and cannot automatically adjust the interface appearance according to the novel content. (2) Static background scheme. By providing solid color background, textured background or fixed background image, the visual effect of the reading interface is enhanced. It remains unchanged after the user sets it. This type of scheme only statically decorates the background style and cannot change in real time with the plot content, lacking the ability to drive emotions. (3) Simple animation overlay scheme.

[0019] Some reading products add page-turning animations, lightweight dynamic backgrounds, or local animations during the reading process to improve the smoothness of the interface and the visual experience. However, such animation effects are usually fixed presets and have no connection with the novel's plot, character status, or emotional changes, thus failing to create a content-driven dynamic interactive experience. (4) Text layout optimization scheme. This mainly focuses on optimizing reading comfort, including font size adjustment, line spacing optimization, font switching, page rendering, and eye protection mode. This type of scheme mainly focuses on optimizing text display quality and lacks support for plot atmosphere, emotional expression, and immersive reading experience.

[0020] The above technical solutions generally have the following drawbacks: (1) The reading interface is disconnected from the plot and emotions of the novel, and cannot express the plot atmosphere through the visual level, lacking the ability to resonate with emotions; (2) The reading UI remains static for a long time and cannot change dynamically according to the development of the plot, resulting in insufficient immersive reading experience; (3) The reading process lacks contextual interactive feedback, and users can only passively receive text content, resulting in weak interactivity; (4) Various reading products are highly homogenized in terms of interface design and interactive experience, lacking differentiated innovation capabilities; (5) Modern mobile devices have strong GPU graphics rendering and dynamic animation processing capabilities, but existing reading systems have failed to make full use of the relevant hardware capabilities to achieve content-driven intelligent dynamic rendering.

[0021] A method for displaying a literary work according to an embodiment of the present disclosure is described below with reference to the accompanying drawings.

[0022] Figure 1 This is a flowchart illustrating a method for displaying a literary work according to an embodiment of the present disclosure. It should be noted that the executing entity of the method for displaying a literary work in this embodiment is a display device for the literary work, which can specifically be a hardware device or software within a hardware device. The hardware device includes, for example, a terminal device or a server.

[0023] like Figure 1 As shown, the method for displaying literary works proposed in this embodiment includes the following steps: S101. Obtain the plot status data of the current chapter of the literary work, wherein the plot status data includes at least the plot emotion data.

[0024] It should be noted that this disclosure does not limit the specific method for obtaining the plot status data of the current chapter of a literary work, and the appropriate method can be selected according to the actual situation.

[0025] Optionally, a pre-trained natural language processing model can be used to perform emotion recognition on the current chapter content to obtain the plot state data of the current chapter content.

[0026] The emotional data in the plot describes the overall emotional direction of the current chapter's content. Examples include feelings of depression, sadness, relief, and excitement.

[0027] In this embodiment of the disclosure, the plot state data also includes plot tension, plot pacing data, and plot scenes.

[0028] It should be noted that, due to differences in performance, power consumption and battery life among terminal devices, the terminal devices prioritize the use of lightweight natural language processing models to perform local reasoning on the content of the current chapter. At the same time, it supports pre-calculating the plot state data of the current chapter content in the cloud and caching it to the terminal device. By reducing the frequency of real-time semantic calculation, the usage of the mobile terminal's central processing unit and memory is reduced.

[0029] S102. Based on the plot status data, obtain the target control parameters of the reading interface.

[0030] It should be noted that a mapping table between candidate plot state data and candidate control parameters can be pre-built to define the control parameters corresponding to different plot state data. Through the mapping table, abstract plot state data can be converted into specific control parameters, realizing dynamic linkage between chapter content and reading interface.

[0031] In this embodiment of the disclosure, a target feature vector is obtained based on the plot state data. Based on the target feature vector, a candidate feature vector matching the target feature vector is obtained from a preset mapping relationship table between candidate plot state data and candidate control parameters. The matched candidate feature vector is the feature vector corresponding to a candidate plot state data in the mapping relationship table. The candidate control parameter that is mapped to the matched candidate feature vector is used as the target control parameter.

[0032] It should be noted that the target control parameters include, but are not limited to, the background color of the reading interface, particle effects, lighting effects, page turning speed, breathing animation, and ambient sound effects.

[0033] S103. Based on the target control parameters, perform visual rendering of the reading interface.

[0034] It should be noted that, through front-end graphics rendering technology, the reading interface is visually rendered according to the target control parameters, and the target control parameters are converted into the final visual effect of the reading interface in real time, so as to realize the dynamic atmosphere expression of the reading interface, and while ensuring the visual effect, the performance and power consumption control of the terminal device are also taken into account.

[0035] According to the method for displaying literary works according to embodiments of this disclosure, the plot state data of the current chapter of the literary work is obtained, wherein the plot state data includes at least plot emotion data. Based on the plot state data, target control parameters for the reading interface are obtained, and based on the target control parameters, the reading interface is visually rendered. Therefore, this disclosure obtains target control parameters for the reading interface based on the plot state data, enabling the reading interface to dynamically adapt to the plot state data, thereby enhancing reading immersion, emotional resonance, and the user's reading experience.

[0036] Figure 2This is a flowchart illustrating a method for displaying a literary work according to an embodiment of the present disclosure.

[0037] like Figure 2 As shown, the method for displaying literary works proposed in this embodiment includes the following steps: S201. Perform sentiment analysis on the current chapter content to extract the emotional state and intensity of the current chapter content.

[0038] Optionally, a pre-trained natural language processing model can be used to perform sentiment analysis on the current chapter content, extracting the emotional state and intensity of the current chapter content.

[0039] S202. Based on emotional state and emotional intensity, obtain the plot emotional data of the current chapter content.

[0040] Optionally, an emotion value can be generated based on the emotion state and emotion intensity, and the plot emotion data of the current chapter can be obtained based on the emotion value.

[0041] The range of the emotion value is [0, 100]. An emotion value of 0 indicates an extremely negative emotion, and an emotion value of 100 indicates an extremely positive emotion.

[0042] It should be noted that the emotional data of the plot provides an important basis for the switching of the interface color scheme, background atmosphere, and visual style of the reading interface.

[0043] S203. Perform word segmentation and part-of-speech analysis on the current chapter content to obtain a set of feature words in the current chapter content, wherein the set of feature words includes at least one of the following: high-frequency emotion words, action words, and tone words.

[0044] Optionally, a pre-trained natural language processing model can be used to perform word segmentation and part-of-speech analysis on the current chapter content to obtain a set of feature words in the current chapter content.

[0045] For example, high-frequency emotional words include suddenly, abruptly, and instantly; action words include rush, pounce, and roar; and interjections include ah, wow, and ya.

[0046] S204. Identify the punctuation density and number of short sentences in the current chapter content.

[0047] Optionally, a pre-trained natural language processing model can be used to identify the punctuation density and the number of short sentences in the current chapter.

[0048] Among them, the punctuation mark can be an exclamation mark.

[0049] S205. Based on the set of feature words, punctuation density, and number of short sentences, determine the plot tension of the current chapter.

[0050] Optionally, a weighted fusion of the feature word set, punctuation density, and number of short sentences can be performed to determine the plot tension of the current chapter.

[0051] The range of plot tension is [0, 100]. A plot tension of 0 indicates that the plot is in a calm state, while a plot tension of 100 indicates that the plot is in a high-tension state.

[0052] It should be noted that the tension level is used to control the intensity of the dynamic effects on the reading interface. These dynamic effects include, but are not limited to, animation frequency, background fluctuation effects, particle changes, and light and shadow flickering.

[0053] S206. Track the sentence length in the current chapter and obtain data on changes in sentence length.

[0054] S207. Determine the number of paragraphs included in the current chapter content, and obtain the paragraph density of the current chapter content based on the number of paragraphs.

[0055] Optionally, the paragraph density of the current chapter can be obtained based on the number of paragraphs and the visible height of the reading interface.

[0056] S208. Determine the number of dialogues and the text progression speed included in the current chapter.

[0057] S209. Determine the plot rhythm data of the current chapter content based on at least one of the following: sentence length variation data, paragraph density, number of dialogues, and text progression speed.

[0058] Optionally, the plot rhythm change rate of the current chapter can be determined based on at least one of sentence length variation data, paragraph density, number of dialogues, and text progression speed, and the plot rhythm change rate can be used as the plot rhythm data of the current chapter.

[0059] For example: The rate of change in the plot pacing of the current chapter can be determined based on a single indicator, such as changes in sentence length, paragraph density, number of dialogues, and text progression speed. Alternatively, a weighted fusion of multiple indicators, including changes in sentence length, paragraph density, number of dialogues, and text progression speed, can be used to determine the rate of change in the plot pacing of the current chapter.

[0060] The range of the plot pacing change rate is [-100%, +100%]. A negative plot pacing change rate indicates a slower plot pace, while a positive plot pacing change rate indicates a faster plot pace.

[0061] It should be noted that the plot pacing data is used to control the dynamic interaction rhythm during the reading process, such as controlling page turning speed, transition animation duration, and interface transition frequency, so that the reading interface feedback is consistent with the plot pacing.

[0062] S2010: Extract keywords, contextual semantics, and chapter content features from the current chapter content.

[0063] Optionally, semantic analysis can be performed on the current chapter content to extract keywords, contextual semantics, and chapter content features.

[0064] S2011. Scene recognition is performed based on keywords, contextual semantics, and chapter content features to obtain the plot scene of the current chapter.

[0065] It should be noted that the plot scenes include, but are not limited to: battle scenes, suspense scenes, romantic scenes, horror scenes, and climactic conflict scenes.

[0066] It should be noted that the plot scenes are used to drive different types of reading interface visual templates, such as color style, background effects, dynamic elements, and sound effects atmosphere.

[0067] S2012. Based on the plot status data, obtain the target feature vector.

[0068] It should be noted that multiple indicators, such as plot emotion data, plot tension data, plot pacing data, and plot scene data, are independent yet interconnected, collectively forming the dynamic driving parameter system of the reading interface.

[0069] Optionally, the plot state data can be spliced ​​together according to a preset dimensional order, and the spliced ​​plot state data can be normalized to obtain the target feature vector.

[0070] S2013. Based on the target feature vector, obtain the candidate feature vector that matches the target feature vector from the preset mapping relationship table between candidate plot state data and candidate control parameters, wherein the matched candidate feature vector is the feature vector corresponding to a candidate plot state data in the mapping relationship table.

[0071] It should be noted that the candidate control parameters include, but are not limited to, background color scheme, light and shadow brightness, particle effect type, animation speed, breathing frequency, page blur, and transition effect intensity.

[0072] For example, plot state data represents suspense / horror emotions, and the corresponding candidate control parameters are low brightness and cool color tone, and enhanced shadow and dynamic fluctuation effects; plot state data represents action / high-octane emotions, and the corresponding candidate control parameters are increased animation rhythm and particle activity; plot state data represents romance / lighthearted emotions, and the corresponding candidate control parameters are warm color tone and low-frequency soft animation effects.

[0073] S2014. The candidate control parameters that are matched with the candidate feature vectors and have a mapping are used as the target control parameters.

[0074] S2015. Based on the target control parameters, perform visual rendering of the reading interface.

[0075] According to the method for displaying literary works in this disclosure, sentiment analysis is performed on the current chapter content to extract the emotional state and intensity of the current chapter content. Word segmentation and part-of-speech analysis are then performed on the current chapter content to obtain a set of feature words. The punctuation density and number of short sentences in the current chapter content are identified. Based on the feature word set, punctuation density, and number of short sentences, the plot tension of the current chapter content is determined. Sentence length in the current chapter content is tracked to obtain data on changes in sentence length. The number of paragraphs included in the current chapter content is determined, and based on the number of paragraphs, the paragraph density of the current chapter content is obtained. The number of dialogues and the text progression speed included in the current chapter content are determined. Finally, based on changes in sentence length... This invention utilizes at least one of the following: data density, paragraph density, dialogue quantity, and text progression speed. It determines the plot rhythm data of the current chapter, extracts keywords, contextual semantics, and chapter content features, performs scene recognition based on these features to obtain the plot scene of the current chapter, obtains a target feature vector based on the plot state data, and retrieves a matching candidate feature vector from a pre-defined mapping table between candidate plot state data and candidate control parameters. The matched candidate feature vector is the feature vector corresponding to a candidate plot state data in the mapping table. The candidate control parameters that map to the matched candidate feature vector are used as target control parameters. Based on these target control parameters, the reading interface is visually rendered. Therefore, this invention obtains more comprehensive and objective plot state data by acquiring multi-dimensional plot state data, improves the efficiency of obtaining target control parameters by querying the mapping table using target feature vectors, and dynamically adapts the reading interface to the plot state data, thereby enhancing reading immersion, emotional resonance, and user reading experience.

[0076] Figure 3 This is a flowchart illustrating a method for displaying a literary work according to an embodiment of the present disclosure.

[0077] like Figure 3 As shown, the method for displaying literary works proposed in this embodiment includes the following steps: S301. Obtain the plot status data of the current chapter of the literary work.

[0078] S302. Based on the plot status data, obtain the target control parameters of the reading interface.

[0079] In this embodiment of the disclosure, the reading speed of the current chapter content is identified, and in response to the reading speed being greater than a set speed threshold, the average plot state data of the current chapter content is determined, and the plot state data is replaced based on the average plot state data.

[0080] It should be noted that this disclosure does not limit the setting of the speed threshold, for example: setting the speed threshold to 800 words per minute.

[0081] It should be noted that when the reading speed exceeds the set speed threshold, indicating that the user is in a fast browsing state, a dynamic rendering degradation strategy is automatically enabled to reduce the interference caused by frequent changes in the reading interface.

[0082] For example, in response to a reading speed exceeding a set speed threshold, the real-time dynamic reading interface switching is paused, high-frequency animations and complex particle effects are turned off, the average plot state data of the current chapter is replaced with the plot state data, and the average plot state data is used as the basis for obtaining the target control parameters of the reading interface.

[0083] It should be noted that when the reading speed changes from greater than the set speed threshold to less than or equal to the set speed threshold, indicating that the user is in a normal reading state, the dynamic rendering capability is re-enabled. This balances reading efficiency and visual comfort, and avoids excessive dynamic feedback during fast reading.

[0084] In this embodiment of the disclosure, user preference information is obtained, and the plot state data is adjusted based on the user preference information to obtain target plot state data. Based on the target plot state data, target control parameters of the reading interface are obtained.

[0085] It should be noted that, based on user preference information, the sensitivity of plot status data is personalized to adapt to the reading habits of different users in order to obtain target plot status data. By using user preference information, the personalization and adaptability of the reading interface can be improved while ensuring the ability to link plots.

[0086] S303, cache target control parameters in the buffer.

[0087] It should be noted that, considering the potential for short-term fluctuations or localized abrupt changes in the plot status data of the current chapter of a literary work, a buffering mechanism is implemented to filter out high-frequency, short-cycle plot status changes. This buffering mechanism can prevent frequent flickering of the reading interface due to localized fluctuations, thereby improving the overall visual stability of the reading interface.

[0088] It should be noted that after obtaining the target control parameters, the visual rendering of the reading interface based on the target control parameters is not performed immediately. Instead, the target control parameters are cached in the buffer.

[0089] S304. Track the mood of the current chapter content. If the mood fluctuation amplitude is continuously less than a set threshold within a first set time period, determine that the mood of the current chapter content is in a stable state, and perform visual rendering of the reading interface based on the target control parameters.

[0090] It should be noted that this disclosure does not limit the first setting time and the setting threshold. For example, the first setting time is 3 seconds and the setting threshold is 10.

[0091] For example, the emotion of the current chapter content is tracked. If the emotion fluctuation amplitude is less than 10 for 3 seconds, it is determined that the emotion of the current chapter content is in a stable state. Based on the target control parameters, the reading interface is visually rendered.

[0092] In this embodiment of the disclosure, in response to the fact that the emotion of the current chapter content is not in a stable state within a first set time period, the fluctuation tracking of the emotion of the current chapter content continues. In response to the cumulative tracking time reaching a second set time period, visual rendering of the reading interface is performed based on the target control parameters.

[0093] It should be noted that this disclosure does not limit the second set duration, for example: the second set duration is 8 seconds.

[0094] For example, the system tracks the mood of the current chapter content. If the mood of the current chapter content is not stable within 3 seconds, it continues to track the fluctuations of the mood of the current chapter content. If the cumulative tracking time reaches 8 seconds, it performs visual rendering of the reading interface based on the target control parameters.

[0095] In this embodiment of the disclosure, the target control parameters are subjected to a smooth transition process before visual rendering of the reading interface based on the target control parameters.

[0096] It should be noted that, in order to avoid visual discontinuity caused by abrupt changes in the reading interface during mood switching, a smooth transition mechanism is adopted to smoothly process the target control parameters, thereby achieving gradual adjustment of the target control parameters. This can effectively reduce visual discomfort caused by frequent changes in the reading interface and improve reading continuity.

[0097] Optionally, smooth transition algorithms such as linear interpolation, Bézier curves, or easing functions can be used to continuously transition target control parameters such as color, brightness, animation frequency, and particle effects, so that changes in the reading interface are consistent with the plot state data.

[0098] For example, as the plot data gradually progresses from calm to climax, the target control parameters such as the brightness and dynamic effects of the reading interface are gradually increased; as the plot data returns to a calm state from tension, the target control parameters such as the animation frequency and visual stimulation of the reading interface are gradually decreased.

[0099] For example, such as Figure 4 As shown, the system acquires the plot emotion data, plot tension data, and plot pacing data of the current chapter. If the reading speed of the current chapter is greater than 800 words / minute, the average plot state data of the current chapter is used to replace the plot state data. If the reading speed is less than or equal to 800 words / minute, the plot state data is used directly. If the mood of the current chapter is stable, a smooth transition is applied to the target control parameters, and visual rendering of the reading interface is performed based on the target control parameters. If the mood of the current chapter is not stable, and the buffering time is less than or equal to 8 seconds, buffering continues. If the buffering time is greater than 8 seconds, a smooth transition is applied to the target control parameters, and visual rendering of the reading interface is forcibly performed based on the target control parameters, updating the background color, particle effects, lighting effects, page turning speed, breathing animation, and environmental sound effects, etc.

[0100] According to the method for displaying literary works according to embodiments of this disclosure, plot state data of the current chapter of the literary work is obtained. Based on the plot state data, target control parameters of the reading interface are obtained and cached in a buffer. The emotion of the current chapter content is tracked. In response to the fact that the amplitude of emotion fluctuation is continuously less than a set threshold within a first set time period, it is determined that the emotion of the current chapter content is in a stable state. Then, visual rendering of the reading interface is performed based on the target control parameters. Thus, this disclosure, through a buffering mechanism, can avoid the problem of frequent flickering of the reading interface caused by local emotion fluctuations, which is beneficial to improving the visual stability of the reading interface.

[0101] Figure 5 This is a flowchart illustrating a method for displaying a literary work according to an embodiment of the present disclosure.

[0102] like Figure 5 As shown, the method for displaying literary works proposed in this embodiment includes the following steps: S501. Obtain the plot status data of the current chapter of the literary work.

[0103] S502. Based on the plot status data, obtain the target control parameters of the reading interface.

[0104] S503. Based on the target control parameters, perform visual rendering of the reading interface.

[0105] In this embodiment of the disclosure, before visually rendering the reading interface based on the target control parameters, the performance parameters of the terminal device are obtained, and the rendering level of the visual rendering is determined based on the performance parameters of the terminal device.

[0106] It should be noted that, due to differences in performance, power consumption, and battery life among terminal devices, the system automatically detects performance parameters such as GPU capability, memory capacity, screen refresh rate, and battery status of the terminal device. Based on these performance parameters, it determines the rendering level for visual rendering, ensuring a basic reading experience while also considering operational stability and power consumption control on different devices.

[0107] For example, when the performance parameters of the terminal device indicate that the terminal device is a high-performance device, the rendering level of visual rendering is determined to be Level 1, and full visual rendering is enabled; when the performance parameters of the terminal device indicate that the terminal device is a medium-performance device, the rendering level of visual rendering is determined to be Level 2, and partial visual rendering is enabled; when the performance parameters of the terminal device indicate that the terminal device is a low-performance device, the rendering level of visual rendering is determined to be Level 2, and the shader mode is simplified or visual rendering is turned off.

[0108] Optionally, optimization methods such as instantiation rendering can be used to reduce the number of drawing calls and improve GPU rendering efficiency. At the same time, high-frequency animations and complex shaders can be scheduled in layers to avoid occupying main thread resources for a long time, thereby achieving GPU rendering optimization.

[0109] In this embodiment of the disclosure, a shader running in the graphics processing unit (GPU) is invoked, and the background color, lighting and shadow levels and atmosphere of the reading interface are rendered based on the background information in the target control parameters.

[0110] It should be noted that dynamic changes in background color, lighting and shadow levels, and atmosphere effects are achieved through custom CSS shaders, and GPU acceleration capabilities are combined to reduce CPU computing overhead.

[0111] Different plot scenes correspond to different shader effects. The colors, transparency, light intensity, and dynamic frequency in the shaders are adjusted in real time based on the plot status data, so that the atmosphere of the reading interface changes synchronously with the plot. For example, in horror and suspense scenes, noise shaders and vignetting shaders are used to generate random noise and shadow fluctuation effects; in romance and heartwarming scenes, radial gradient shaders are used to create soft halos and warm color transitions; and in high-octane and battle scenes, dynamic contrast and color saturation are increased to enhance the visual impact.

[0112] In this embodiment of the disclosure, the background effect of the reading interface is rendered based on a programmable canvas and according to the particle parameters in the target control parameters.

[0113] Optionally, based on the Hyper Text Markup Language 5 (HTML5) canvas, the background effect of the reading interface is rendered according to the particle parameters in the target control parameters to achieve dynamic particle effects, thereby enhancing the dynamic performance of the reading scene.

[0114] It should be noted that particle parameters include, but are not limited to, particle number, particle size, speed, drift direction, and lifespan.

[0115] For example, increase the speed and density of particles in climactic scenes; decrease the frequency and dynamic range of particles in calm scenes; and generate directional particle motion effects in special scenes such as rainy nights and battles.

[0116] It should be noted that the particle rendering scale can be dynamically adjusted based on the performance parameters of the terminal device. For example, high-performance devices can enable full particle effects; medium- and low-performance devices can reduce the number of particles; and complex particle rendering can be turned off in low-performance mode to reduce GPU load and power consumption.

[0117] In this embodiment of the disclosure, the keyframe animation is rendered by Cascading Style Sheets (CSS) based on the breathing animation parameters in the target control parameters, and a script-based scheduling mechanism is constructed for the keyframe animation.

[0118] It should be noted that the breathing animation parameters are used for visual parameters such as page brightness, light and shadow transparency, background fluctuation frequency, and element scaling in the reading interface.

[0119] The breathing animation's breathing frequency is linked to the tension of the plot; for example, the higher the tension, the faster the breathing frequency; the lower the tension, the slower the breathing frequency.

[0120] It should be noted that the keyframe animation is rendered using CSS based on the breathing animation parameters in the target control parameters, and a JavaScript-based scheduling mechanism is built for the keyframe animation to achieve a breathing dynamic effect on the reading interface. Through continuous and lightweight dynamic changes, the emotional immersion and scene atmosphere during the reading process are enhanced.

[0121] In this embodiment of the disclosure, the page-turning animation is rendered according to the page-turning speed in the target control parameters.

[0122] For example, when the plot status data indicates a highly tense plot, the page-turning speed is increased, and an accelerated easing function and elastic feedback effect are used to render the page-turning animation according to the page-turning speed; when the plot status data indicates a calm plot, the page-turning speed is decreased, and linear easing and soft transition effects are used to render the page-turning animation according to the page-turning speed.

[0123] It should be noted that the page-turning speed in the target control parameters is kept consistent with the plot status data, thereby enhancing the rhythm and immersive experience during reading.

[0124] In this embodiment of the disclosure, in response to updating the reading interface based on the visual rendering results of the reading interface, ambient sounds matching the plot scene in the plot state data are played synchronously.

[0125] It should be noted that the system acquires various types of sound effect resources, including horror sound effects, action-packed battle sound effects, romantic and heartwarming sound effects, and suspenseful environmental sound effects. Based on these diverse sound effect resources, a sound effect resource library is pre-built. The reading interface is updated in response to the visual rendering results based on the reading interface. Furthermore, through the sound effect resource library, ambient sounds that match the plot scenes in the plot status data are played synchronously. Through the linkage of visual and sound effects, a multi-sensory reading experience is achieved.

[0126] Optionally, the volume of ambient sounds can be dynamically adjusted based on the emotional intensity in the plot status data, and a cross-fade-in / fade-out mechanism can be used during emotional transitions to achieve a smooth transition of sound effects.

[0127] For example, when the plot status data indicates that the plot is moving from a calm state to a climax, the ambient sound is gradually increased; when the plot status data indicates that the plot is returning to calm, the intensity of the ambient sound effects is dynamically reduced.

[0128] In this embodiment of the disclosure, the load information required for visual rendering is identified, and in response to the load information being greater than a set load threshold, a hardware accelerator is activated to accelerate the rendering of at least a portion of the rendering tasks.

[0129] It should be noted that for complex dynamic effects and high-frequency graphics computing scenarios, if the load information required for visual rendering is greater than the set load threshold, hardware accelerators such as Web Graphics Library (WebGL) or Web GPU are started. Through hardware accelerators, at least a part of the rendering tasks are hardware accelerated. With the parallel computing capabilities of GPU, the pressure on the main thread can be reduced while ensuring the smoothness of rendering, thereby improving the real-time rendering performance in complex scenes.

[0130] It should be noted that complex dynamic effects and high-frequency graphics computing scenarios include, but are not limited to, complex visual scenes such as camera shake, explosion effects, dynamic depth of field, light and shadow layering, and three-dimensional spatial transition effects in battle scenes.

[0131] S504. Monitor the user's continuous reading time.

[0132] S505. Adjust the dynamic effects of the reading interface according to the continuous reading time.

[0133] In this embodiment of the disclosure, in response to the continuous reading time reaching a third set duration, the rendering system is instructed to reduce the intensity of the dynamic effects on the reading interface; in response to the continuous reading time reaching a fourth set duration, the rendering system is instructed to switch to the eye-protection display mode of the reading interface, and / or reduce the frequency and brightness of the dynamic effects.

[0134] It should be noted that this disclosure does not limit the third and fourth set durations. Optionally, the third set duration is 60 minutes and the fourth set duration is 90 minutes.

[0135] For example, when continuous reading time reaches 60 minutes, the rendering system is instructed to reduce the intensity of dynamic effects on the reading interface; when continuous reading time reaches 90 minutes, the rendering system is instructed to switch to the eye-protection display mode of the reading interface and reduce the frequency and brightness of dynamic effects.

[0136] It should be noted that the reading fatigue protection function is enabled by default, reducing user fatigue caused by prolonged dynamic visual effects. Users can also disable this function.

[0137] According to the method for displaying literary works according to embodiments of this disclosure, the plot state data of the current chapter of the literary work is obtained. Based on the plot state data, target control parameters of the reading interface are obtained. Based on the target control parameters, visual rendering of the reading interface is performed. The user's continuous reading time is monitored, and the dynamic effects of the reading interface are adjusted according to the continuous reading time. Therefore, this disclosure adjusts the dynamic effects of the reading interface based on continuous reading time, reducing visual fatigue caused by prolonged reading, balancing an immersive reading experience with eye comfort, and improving the user's reading experience.

[0138] The following explanation details the specific process of the method for displaying literary works, specifically novels, according to embodiments of this disclosure.

[0139] For example, such as Figure 6As shown, the system extracts plot-related state data from the current reading content of the novel using an emotion recognition model. Based on this data, multi-dimensional feature vectors are obtained. The system also collects user swiping and page-turning actions in real time to obtain the current reading speed and progress, as well as the visible text area. User preference information is obtained through user settings. All of this data is aggregated into a reading state synchronization engine, which analyzes and processes the aggregated data to obtain target control parameters. This engine, as the core control layer, incorporates three control mechanisms: state mapping query, smooth transition processing, and a buffering mechanism (3-8 seconds). Based on the target control parameters, the system uses a CSS Shader rendering module and an environmental sound effect synchronization module to visually render the reading interface, outputting a basic dynamic UI interface visible to the user. Finally, the system uses a Canvas particle system module and WebGL / WebGPU advanced rendering to visually render the reading interface, outputting a special effects layer dynamic UI interface.

[0140] For example, such as Figure 7 As shown, when a user opens a chapter reading app, the app performs sentence segmentation and parsing of the current chapter's text. The segmented text fragments are then sent to an emotion recognition model. The model performs NLP sentiment analysis to obtain plot state data. Based on this data, it acquires an emotion feature vector (target feature vector). The app sends this vector to a reading state synchronization engine, which in turn requests the device performance level from the device performance detection module. The engine receives the returned performance level to determine the rendering level for visual rendering, responding to a reading speed greater than [a certain threshold]. A speed threshold is set to determine the fast reading mode. The reading state synchronization engine calculates the average plot state data of the current chapter content, replaces the real-time plot state data with the average plot state data, and determines the target control parameters through state mapping query. The target control parameters are then smoothly processed, and the final UI rendering parameters are sent to the front-end rendering system. The front-end rendering system constructs a buffering mechanism based on the UI rendering parameters. Stable buffering: if the emotional fluctuation amplitude is less than 3 for 3 seconds, visual rendering of the reading interface is performed based on the target control parameters. Maximum buffering: in response to the cumulative tracking time reaching 8 seconds, visual rendering of the reading interface is performed based on the target control parameters, realizing dynamic UI updates and presenting a real-time atmosphere.

[0141] It should be noted that, with "content-driven interface changes" as the core, the reading interface is synchronized with the novel's plot in real time without affecting the user's normal reading habits. The overall interaction methods include three categories: automatic interaction mode, personalized settings interaction mode, and manual mood mode.

[0142] It should be noted that for the automatic interaction mode: after a user opens the novel reading application and enters any novel chapter, the system automatically activates the emotion recognition model to analyze the current reading content in real time. No additional user operation is required. During the user's normal reading process, the system dynamically adjusts the background color, lighting and atmosphere, particle dynamic effects, page breathing frequency, page turning rhythm and animation effects of the reading interface based on the plot status data corresponding to the current reading position.

[0143] For example, in suspenseful or horror scenes, the reading interface gradually switches to a low-brightness, cool color scheme and enhances shadow and dynamic fluctuation effects; in action-packed or high-octane scenes, the dynamic rhythm and light effects of the interface are increased; and in relaxed or heartwarming scenes, warm colors and low-frequency, soft animation effects are used.

[0144] It should be noted that when users quickly jump to chapters or drag the reading progress, the reading interface will not switch immediately. Instead, a smooth transition will be completed within a preset time range, allowing the emotional atmosphere corresponding to the new chapter to gradually load, avoiding visual discontinuity caused by abrupt changes in the reading interface.

[0145] It should be noted that, for personalized interaction modes, in order to adapt to the reading habits and visual preferences of different users, multi-dimensional personalized configuration capabilities are provided: (1) Emotional sensitivity adjustment provides an emotional sensitivity slider to control the intensity of the dynamic UI response to the emotions of the plot. The adjustment range is 0% to 100%: when 0%, the reading interface maintains the traditional static reading mode; when 100%, the full dynamic emotional feedback effect is enabled. Users can adjust the change range of the reading interface according to their personal preferences to balance immersion and reading comfort; (2) Dynamic effect switch: supports users to turn on or off different types of particle effects, breathing animation, light and shadow changes, environmental sound effects, page dynamic transitions and other dynamic effects individually. Users can freely combine and configure according to device performance, usage scenarios or personal preferences. (3) Scene preference settings: supports users to set exclusive UI preference rules for specific plot scenes, and to perform differentiated rendering of the corresponding scenes according to user configuration to improve personalized adaptation capabilities. For example: "Only enable background color change in battle scenes and do not enable vibration effects"; "Reduce dynamic flashing frequency in horror scenes"; "Turn off background sound effects in romance scenes", etc. (4) Reading fatigue protection mechanism: Supports reading fatigue detection function to reduce the fatigue caused by long-term dynamic visual effects. For example, when it is detected that the user has been reading continuously for more than 60 minutes, the intensity of dynamic effects will be automatically reduced; when the user has been reading continuously for more than 90 minutes, it will automatically switch to eye protection mode and reduce the animation frequency and brightness changes. This function is enabled by default and can be manually turned off by the user as needed.

[0146] It should be noted that, for the manual mood mode, in addition to the automatic mood-driven mode, it also supports users to actively select the reading atmosphere: (1) The mood switcher provides an entry point for mood mode switching, and users can manually select the current reading atmosphere, such as: horror mode; action mode; calm mode; suspense mode, etc. When the user switches the mood mode, the system immediately loads the corresponding UI effect, instead of relying entirely on the plot status data. This mode is suitable for scenarios where users want to actively control the reading atmosphere. (2) Quick preset mode: It has a variety of preset configuration schemes built in, which users can switch with one click, including: immersive reading mode; eye protection mode; minimalist mode; low power mode, etc. The plot status data can adjust multiple UI parameters at the same time, improving the ease of operation.

[0147] In summary, this disclosure addresses the shortcomings of traditional e-reading interfaces, which are fixed and static and only capable of displaying text. It upgrades the static reading interface to a dynamically rendered interface that adapts to the plot in real time. By performing semantic analysis, emotion recognition, and plot state feature extraction on the novel text, it dynamically drives the synchronous changes of the reading interface's theme color, background visual effects, font styles, interactive animation feedback, and scene-based special effects elements. This allows the reading interface to change in real time with the plot, thereby enhancing reading immersion, emotional resonance, and the user's reading experience. It can be applied to various intelligent reading scenarios, including mobile novel reading apps, web-based online reading platforms, e-book readers, AI interactive reading systems, AI-assisted creative writing platforms, and immersive digital content products.

[0148] The acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0149] Corresponding to the methods for displaying literary works provided in the above embodiments, one embodiment of this disclosure also provides a display device for literary works. Since the display device for literary works provided in this disclosure corresponds to the methods for displaying literary works provided in the above embodiments, the implementation methods for displaying literary works are also applicable to the display device for literary works provided in this embodiment, and will not be described in detail in this embodiment.

[0150] Figure 8 This is a schematic diagram of the structure of a display device for a literary work according to an embodiment of the present disclosure.

[0151] like Figure 8 As shown, the display device 800 for the literary work includes: a first acquisition module 810, a second acquisition module 820, and a rendering module 830.

[0152] The first acquisition module 810 is used to acquire the plot status data of the current chapter of the literary work, wherein the plot status data includes at least plot emotion data; The second acquisition module 820 is used to acquire target control parameters of the reading interface based on the plot status data; The rendering module 830 is used to perform visual rendering of the reading interface based on the target control parameters.

[0153] The first acquisition module 810 is further configured to: perform sentiment analysis on the current chapter content, extract the emotional state and emotional intensity of the current chapter content; and acquire the plot emotion data of the current chapter content based on the emotional state and emotional intensity.

[0154] The plot state data also includes plot tension. The first acquisition module 810 is further configured to: perform word segmentation and part-of-speech analysis on the current chapter content to obtain a set of feature words in the current chapter content, wherein the set of feature words includes at least one of high-frequency emotion words, action words, and tone words; identify the punctuation density and number of short sentences in the current chapter content; and determine the plot tension of the current chapter content based on the set of feature words, punctuation density, and number of short sentences.

[0155] The plot state data also includes plot rhythm data. The first acquisition module 810 is further configured to: track the sentence length in the current chapter content and acquire sentence length change data; determine the number of paragraphs included in the current chapter content and acquire the paragraph density of the current chapter content based on the number of paragraphs; determine the number of dialogues and text progression speed included in the current chapter content; and determine the plot rhythm data of the current chapter content based on at least one of the sentence length change data, the paragraph density, the number of dialogues, and the text progression speed.

[0156] The plot state data also includes plot scenes. The first acquisition module 810 is further used to: extract keywords, contextual semantics and chapter content features of the current chapter content; and perform scene recognition based on the keywords, contextual semantics and chapter content features to obtain the plot scenes of the current chapter content.

[0157] The second acquisition module 820 is further configured to: acquire a target feature vector based on the plot state data; acquire a candidate feature vector matching the target feature vector from a preset mapping table between candidate plot state data and candidate control parameters based on the target feature vector, wherein the matching candidate feature vector is a feature vector corresponding to a candidate plot state data in the mapping table; and use the candidate control parameter that is mapped to the matching candidate feature vector as the target control parameter.

[0158] Before obtaining the target control parameters of the reading interface based on the plot status data, the device 800 is further configured to: identify the reading speed of the current chapter content; in response to the reading speed being greater than a set speed threshold, determine the average plot status data of the current chapter content, and replace the plot status data based on the average plot status data.

[0159] The rendering module 830 is further configured to: cache the target control parameters in a buffer; track the mood of the current chapter content; determine that the mood of the current chapter content is in a stable state in response to the mood fluctuation amplitude being less than a set threshold for a first set time period; and perform visual rendering of the reading interface based on the target control parameters.

[0160] The device 800 is further configured to: in response to the fact that the emotion of the current chapter content is not in a stable state within the first set time period, continue to track the fluctuation of the emotion of the current chapter content; and in response to the cumulative tracking time reaching the second set time period, perform visual rendering of the reading interface based on the target control parameters.

[0161] Before visually rendering the reading interface based on the target control parameters, the device 800 is further configured to: perform smooth transition processing on the target control parameters.

[0162] Before performing visual rendering of the reading interface based on the target control parameters, the device 800 is further configured to: obtain the performance parameters of the terminal device; and determine the rendering level of the visual rendering based on the performance parameters of the terminal device.

[0163] Wherein, after visually rendering the reading interface based on the target control parameters, the device 800 is further configured to: monitor the user's continuous reading time; and adjust the dynamic effects of the reading interface according to the continuous reading time.

[0164] The device 800 is further configured to: in response to the continuous reading time reaching a third set time, instruct the rendering system to reduce the intensity of the dynamic effects of the reading interface; in response to the continuous reading time reaching a fourth set time, instruct the rendering system to switch to the eye-protection display mode of the reading interface, and / or reduce the frequency and brightness of the dynamic effects.

[0165] The second acquisition module 820 is further configured to: acquire user preference information; adjust the plot state data based on the user preference information to obtain target plot state data; and acquire target control parameters of the reading interface based on the target plot state data.

[0166] The step of visually rendering the reading interface based on the target control parameters includes at least one of the following: calling a shader running in the graphics processing unit (GPU) and rendering the background color, lighting and shadow levels, and atmosphere of the reading interface based on the background information in the target control parameters; rendering the background effect of the reading interface based on the particle parameters in the target control parameters using a programmable canvas; rendering keyframe animations using Cascading Style Sheets (CSS) based on the breathing animation parameters in the target control parameters, and constructing a script-based scheduling mechanism for the keyframe animations; and rendering page-turning animations based on the page-turning speed in the target control parameters.

[0167] The device 800 is further configured to: update the reading interface in response to the visual rendering result of the reading interface, and synchronously play ambient sounds that match the plot scene in the plot state data.

[0168] The device 800 is further configured to: identify the load information required for the visual rendering; and, in response to the load information being greater than a set load threshold, activate a hardware accelerator to accelerate the rendering of at least a portion of the rendering tasks.

[0169] According to an embodiment of the present disclosure, a display device for a literary work acquires plot state data of the current chapter of the literary work, wherein the plot state data includes at least plot emotion data. Based on the plot state data, target control parameters for the reading interface are acquired, and based on the target control parameters, the reading interface is visually rendered. Thus, the present disclosure acquires target control parameters for the reading interface based on the plot state data, enabling the reading interface to dynamically adapt to the plot state data, thereby enhancing reading immersion, emotional resonance, and the user's reading experience.

[0170] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0171] Figure 9 A schematic block diagram of an example electronic device 900 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0172] like Figure 9 As shown, device 900 includes a computing unit 901, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 902 or a computer program loaded from storage unit 908 into random access memory (RAM) 903. RAM 903 may also store various programs and data required for the operation of device 900. The computing unit 901, ROM 902, and RAM 903 are interconnected via bus 904. Input / output (I / O) interface 905 is also connected to bus 904.

[0173] Multiple components in device 900 are connected to I / O interface 905, including: input unit 906, such as keyboard, mouse, etc.; output unit 907, such as various types of monitors, speakers, etc.; storage unit 908, such as disk, optical disk, etc.; and communication unit 909, such as network card, modem, wireless transceiver, etc. Communication unit 909 allows device 900 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0174] The computing unit 901 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 901 performs the various methods and processes described above, such as methods for displaying literary works. For example, in some embodiments, the display of literary works can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program can be loaded and / or installed on device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by the computing unit 501, one or more steps of the display of literary works described above can be performed. Alternatively, in other embodiments, the computing unit 501 can be configured to perform methods for displaying literary works by any other suitable means (e.g., by means of firmware).

[0175] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0176] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0177] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0178] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0179] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), the Internet, and blockchain networks.

[0180] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.

[0181] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the method for displaying a literary work as described above.

[0182] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0183] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method for displaying a literary work, wherein, The method includes: Obtain the plot status data of the current chapter of a literary work, wherein the plot status data includes at least plot emotion data; Based on the aforementioned plot status data, obtain the target control parameters for the reading interface; Based on the target control parameters, the reading interface is visually rendered.

2. The method according to claim 1, wherein, The process of obtaining the plot status data of the current chapter of a literary work includes: Perform sentiment analysis on the current chapter content to extract the emotional state and intensity of the current chapter content; Based on the emotional state and intensity, obtain the plot emotion data of the current chapter content.

3. The method according to claim 1, wherein, The plot status data also includes plot tension. The process of obtaining plot status data for the current chapter of a literary work includes: The current chapter content is segmented and part-of-speech analyzed to obtain a set of feature words in the current chapter content, wherein the set of feature words includes at least one of high-frequency emotion words, action words, and tone words; Identify the punctuation density and the number of short sentences in the current chapter content; The tension of the plot in the current chapter is determined based on the set of feature words, punctuation density, and number of short sentences.

4. The method according to claim 1, wherein, The plot status data also includes plot pacing data. The process of obtaining the plot status data for the current chapter of a literary work includes: Track the sentence lengths in the current chapter and obtain data on changes in sentence lengths; Determine the number of paragraphs included in the current chapter content, and obtain the paragraph density of the current chapter content based on the number of paragraphs; Determine the number of dialogues and the text progression speed included in the current chapter content; The plot pacing data of the current chapter content is determined based on at least one of the sentence length variation data, paragraph density, dialogue quantity, and text progression speed.

5. The method according to claim 1, wherein, The plot status data also includes plot scenes. The process of obtaining the plot status data of the current chapter of a literary work includes: Extract keywords, contextual semantics, and chapter content features from the current chapter content; Scene recognition is performed based on the keywords, contextual semantics, and chapter content features to obtain the plot scene of the current chapter content.

6. The method according to claim 1, wherein, The step of obtaining the target control parameters of the reading interface based on the plot status data includes: Based on the aforementioned plot state data, obtain the target feature vector; Based on the target feature vector, a candidate feature vector matching the target feature vector is obtained from a preset mapping table between candidate plot state data and candidate control parameters, wherein the matching candidate feature vector is the feature vector corresponding to a candidate plot state data in the mapping table. The candidate control parameters that are mapped to the matching candidate feature vectors are used as the target control parameters.

7. The method according to any one of claims 1-6, further comprising, before obtaining the target control parameters of the reading interface based on the plot state data: Identify the reading speed of the current chapter content; In response to the reading speed being greater than a set speed threshold, the average plot status data of the current chapter content is determined, and the plot status data is replaced based on the average plot status data.

8. The method according to any one of claims 1-6, wherein visually rendering the reading interface based on the target control parameters further comprises: The target control parameters are cached in a buffer. The current chapter content's mood is tracked. If the mood fluctuation amplitude is consistently less than a set threshold within a first set time period, it is determined that the current chapter content's mood is stable. Based on the target control parameters, visual rendering of the reading interface is then performed.

9. The method according to claim 8, further comprising: In response to the fact that the emotion of the current chapter content is not in a stable state within the first set time period, the fluctuation tracking of the emotion of the current chapter content continues; In response to the cumulative tracking time reaching a second set time, visual rendering of the reading interface is performed based on the target control parameters.

10. The method according to any one of claims 1-6, further comprising, before visually rendering the reading interface based on the target control parameters: The target control parameters are then subjected to a smooth transition process.

11. The method according to any one of claims 1-6, further comprising, before visually rendering the reading interface based on the target control parameters: Obtain the performance parameters of the terminal device; The rendering level of the visual rendering is determined based on the performance parameters of the terminal device.

12. The method according to any one of claims 1-6, wherein, After visually rendering the reading interface based on the target control parameters, the process further includes: Monitor the user's continuous reading time; The dynamic effects of the reading interface are adjusted based on the continuous reading duration.

13. The method according to claim 12, wherein, The step of adjusting the dynamic effects of the reading interface based on the continuous reading duration includes: In response to the continuous reading time reaching a third set time, the rendering system is instructed to reduce the intensity of the dynamic effects of the reading interface; In response to the continuous reading time reaching a fourth set duration, the rendering system is instructed to switch to the eye-protection display mode of the reading interface, and / or, reduce the frequency and brightness of the dynamic effects.

14. The method according to any one of claims 1-6, wherein, The step of obtaining the target control parameters of the reading interface based on the plot status data also includes: Obtain user preference information; Based on the user preference information, the plot state data is adjusted to obtain the target plot state data; Based on the target plot state data, obtain the target control parameters for the reading interface.

15. The method according to any one of claims 1-6, wherein, The visual rendering of the reading interface based on the target control parameters includes at least one of the following: The shader running in the graphics processing unit (GPU) is invoked, and based on the background information in the target control parameters, the background color, lighting and shadow levels and atmosphere of the reading interface are rendered. Based on a programmable canvas, the background effect of the reading interface is rendered according to the particle parameters in the target control parameters; The keyframe animation is rendered using Cascading Style Sheets (CSS) based on the breathing animation parameters in the target control parameters, and a script-based scheduling mechanism is built for the keyframe animation. The page-turning animation is rendered based on the page-turning speed in the target control parameters.

16. The method according to any one of claims 1-6, wherein, The method further includes: In response to updating the reading interface based on the visual rendering results of the reading interface, ambient sounds matching the plot scene in the plot state data are played synchronously.

17. The method according to any one of claims 1-6, wherein, The method further includes: Identify the load information required for the visual rendering; In response to the load information exceeding a set load threshold, a hardware accelerator is activated to accelerate the rendering of at least a portion of the rendering tasks.

18. A display device for a literary work, wherein, The device includes: The first acquisition module is used to acquire the plot status data of the current chapter of the literary work, wherein the plot status data includes at least plot emotion data; The second acquisition module is used to acquire target control parameters of the reading interface based on the plot status data; The rendering module is used to perform visual rendering of the reading interface based on the target control parameters.

19. An electronic device, characterized in that, Including processor and memory; The processor reads executable program code stored in the memory to run a program corresponding to the executable program code, so as to implement the method as described in any one of claims 1-17.

20. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-17.

21. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-17.