A method, apparatus, device, and medium for rendering answer content

By matching the predefined rendering styles with the feature vector library, the problem of poor display of private big model answers is solved, and personalized rendering and display effects are achieved.

CN120045700BActive Publication Date: 2025-07-25HANGZHOU NEWGRAND TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510511367.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-23
Publication Date
2025-07-25
Estimated Expiration
2045-04-23

AI Technical Summary

Technical Problem

The existing answer system cannot effectively display the diverse answer content generated by private big models, resulting in poor display results.

Method used

The feature vector library determines the predefined rendering style that matches the answer content generated by the private big model and renders it. The answer content generated by the public big model adopts text rendering style.

Benefits of technology

It realizes personalized display of private big model answer content, improving the display effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120045700B_ABST
    Figure CN120045700B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, equipment and medium for rendering answer content, which relates to the field of front-end rendering technology. The method includes: obtaining a target answer to a user question; if the target answer is generated by a private large model, determining a predefined rendering style that matches the target answer through a feature vector library; rendering the target answer according to the predefined rendering style; and displaying the rendering result. Embodiments of the present invention can improve the display effect of the answer content of the large model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of front - end rendering, and particularly to a rendering method, device, equipment and medium for answer content. Background Art

[0002] With the continuous open - source of various large - language models, more and more enterprises are trying to deploy private large models locally instead of directly calling third - party general large models. For enterprises, on the one hand, local deployment can ensure that data does not leave the enterprise's firewall, thus better controlling and protecting the security and privacy of data, which is particularly important for industries with strict requirements for data security such as finance and healthcare. On the other hand, enterprises can more freely modify and expand the functions of the model without relying on external suppliers to meet specific business needs.

[0003] Compared with general large models, private large models allow access to various data resources inside the business system, and the answer forms given to user questions are more diverse, which may be a chart, a picture or a table, while the answer content given by general large models is mostly in pure text. For the diverse answer results, the existing answer systems cannot well display the answer content diversely, and the display effect of the answer content is poor. Summary of the Invention

[0004] The present invention provides a rendering method, device, equipment and medium for answer content to improve the display effect of the answer content of large models.

[0005] According to one aspect of the present invention, a rendering method for answer content is provided, including:

[0006] Obtaining a target answer to a user question;

[0007] If the target answer is generated by a private large model, determining a predefined rendering style matching the target answer through a feature vector library;

[0008] Rendering the target answer according to the predefined rendering style;

[0009] Displaying the rendering result.

[0010] According to another aspect of the present invention, a rendering device for answer content is provided, including:

[0011] An obtaining module, configured to obtain a target answer to a user question;

[0012] A determining module, configured to, if the target answer is generated by a private large model, determine a predefined rendering style matching the target answer through a feature vector library;

[0013] A rendering module for rendering the target answer according to the predefined rendering style;

[0014] A display module for displaying the rendering result.

[0015] According to another aspect of the present invention, there is provided a computer program product including a computer program which, when executed by a processor, implements the rendering method of the answer content according to any embodiment of the present invention.

[0016] According to another aspect of the present invention, there is provided an electronic device including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the rendering method of the answer content according to any embodiment of the present invention.

[0017] According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement the rendering method of the answer content according to any embodiment of the present invention when executed.

[0018] In the embodiments of the present invention, by predefining different rendering styles, after obtaining the answer content of the large model, the rendering style matching the answer content is used to render and display the answer content, realizing the personalized display of the answer content and the corresponding page, and improving the display effect of the answer content of the large model.

[0019] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can also obtain other drawings based on these drawings without creative efforts.

[0021] Figure 1 is a flowchart of a rendering method of an answer content according to an embodiment of the present invention;

[0022] Figure 2 is a flowchart of a rendering method of an answer content according to another embodiment of the present invention;

[0023] Figure 3 It is a schematic diagram of the steps for constructing a menu structure tree provided by another embodiment of the present invention;

[0024] Figure 4 It is a schematic diagram of the steps for page replay provided by another embodiment of the present invention;

[0025] Figure 5 It is a schematic structural diagram of a rendering device for answer content provided by another embodiment of the present invention;

[0026] Figure 6 It is a schematic structural diagram of an electronic device for implementing the embodiment of the present invention. Detailed implementation manners

[0027] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0028] It should be noted that the terms "first", "second", etc. in the present invention are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.

[0029] Figure 1 It is a flowchart of a method for rendering answer content provided by an embodiment of the present invention. This embodiment is applicable to the situation of diversely rendering the answer content obtained by a question-and-answer system based on a private large model and a public large model after obtaining the answer content to the user's question. This method can be executed by a rendering device for answer content, and this device can be implemented in the form of hardware and / or software. This device can be configured in an electronic device with corresponding data processing capabilities, such as a question-and-answer system. As Figure 1 shown, this method includes:

[0030] S110. Obtain the target answer to the user's question.

[0031] S120. If the target answer is generated by a private large model, determine a predefined rendering style that matches the target answer through the feature vector library.

[0032] S130. Render the target answer according to the predefined rendering style;

[0033] S140. Display the rendering result.

[0034] Among them, at least two pre-stored vectors are stored in the feature vector library, and each pre-stored vector corresponds to a predefined rendering style, which is expressed by the formula as follows: V = {v1, v2,..., vn}. V represents the feature vector library, v1 - vn respectively represent different pre-stored vectors, and n ≥ 2.

[0035] Specifically, when the user logs in to the Q&A system and opens the AI robot function, first judge whether the rendering engine has been built in the current system. If not, start building the rendering engine. If it has been built, perform initialization (for example, automatically identify the theme color of the current interface, set the theme color of the current interface as the theme color of the large model interface, and make it 80% transparent. For the content area, deepen the color by one dimension to realize the automatic display of the large model interface), and prompt the user that they can start entering questions. After the user enters a question, the Q&A system calls the corresponding private / public large model to obtain the target answer. For example, it first tries to call the private large model to answer the user's question through internal knowledge. If the private large model cannot give a credible answer, the system will try to call the public large model to answer the user's question using external knowledge on the network platform. For the obtained target answer, the system first determines the source of the target answer.

[0036] If the target answer is generated by a private large model, it means that the answer content comes from internal private knowledge and is not suitable for rendering in a pure text style. According to the data description of the answer content, generate the corresponding target vector, and match the target vector with the pre-stored vectors in the feature vector library to determine the predefined rendering style suitable for the target answer. Load the rendering template according to the predefined rendering style, and fill in the target answer to complete the rendering of the answer content. After the rendering is completed, display the rendering result to the user.

[0037] In the embodiments of the present invention, by predefining different rendering styles, after obtaining the answer content of the large model, the rendering style matching the answer content is used to render and display the answer content, realizing the personalized display of the answer content and the corresponding page, and improving the display effect of the answer content of the large model.

[0038] Based on the above embodiments, optionally, after obtaining the target answer to the user's question, it further includes:

[0039] If the target answer is generated by a public large model, render the target answer using the text rendering style and display the rendering result.

[0040] Specifically, if the target answer is generated by a public large model, the target answer generated by the public large model is usually pure text content. In this case, there is no need to refer to the predefined rendering style, and the target answer can be directly rendered and displayed according to the conventional text rendering style. That is, whether the target answer is generated by a public large model or a private large model, the system needs to determine the matching rendering style and then perform the rendering. However, for the target answer generated by the public large model, its matching relationship is unique and fixed, and it only matches the text rendering style. In other words, the text rendering style can be regarded as a special predefined rendering style.

[0041] Figure 2 FIG. is a flowchart of a method for rendering answer content provided by another embodiment of the present invention. This embodiment is optimized and improved on the basis of the above embodiment. As Figure 2 shown, the method includes:

[0042] S210. Obtain the target answer to the user's question.

[0043] S220. If the target answer is generated by a private large model, describe the target answer to obtain the target vector of the target answer; match the target vector with the pre-stored vectors in the feature vector library one by one.

[0044] S230. If there is a pre-stored vector whose similarity to the target vector is greater than the threshold, determine the rendering style associated with the pre-stored vector as the predefined rendering style matching the target answer; if there is no pre-stored vector whose similarity to the target vector is greater than the threshold, determine the target data type of the target answer according to the data object hierarchy of the target answer, and determine the default rendering style of the target data type as the predefined rendering style matching the target answer.

[0045] Among them, the data object (json) hierarchy reflects the data structure of the target answer, such as a nested structure or a flattened structure.

[0046] Specifically, obtain the description information of the target answer (such as extracting variables with two-way binding of html tags, service path information of requests, etc.), extract features from the description information to obtain the target vector of the target answer. Through a pre-set similarity comparison algorithm (such as the cosine similarity algorithm), match the target vector with the pre-stored vectors in the feature vector library one by one to determine the similarity between the target vector and each pre-stored vector. Determine whether there is a pre-stored vector with a similarity greater than a threshold (such as 0.8). If there is only one, directly determine the pre-defined rendering style corresponding to this pre-stored vector as the pre-defined rendering style matching the target answer. If there are multiple (such as 3), then determine the pre-defined rendering style corresponding to the pre-stored vector with the highest similarity to the target vector as the pre-defined rendering style matching the target answer. If there is none, determine the data structure of the target answer according to the data object hierarchy of the target answer, and then determine the target data type corresponding to this data structure (such as table data or chart data). For example, if the target answer is nested structured, it means that the target answer may be more suitable to be represented by a chart, then the target data type is the icon data type; if the target answer is flattened, it means that the target answer may be more suitable to be represented by a table, then the target data type is the table data type. And determine the default rendering style prepared for this target data type as the pre-defined rendering style matching the target answer.

[0047] Optionally, based on the above embodiments, optionally, before determining the pre-defined rendering style matching the target answer through the feature vector library, it further includes:

[0048] Replay the pages in the business system to obtain the page metadata and page types of each page;

[0049] For each page, generate the pre-defined rendering style of the current page according to the page metadata and page type of the current page;

[0050] Determine the pre-stored vector of the current page according to the page metadata and put the pre-stored vector into the feature vector library.

[0051] Among them, the private large model is trained according to the private knowledge in the business system.

[0052] Specifically, according to the menu structure tree of the business system, the pages contained in the business system are replayed and inferred one by one to obtain the page metadata and page type of each page. The predefined rendering style applicable to the current page is determined based on the page data metadata and page type, and the predefined rendering style is stored. Subsequently, the variables of the bidirectional binding of the display html tag and the requested service path are extracted based on the page metadata, and the variables, paths, and predefined rendering types applicable to the current page are vectorized to obtain the pre-stored vector of the current page, and the pre-selected vector is placed in the feature vector library.

[0053] Based on the above embodiment, optionally, the replaying of the page of the business system to obtain the page metadata and page type of the page includes:

[0054] Build a menu structure tree based on the menu list of the business system;

[0055] For each menu node of the menu structure tree, a target routing address is determined according to a menu path and a menu identifier of the menu node, and a page corresponding to the target routing address is replayed to obtain page metadata and page type of the page.

[0056] Specifically, Figure 3 As shown, the menu list of the business system is extracted, and the intent of all menus in the menu list is recognized to identify menu types such as reports, lists, details, and charts. During the recognition process, a menu structure tree container is established to store the menu structure tree. First, for menu nodes that clearly appear with keywords such as add, delete, and edit, they are removed from the menu structure tree; secondly, for menus in the menu structure tree container that have no value in the path, they are marked as unknown, and for those with values, they are marked as menus, and finally a reasonable menu structure tree is obtained. As shown Figure 4 As shown, for each menu node in the menu structure tree, the routing list of the front-end code is extracted according to its menu path and menu identifier to determine the target routing address. The page pointed to by the target routing address is replayed to obtain the metadata of the page, and the page type of the page is inferred accordingly.

[0057] An exemplary reasoning path is as follows:

[0058] 1) During page replay, if 3 or more echarts logos appear in the page extraction, the current path is automatically identified as the large screen, and the rendering style extraction of the large screen begins. First, the HTML element to which echarts is attached is located, and the entire HTML sub-element and the object creation code of echars are extracted based on the HTML element ID as the key. Based on the two-way binding variable relationship of the element, the server request path of the variable is inferred as the page metadata, and the page type is identified as a chart.

[0059] 2) In page replay, if there are matching buttons for operations such as query, addition, and modification on the page, locate this function as a management function. At the same time, according to the menu node, check whether there are child nodes that are unknown. If so, further infer the page opened by the click event of the child node for reasoning; for the interface determined to be a management function, extract the table elements of this interface and the two-way binding URL of the table data as page metadata, and mark the page type as a table.

[0060] 3) In page replay, if there are a large number of table elements, locate it as a report function, extract the table elements of this interface and the two-way binding URL of the table data as page metadata, and mark the page type as a table.

[0061] Based on the above embodiments, optionally, the generating of the predefined rendering style of the current page according to the page metadata and page type of the current page includes:

[0062] If it is determined according to the page metadata that there are total items in the current page, then generate the predefined rendering style of the current page by combining the total items and the page type;

[0063] If it is determined according to the page metadata that there are no total items in the current page, then generate the predefined rendering style of the current page according to the page type.

[0064] Specifically, total items usually carry summary or total information, which is crucial for users to understand the overall data trend. Therefore, when generating the predefined rendering style of the current page, it is necessary to first determine according to the page metadata that there are no total items in the current page. If not, the predefined rendering style of the current page can be directly generated according to the page type. If so, the predefined rendering style of the current page needs to be generated by combining the total items and the page type.

[0065] An exemplary generation logic is as follows:

[0066] 1) For the table type, the table style needs to be determined according to the HTML elements. If the table is a pure table, parse the table style and the defined elements of HTML, generate a predefined rendering style with two rows and one column and save it, with the type being a table. Insert it into UILIB with the type being a table. If it is found that there are also total items in the table, parse the table style and the defined elements of HTML, generate a predefined rendering style with two rows and one column, and at the same time, according to the total item style, append the style of the total row to the predefined rendering style, with the total added at the top and bottom, and then save it, with the type being a table + total.

[0067] 2) Chart type: For charts, mainly determine whether all charts have a total item, extract the total style if it exists, as well as the style color of Echarts, obtain the chart types of all Echarts through the public large model, and generate the style of a single chart and the predefined rendering style of the chart + summary and save them.

[0068] S240. Render the target answer according to the predefined rendering style.

[0069] S250. Display the rendering result.

[0070] In the embodiment of the present invention, by extracting page metadata and determining the page type according to page replay, the integrity of page metadata and the classification accuracy of page types are improved.

[0071] Figure 5 It is a schematic structural diagram of a rendering device for answer content provided by another embodiment of the present invention. As Figure 5 shown, the device includes:

[0072] An acquisition module 310, configured to acquire the target answer to the user's question;

[0073] A determination module 320, configured to, if the target answer is generated by a private large model, determine a predefined rendering style that matches the target answer through a feature vector library;

[0074] A rendering module 330, configured to render the target answer according to the predefined rendering style;

[0075] A display module 340, configured to display the rendering result.

[0076] The rendering device for answer content provided by the embodiment of the present invention can execute the rendering method for answer content provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method.

[0077] Optionally, the determination module 320 includes:

[0078] A description unit, configured to describe the target answer to obtain the target vector of the target answer;

[0079] A matching unit, configured to match the target vector with the pre-stored vectors in the feature vector library one by one;

[0080] A first determination unit, configured to, if there is a pre-stored vector whose similarity to the target vector is greater than a threshold, determine the rendering style associated with the pre-stored vector as the predefined rendering style that matches the target answer;

[0081] A second determination unit, configured to, if there is no pre-stored vector whose similarity to the target vector is greater than a threshold, determine the target data type of the target answer according to the data object level of the target answer, and determine the default rendering style of the target data type as a predefined rendering style matching the target answer.

[0082] Optionally, the apparatus further includes:

[0083] A replay module, configured to replay pages in a business system to obtain page metadata and page types of each page;

[0084] A predefined module, configured to, for each page, generate a predefined rendering style of the current page according to the page metadata and page type of the current page;

[0085] A storage module, configured to determine a pre-stored vector of the current page according to the page metadata, and put the pre-stored vector into a feature vector library.

[0086] Optionally, the replay module is specifically configured to: construct a menu structure tree according to a menu list of a business system; for each menu node of the menu structure tree, determine a target routing address according to the menu path and menu identifier of the menu node, and replay the page corresponding to the target routing address to obtain the page metadata and page type of the page.

[0087] Optionally, the predefined module is specifically configured to: if it is determined according to the page metadata that there is a total item in the current page, generate a predefined rendering style of the current page by combining the total item and the page type; if it is determined according to the page metadata that there is no total item in the current page, generate a predefined rendering style of the current page according to the page type.

[0088] Optionally, the apparatus further includes:

[0089] A text rendering module, configured to, if the target answer is generated by a public large model, render the target answer through a text rendering style and display the rendering result.

[0090] The rendering apparatus for further explaining the answer content can also execute the answer content rendering method provided in any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution of the method.

[0091] Figure 6The structural schematic diagram of an electronic device 40 that can be used to implement the embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are only examples and are not intended to limit the implementation of the present invention described herein and / or claimed.

[0092] As Figure 6 shown, the electronic device 40 includes at least one processor 41, and a memory communicatively connected to the at least one processor 41, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc. The memory stores a computer program executable by the at least one processor. The processor 41 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 42 or the computer program loaded from the storage unit 48 into the random access memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the electronic device 40 can also be stored. The processor 41, the ROM 42, and the RAM 43 are connected to each other via a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.

[0093] A plurality of components in the electronic device 40 are connected to the I / O interface 45, including: an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as various types of displays, speakers, etc.; a storage unit 48, such as a magnetic disk, an optical disk, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0094] The processor 41 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 41 executes the various methods and processes described above, such as the rendering method of the answer content.

[0095] In some embodiments, the method for rendering the answer content can be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed onto the electronic device 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the method for rendering the answer content described above can be performed. Alternatively, in other embodiments, the processor 41 may be configured to execute the method for rendering the answer content by any other suitable means (e.g., by means of firmware).

[0096] The various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), systems on a chip (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that receives data and instructions from a storage system, at least one input device, and at least one output device, and transmits the data and instructions to the storage system, the at least one input device, and the at least one output device.

[0097] The computer programs for implementing the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer programs are executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer programs can be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

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

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

[0100] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0101] A computing system may include a client and a server. The client and the server are generally far from each other and usually interact via a communication network. The relationship between the client and the server is created by computer programs running on respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, solving the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.

[0102] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is made herein.

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

Claims

1. A rendering method for answer content, characterized in that, The method includes: Obtaining a target answer to the user's question; If the target answer is generated by a private large model, determining a predefined rendering style matching the target answer through a feature vector library; Rendering the target answer according to the predefined rendering style; Displaying the rendering result; Wherein, the determining a predefined rendering style matching the target answer through a feature vector library includes: Describing the target answer to obtain a target vector of the target answer; Sequentially matching the target vector with the pre-stored vectors in the feature vector library; If there is a pre-stored vector whose similarity to the target vector is greater than the threshold, determining the rendering style associated with the pre-stored vector as the predefined rendering style matching the target answer; If there is no pre-stored vector whose similarity to the target vector is greater than the threshold, determining the target data type of the target answer according to the data object hierarchy of the target answer, and determining the default rendering style of the target data type as the predefined rendering style matching the target answer; Wherein, the construction of the feature vector library includes: Replaying the pages in the business system to obtain the page metadata and page types of each page; For each page, generating a predefined rendering style for the current page according to the page metadata and page type of the current page; Determining a pre-stored vector for the current page according to the page metadata, and putting the pre-stored vector into the feature vector library; Wherein, the replaying of the pages in the business system includes: Constructing a menu structure tree according to the menu list of the business system; For each menu node of the menu structure tree, determining a target routing address according to the menu path and menu identifier of the menu node, and replaying the page corresponding to the target routing address to obtain the page metadata and page type of the page; Wherein, after obtaining the target answer to the user's question, it further includes: If the target answer is generated by a public large model, rendering the target answer through a text rendering style and displaying the rendering result.

2. The method according to claim 1, characterized in that, Generating the predefined rendering style includes: If it is determined according to the page metadata that there is a total item in the current page, generating the predefined rendering style of the current page by combining the total item and the page type; If it is determined according to the page metadata that there is no total item in the current page, generating the predefined rendering style of the current page according to the page type.

3. A rendering device for answer content, characterized in that, The device includes: An obtaining module, configured to obtain a target answer to the user's question; A determining module, configured to, if the target answer is generated by a private large model, determine a predefined rendering style matching the target answer through a feature vector library; A rendering module, configured to render the target answer according to the predefined rendering style; A displaying module, configured to display the rendering result; Wherein, the determining module includes: A describing unit, configured to describe the target answer to obtain a target vector of the target answer; A matching unit, configured to sequentially match the target vector with the pre-stored vectors in the feature vector library; A first determination unit, configured to, if there exists a pre-stored vector whose similarity to the target vector is greater than a threshold, determine the rendering style associated with the pre-stored vector as a predefined rendering style matching the target answer; A second determination unit, configured to, if there does not exist a pre-stored vector whose similarity to the target vector is greater than a threshold, determine the target data type of the target answer according to the data object hierarchy of the target answer, and determine the default rendering style of the target data type as a predefined rendering style matching the target answer; A replay module, configured to replay the pages in the business system to obtain the page metadata and page types of each page; A predefined module, configured to, for each page, generate a predefined rendering style of the current page according to the page metadata and page type of the current page; A storage module, configured to determine a pre-stored vector of the current page according to the page metadata, and put the pre-stored vector into a feature vector library; The replay module is specifically configured to: construct a menu structure tree according to the menu list of the business system; for each menu node of the menu structure tree, determine a target routing address according to the menu path and menu identifier of the menu node, and replay the page corresponding to the target routing address to obtain the page metadata and page type of the page; A text rendering module, configured to, if the target answer is generated by a public large model, render the target answer through a text rendering style and display the rendering result.

4. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the rendering method of the answer content described in any one of claims 1-2.

5. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a processor to implement the rendering method of the answer content described in any one of claims 1-2 when executed.

Citation Information

Patent Citations

  • Database query method and device based on natural language and electronic equipment

    CN118535679A

  • Large model interaction page rendering method and system, electronic equipment and storage medium

    CN119396950A