Large model multi-modal output display method and device
By acquiring and parsing initial data and using large models to generate multi-modal output display methods, it solves the problem that existing technology cannot meet the multi-modal needs of professional reports, achieves flexible and efficient image rendering, and supports the display of complex data. .
Patent Information
- Application Number
- CN202410766829.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-06-14
AI Technical Summary
Existing large language models can no longer meet the needs of professional reports that require more elements in terms of mixed output of text, pictures, and videos, such as tables, data charts, maps, formulas, and other multi-modal data output displays.
By obtaining the initial data, input the large model to obtain the target data, parse the data based on the extraction rules and parser, draw the target image, support the analysis of Markdown format text, JS code and DOM object data, determine the asynchronous loading of plug-ins, and carry out Image rendering to display multimodal content.
It enhances the flexibility and diversity of large model output, improves image drawing efficiency and success rate, supports the display of complex charts and maps, and solves the problem of slow rendering speed of Markdown output under big data.
Smart Images

Figure CN118733799A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the field of big data technology, and in particular to a method for multimodal output display of a large model. Background Art
[0002] With the successive launch of large language models such as ChatGPT, Stable Diffusion, and Sora, large language models (LLM) can not only output text, but also images and even videos. The combination of multiple models can generate relatively novel and rich materials in the form of illustrated blogs, promotional materials, etc., so most of the current products can achieve mixed output of text, images, and videos.
[0003] However, as people explore the capabilities of general large models, the mixed layout of text, pictures, and videos cannot meet the requirements. In addition to text and pictures, some professional reports require more elements, such as tables, data charts, maps, formulas, etc. Therefore, how to support multi-modal data output and display has become one of the primary problems facing large model products. Therefore, a better solution is urgently needed. Summary of the invention
[0004] In view of this, the embodiments of this specification provide a large model multimodal output display method. One or more embodiments of this specification also involve a large model multimodal output display device, a computing device, a computer-readable storage medium and a computer program to solve the technical defects existing in the prior art.
[0005] According to a first aspect of an embodiment of this specification, a large model multimodal output display method is provided, comprising:
[0006] Obtain initial data, and input the initial data into the large model to obtain target data;
[0007] Extract target data based on extraction rules and determine parsed data;
[0008] Based on the parsed data, the target image is drawn and displayed.
[0009] In a possible implementation, obtaining initial data and inputting the initial data into a large model to obtain target data includes:
[0010] Determine text data based on initial data, input the text data into the big model, and obtain target data; wherein the target data is in Markdown format.
[0011] In a possible implementation, extracting target data based on extraction rules to determine parsed data includes:
[0012] Determine comparison data based on the extraction rules, and determine a target parser based on comparing the comparison data with the target data;
[0013] The target data is parsed based on the target parser to determine the parsed data.
[0014] In a possible implementation, parsing the target data based on the target parser to determine the parsed data includes:
[0015] Determine the set character based on the target parser;
[0016] Parsing the target data based on the set characters to obtain parsed data; wherein the parsed data includes JS code data and DOM object data.
[0017] In a possible implementation, drawing a target image based on parsed data and displaying the target image includes:
[0018] Determine whether there is an asynchronous loading plug-in and determine the plug-in loading result;
[0019] According to the plug-in loading result, the target image is drawn based on the parsed data and displayed.
[0020] In a possible implementation, the target image is drawn based on the parsed data according to the plug-in loading result, and the target image is displayed, including:
[0021] When the plug-in loading result is that there is no asynchronous loading plug-in, image rendering is performed based on the parsed data to obtain a target image, and the target image is displayed.
[0022] In a possible implementation, the target image is drawn based on the parsed data according to the plug-in loading result, and the target image is displayed, including:
[0023] When the plug-in loading result indicates that there is an asynchronously loaded plug-in, image rendering is performed based on the parsed data to obtain an initial rendered image;
[0024] Acquire third-party system data, perform image rendering based on the third-party system data and the initial rendered image, obtain a target image, and display the target image.
[0025] According to a second aspect of the embodiments of this specification, a large model multimodal output display device is provided, comprising:
[0026] A data processing module is configured to obtain initial data and input the initial data into a large model to obtain target data;
[0027] A data parsing module is configured to extract target data based on extraction rules and determine parsed data;
[0028] The image drawing module is configured to draw a target image based on the parsed data and display the target image.
[0029] According to a third aspect of an embodiment of this specification, a computing device is provided, including:
[0030] Memory and processor;
[0031] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the above-mentioned large model multi-modal output display method are implemented.
[0032] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the above-mentioned large model multimodal output display method are implemented.
[0033] According to a fifth aspect of the embodiments of this specification, a computer program is provided, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned large model multimodal output display method.
[0034] The embodiments of this specification provide a large model multimodal output display method and device, wherein the large model multimodal output display method includes: obtaining initial data, inputting the initial data into the large model to obtain target data; extracting the target data based on extraction rules, determining parsed data; drawing a target image based on the parsed data, and displaying the target image. By obtaining initial data, inputting the initial data into the large model to obtain target data; extracting the target data based on extraction rules, determining parsed data; drawing a target image based on the parsed data, and displaying the target image, the flexibility and diversity of the large model output data can be enhanced, thereby facilitating image drawing, improving drawing efficiency, and increasing the success rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is a flowchart of a large model multimodal output display method provided by an embodiment of this specification;
[0036] Figure 2 It is a schematic diagram of a large model multimodal output display method provided by an embodiment of this specification;
[0037] Figure 3 It is a structural schematic diagram of a large-model multi-modal output display device provided by an embodiment of this specification;
[0038] Figure 4 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION
[0039] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.
[0040] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a" and "the" used in one or more embodiments of this specification 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 in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0041] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, 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 one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0042] First, the terms involved in one or more embodiments of this specification are explained.
[0043] JS: JavaScript is a lightweight, interpreted or just-in-time compiled programming language with function priority.
[0044] DOM: Document Object Model, is a programming interface for web documents. It represents the page so that programs can change the structure, style, and content of the document. DOM represents the document as nodes and objects; in this way, programming languages can interact with the page.
[0045] Markdown: is a lightweight markup language.
[0046] At present, large models are basically output in Markdown format. Markdown itself supports the output of text, pictures, and tables, and some extensions support the output of rich text such as charts and videos. When using Markdown output, all formats are fixed and have a zero-tolerance design. Due to the illusion and randomness of large models, it is extremely difficult to output large models in a fixed format and completely correct output. In addition, Markdown supports formats such as text, pictures, tables, videos, and links, but cannot support flexible third-party application forms such as charts and maps. Markdown is a single-compilation design structure, so all data and formats need to be rendered at once. This results in a slow or even crashed Markdown document if it has a large amount of data (more than 2,000 lines) showing charts or tables.
[0047] Therefore, in this specification, a large model multimodal output display method is provided. This specification also involves a large model multimodal output display device, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.
[0048] See also Figure 1 , Figure 1 A flowchart of a large model multimodal output display method provided according to an embodiment of the present specification is shown, which specifically includes the following steps.
[0049] Step 101: Obtain initial data, and input the initial data into the large model to obtain target data.
[0050] In a possible implementation, initial data is obtained, and the initial data is input into a large model to obtain target data, including: determining text data based on the initial data, inputting the text data into the large model, and obtaining target data; wherein the target data is in Markdown format.
[0051] In actual applications, users can ask questions to the big model, that is, give the big model tasks, such as: What is the driving route of vehicle A today? Figure 2 ,Based on this task, the big model retrieves the vehicle’s route data and outputs the data in Markdown format.
[0052] Step 102: Extract target data based on extraction rules to determine parsed data.
[0053] In a possible implementation, target data is extracted based on extraction rules to determine parsed data, including: determining comparison data based on the extraction rules, determining a target parser based on comparing the comparison data with the target data; and parsing the target data based on the target parser to determine parsed data.
[0054] In actual applications, the big model understands that the output format of echarts is in json format, including: title, text, xAxis, yAxis, series and other modules. Problems with the format of these modules will cause rendering failure. In the embodiments of this manual, all these attributes are built-in, and you only need to pay attention to the data part. Examples are described as follows.
[0055] :::pie{"title":"My skills","key":["java","python","scala"],"value":[100,60,70,70]}:::;
[0056] Among them, "pie" is a kind of comparison data. If "pie" exists in the data, the corresponding target parser can be used to parse the subsequent data to obtain the parsed data of "pie".
[0057] See also Figure 2 ,The target parser can also include video format, audio format, map format and Echarts format parsers.
[0058] In a possible implementation, the target data is parsed based on the target parser to determine the parsed data, including: determining set characters based on the target parser; parsing the target data based on the set characters to obtain the parsed data; wherein the parsed data includes JS code data and DOM object data.
[0059] Using the above example, the corresponding setting character of the parser of the type "pie" is "pie", then the "pie" character is searched from the Markdown format data, and after it is found, the corresponding data is formatted to obtain parsed data. The formats of the parsed data can include html, css, js, json and other formats.
[0060] It should be noted that the parser can also be extended. The custom parser determines which parser to use according to the xxx in ":::xxx". The parser can finally return a DOM object + JS code in HTML.
[0061] Step 103: Draw a target image based on the parsed data, and display the target image.
[0062] Specifically, based on the parsed data, a target image is drawn and displayed, including: determining whether there is an asynchronously loaded plug-in and determining the plug-in loading result; and drawing the target image based on the parsed data according to the plug-in loading result, and displaying the target image.
[0063] In one possible implementation, a target image is drawn based on parsed data according to the plug-in loading result, and the target image is displayed, including: when the plug-in loading result is that there is no asynchronously loaded plug-in, image rendering is performed based on the parsed data to obtain the target image, and the target image is displayed.
[0064] In actual applications, if there is no requirement for asynchronous data conversion, that is, there is no asynchronous loading of plug-ins, then the data can be rendered directly, images can be generated, and displayed.
[0065] In another possible implementation, a target image is drawn based on parsed data according to the plug-in loading result, and the target image is displayed, including: when the plug-in loading result is that there is an asynchronously loaded plug-in, image rendering is performed based on the parsed data to obtain an initial rendered image; third-party system data is obtained, image rendering is performed based on the third-party system data and the initial rendered image to obtain the target image, and the target image is displayed.
[0066] In actual applications, data can also be obtained asynchronously, so the large model can set an id for each data return, for example:::pie{"id":"xxxxxxxxxxxxx"}:::, after the parser obtains the id, it uses the asynchronous interface to obtain data, and the obtained data is {"key":["java","python","scala"],"value":[100,60,70,70]}. Render the graph after obtaining the data.
[0067] For example, when asking the big model what is the route of vehicle A today? After the big model outputs the data in Markdown format, the target parser converts the data into data encapsulated in html, css, js and json, see Figure 2 , determine whether there is an asynchronous loading plug-in. If so, set the id for the data, obtain the data output by the large model through the id, perform preliminary rendering, and then retrieve the data from the map software to match the route with the map. Figure 1 The target image is obtained by drawing at the same time, and the target image is displayed.
[0068] The embodiments of this specification provide a large model multimodal output display method and device, wherein the large model multimodal output display method includes: obtaining initial data, inputting the initial data into the large model to obtain target data; extracting the target data based on extraction rules, determining parsed data; drawing a target image based on the parsed data, and displaying the target image. By obtaining initial data, inputting the initial data into the large model to obtain target data; extracting the target data based on extraction rules, determining parsed data; drawing a target image based on the parsed data, and displaying the target image, the flexibility and diversity of the large model output data can be enhanced, thereby facilitating image drawing, improving drawing efficiency, and increasing the success rate.
[0069] Furthermore, in some scenarios, powerful display plug-ins can be encapsulated by using html+css+js+json. This enhances the flexibility and diversity of large model outputs. For example, map components can be encapsulated based on amap to support querying running trajectories. In big data scenarios, the use of asynchronous and secondary compilation methods can solve the problems of complex charts and slow rendering speeds.
[0070] Corresponding to the above method embodiment, this specification also provides a large model multi-modal output display device embodiment, Figure 3 FIG. 1 shows a schematic diagram of a large-scale multi-modal output display device provided by an embodiment of the present specification. Figure 3 As shown, the device comprises:
[0071] The data processing module 301 is configured to obtain initial data and input the initial data into the large model to obtain target data;
[0072] The data parsing module 302 is configured to extract the target data based on the extraction rules and determine the parsed data;
[0073] The image drawing module 303 is configured to draw a target image based on the parsed data and display the target image.
[0074] In a possible implementation, the data processing module 301 is further configured to:
[0075] Determine text data based on initial data, input the text data into the big model, and obtain target data; wherein the target data is in Markdown format.
[0076] In a possible implementation, the data parsing module 302 is further configured to:
[0077] Determine comparison data based on the extraction rules, and determine a target parser based on comparing the comparison data with the target data;
[0078] The target data is parsed based on the target parser to determine the parsed data.
[0079] In a possible implementation, the data parsing module 302 is further configured to:
[0080] Determine the set character based on the target parser;
[0081] Parsing the target data based on the set characters to obtain parsed data; wherein the parsed data includes JS code data and DOM object data.
[0082] In a possible implementation, the image drawing module 303 is further configured to:
[0083] Determine whether there is an asynchronous loading plug-in and determine the plug-in loading result;
[0084] According to the plug-in loading result, the target image is drawn based on the parsed data and displayed.
[0085] In a possible implementation, the image drawing module 303 is further configured to:
[0086] When the plug-in loading result is that there is no asynchronous loading plug-in, image rendering is performed based on the parsed data to obtain a target image, and the target image is displayed.
[0087] In a possible implementation, the image drawing module 303 is further configured to:
[0088] When the plug-in loading result indicates that there is an asynchronously loaded plug-in, image rendering is performed based on the parsed data to obtain an initial rendered image;
[0089] Acquire third-party system data, perform image rendering based on the third-party system data and the initial rendered image, obtain a target image, and display the target image.
[0090] The embodiments of this specification provide a large model multimodal output display method and device, wherein the large model multimodal output display device includes: obtaining initial data, inputting the initial data into the large model to obtain target data; extracting the target data based on extraction rules, determining parsed data; drawing a target image based on the parsed data, and displaying the target image. By obtaining initial data, inputting the initial data into the large model to obtain target data; extracting the target data based on extraction rules, determining parsed data; drawing a target image based on the parsed data, and displaying the target image, the flexibility and diversity of the large model output data can be enhanced, thereby facilitating image drawing, improving drawing efficiency, and increasing the success rate.
[0091] The above is a schematic scheme of a large-model multimodal output display device of this embodiment. It should be noted that the technical scheme of the large-model multimodal output display device and the technical scheme of the large-model multimodal output display method described above belong to the same concept, and the details not described in detail in the technical scheme of the large-model multimodal output display device can be found in the description of the technical scheme of the large-model multimodal output display method described above.
[0092] Figure 4 The block diagram of a computing device 400 according to an embodiment of the present specification is shown. The components of the computing device 400 include but are not limited to a memory 410 and a processor 420. The processor 420 is connected to the memory 410 via a bus 430, and the database 450 is used to store data.
[0093] The computing device 400 also includes an access device 440, which enables the computing device 400 to communicate via one or more networks 460. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 440 may include one or more of any type of network interface (e.g., a network interface card (NIC)) of wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, and a near field communication (NFC).
[0094] In one embodiment of the present specification, the above components of the computing device 400 and Figure 4 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 4 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0095] The computing device 400 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 400 may also be a mobile or stationary server.
[0096] Among them, the processor 420 is used to execute the following computer executable instructions, which, when executed by the processor, implement the steps of the above-mentioned large model multimodal output display method. The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above-mentioned large model multimodal output display method belong to the same concept. The details not described in detail in the technical scheme of the computing device can be found in the description of the technical scheme of the above-mentioned large model multimodal output display method.
[0097] An embodiment of the present specification also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the above-mentioned large model multimodal output display method.
[0098] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the large model multimodal output display method mentioned above belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be found in the description of the technical scheme of the large model multimodal output display method mentioned above.
[0099] An embodiment of the present specification also provides a computer program, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned large model multimodal output display method.
[0100] The above is a schematic scheme of a computer program of this embodiment. It should be noted that the technical scheme of the computer program and the technical scheme of the large model multimodal output display method mentioned above belong to the same concept, and the details not described in detail in the technical scheme of the computer program can be found in the description of the technical scheme of the large model multimodal output display method mentioned above.
[0101] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0102] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0103] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.
[0104] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0105] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is only limited by the claims and their full scope and equivalents.
Claims
1. A large model multimodal output display method, characterized in that: include: Acquire initial data, and input the initial data into a large model to acquire target data; Extract the target data based on the extraction rules to determine parsed data; Based on the parsed data, a target image is drawn and the target image is displayed.
2. The method according to claim 1, characterized in that The obtaining of initial data, and inputting the initial data into a large model to obtain target data, comprises: Determine text data based on the initial data, input the text data into the large model, and obtain target data; wherein the target data is in Markdown format.
3. The method according to claim 1, characterized in that The step of extracting the target data based on the extraction rule and determining the parsed data includes: Determine comparison data based on the extraction rule, and determine a target parser based on comparing the comparison data with the target data; The target data is parsed based on the target parser to determine parsed data.
4. The method according to claim 3, characterized in that The step of parsing the target data based on the target parser to determine parsed data includes: Determining a set character based on the target parser; The target data is parsed based on the set characters to obtain parsed data; wherein the parsed data includes JS code data and DOM object data.
5. The method according to claim 1, characterized in that Drawing a target image based on the parsed data and displaying the target image comprises: Determine whether there is an asynchronous loading plug-in and determine the plug-in loading result; According to the plug-in loading result, based on the parsed data, a target image is drawn and the target image is displayed.
6. The method according to claim 5, characterized in that The step of drawing a target image based on the parsed data according to the plug-in loading result and displaying the target image includes: When the plug-in loading result is that the asynchronous loading plug-in does not exist, image rendering is performed based on the parsed data to obtain a target image, and the target image is displayed.
7. The method according to claim 5, characterized in that The step of drawing a target image based on the parsed data according to the plug-in loading result and displaying the target image includes: When the plug-in loading result indicates that the asynchronous loading plug-in exists, performing image rendering based on the parsed data to obtain an initial rendered image; The third-party system data is obtained, image rendering is performed based on the third-party system data and the initial rendered image to obtain a target image, and the target image is displayed.
8. A large-scale multi-modal output display device, characterized in that: include: A data processing module is configured to obtain initial data, and input the initial data into a large model to obtain target data; A data parsing module is configured to extract the target data based on an extraction rule and determine parsed data; The image drawing module is configured to draw a target image based on the parsed data and display the target image.
9. A computing device, characterized in that include: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the large model multimodal output display method described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the large model multimodal output display method described in any one of claims 1 to 7.
Citation Information
Patent Citations
Client user interface updating method and device, client and server
CN114489894A
Interaction page rendering method and device, computer equipment and storage medium
CN114968241A
Data processing method and device, electronic equipment and storage medium
CN116909435A
Artificial intelligence-based report data generation method and system and storage medium
CN117370426A
Question and answer method, electronic equipment, storage medium and program product
CN117909479A
Cited By
Data rendering method, related device and computer program product
CN120874812A
