All-weather RAG intelligent agent automatic newspaper design method and device and electronic equipment

Through the all-weather RAG intelligent automatic newspaper design method, using multi-level tree structure and vectorization technology, combined with personalized vector database and basic LLM model, automatic intelligent newspaper design is realized, solving the inflexible and inadequate automatic design in the existing technology. The issue of limitations of large models.

CN119476247AActive Publication Date: 2025-02-18ZHEJIANG FANGZHENG PRINTING CO LTD

Patent Information

Application Number
CN202510066713.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-16
Publication Date
2025-02-18
Estimated Expiration
2045-01-16

AI Technical Summary

Technical Problem

The prior art cannot realize automatic intelligent newspaper design around the clock, and the large model has limitations in information acquisition and private knowledge processing.

Method used

Using the all-weather RAG agent automatic newspaper design method, a multi-level tree structure (RAPTOR tree) is constructed by obtaining the newspaper category and layout information selected by the user, and using the Agent design and abstract design of vectorization, clustering and thinking chains to automatically design newspapers. Generate layout. This method combines the personalized vector database in the private domain container and the basic LLM model of the common domain for training.

Benefits of technology

It realizes automatic newspaper design around the clock, improves the accuracy and personalization of the design, and solves the limitations of large models in real-time and private knowledge processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119476247A_ABST
    Figure CN119476247A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of data processing, and provides an all-weather RAG intelligent agent automatic newspaper design method and device and electronic equipment. A preset newspaper design generation model in the method is obtained by taking a personalized vector database configured in a private domain container as a training set and training a basic LLM large model and a basic text graph model based on a public domain. The personalized vector database at least stores a propagation design reading template conforming to the content of the user newspaper, after the newspaper category selected by the user and the page information input by the user are obtained, article semantics obtained by the page information can be understood, a multi-layer tree structure is constructed through an RAPTOR tree, and the content of the user newspaper can be obtained. And inputting the layout information into the multi-layer tree structure, and automatically designing a newspaper generation layout based on vectorization, clustering and thinking chain Agent design and abstract matched with the output layout information, thereby realizing all-weather automatic newspaper design.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method, device and electronic equipment based on an all-weather RAG intelligent agent automatic newspaper design. Background Art

[0002] With the continuous advancement of AI technology, users have higher expectations for the immediacy, accuracy and personalization of information acquisition. The challenge for designers is how to use design thinking, thinking chains and AI technology to help users obtain information more efficiently, while creating new functions with intelligent perception. In the news publishing scenario, large models are also used. Make full use of layout space, optimize design effects, enhance reader interaction and immersive experience, and create a focused and pleasant reading atmosphere. However, sometimes the output of large models is not the result required by users, and the accuracy is not high. The limitations of large models are also reflected in the lack of real-time performance and the inability to obtain private knowledge, which also limits the implementation of large models in various scenarios.

[0003] For example, CN 112001154 proposes a printing typesetting system and method based on AI automatic typesetting design of newspaper layouts. The system can calculate the spatial difference in the number of words for each candidate template through AI deep reinforcement learning, compare the difference sizes of different candidate templates, and finally select the template with the smallest difference as the best template. In this way, the printed output newspaper design panel can be generated through AI automatic typesetting design, and then enter the printing link for mass production, thereby improving production efficiency.

[0004] However, existing technologies only select the best templates for AI to refer to, and AI cannot automatically and intelligently perform layout design around the clock.

[0005] RAG can help solve the problem of private knowledge and enable better integration of private layout knowledge base and AI big model. Summary of the invention

[0006] In order to solve or partially solve the problems existing in the related art, the present application proposes a method, device and electronic equipment for automatic newspaper design by RAG intelligent body around the clock, which can automatically design and generate newspapers around the clock.

[0007] The first aspect of the present application provides a method for all-weather RAG agent automatic newspaper design, which is applied to the RAG agent, and the method comprises: Get the newspaper category selected by the user; Receiving layout information input by a user based on a selected newspaper category; the layout information at least includes layout text information, layout image, layout text area and layout image area; Based on understanding the article semantics obtained from the layout information, a multi-level tree structure is constructed using a RAPTOR tree; the multi-level tree structure newspaper has a tree-like summary index structure from the bottom layer to the top layer; The layout text information, layout image, layout text area and layout image area are input into the multi-level tree structure, and the newspaper generation layout is automatically designed based on the Agent design and summary of the vectorization, clustering, and thought chain that match the output layout information; wherein the preset newspaper design generation model is obtained after training based on the personalized vector database configured in the private domain container as a training set and the basic LLM large model and basic text map model based on the public domain, and the personalized vector database at least stores the communication design reading template.

[0008] The second aspect of the present application provides a device for automatic newspaper design of an all-weather RAG agent, which is applied to a RAG agent, and the device comprises: An acquisition unit, used for acquiring a newspaper category selected by a user; A receiving unit, used to receive layout information input by a user based on a selected newspaper category; the layout information at least includes layout text information, layout image, layout text area and layout image area; A construction unit, based on understanding the article semantics obtained from the layout information, constructs a multi-level tree structure using a RAPTOR tree; the multi-level tree structure newspaper has a tree summary index structure from the bottom layer to the top layer; An input unit, used for inputting the layout text information, layout image, layout text area and layout image area into the multi-level tree structure, and automatically designing the newspaper layout based on the vectorization, clustering, Agent design and summary of the thought chain matching the output layout information; An output unit, used for outputting a target layout based on the newspaper layout generation and a preset newspaper design generation model; Among them, the preset newspaper design generation model is obtained after training based on the personalized vector database configured in the private domain container as a training set and the basic LLM large model and basic text graph model based on the public domain. The personalized vector database at least stores a communication design reading template that conforms to the content of the user's newspaper.

[0009] The third aspect of the present application provides an electronic device, 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, and the instructions are executed by the at least one processor so that the at least one processor can execute the method of all-weather RAG intelligent agent automatic newspaper design as described above.

[0010] The technical solution provided by this application may have the following beneficial effects: The present application provides a method, device and electronic device for all-weather RAG agent automatic newspaper design. The preset newspaper design generation model in the method is obtained after training based on a personalized vector database configured in a private domain container as a training set and a basic LLM large model and a basic text map model based on a public domain. The personalized vector database at least stores a communication design reading template that conforms to the content of the user's newspaper. After obtaining the user's selected newspaper category and input layout information, the article semantics obtained from the layout text information can be understood, a multi-level tree structure can be constructed with a RAPTOR tree, the layout information can be input into the multi-level tree structure, and the Agent design and summary of the vectorization, clustering, and thinking chain that match the output layout information can be used to automatically design the newspaper generation layout, thereby realizing all-weather automatic newspaper design. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The above and other objects, features and advantages of the present application will become more apparent by describing in more detail exemplary embodiments of the present application in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments of the present application.

[0012] Figure 1 It is a flow chart of a method for all-weather RAG agent automatic newspaper design disclosed in an embodiment of the present application; Figure 2 It is a flow chart of an application of a method for all-weather RAG intelligent agent automatic newspaper design disclosed in an embodiment of the present application; Figure 3 It is a structural schematic diagram of a device for all-weather RAG intelligent agent automatic newspaper design disclosed in an embodiment of the present application; Figure 4 It is a schematic diagram of the structure of an electronic device disclosed in an embodiment of the present application. DETAILED DESCRIPTION

[0013] The embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to make the present application more thorough and complete, and to fully convey the scope of the present application to those skilled in the art.

[0014] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0015] It should be understood that although the terms "first", "second", "third", etc. may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0016] Traditional newspaper design requires human participation, and in news publishing, newspapers designed by people with different experiences present completely different layouts, and their appeal to readers is also quite different. Therefore, the prior art provides relevant technical solutions using AI automatic typesetting, which can automatically select appropriate templates to output newspaper design layouts. However, the existing automatic typesetting is not flexible enough, cannot adjust its own behavior to achieve its goals, does not have learning ability, and cannot achieve all-weather automatic newspaper design.

[0017] The newspaper in the embodiment of the present application may refer to newspapers and periodicals, which can be printed or published in electronic form or physical form.

[0018] In the embodiments of the present application, AI Agents are introduced. AI Agents is a more advanced artificial intelligence system that can perform complex tasks and make decisions with minimal human guidance. It uses complex machine learning models (usually including deep learning and reinforcement learning) to process and analyze data from different channels.

[0019] AI Agents are able to understand context, learn from interactions, and adjust their behavior to achieve specific goals. Unlike simpler systems, AI Agents can handle ambiguity, make autonomous decisions, and execute multi-step plans to solve complex problems, making them suitable for more challenging and open-ended tasks.

[0020] The embodiment of the present application adapts the search technology to the artificial intelligence entity.

[0021] Screening of search results: The results of the user's question search need to be screened and sorted to select a limited part of the content instead of presenting all the results to the user. This process is called ranking, which mainly involves the sorting algorithm of the search results; content, area recognition (structural layout processing), extraction, and segmentation of search results: The search results contain documents and web pages in formats such as PDF, and the content needs to be identified and extracted. The technologies that may be involved in identifying and extracting content include OCR, document structuring, and the recognition capabilities of the large model itself; after extraction, the content needs to be segmented. Due to the limitation of the context length of the large model, it is impossible to submit all the content to the model. Some segmentation methods and algorithms are involved here; the embodiment of this application introduces the RAPTOR tree. The difference between the RAPTOR tree and other search technologies is mainly reflected in the multi-level tree structure it constructs. RAPTOR constructs a tree index structure from the bottom to the top by recursively vectorizing, clustering, and summarizing text fragments.

[0022] Through vector retrieval, the contents of the private content layout library that are most similar to the user's requirements can be obtained. Even if the user's requirements do not contain keywords, the "content layout containing the answer" can be searched through semantic relevance.

[0023] Compared with other data structures, the RAPTOR tree is unique in that it captures high-level and low-level details of the text by recursively building a tree structure of the document, supporting multi-step reasoning and complex queries. The RAPTOR tree segments the text by fixed-length tokens. It divides the retrieval content layout library into short text (abstract) blocks of 100 tokens in length. If a sentence exceeds the limit of 100 tokens, the entire sentence will be retained intact in the next text block to maintain the context and semantic consistency of the text. This segmentation method facilitates the subsequent embedding, clustering, and summarization of text blocks, thereby constructing a RAPTOR tree with a multi-level structure.

[0024] The RAPTOR tree segment length is fixed to 100 tokens. The construction of the RAPTOR tree starts by segmenting the retrieval corpus into short texts of length 100 tokens. If the sentence exceeds the limit of 100 tokens, the entire sentence is moved to the next block to maintain the context and semantic consistency of the text.

[0025] These texts are then embedded using SBERT, with the text blocks and their corresponding SBERT embeddings forming the leaf nodes of a tree structure. Similar text blocks are then grouped, a clustering algorithm is applied, and the grouped text is summarized using a language model. These summarized texts are re-embedded, and the cycle of embedding, clustering, and summarization continues until further clustering becomes infeasible, resulting in a multi-level tree representation of the original document.

[0026] The clustering algorithm of RAPTOR tree selects the appropriate clustering algorithm according to the characteristics of the data, such as K-Means, DBSCAN or hierarchical clustering. For RAPTOR tree, due to the high dimensionality and complexity of text data, it may be necessary to combine the advantages of multiple algorithms. The Monte Carlo method used in dynamic data processing is a method of solving problems through random sampling simulation. By generating random numbers and establishing a probability model, numerical problems that are difficult to solve by other methods can be solved.

[0027] The present invention can include the following parts to construct a private domain system RAG: Language Model: Using RAG Use tools such as Large Language Models (LLM) to seamlessly combine the power of information retrieval with natural language generation. Learning refers to the conversion of data such as text and images into mathematical vectors that can capture the semantic information and area information behind the original data. Learning and retrieval techniques are two technologies that work together. This is a pre-trained model that can generate text based on a given context. In RAG, the language model uses the retrieved information to generate more accurate and rich designs.

[0028] External classified personalized private domain knowledge base: This is a database or document collection containing classified personalized newspaper layouts with a large amount of information, which is structured data, unstructured text or multimodal content. The information in the private domain layout knowledge base is stored in vector form, which is convenient for fast retrieval and matching.

[0029] Retrieval mechanism: This component is responsible for retrieving relevant information fragments when the language model is generated. Retrieval technology is the process of using these vectorized data to efficiently find similar content. The retrieval mechanism usually uses embedding technology. The entire operation mechanism is to first search its own layout knowledge base, and then return the closest result to the user through vector operations. Compare the input of the language model with the entries in the layout knowledge base to find the most relevant part.

[0030] Integration and training: The images are processed with computer photo editing tools for basic color adjustment and retouching. The retrieval component and language model are integrated for end-to-end training or fine-tuning to optimize the performance of the entire system.

[0031] Use simple keyword-based search and then use cosine similarity to select the most relevant paragraphs. First, make sure you have the necessary libraries installed, such as torch and transformers.

[0032] The starting point of a RAG system is generally a layout library of text documents, which is a technique that uses external data to improve the accuracy and reliability of LLM. The text is then split into chunks, and these chunks are then embedded into vectors with the transformer encoder model, all of these vectors are indexed, and finally an LLM understanding is created, telling the model to recognize the query, given the context found in the search step. At runtime, the vectorization of the recognition query is completed with the same encoder model, and then this query vector is executed.

[0033] The process of implementing RAG can be divided into three steps.

[0034] In the application, you need to prepare the document data required by the layout library and upload this data to the layout library. At this time, the uploaded data will be vectorized by the "Embedding Model", which is a process that converts the text content into a language that the computer can understand.

[0035] After conversion, it is stored in a specific database, which is usually called a "vector database".

[0036] When a user enters a piece of text, the text will also be vectorized by the "embedding model"; The computer then performs a similarity match between the content entered by the user and the content in the vector database to find the most relevant document content in the database.

[0037] There are some optimization techniques in the matching process, the most common one is ANN, Approximate Nearest Neighbor (ANN).

[0038] Combine the matched information with the user input information (this involves some preprocessing, such as enabling the model to distinguish between user input information and retrieved knowledge); then input the processed information into the model to generate a comprehensive design. As you can understand, the output includes not only the text, but also the relevant reference sources.

[0039] RAG can solve the problem of private layouts. It uses an external layout library to allow the large model to identify related issues in the private library based on the retrieved content. This is the so-called retrieval enhancement, and its purpose is also to improve certainty.

[0040] To address the real-time problem, through Actions or Function Calling (function calling, understood as interface callback), the big model can call search, map, and even the API implemented by the enterprise in real time to obtain various required real-time information (including data collection, data processing, feature extraction, model training, model prediction, data analysis, etc., as well as their impact and value on the user's reading experience and content dissemination effect. Such as clicks, browsing, staying, sliding, jumping, collecting, liking, commenting, sharing, etc. These data reflect the user's interest and preference in the layout content, as well as the user's reading habits and reading effect.

[0041] Content feature data refers to the basic information and features of layout content, such as theme, style, structure, emotion, quality, length, format, type, font, font size, color label, etc. These data can reflect the nature and value of layout content, as well as the differences and similarities of layout content. The value data of layout content refers to the effect of layout content, such as page views, click-through rate, conversion rate, rate of return, retention rate, and spread rate. These data can reflect the attractiveness and influence of layout content, as well as the contribution and benefits of layout content.

[0042] There are many channels and methods for data collection. For example, the platform's own log system, tracking system, monitoring system, etc. can be used to record and collect user behavior data and the value data of layout content in real time; through third-party data service providers, data platforms, data exchanges, etc., user attribute data and feature data of layout content can be obtained and supplemented; through users' active feedback, questionnaires, interviews, etc., user behavior data and attribute data can be obtained and verified; through active annotation of layout content, layout content analysis, layout content mining, etc., feature data and value data of layout content can be obtained and verified.

[0043] The purpose of data collection is to build personalized portraits of users and layout content, so as to provide users with the most suitable content layout display for them. The principle of data collection is to collect as much, as complete, as accurate and as new as possible, so as to improve the coverage, completeness, accuracy and timeliness of data. The difficulty of data collection is to solve the problems of data security, legality, privacy, ethics, etc., so as to protect the rights and dignity of users and layout content. Based on artificial intelligence technology and big data analysis, it provides accurate and efficient reader acquisition solutions for design. Reduce the problem of inaccurate output results.

[0044] RAG's advantages: Since RAG technology enhances the design quality of the model by retrieving the existing layout knowledge base, the output quality of the model can be improved without retraining the model (LLM).

[0045] RAG-generated layouts can be accompanied by corresponding citation sources, allowing users to easily verify the accuracy of the model design, thereby increasing trust in the model output.

[0046] By retrieving information from the layout knowledge base, the possibility of model output errors can be effectively reduced, and specific layout knowledge and prompts can be used to meet the customized needs of different industries or users. The layout knowledge base can be updated in real time, making it easier for the model to call the latest information and data. This is especially important for fields that require real-time access to the latest information.

[0047] Layout design must consider the visual movement path when the user looks at the design layout. For example, when the user looks at the design layout, the user's visual focus is on the order of different positions on the design layout. This movement order is called the visual movement path (eye trackers are used to provide data support to determine the feasibility of the design plan, etc.).

[0048] There are seven common visual moving lines: linear moving line, diagonal moving line, circular moving line, Z-shaped moving line, F-shaped moving line, focusing moving line, and progressive moving line.

[0049] Linear flow is the arrangement of design elements along a straight line, with the purpose of guiding the reader's eyes to move along this path. This layout is usually simple and effective, helping readers quickly obtain information and is suitable for a variety of design occasions.

[0050] In the layout design of paper media articles, titles, text and pictures are usually arranged along a vertical linear structure to make the reading experience better. Focusing lines guide readers' attention by emphasizing specific elements, so that they focus on the key content in the design. This layout usually ensures that readers visually prioritize the most important information through contrast, size, color and position. Progressive lines gradually guide readers' eyes in the design, usually through changes in the size, color, shape or layout of elements, so that readers' attention moves along a gradual path. This layout can help readers gradually obtain information and enhance the visual hierarchy.

[0051] RAPTOR recursively clusters text blocks based on vectors and generates text summaries of these clusters, thereby building a tree from the bottom up. Selection is based on metrics such as reading volume, author, interaction volume, relevance, etc.

[0052] Please continue to see Figure 1 , Figure 1 It is a flow chart of a method for automatic newspaper design by an all-weather RAG intelligent agent disclosed in an embodiment of the present application.

[0053] The method provided in the embodiment of the present application is applied to a RAG agent. The method may include the following steps.

[0054] S100: Obtain the newspaper category selected by the user.

[0055] S200, receiving layout information input by a user based on a selected newspaper category; the layout information at least includes layout text information, layout image, layout text area and layout image area.

[0056] S300, based on understanding the article semantics obtained from the layout information, construct a multi-level tree structure using the RAPTOR tree; the multi-level tree structure newspaper has a tree-like summary index structure from the bottom to the top, such as an expert system, a Bayesian network, and other multi-level tree structures.

[0057] S400, inputting the layout text information, layout image, layout text area (content, title) and layout image area (identification) into the multi-level tree structure and vectorizing them, and automatically designing the newspaper layout based on the vectorization, clustering, and Agent design of the thinking chain matching the output layout information; S500, outputting a target layout based on the newspaper layout generation and a preset newspaper design generation model; Among them, the preset newspaper design generation model is obtained after training based on the personalized vector database configured in the private domain container as a training set and the basic LLM large model and basic text graph model based on the public domain. The personalized vector database at least stores a communication design reading template that conforms to the content of the user's newspaper.

[0058] In the embodiment of the present application, the user selects a newspaper category, which may include daily newspaper, evening newspaper, metropolitan newspaper, business newspaper, enterprise newspaper, etc.

[0059] An embodiment of the present application may be a software tool that is self-developed and connected to a backend cloud server cluster, and provides an input and output interface. The user can input layout information based on the input interface of the software tool. Among them, the layout information may be prompt words related to news reports, comments, special reports, sports news, financial information, life services, entertainment news, weather forecasts, etc. The layout information includes layout text information and layout images, and the layout text information is arranged in order of headlines, two, three, etc. The layout image corresponds to the layout text information, that is, the headline corresponds to a layout image, the two correspond to a layout image, and so on, and the layout text area of ​​the layout text information and the layout image area corresponding to the layout image can be input. Among them, the above two areas may include length, width and coordinates.

[0060] It is understandable that the above layout information input by the user can be input based on experience, and the above headlines, second headlines and corresponding images are set manually based on historical experience, so that the subsequent preset newspaper design generation model can design and generate the target layout based on the relatively consistent with the user's needs.

[0061] This application can build a multi-level tree structure with the RAPTOR tree, identify the sequential headlines, second articles, third articles, etc., and understand the article semantics. By recursively vectorizing, clustering, and summarizing text fragments, a tree-like summary index structure from the bottom to the top is constructed. A large number of news photos are uploaded, and the system automatically screens them according to common aesthetic standards, tags them, and indexes them in a tree-like summary. It recommends the best photos that are suitable for the article semantics, or uploads similar reference templates (weighted first). By understanding the article semantics, the RAG agent combines the layout structure, color, fonts, and picture layout structure with graphic design principles to ensure that each layout element can complement the image of the personalized newspaper style, and conducts intelligent design (understanding semantic vectorization, clustering, and summary generation, matching the layout precipitation, layout design style, and structural roles summarized by historical predecessors. Learning includes RAPTOR recursively clustering text blocks according to vectors and generating text summaries of these clusters, thereby building a tree from the bottom up (daily newspapers, evening newspapers, metropolitan newspapers, business newspapers, enterprise newspapers, etc.). Nodes clustered together are sibling nodes; the parent node contains the text summary of the cluster. This structure enables RAPTOR to load context blocks representing different levels of text into the LLM Context, so that it can effectively and efficiently intelligently design and match layouts at different levels. For example, if the text and the contrasting text have the same content, the result is designed, and then the layout design features are optimized using the rules of graphic design, namely the golden section. Understand the semantics of the article and recursively vectorize, cluster and generate summaries of text fragments.

[0062] The layout information is designed in sequence (first page, second page, third page, etc.) and the content element information is input into the RAPTOR tree based on the retrieval enhanced RAG technology to construct a multi-level tree structure vectorization, clustering and summary, and the vectorization, clustering and summary matching the information are obtained to automatically design the newspaper generation layout to realize automatic typesetting design.

[0063] Based on the layout generation information, the target layout is outputted in the newspaper design generation model (the language reasoning and decision-making tasks of diversified newspaper layout designs are solved by combining reasoning and acting in the language content element model).

[0064] The RAPTOR tree constructs a multi-level tree structure for vectorization, clustering and summarization as the personalized vector database. Each cluster and summary corresponds to at least one category. This structure not only captures the high-level theme of the document, but also retains the low-level details, allowing nodes to be grouped based on semantic similarity rather than just text order. In contrast, traditional search techniques can often only retrieve short, continuous blocks of text, making it difficult to fully understand the context of the entire document. In addition, the RAPTOR tree also provides two retrieval strategies: tree traversal and folding tree, which can more effectively handle complex queries and multi-step reasoning tasks. Each design template under each category can be sorted based on the real-time access data of each template; After the target template is determined based on the template selection operation, a complex agent is constructed that integrates LLM, workflow, knowledge base, and API plug-in. AI Agents use continuous learning algorithms and adaptive models that evolve with each interaction (recognition). These systems are able to infer ways to deal with unfamiliar scenarios based on past experience and adjust their methods based on user feedback. By using technologies such as reinforcement learning and transfer learning, agents can expand their capabilities on different topics and become more flexible and efficient. Update the current layout to the automatically designed generated layout.

[0065] In the embodiments of this application, it is also necessary to consider the physical world interaction and design a simple method for combining multimodal interactions, through the processes that humans experience during the physical world interaction process: how humans perceive, understand, decide and act. These processes are the core building blocks of all multimodal experiences.

[0066] In the embodiment of the present application, dynamic real-time data can be obtained and applied to the design framework of AI Agents, which can include multiple planning and reflection techniques, LATS. LATS uses the Monte Carlo Tree Search (MCTS) algorithm to find the optimal decision path by balancing exploration and exploitation.

[0067] In the embodiment of the present application, a reference newspaper layout can also be added.

[0068] In the application, the software tool can obtain the reference newspaper layout added by the user; then the newspaper layout and area identification generation information and the reference newspaper layout and area parameters are sent to the preset newspaper design generation model, i.e., newspaper layout and area generation model, so that the newspaper layout generation model controls the typesetting design parameters of the generation result based on the reference newspaper layout area parameters; the typesetting design parameters are used to typeset the theme, logo, spacing, font size, text, and area in the newspaper layout. The area parameters include specific length and width parameters.

[0069] In the embodiment of the present application, it also includes: Receiving a user's modification operation on a certain newspaper layout element in the target layout; the newspaper layout element includes a title, a body and a background; Determining the modification mode of the newspaper layout element by the modification operation; The newspaper layout element is modified based on the modification method; the modification method includes calling the newspaper layout generation model to rewrite text or adjust the newspaper layout of the target element.

[0070] In the embodiment of the present application, after the target layout is generated, the layout elements can continue to be modified, such as receiving the user's modification operation on a newspaper layout element in the target layout based on the order of the headline, two to N pieces of information (including text, pictures), and the modification operation on the title, theme, and background. The newspaper layout generation model can be called to rewrite the text or adjust the newspaper layout of the target element.

[0071] Please continue to see Figure 2 , Figure 2 It is a flow chart of the application of a method for automatic newspaper design of an all-weather RAG intelligent agent disclosed in an embodiment of the present application.

[0072] In the application, users can input layout information and select newspaper categories. Then, the information is input into the RAG large model capable of semantic understanding, information retrieval and enhanced generation. The model combines article content, dynamic data (such as which layouts have performed well in recent reader views, likes and comments) and a large number of candidate reference templates in the historical excellent layout database to generate the most suitable layout set that meets semantic and aesthetic standards based on aesthetic standards (such as the golden ratio).

[0073] If there is a specified layout sample, the agent can also combine the sample to generate the optimal layout structure set and the attributes of each news element (such as news title font size, image size, etc.), and the typesetting system such as latex generates the final layout.

[0074] It can be seen that in order to ensure that the output target layout and each layout of the newspaper are more attractive in the embodiment of the present application, the layout-related information input by the user, such as layout text information, layout image, layout text area and layout image area, etc., is allowed to be understood by the intelligent agent. After understanding and constructing a multi-level tree structure, the newspaper generation layout can be output based on the structure tree, and the final target layout can be output based on the preset newspaper design generation model, so that the newspaper is more conducive to readers' reading.

[0075] Corresponding to the aforementioned method embodiments, the present application also discloses corresponding device embodiments.

[0076] See also Figure 3 , Figure 3This is a schematic diagram of the structure of a device for all-weather RAG intelligent body automatic newspaper design disclosed in an embodiment of the present application.

[0077] The embodiment of the present application discloses a device for all-weather RAG agent automatic newspaper design, comprising: An acquisition unit 31 is used to obtain a newspaper category selected by a user; The receiving unit 32 is used to receive the layout information input by the user based on the selected newspaper category; the layout information at least includes layout text information, layout image, layout text area and layout image area; A construction unit 33 is used to construct a multi-level tree structure with a RAPTOR tree based on the article semantics obtained by understanding the layout information; the multi-level tree structure newspaper has a tree summary index structure from the bottom layer to the top layer; An input unit 34 is used to input the layout text information, layout image, layout text area and layout image area into the multi-level tree structure, and automatically design the newspaper layout based on the vectorization, clustering, Agent design of the thinking chain and the summary matching the output layout information; An output unit 35 is used to output a target layout based on the newspaper layout generation and a preset newspaper design generation model; Among them, the preset newspaper design generation model is obtained after training based on the personalized vector database configured in the private domain container as a training set and the basic LLM large model and basic text graph model based on the public domain. The personalized vector database at least stores a communication design reading template that conforms to the content of the user's newspaper.

[0078] The implementation process of each module in the device in the present application can refer to the implementation methods of each step in the aforementioned method embodiment, which will not be described in detail here.

[0079] The present application also provides an electronic device, see Figure 4 , Figure 4 The electronic device 1000 includes a memory 1010 and a processor 1020 .

[0080] The processor 1020 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0081] The memory 1010 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. Among them, ROM can store static data or instructions required by the processor 1020 or other modules of the computer. The permanent storage device may be a readable and writable storage device. The permanent storage device may be a non-volatile storage device that does not lose the stored instructions and data even after the computer is powered off. In some embodiments, the permanent storage device uses a large-capacity storage device (such as a magnetic or optical disk, flash memory) as a permanent storage device. In some other embodiments, the permanent storage device may be a removable storage device (such as a floppy disk, optical drive). The system memory may be a readable and writable storage device or a volatile readable and writable storage device, such as a dynamic random access memory. The system memory may store some or all instructions and data required by the processor at run time. In addition, the memory 1010 may include any combination of computer-readable storage media, including various types of semiconductor storage chips (such as DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical disks may also be used. In some embodiments, the memory 1010 may include a readable and / or writable removable storage device, such as a laser disc (CD), a read-only digital versatile disc (such as a DVD-ROM, a double-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (such as an SD card, a mini SD card, a Micro-SD card, etc.), a magnetic floppy disk, etc. The computer-readable storage medium does not include carrier waves and transient electronic signals transmitted wirelessly or wired.

[0082] The memory 1010 stores executable codes, and when the executable codes are processed by the processor 1020 , the processor 1020 can execute part or all of the methods described above.

[0083] In addition, the method according to the present application may also be implemented as a computer program or a computer program product, which includes computer program code instructions for executing some or all of the steps in the above method of the present application.

[0084] Alternatively, the present application can also be implemented as a computer-readable storage medium (or non-transitory machine-readable storage medium or machine-readable storage medium) on which executable code (or computer program or computer instruction code) is stored. When the executable code (or computer program or computer instruction code) is executed by a processor of an electronic device (or server, etc.), the processor executes part or all of the steps of the above-mentioned method according to the present application.

[0085] The embodiments of the present application have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A method for all-weather RAG agent automatic newspaper design, characterized in that: Applied to a RAG agent, the method comprises: Get the newspaper category selected by the user; Receiving layout information input by a user based on a selected newspaper category; the layout information at least includes layout text information, layout image, layout text area and layout image area; Based on understanding the article semantics obtained from the layout information, a multi-level tree structure is constructed using a RAPTOR tree; the multi-level tree structure newspaper has a tree-like summary index structure from the bottom layer to the top layer; Input the layout text information, layout image, layout text area and layout image area into the multi-level tree structure, and automatically design the newspaper layout based on the vectorization, clustering, thought chain agent design and summary matching the output layout information; Outputting a target layout based on the newspaper layout generation and a preset newspaper design generation model; Among them, the preset newspaper design generation model is obtained after training based on the personalized vector database configured in the private domain container as a training set and the basic LLM large model and basic text graph model based on the public domain. The personalized vector database at least stores a communication design reading template that conforms to the content of the user's newspaper.

2. The method according to claim 1, characterized in that Also includes: Receiving dynamic real-time data of the target layout; The target layout is designed and modified based at least on the dynamic real-time data.

3. The method according to claim 1, characterized in that: The multi-level tree structure vectorization, clustering and summary constructed by the RAPTOR tree are the personalized vector database, each of the clusters and summaries corresponds to at least one category, and each design template under each category can be sorted based on the real-time access data of each template; the multi-level tree structure includes tree traversal and folding tree retrieval strategies.

4. The method according to claim 1, characterized in that: In the multi-level tree structure, the nodes clustered together are brother nodes, and the parent node is the newspaper text summary, so that the multi-level tree structure can be loaded into the context of the basic LLM large model to facilitate the output of layouts at different levels.

5. The method according to claim 1, characterized in that The method further comprises: Obtaining the reference newspaper page added by the user; Then, based on the newspaper generated layout and the preset newspaper design generation model, the target layout is output, including: sending the newspaper generated layout, area recognition generation information and the reference newspaper layout and area parameters to the preset newspaper design generation model, so that the newspaper layout generation model controls the typesetting design parameters of the generated result based on the reference newspaper layout area parameters; the typesetting design parameters are used to perform typesetting design on the theme, logo, spacing, font size, text and area in the newspaper layout.

6. The method according to claim 1, characterized in that The method further comprises: Receiving a user's modification operation on a certain newspaper layout element in the target layout based on the order of the headline, two to N pieces of information; the newspaper layout elements include the title, the main body and the background; Determining a modification mode of the newspaper layout element in the modification operation; The newspaper layout element is modified based on the modification method; the modification method includes calling the newspaper layout generation model to rewrite text or adjust the newspaper layout of the target element.

7. The method according to claim 2, characterized in that The dynamic real-time data is used to control the newspaper layout generation information and layout structure adjustment output by the preset newspaper design generation model.

8. A device for all-weather RAG agent automatic newspaper design, characterized in that: Applied to RAG intelligent agent, the device comprises: An acquisition unit, used for acquiring a newspaper category selected by a user; A receiving unit, used to receive layout information input by a user based on a selected newspaper category; the layout information at least includes layout text information, layout image, layout text area and layout image area; A construction unit, based on understanding the article semantics obtained from the layout information, constructs a multi-level tree structure using a RAPTOR tree; the multi-level tree structure newspaper has a tree summary index structure from the bottom layer to the top layer; An input unit, used for inputting the layout text information, layout image, layout text area and layout image area into the multi-level tree structure, and automatically designing the newspaper layout based on the vectorization, clustering, Agent design and summary of the thought chain matching the output layout information; An output unit, used for outputting a target layout based on the newspaper layout generation and a preset newspaper design generation model; Among them, the preset newspaper design generation model is obtained after training based on the personalized vector database configured in the private domain container as a training set and the basic LLM large model and basic text graph model based on the public domain. The personalized vector database at least stores a communication design reading template that conforms to the content of the user's newspaper.

9. An electronic device, 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, and the instructions are executed by the at least one processor so that the at least one processor can execute a method for all-weather RAG intelligent agent automatic newspaper design as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Statistical report generation method and system based on large language model

    CN117875296A

  • Intelligent agent recommendation method and device and computer readable storage medium

    CN118964590A

Cited By

  • Information storage method, retrieval method and question answering method

    CN120336479A

  • Multi-path legal inference engine based on MCP protocol

    CN120764667A

  • Multi-path legal reasoning engine based on mcp protocol

    CN120764667B

  • Newspaper picture color optimization intelligent model construction method

    CN121437762A