Text content processing method and device, equipment and storage medium

By generating ad content that matches the style and context of the text and consistently inserting it into the text, the problem of ad display interfering with reading is solved, thus improving the user experience.

CN121479059APending Publication Date: 2026-02-06BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511657802.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-12
Publication Date
2026-02-06

AI Technical Summary

Technical Problem

In existing technologies, displaying advertisements on text content pages can disrupt the user's reading continuity and negatively impact the user's reading experience.

Method used

Recommended resource text is generated based on the style characteristics and contextual information of the target text content, and then inserted into the text content for display, ensuring consistency with the style and layout of the main text.

Benefits of technology

Without interrupting the user's reading, the interference of ad display on reading is reduced, thus improving the user's reading experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121479059A_ABST
    Figure CN121479059A_ABST
Patent Text Reader

Abstract

The invention relates to a text content processing method and device, equipment and a storage medium, and the method comprises the steps: firstly obtaining a recommendation resource text corresponding to a target text content when a display triggering operation for the target text content is received, the recommended resource text is generated according to style features of the target text content and based on recommended resource materials and context information corresponding to the target text content, and the target text content meets a preset resource insertion condition. And then displaying the target text content, and inserting and displaying the recommended resource text in the target text content according to the format information of the target text content. According to the method, when the target text content meeting the preset resource insertion condition is triggered to be displayed, the recommended resource text generated according to the style characteristics and the context information is inserted and displayed in the target text content according to the format information of the target text content, so that the interference on user reading is greatly reduced in the process of displaying the recommended resource text; therefore, the text reading experience of the user is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a text content processing method, apparatus, device, and storage medium. Background Technology

[0002] In the field of text reading, there is often a need to display advertising content on text content pages. However, in related technologies, displaying advertising content can disrupt the user's reading continuity and negatively impact the text reading experience.

[0003] Therefore, how to display advertising content on text content pages in a way that minimizes interference with user reading is a pressing technical problem that needs to be solved. Summary of the Invention

[0004] In order to solve the above-mentioned technical problems, or at least partially solve the above-mentioned technical problems, this disclosure provides a text content processing method, apparatus, device and storage medium.

[0005] In a first aspect, embodiments of this disclosure provide a text content processing method, the method comprising: In response to a display trigger operation for target text content, recommended resource text corresponding to the target text content is obtained; wherein, the target text content meets preset resource insertion conditions, and the recommended resource text is generated based on the style characteristics of the target text content, the recommended resource materials corresponding to the target text content, and the context information in the target text content; Display the target text content, and insert the recommended resource text into the target text content according to the layout information of the target text content.

[0006] In one optional implementation, a preset recommendation identifier is displayed at the target display position corresponding to the recommended resource text inserted into the target text content. The preset recommendation identifier is used to identify the content type of the recommended resource text.

[0007] In one optional implementation, the step of obtaining the recommended resource text corresponding to the target text content in response to a display trigger operation for the target text content includes: In response to a display trigger operation for the target text content, the cache is queried to determine whether recommended resource text corresponding to the target text content is stored; wherein, the cache stores a set of recommended resource texts corresponding to the work document to which the target text content belongs; If the cache stores recommended resource text corresponding to the target text content, then the recommended resource text corresponding to the target text content is retrieved from the cache.

[0008] In an optional implementation, after the query cache determines whether it stores recommended resource text corresponding to the target text content, the method further includes: If the cache does not store the recommended resource text corresponding to the target text content, a recommended resource text request is sent to the server; wherein, the recommended resource text request is used to request the server to generate recommended resource text based on the recommended resource materials corresponding to the target text content and the context information in the target text content according to the style characteristics of the target text content; The recommended resource text returned by the server is received and used as the recommended resource text corresponding to the target text content.

[0009] In an optional implementation, before sending the recommended resource text request to the server, the method further includes: The style information of the target text content is obtained, and the style features of the target text content are extracted from the style information; wherein, the style information includes at least one of the following: content genre, person perspective, tone information, text punctuation style, text length information, and content rhythm information corresponding to the target text content; Sending the recommended resource text request to the server includes: Send a request for recommended resource text to the server, carrying contextual information from the target text content and the style features.

[0010] In one optional implementation, the recommended resource text corresponding to the target text content is determined from multiple candidate recommended resource texts based on a style relevance score, wherein the style relevance score is used to characterize the similarity between the corresponding candidate recommended resource text and the target text content in the style feature dimension; the multiple candidate recommended resource texts are determined based on the similarity between the context feature vector corresponding to the context information in the target text content and the feature vectors corresponding to the multiple pre-generated recommended resource texts respectively.

[0011] In one optional implementation, the recommended resource text corresponding to the target text content is determined from multiple candidate recommended resource texts based on style relevance score, semantic relevance score, and readability score. The semantic relevance score is used to characterize the degree of similarity between the corresponding candidate recommended resource text and the target text content in the semantic dimension, and the readability score is used to characterize the fluency of expression of the corresponding candidate recommended resource text.

[0012] In one optional implementation, the preset resource insertion conditions include at least one of the following: the presence of a transition between text structure units and the end of a text structure unit in the text content; or, the text content is displayed on the work catalog page, work details page, or work recommendation page.

[0013] In one optional implementation, the recommended resource materials include at least one of the following: selling point information of the recommended resource, summary information of the details page, image materials, and video materials.

[0014] Secondly, this disclosure also provides a text content processing apparatus, the apparatus comprising: The first acquisition module is used to acquire recommended resource text corresponding to the target text content in response to a display trigger operation for the target text content; wherein the target text content meets preset resource insertion conditions, and the recommended resource text is generated based on the recommended resource materials corresponding to the target text content and the context information in the target text content according to the style characteristics of the target text content; The first display module is used to display the target text content and insert the recommended resource text into the target text content according to the layout information of the target text content.

[0015] Thirdly, embodiments of this disclosure also provide an electronic device, the electronic device comprising: Processor; memory for storing instructions executable by the processor; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the text content processing method provided in the embodiments of this disclosure.

[0016] Fourthly, embodiments of this disclosure also provide a computer-readable storage medium storing a computer program for performing the text content processing method provided in embodiments of this disclosure.

[0017] Fifthly, this disclosure provides a computer program product comprising a computer program / instruction that, when executed by a processor, implements the method described above.

[0018] The technical solution provided in this disclosure has at least the following advantages compared with the prior art: In the text content processing method provided in this embodiment, upon receiving a display trigger operation for target text content, the method first obtains the recommended resource text corresponding to the target text content. The recommended resource text is generated based on the style characteristics of the target text content and the context information within the target text content, and the target text content meets preset resource insertion conditions. Next, the target text content is displayed, and the recommended resource text is inserted into the target text content according to its layout information. This embodiment, when triggering the display of target text content that meets the preset resource insertion conditions, inserts recommended resource text generated according to its style characteristics and context information into the target text content based on its layout information. This significantly reduces interference with user reading during the display of recommended resource text on the text content page, thereby ensuring the user's text reading experience. Attached Figure Description

[0019] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.

[0020] Figure 1 A flowchart of a text content processing method provided in this embodiment of the disclosure; Figure 2 This is a schematic diagram of a page displaying target text content provided in an embodiment of this disclosure; Figure 3 This is a schematic diagram illustrating a text content processing process provided in an embodiment of the present disclosure; Figure 4 This is a schematic diagram of the structure of a text content processing device provided in an embodiment of the present disclosure; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation

[0021] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0022] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0023] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.

[0024] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0025] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0026] In the field of text reading, especially novel reading, displaying advertising content on novel reading pages is a functional requirement. How to display advertising content on novel reading pages in a way that minimizes its impact on users' reading experience is a technical problem that urgently needs to be solved.

[0027] To address this, this disclosure provides a text content processing method. Upon receiving a display trigger operation for target text content, the method first obtains recommended resource text corresponding to the target text content. This recommended resource text is generated based on the style characteristics of the target text content and the contextual information within the target text content, ensuring the target text content meets preset resource insertion conditions. Secondly, the target text content is displayed, and the recommended resource text is inserted into the target text content according to its layout information. In this embodiment, when triggering the display of target text content that meets preset resource insertion conditions, recommended resource text generated according to its style characteristics and contextual information is inserted into the target text content according to its layout information.

[0028] As can be seen, the embodiments of this disclosure can greatly reduce interference with user reading during the display of recommended resource text on the text content page, thereby ensuring the user's text reading experience.

[0029] For ease of understanding, embodiments of this disclosure provide a text content processing method, which can be executed by a text content processing device, wherein the device can be implemented in software and / or hardware, and is generally integrated into an electronic device. Reference Figure 1 The flowchart below illustrates a text content processing method provided in this embodiment of the present disclosure, wherein the method includes: S101: In response to a display trigger operation for the target text content, obtain the recommended resource text corresponding to the target text content.

[0030] The target text content meets preset resource insertion conditions, and the recommended resource text is generated based on the style characteristics of the target text content, the recommended resource materials corresponding to the target text content, and the context information in the target text content.

[0031] The target text content in this embodiment can be text content of any genre, such as text content of a novel, text content of an article, etc. The target text content can be a page from a novel, a page from an article, etc.

[0032] The target text content can belong to any content document, and it must be text content within that document that meets the preset resource insertion conditions. These preset resource insertion conditions define the criteria for inserting recommended resource text into the text content. These conditions may include at least one of the following: the presence of transitions between text structure units and the end of a text structure unit. Alternatively, the text content may be displayed on the work's table of contents page, work details page, or work recommendation page.

[0033] Here, a text structure unit can refer to a structural unit within the text content, such as a chapter or paragraph. Transitions between text structure units can include transitions between chapters, and the end of a text structure unit can include the end of a chapter. In other words, the target text content that triggers the display can include at least one of the following: a transition between chapters or the end of a chapter. A transition between chapters refers to the boundary or transitional area between the end of the previous chapter and the beginning of the next chapter. The end of a chapter can be the end of the final chapter, such as the end page of the entire novel.

[0034] Additionally, the catalog page displays the catalog content of a work, specifically a list of all chapters. Recommended resource text can be inserted at the top, bottom, or in a safe position within the list. In other words, the target text content that triggers the display can be part of the catalog content. The work details page displays detailed information about the text work, such as its theme, summary, cover, synopsis, rating, and table of contents entry. Again, the target text content that triggers the display can be part of the work's theme, summary, cover, synopsis, rating, and table of contents entry. The recommended works page displays a list of recommended works; therefore, the target text content that triggers the display can be text from the recommended works list.

[0035] It is worth noting that the embodiments disclosed herein do not limit the specific content of the preset resource insertion conditions, and the timing of inserting recommended resource text into the text content can be defined according to needs.

[0036] In practical applications, when a display trigger operation is received for target text content that meets the preset resource insertion conditions, the recommended resource text corresponding to the target text content is first obtained and inserted for display.

[0037] In this embodiment of the disclosure, the recommended resource text refers to the descriptive text for one or more recommended resources. The recommended resource text may include advertising content in text form, used to promote one or more recommended resources.

[0038] In this embodiment, the recommended resource text corresponding to the target text content is generated based on the style characteristics of the target text content, the recommended resource materials corresponding to the target text content, and the context information in the target text content. Specifically, the style characteristics of the recommended resource text corresponding to the target text content are consistent with or highly similar to the style characteristics of the target text content. For example, if the style characteristics of the target text content indicate a humorous style, then the recommended resource text corresponding to the target text content also has a humorous style, making the inserted and displayed recommended resource text consistent with the main text (i.e., the target text content).

[0039] In addition, the recommended resource materials used to generate the recommended resource text corresponding to the target text content may include at least one of the following: selling point information of the recommended resource, details page summary information, image materials, and video materials. Selling point information includes advantages of one or more dimensions of the recommended resource, such as comfort and hygiene. Details page summary information refers to the summary description information of the recommended resource on the details page, such as color and applicable scenarios. Image materials may include images taken from multiple angles of the recommended resource, and video materials may be introductory videos taken for the recommended resource. All of the above can be used as recommended resource materials for generating recommended resource text in this embodiment of the disclosure.

[0040] In practical applications, for the same content document, such as a novel, one or more recommended resources are pre-configured. During the display of the novel content, there is a need to display the recommended resource text corresponding to each of these resources. Based on at least one of the following: selling points, details page summary information, image materials, and video materials, recommended resource text relevant to the contextual information in the target text content is generated.

[0041] In addition, the contextual information used to generate recommended resource text corresponding to the target text content can include the positional information of one or more textual structural units within the target text content, such as the paragraph number of a certain chapter on a certain page. By analyzing the text content corresponding to this contextual information, recommended resource text related to its content is generated, making the inserted recommended resource text coherent and smooth with the main text (i.e., the target text content), and not abrupt for the reader.

[0042] The recommended resource text corresponding to the target text content generated in this embodiment is generated based on the recommended resource materials pre-configured for the target text content. In particular, it is consistent with the style of the target text content and coherent with its context, thereby ensuring that the recommended resource text inserted and displayed in the target text content does not disturb the user's reading continuity and reduces the impact on the user's reading experience. In one optional implementation, the recommended resource text corresponding to the target text content can be pre-generated and stored in a cache, or it can be generated in real time after the target text content is triggered for display. This disclosure does not limit the timing of the generation of the recommended resource text corresponding to the target text content.

[0043] S102: Display the target text content, and insert the recommended resource text into the target text content according to the layout information of the target text content.

[0044] In this embodiment of the disclosure, after obtaining the recommended resource text corresponding to the target text content, the recommended resource text is inserted and displayed in the target text content according to the layout information of the target text content.

[0045] The layout information includes character spacing, indentation, line breaks, punctuation, full-width characters, etc., which are used to constrain the display layout of the recommended resource text, so that its display layout is consistent with the main text (i.e. the target text content), reducing the disturbance to the reading user.

[0046] In one optional implementation, on the page displaying the target text content, recommended resource text can be inserted at the display position of the text content corresponding to the context information in the target text content. This allows the recommended resource text to be integrated into the target text content, maintaining the coherence and smoothness of the target text content and reducing interference with the user's reading.

[0047] In another alternative implementation, recommended resource text can be displayed at any location on the page containing the target text content, such as between two paragraphs or at the end of a chapter.

[0048] In addition, to indicate the display location of the recommended resource text to the reader, this embodiment of the disclosure can also insert a preset recommendation identifier at the target display location corresponding to the displayed recommended resource text within the target text content. The preset recommendation identifier is used to identify the content type of the recommended resource text; for example, the preset recommendation identifier can be an identifier such as "promotion" or "advertisement." Specifically, the target display location corresponding to the recommended resource text can include the beginning of a line or a line position within the recommended resource text.

[0049] like Figure 2 The diagram shown is a schematic of a target text content display page provided in an embodiment of this disclosure. On the page displaying the target text content, recommended resource text 201 is inserted into the target text content with the same or similar style features and layout, so as to realize the insertion of recommended resource text without interrupting the user's reading.

[0050] In the text content processing method provided in this embodiment, upon receiving a display trigger operation for target text content, the method first obtains the recommended resource text corresponding to the target text content. The recommended resource text is generated based on the style characteristics of the target text content and the context information within the target text content, and the target text content meets preset resource insertion conditions. Next, the target text content is displayed, and the recommended resource text is inserted into the target text content according to its layout information. This embodiment, when triggering the display of target text content that meets the preset resource insertion conditions, inserts recommended resource text generated according to its style characteristics and context information into the target text content based on its layout information. This significantly reduces interference with user reading during the display of recommended resource text on the text content page, thereby ensuring the user's text reading experience.

[0051] As can be seen, the embodiments of this disclosure can insert advertising content into plain text paragraphs without interrupting the user's reading, while maintaining consistency with the style and layout of the main text.

[0052] Based on the above embodiments, this disclosure also provides a schematic diagram of text content processing, referring to... Figure 2 Specifically, the text content processing method provided in this disclosure is applied to both the client and server sides. Through data interaction between the two, it is possible to insert advertising content as plain text paragraphs without interrupting the user's reading, while maintaining consistency with the style and layout of the main text.

[0053] When the client receives a trigger operation to display target text content that meets preset resource insertion conditions, it first checks the cache to determine if recommended resource text corresponding to the target text content is stored. The cache pre-stores a set of recommended resource texts corresponding to the work document to which the target text content belongs. This set includes pre-generated recommended resource texts, each pre-generated based on materials from one or more recommended resources pre-configured for the work document. Each recommended resource text in the set corresponding to the work document can have a correspondence with different chapters within that work document; for example, each recommended resource text has a corresponding chapter identifier. This correspondence is used to determine whether the cache stores recommended resource text corresponding to the target text content.

[0054] In practical applications, caching can be deployed on the client side. By pre-storing the set of recommended resource texts corresponding to the work document to which the target text content belongs in the client's cache, it is convenient to insert and display the recommended resource texts in the set of recommended resource texts during the display of the text content in the work document.

[0055] In addition, caching can also be deployed on the server side. By pre-storing the set of recommended resource texts corresponding to the work document to which the target text content belongs in the server-side cache, it is convenient to retrieve the recommended resource texts for insertion and display from the server-side cache in a timely manner during the display of the text content in the work document.

[0056] In practical applications, if it is determined that the cache contains recommended resource text corresponding to the target text content, then the recommended resource text corresponding to the target text content is retrieved from the cache. For example, the recommended resource text with the chapter identifier corresponding to the target text content can be retrieved from the cache.

[0057] If it is determined that the recommended resource text corresponding to the target text content is not stored in the cache, that is, the cache is not hit, a recommended resource text request is sent to the server. The recommended resource text request is used to request the server to generate recommended resource text based on the style characteristics of the target text content, the recommended resource materials corresponding to the target text content, and the context information in the target text content.

[0058] In one optional implementation, before sending a request for recommended resource text to the server, the client can first obtain the style information of the target text content and extract its style features from the style information. The style information may include at least one of the following: content genre, point of view, tone information, punctuation style, text length information, and rhythm information corresponding to the target text content. Specifically, content genre is used to characterize the genre of the work to which the target text content belongs, such as a novel. Point of view is used to identify the point of view of the target text content, such as a first-person perspective. Tone information is used to characterize the overall tone of the target text content, such as a praising or laudatory tone. Punctuation style is used to characterize the punctuation usage characteristics of the target text content, such as the frequent use of exclamation marks.

[0059] In this embodiment, the recommended resource text request sent to the server carries contextual information and extracted style features from the target text content. The contextual information in the target text content may include the positional information of one or more text structural units within the target text content, such as the paragraph number of a specific chapter on a specific page. Upon receiving the recommended resource text request, the server can generate recommended resource text related to the content by analyzing the text content corresponding to the contextual information it carries.

[0060] After receiving a request for recommended resource text, the server parses the context information and style features of the target text content from the request. Based on the style features of the target text content, the server generates the recommended resource text corresponding to the target text content, along with the context information in the target text content.

[0061] In one optional implementation, after obtaining the context information from the target text content, the server obtains the context content corresponding to the context information and encodes the context content to obtain a feature vector. By performing similarity matching between this context content feature vector and the feature vectors corresponding to each recommended resource text in the recommended resource text set corresponding to the work document to which the target text content belongs, which is pre-stored in the server's cache, multiple candidate recommended resource texts with similarity scores higher than a preset threshold are identified. Then, the similarity between each candidate recommended resource text and the target text content in the style feature dimension is determined as the style relevance score of the corresponding candidate recommended resource text. The higher the style relevance score, the more consistent the styles of the two. This embodiment of the disclosure obtains candidate recommended resource texts with style relevance scores higher than a preset score as the recommended resource texts corresponding to the target text content.

[0062] In another optional implementation, the server can further determine the recommended resource text corresponding to the target text content from the semantic and fluency dimensions, based on the aforementioned style feature dimensions. Specifically, the similarity between each candidate recommended resource text and the target text content in the semantic dimension is determined as the semantic relevance score of the corresponding candidate recommended resource text. In addition, the fluency of expression of each candidate recommended resource text can be determined by the model, thereby determining the readability score of each candidate recommended resource text. The higher the readability score, the higher the fluency of expression of the corresponding candidate recommended resource text.

[0063] This embodiment combines the scores of each of the above dimensions and determines the weights according to the importance of each dimension. By using a weighted summation method, it is possible to determine the candidate recommended resource texts with high scores in the style relevance dimension, semantic relevance dimension, and readability dimension, which are then used as the recommended resource texts corresponding to the target text content.

[0064] In this embodiment, after determining the recommended resource text corresponding to the target text content, the server returns the recommended resource text to the client. Upon receiving the recommended resource text, the client uses it as the recommended resource text corresponding to the target text content. On the page displaying the target text content, the recommended resource text is inserted and displayed within the target text content according to its layout information.

[0065] The text content processing method provided in this embodiment of the present disclosure, through data interaction between the client and the server, can insert recommended resource text generated according to its style characteristics and context information into the target text content when the target text content that meets the preset resource insertion conditions is triggered to be displayed. This can greatly reduce the interference to the user's reading during the display of recommended resource text on the text content page, thereby ensuring the user's text reading experience.

[0066] To implement the above embodiments, this disclosure also proposes a text content processing apparatus. Figure 4 This is a schematic diagram of a text content processing device provided in an embodiment of the present disclosure. The device can be controlled by software and / or hardware and is generally integrated into an electronic device. Figure 4 As shown, the device includes: The first acquisition module 401 is used to acquire recommended resource text corresponding to the target text content in response to a display trigger operation for the target text content; wherein the target text content meets preset resource insertion conditions, and the recommended resource text is generated based on the recommended resource materials corresponding to the target text content and the context information in the target text content according to the style characteristics of the target text content; The first display module 402 is used to display the target text content and insert the recommended resource text into the target text content according to the layout information of the target text content.

[0067] In one optional implementation, a preset recommendation identifier is displayed at the target display position corresponding to the recommended resource text inserted into the target text content. The preset recommendation identifier is used to identify the content type of the recommended resource text.

[0068] In one optional implementation, the first acquisition module includes: The query submodule is used to respond to the display trigger operation of the target text content and query the cache to determine whether the recommended resource text corresponding to the target text content is stored; wherein, the cache stores a set of recommended resource texts corresponding to the work document to which the target text content belongs; The first acquisition submodule is used to acquire the recommended resource text corresponding to the target text content from the cache if the cache stores the recommended resource text corresponding to the target text content.

[0069] In one optional implementation, the first acquisition module further includes: The sending submodule is used to send a recommended resource text request to the server if the cache does not store the recommended resource text corresponding to the target text content; wherein, the recommended resource text request is used to request the server to generate recommended resource text based on the style characteristics of the target text content, the recommended resource materials corresponding to the target text content, and the context information in the target text content; The receiving submodule is used to receive the recommended resource text returned by the server, which serves as the recommended resource text corresponding to the target text content.

[0070] In one optional embodiment, the apparatus further includes: The second acquisition module is used to acquire style information of the target text content and extract style features of the target text content from the style information; wherein, the style information includes at least one of the following: content genre, person perspective, tone information, text punctuation, text length information, and content rhythm information corresponding to the target text content; The sending submodule is specifically used for: Send a request for recommended resource text to the server, carrying contextual information from the target text content and the style features.

[0071] In one optional implementation, the recommended resource text corresponding to the target text content is determined from multiple candidate recommended resource texts based on a style relevance score, wherein the style relevance score is used to characterize the similarity between the corresponding candidate recommended resource text and the target text content in the style feature dimension; the multiple candidate recommended resource texts are determined based on the similarity between the context feature vector corresponding to the context information in the target text content and the feature vectors corresponding to the multiple pre-generated recommended resource texts respectively.

[0072] In one optional implementation, the recommended resource text corresponding to the target text content is determined from multiple candidate recommended resource texts based on style relevance score, semantic relevance score, and readability score. The semantic relevance score is used to characterize the degree of similarity between the corresponding candidate recommended resource text and the target text content in the semantic dimension, and the readability score is used to characterize the fluency of expression of the corresponding candidate recommended resource text.

[0073] In one optional implementation, the preset resource insertion conditions include at least one of the following: the presence of a transition between text structure units and the end of a text structure unit in the text content; or, the text content is displayed on the work catalog page, work details page, or work recommendation page.

[0074] In one optional implementation, the recommended resource materials include at least one of the following: selling point information of the recommended resource, summary information of the details page, image materials, and video materials.

[0075] The text content processing apparatus provided in this embodiment, upon receiving a display trigger operation for target text content, first obtains recommended resource text corresponding to the target text content. This recommended resource text is generated based on the style characteristics of the target text content and the contextual information within the target text content, ensuring the target text content meets preset resource insertion conditions. Next, the target text content is displayed, and the recommended resource text is inserted into the target text content according to its layout information. This embodiment, by inserting recommended resource text generated according to its style characteristics and contextual information into the target text content based on its layout information when triggering the display of target text content that meets preset resource insertion conditions, can significantly reduce interference with user reading during the display of recommended resource text on the text content page, thereby ensuring the user's text reading experience.

[0076] As can be seen, the embodiments of this disclosure can insert advertising content into plain text paragraphs without interrupting the user's reading, while maintaining consistency with the style and layout of the main text.

[0077] In addition to the methods and apparatus described above, this disclosure also provides a computer-readable storage medium storing instructions that, when executed on a terminal device, cause the terminal device to implement the text content processing method described in this disclosure.

[0078] This disclosure also provides a computer program product, which includes a computer program / instruction that, when executed by a processor, implements the text content processing method described in this disclosure.

[0079] In addition, this disclosure also provides an electronic device, see [link to relevant documentation]. Figure 5 As shown, it may include: The electronic device includes a processor 501, a memory 502, an input device 503, and an output device 504. The number of processors 501 in the electronic device can be one or more. Figure 5 Taking a processor as an example. In some embodiments of this disclosure, the processor 501, memory 502, input device 503, and output device 504 can be connected via a bus or other means, wherein, Figure 5 Taking the example of a connection between China and Israel via a bus.

[0080] The memory 502 can be used to store software programs and modules. The processor 501 executes various functional applications and data processing of the electronic device by running the software programs and modules stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function, etc. In addition, the memory 502 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. The input device 503 can be used to receive input digital or character information, and to generate signal inputs related to user settings and function control of the electronic device.

[0081] Specifically in this embodiment, the processor 501 loads the executable files corresponding to the processes of one or more applications into the memory 502 according to the following instructions, and the processor 501 runs the applications stored in the memory 502 to realize the various functions of the above-mentioned electronic device.

[0082] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0083] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A text content processing method, characterized in that, The method includes: In response to a display trigger operation for target text content, recommended resource text corresponding to the target text content is obtained; wherein, the target text content meets preset resource insertion conditions, and the recommended resource text is generated based on the style characteristics of the target text content, the recommended resource materials corresponding to the target text content, and the context information in the target text content; Display the target text content, and insert the recommended resource text into the target text content according to the layout information of the target text content.

2. The text content processing method according to claim 1, characterized in that, A preset recommendation identifier is displayed at the target display position corresponding to the recommended resource text inserted into the target text content. The preset recommendation identifier is used to identify the content type of the recommended resource text.

3. The text content processing method according to claim 1, characterized in that, The step of obtaining recommended resource text corresponding to the target text content in response to a display trigger operation for the target text content includes: In response to a display trigger operation for the target text content, the cache is queried to determine whether recommended resource text corresponding to the target text content is stored; wherein, the cache stores a set of recommended resource texts corresponding to the work document to which the target text content belongs; If the cache stores recommended resource text corresponding to the target text content, then the recommended resource text corresponding to the target text content is retrieved from the cache.

4. The text content processing method according to claim 3, characterized in that, After the query cache determines whether it stores recommended resource text corresponding to the target text content, the method further includes: If the cache does not store the recommended resource text corresponding to the target text content, a recommended resource text request is sent to the server; wherein, the recommended resource text request is used to request the server to generate recommended resource text based on the recommended resource materials corresponding to the target text content and the context information in the target text content according to the style characteristics of the target text content; The recommended resource text returned by the server is received and used as the recommended resource text corresponding to the target text content.

5. The text content processing method according to claim 4, characterized in that, Before sending the recommended resource text request to the server, the method further includes: The style information of the target text content is obtained, and the style features of the target text content are extracted from the style information; wherein, the style information includes at least one of the following: content genre, person perspective, tone information, text punctuation style, text length information, and content rhythm information corresponding to the target text content; Sending the recommended resource text request to the server includes: Send a request for recommended resource text to the server, carrying contextual information from the target text content and the style features.

6. The text content processing method according to claim 5, characterized in that, The recommended resource text corresponding to the target text content is determined from multiple candidate recommended resource texts based on a style relevance score. The style relevance score is used to characterize the similarity between the corresponding candidate recommended resource text and the target text content in the style feature dimension. The multiple candidate recommended resource texts are determined based on the similarity between the context feature vector corresponding to the context information in the target text content and the feature vectors corresponding to the multiple pre-generated recommended resource texts.

7. The text content processing method according to claim 6, characterized in that, The recommended resource text corresponding to the target text content is determined from multiple candidate recommended resource texts based on style relevance score, semantic relevance score, and readability score. The semantic relevance score is used to characterize the degree of similarity between the corresponding candidate recommended resource text and the target text content in the semantic dimension, and the readability score is used to characterize the fluency of expression of the corresponding candidate recommended resource text.

8. The text content processing method according to claim 1, characterized in that, The preset resource insertion conditions include at least one of the following: the presence of transitions between text structure units and the end of a text structure unit in the text content; or, the text content is displayed on the work catalog page, work details page, or work recommendation page.

9. The text content processing method according to claim 1, characterized in that, The recommended resource materials include at least one of the following: selling points information of the recommended resources, summary information of the details page, image materials, and video materials.

10. A text content processing device, characterized in that, The device includes: The first acquisition module is used to acquire recommended resource text corresponding to the target text content in response to a display trigger operation for the target text content; wherein the target text content meets preset resource insertion conditions, and the recommended resource text is generated based on the recommended resource materials corresponding to the target text content and the context information in the target text content according to the style characteristics of the target text content; The first display module is used to display the target text content and insert the recommended resource text into the target text content according to the layout information of the target text content.

11. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store the processor's executable instructions; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the method as described in any one of claims 1-9.

12. A computer-readable storage medium, characterized in that, The storage medium stores a computer program for performing the method as described in any one of claims 1-9.

13. A computer program product, characterized in that, The computer program product includes a computer program / instruction that, when executed by a processor, implements the method as described in any one of claims 1-9.