Data display method and device based on large language model, medium and equipment

By generating interface layout information that conforms to the front-end framework through a large language model, the problem of matching structured text display with application scenarios is solved, and efficient data visualization display and user-friendly interface experience are achieved.

CN120688455AActive Publication Date: 2025-09-23BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202511179294.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-21
Publication Date
2025-09-23
Estimated Expiration
2045-08-21

AI Technical Summary

Technical Problem

In the existing technology, the display method of structured text is difficult to match with the actual application scenario, resulting in a poor reading experience for users and difficulty in highlighting key information.

Method used

By combining a large language model with prompt words, the interface layout information that conforms to the front-end framework is generated, expressed using JavaScript extended syntax JSX code, and the display interface is generated through compilation and rendering.

Benefits of technology

It improves the matching degree between interface layout information and target data, enhances the visual display of data, improves user understanding efficiency and interactive experience, lowers the technical threshold, and enables non-front-end personnel to quickly build and publish data display interfaces.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120688455A_ABST
    Figure CN120688455A_ABST
Patent Text Reader

Abstract

The invention discloses a data display method and device based on a large language model, a medium and equipment, and relates to the technical field of large language models and computers. The method comprises the following steps: receiving target data, wherein the target data is used for determining display content in a display interface; based on the target data, a big language model and cue words corresponding to the big language model, interface layout information corresponding to the target data is determined and displayed, and the interface layout information is expressed through JavaScript extension grammar JSX codes; compiling the interface layout information to obtain an executable code corresponding to the interface layout information; and performing rendering based on the executable code and the target data, and generating and displaying the display interface. Therefore, the interface layout information can be determined by guiding the large language model through the cue word based on the input target data, and the matching degree between the interface layout information and the target data can be improved to enhance visual display of the target data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical fields of computer technology and large language models, and in particular, to a data presentation method, apparatus, medium, and device based on a large language model. Background Art

[0002] Structured text (such as JSON) can effectively carry rich semantic information and is a widely used expression format in data analysis, content generation, and document writing. Related technologies allow structured text to be written into specific templates to display the data within the structured text to users. While this method displays complete data content, it can also hinder the user experience in reading and understanding key information. Summary of the Invention

[0003] This summary is provided to briefly introduce concepts that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0004] In a first aspect, the present disclosure provides a data presentation method based on a large language model, the method comprising: receiving target data, wherein the target data is used to determine display content in a display interface; Determine, based on the target data, the large language model, and the prompt word corresponding to the large language model, to display interface layout information corresponding to the target data, wherein the interface layout information is represented by JavaScript extended syntax JSX code; Compiling the interface layout information to obtain executable code corresponding to the interface layout information; Rendering is performed based on the executable code and the target data to generate and display the display interface.

[0005] In a second aspect, the present disclosure provides a data presentation device based on a large language model, the device comprising: A receiving module, configured to receive target data, wherein the target data is used to determine display content in the display interface; a determination module, configured to determine, based on the target data, the large language model, and the prompt word corresponding to the large language model, interface layout information corresponding to the target data, wherein the interface layout information is represented by JavaScript extended syntax JSX code; A compiling module, configured to compile the interface layout information to obtain executable code corresponding to the interface layout information; A rendering module is used to render based on the executable code and the target data, generate the display interface and display it.

[0006] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which implements the steps of the method described in the first aspect when executed by a processing device.

[0007] In a fourth aspect, the present disclosure provides an electronic device, comprising: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of the method described in the first aspect.

[0008] In a fifth aspect, the present disclosure provides a computer program product, comprising a computer program, which implements the steps of the method described in the first aspect when executed by a processor.

[0009] Through the above technical solution, based on the input target data, the large language model can be guided by prompt words to determine the interface layout information, which can improve the matching degree between the interface layout information and the target data, and the display content in the display interface can be reasonably arranged to enhance the visual display of the target data, highlight key information, and improve the user's overall understanding efficiency and interactive experience. In addition, the technical threshold from content generation to interface publishing can be lowered, and non-front-end personnel can also quickly build and publish interfaces for data display. In addition, by displaying the target data through the display interface, the visual hierarchy of the displayed content can be enhanced, thereby enhancing the user's reading efficiency and visual appeal to the user to a certain extent.

[0010] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale. In the drawings: Figure 1 is a flowchart of a data presentation method based on a large language model provided according to an embodiment of the present disclosure; Figure 2 is a schematic diagram of a display interface provided according to an embodiment of the present disclosure; Figure 3 is a flowchart of a data presentation method based on a large language model provided according to another embodiment of the present disclosure; Figure 4is a block diagram of a data display device based on a large language model provided according to an embodiment of the present disclosure; Figure 5 A schematic structural diagram of an electronic device suitable for implementing the embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0012] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

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

[0014] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.

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

[0016] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0017] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0018] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0019] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.

[0020] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.

[0021] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0022] At the same time, it is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0023] As described in the background, structured text can be written into a specific template for display. This process can display data content to users, but the display method and style are usually fixed and difficult to match with actual application scenarios. Based on this, the present disclosure provides the following embodiments to improve the high-quality display of data.

[0024] Figure 1 As shown in FIG, it is a flow chart of a data display method based on a large language model according to an embodiment of the present disclosure. Figure 1 As shown, the method may include: In step 11, target data is received, wherein the target data is used to determine display content in the display interface.

[0025] As an example, the target data may be structured data that the user needs to analyze and display, such as data in Markdown, JSON, etc. For example, the target data may be data in an analysis report. When browsing the target data based on the method disclosed herein, the target data may be displayed through a display interface. The display interface may include web page resources, such as web page features such as titles, charts, key annotations, and partition layouts. The display content is determined by analyzing the target data.

[0026] In step 12, based on the target data, the large language model and the prompt words corresponding to the large language model, the interface layout information corresponding to the target data is determined, wherein the interface layout information is represented by JavaScript extended syntax JSX code.

[0027] For example, you can pre-build prompts for the Large Language Model (LLM). To improve the LLM's semantic understanding of target data and produce grammatically correct and well-structured display interfaces, you can pre-configure prompts to guide the LLM in generating JSX code that complies with the front-end framework, enabling automatic generation of interface layout information.

[0028] In some possible embodiments, the prompt words corresponding to the large language model include at least one of the following types: Layout guidance sub-prompts are used by the large language model to determine the corresponding layout structure of the display interface. For example, the layout guidance sub-prompts can indicate the basic layout structure of the webpage, such as columns, information blocks, and card layouts, to guide the LLM to select the appropriate visual hierarchy and layout structure based on the content of the target data.

[0029] The style-guiding sub-prompt word is used by the large language model to determine the style corresponding to the display content in the display interface. For example, in order to enhance the LLM's perception of language semantics, the style-guiding sub-prompt word can be used to guide the LLM to automatically select the corresponding style based on the meaning of the fields in the target data, such as "conclusion", "indicator", "abnormal item", etc. The style can include fonts, colors, emphasis methods, etc. to improve the match between the display style of the display content and the content semantics of the display content.

[0030] The layout object sub-prompt is used by the large language model to determine the icon library and / or chart type library to which the layout objects in the display interface belong. For example, to prevent the use of non-existent layout objects in the LLM, the layout object sub-prompt can explicitly provide the allowed icon library and / or chart type library. This allows the LLM to determine the layout icons from the available icon library and the layout chart types from the available chart type library when generating the layout, thereby determining the availability of the generated interface layout information.

[0031] The content generation specification sub-prompt is used to indicate the constraints for content generation by the large language model. For example, to ensure the usability of interface layout information, the constraint rules can be indicated in the content generation specification sub-prompt. For example, for charts, chart construction rules can be set (such as the horizontal axis is a categorical field and the vertical axis is a numerical field). This guides the LLM to automatically extract and transform visual data from the target data to construct a well-formatted chart code snippet.

[0032] Component sub-prompts are used to indicate the page display components that can be used with the large language model and the scenario information corresponding to these page display components. For example, the component sub-prompt can clearly indicate the page display components that can be used in the prompt, and the applicable scenarios of each page display component can be explained through scenario information. This will guide the LLM to only use controlled components when generating interface layout information, avoiding illegal component calls.

[0033] The types of sub-prompt words contained in the large language model's prompt words can be configured based on actual application scenarios. This allows the target data to be analyzed in conjunction with the prompt words to obtain interface layout information that conforms to the target data's semantics and has a clear structure, thereby improving the automation level of interface generation and the quality of the generated display interface. By setting these prompt words, multiple prompt restrictions can be imposed on icons, components, chart types, and specifications. This reduces the risk of invalid or illegal code output by the LLM from the perspective of prompt words, ensuring the executable nature of the interface layout information output by the large language model.

[0034] In step 13, the interface layout information is compiled to obtain executable code corresponding to the interface layout information.

[0035] The obtained interface layout information is JSX code, which cannot be directly executed in a browser. In order to preview the display interface, in this embodiment, the interface layout information can be compiled to obtain executable code. For example, the JSX code can be compiled using a standard JavaScript compiler to obtain JS code that can be loaded by the web page.

[0036] In step 14, rendering is performed based on the executable code and the target data to generate a display interface and display it.

[0037] As an example, the rendering of the interface can be realized based on the rendering technology in this field, such as the rendering through React rendering technology to obtain and display the display interface. If the target data is the data in the analysis report, the determined interface layout information can include the titles corresponding to multiple tabs, the description of abnormal items, the line chart corresponding to indicator A and the line chart corresponding to indicator B (such as Figure 2 As shown in A4 in the figure), as well as interactive buttons for switching data units in the chart, the generated display interface is as follows Figure 2 shown.

[0038] Therefore, through the above technical solution, based on the input target data, the large language model can be guided by prompt words to determine the interface layout information, which can improve the matching degree between the interface layout information and the target data, and the display content in the display interface can be reasonably arranged to enhance the visual display of the target data, highlight key information, and improve the user's overall understanding efficiency and interactive experience. In addition, the technical threshold from content generation to interface publishing can be lowered, and non-front-end personnel can also quickly build and publish interfaces for data display. In addition, by displaying the target data through the display interface, the visual hierarchy of the display content can be enhanced to enhance the user's reading efficiency and visual appeal to the user to a certain extent.

[0039] In some possible embodiments, the large language model corresponds to multiple candidate prompt words. As an example, multiple available prompt words can be set for the large language model based on actual application scenarios to improve the matching between the prompt words and the target data, thereby improving the accuracy of the obtained interface layout information.

[0040] Accordingly, determining to display interface layout information corresponding to the target data based on the target data, the large language model, and the prompt word corresponding to the large language model may include: Matching is performed between the target data and the candidate prompt words to determine a target prompt word that matches the target data.

[0041] As an example, text similarity matching may be performed based on the data content in the target data and the candidate prompt words, and the candidate prompt word with the highest similarity is determined as the target prompt word.

[0042] As another example, the target data and multiple candidate prompt words can be input into a large language model for analysis by the large language model to determine which prompt word better matches the target data. The prompt word selected by the large language model can then be used as the target prompt word.

[0043] Afterwards, the target data and the target prompt word are input into the large language model to obtain the interface layout information.

[0044] For example, the target data and target prompt words can be combined and input into the large language model, so that the large language model can analyze the target prompt words and target data, and determine the interface layout information such as components, charts, icons, etc. used to display the target data based on the content and constraints in the target prompt words.

[0045] Therefore, through the above technical solution, it is possible to determine target prompt words that are more closely matched with the target data, so as to provide accurate prompt words for the analysis of the large language model, thereby improving the availability and accuracy of the output interface layout information, and providing effective data support for the subsequent generation of high-quality display interfaces.

[0046] In some possible embodiments, determining to display interface layout information corresponding to the target data based on the target data, the large language model, and the prompt word corresponding to the large language model may include: According to the target data and the type of the sub-prompt word corresponding to the large language model, a sub-prompt word of the type is determined.

[0047] As an example, the target data and sub-prompt word types can be input into the large language model for analysis to determine sub-prompt words of that type. For example, the sub-prompt word types corresponding to the large language model include layout-guiding sub-prompt words, style-guiding sub-prompt words, layout object sub-prompt words, content generation specification sub-prompt words, and component sub-prompt words. In this embodiment, the target data and sub-prompt word types (such as layout-guiding sub-prompt words) can be input into the large language model. The large language model will then analyze the target data to determine the basic typesetting structures that can be used to display the target data, thereby obtaining the layout-guiding sub-prompt words. For another example, the target data and style-guiding sub-prompt words can be input into the large language model. The large language model will then analyze the target data to determine semantic fields that can be displayed in a style and their corresponding display styles, thereby obtaining the style-guiding sub-prompt words. Other methods for determining sub-prompt words are not detailed here.

[0048] The sub-prompt words corresponding to the large language model are merged to obtain the target prompt word of the large language model.

[0049] Through the steps described above, the sub-prompt words under each sub-prompt word type can be determined. In this embodiment, the determined sub-prompt words can be merged to obtain the target prompt word, thereby guiding the analysis process of the large language model based on the sub-prompt words under multiple dimensions.

[0050] Afterwards, the target data and the target prompt word are input into the large language model to obtain the interface layout information.

[0051] For example, the target data and target prompt words can be combined and input into the large language model, so that the large language model can analyze the target prompt words and target data, and determine the interface layout information such as components, charts, icons, etc. used to display the target data based on the content and constraints in the target prompt words.

[0052] Therefore, through the above technical solution, the diversity of sub-prompt words under each type can be improved, and at the same time, the matching degree between sub-prompt words and target data can be improved, further improving the accuracy of target prompt words, providing accurate prompt words for the analysis of large language models, improving the availability and accuracy of the output interface layout information, and providing effective data support for the subsequent generation of high-quality display interfaces.

[0053] In some possible embodiments, compiling the interface layout information to obtain executable code corresponding to the interface layout information may include: A compilation service call request is constructed based on the interface layout information, and the compilation service call request is sent to a compilation service, wherein the compilation service is a pre-packaged Hypertext Transfer Protocol (HTTP) service.

[0054] In this embodiment, a compilation service can be pre-built and deployed as a universal service on any backend platform. For example, the compilation service can be built using the esbuild compiler build tool. For example, the compiled compilation service can be encapsulated as an HTTP (Hypertext Transfer Protocol) service, such as a Node.js service. This compilation service is an online service and provides a standard HTTP interface, allowing interface layout information to be submitted for compilation via POST requests.

[0055] Afterwards, the executable code returned by the compilation service is received. The executable code may be a JS code that can be executed by a browser.

[0056] In this embodiment, the HTTP service can be called through a compilation service call request, and the executable code compiled by the compilation service can be received. The compilation of the interface layout information is implemented through the online compilation service, which facilitates platform integration and asynchronous processing and improves the compilation efficiency of the interface layout information.

[0057] In some possible embodiments, the compilation service responds to the compilation service call request through an independent thread.

[0058] For example, to avoid single-threaded blocking during compilation, you can use the Node.js worker_threads module for concurrent processing. The Node.js worker_threads module allows JavaScript code to run in a separate thread from the main thread, allowing each compilation service call to run in a separate thread. This improves the stability and scalability of the compilation service, prevents single tasks from slowing down the overall service, and improves compilation efficiency.

[0059] In some possible embodiments, the executable code is JS code; accordingly, rendering based on the executable code and the target data to generate and display the display interface may include: Create interface code corresponding to the display interface, wherein the interface code includes an inline frame component.

[0060] The display interface may be an interface within a generation platform for generating display interfaces, and may serve as the primary interface for data display. The interface code may include an inline frame component to embed the generated interface for displaying target data within the primary interface for display, thereby isolating the generated display content from the interface within the generation platform.

[0061] As an example, the inline frame component may be an iframe component, in which HTML code may be written into the document of the iframe by using document.write to form an independently running rendering environment.

[0062] The JS code is injected into the inline frame component in a link manner.

[0063] As an example, you can pass the compiled JS code as a link as a parameter of the inline frame component. For example, the inline frame component will inject the link as <script src=""…”">,从而在内联框架组件中动态加载生成的界面逻辑和DOM(Document Object Model,文档对象模型)结构。

[0064] 基于更新后的界面代码进行渲染,获得所述展示界面,其中,所述展示界面中所述内联框架组件对应的区域展示基于所述目标数据确定的展示内容。

[0065] 作为示例,可以通过React渲染技术对界面代码进行渲染,从而在展示界面中展示目标数据对应的展示内容。例如React的ref是用于访问在函数组件或类组件中渲染的DOM界面或React元素的方式,基于ref可以直接操作DOM节点,或者在渲染的组件实例上调用方法,如基于React的ref控制,外部可控制内联框架组件的加载状态、高度调整、刷新等行为,并且可以支持设置回调函数监听内联框架组件的加载完成、页面内事件等,便于业务系统进行集成。

[0066] 由此,通过上述技术方案,可以在展示界面中通过注入JS代码的方式,在展示界面中的通过内联框架组件实现对目标数据对应的展示内容的展示,使得生成的展示内容和展示界面进行解耦合,提升组件复用性和隔离性,增加界面渲染的灵活性和兼容性,使得本公开所公开的方法可以嵌入已有的业务系统或平台,拓宽本公开提供的方法的使用范围。

[0067] 在一些可能的实施例中,所述JS代码中包含多个子组件的JS代码。如图2所示,其中组件A1、A2、A3和A4分别对应一子组件,JS代码中可以包含上述子组件的JS代码。

[0068] 所述界面代码中包含多个所述内联框架组件,每一所述子组件的JS代码对应一所述内联框架组件。

[0069] 相应地,所述在所述内联框架组件中以链接的方式注入所述JS代码,可以包括:针对每一所述内联框架组件,在所述内联框架组件中以链接的方式注入一所述子组件的JS代码。

[0070] 该实施例中,展示界面的界面代码中可以包含内联框架组件F1、F2、F3、F4,其中,在F1中注入A1的JS代码,在F2中注入A2的JS代码,在F3中注入A3的JS代码,在F4中注入A4的JS代码。则在进行界面渲染后,可以在展示界面中实现多个渲染内容的并列展示,并且不同的子组件在不同的内联框架组件中,可以支持子组件的按需加载和卸载,进一步提升展示界面的可编辑性,为用户提供更加贴合其使用需求的展示方式,提升数据展示的性能。

[0071] 如图3所示,为基于本公开的一种实施方式提供的基于大语言模型的数据展示方法的流程图,用户基于前端输入目标数据,之后目将标数据发送至后端进行处理。在后端处理过程中,根据目标数据和提示词确定用于输入大语言模型的目标提示词,并通过大语言模型对目标提示词和目标数据进行分析获得界面布局信息。之后,通过编译服务如Node.js对界面布局信息进行编译,获得可执行代码如JS代码。进一步地,基于该JS代码生成链接,并返回至前端,以在前端中将该JS代码的链接注入展示界面中的内联框架组件中,并通过对内联框架组件进行渲染而在展示界面中展示目标数据对应的展示内容。其中,上述步骤的具体实现方式已在上文进行详述,在此不作赘述。

[0072] 基于同样的发明构思,本公开还提供一种基于大语言模型的数据展示装置,如图4所示,所述装置10包括:接收模块100,用于接收目标数据,其中,所述目标数据用于确定展示界面中的展示内容;确定模块200,用于基于所述目标数据、大语言模型以及所述大语言模型对应的提示词,确定展示所述目标数据对应的界面布局信息,其中,所述界面布局信息通过JavaScript扩展语法JSX代码表示;编译模块300,用于对所述界面布局信息进行编译,获得所述界面布局信息对应的可执行代码;渲染模块400,用于基于所述可执行代码和所述目标数据进行渲染,生成所述展示界面并展示。

[0073] 可选地,所述大语言模型对应有多个候选提示词;所述确定模块200包括:匹配子模块,用于根据所述目标数据和所述候选提示词进行匹配,确定与所述目标数据匹配的目标提示词;处理子模块,用于将所述目标数据和所述目标提示词输入所述大语言模型,获得所述界面布局信息。

[0074] 可选地,所述大语言模型对应的提示词中包含以下类型中的至少一者:布局引导子提示词,用于所述大语言模型确定所述展示界面对应的排版结构;样式引导子提示词,用于所述大语言模型确定展示界面中的展示内容对应的样式;布局对象子提示词,用于所述大语言模型确定所述展示界面中的布局对象所属的图标库和 / 或图表类型库;内容生成规范子提示词,用于表示所述大语言模型的内容生成的约束规则;组件子提示词,用于表示所述大语言模型对应的可使用的页面展示组件以及所述页面展示组件对应的场景信息。

[0075] 可选地,所述确定模块200包括:确定子模块,用于根据所述目标数据和所述大语言模型对应的子提示词的类型,确定所述类型下的子提示词;合并子模块,用于将所述大语言模型对应的子提示词进行合并,获得所述大语言模型的目标提示词;处理子模块,用于将所述目标数据和所述目标提示词输入所述大语言模型,获得所述界面布局信息。

[0076] 可选地,所述编译模块300包括:发送子模块,用于基于所述界面布局信息构建编译服务调用请求,并将所述编译服务调用请求发送至编译服务,其中,所述编译服务为预先封装的超文本传输协议HTTP服务;接收子模块,用于接收所述编译服务返回的可执行代码。

[0077] 可选地,所述编译服务中通过一独立线程响应一所述编译服务调用请求。

[0078] 可选地,所述可执行代码为JS代码;所述渲染模块400包括:创建子模块,用于创建所述展示界面对应的界面代码,所述界面代码中包含内联框架组件;注入子模块,用于在所述内联框架组件中以链接的方式注入所述JS代码;渲染子模块,用于基于更新后的界面代码进行渲染,获得所述展示界面,其中,所述展示界面中所述内联框架组件对应的区域展示基于所述目标数据确定的展示内容。

[0079] 可选地,所述JS代码中包含多个子组件的JS代码,所述界面代码中包含多个所述内联框架组件,每一所述子组件的JS代码对应一所述内联框架组件;所述注入子模块用于:针对每一所述内联框架组件,在所述内联框架组件中以链接的方式注入一所述子组件的JS代码。

[0080] 下面参考图5,其示出了适于用来实现本公开实施例的电子设备(例如终端设备或服务器)600的结构示意图。本公开实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图5示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。

[0081] 如图5所示,电子设备600可以包括处理装置(例如中央处理器、图形处理器等)601,其可以根据存储在只读存储器(ROM)602中的程序或者从存储装置608加载到随机访问存储器(RAM)603中的程序而执行各种适当的动作和处理。在RAM 603中,还存储有电子设备600操作所需的各种程序和数据。处理装置601、ROM 602以及RAM 603通过总线604彼此相连。输入 / 输出(I / O)接口605也连接至总线604。

[0082] 通常,以下装置可以连接至I / O接口605:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置606;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置607;包括例如磁带、硬盘等的存储装置608;以及通信装置609。通信装置609可以允许电子设备600与其他设备进行无线或有线通信以交换数据。虽然图5示出了具有各种装置的电子设备600,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。

[0083] 特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置609从网络上被下载和安装,或者从存储装置608被安装,或者从ROM 602被安装。在该计算机程序被处理装置601执行时,执行本公开实施例的方法中限定的上述功能。

[0084] 需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。

[0085] 在一些实施方式中,客户端、服务器可以利用诸如HTTP(HyperText TransferProtocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网("LAN”),广域网("WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。

[0086] 上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。

[0087] 上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:接收目标数据,其中,所述目标数据用于确定展示界面中的展示内容;基于所述目标数据、大语言模型以及所述大语言模型对应的提示词,确定展示所述目标数据对应的界面布局信息,其中,所述界面布局信息通过JavaScript扩展语法JSX代码表示;对所述界面布局信息进行编译,获得所述界面布局信息对应的可执行代码;基于所述可执行代码和所述目标数据进行渲染,生成所述展示界面并展示。

[0088] 可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言——诸如"C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)——连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。

[0089] 附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和 / 或流程图中的每个方框、以及框图和 / 或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。

[0090] 描述于本公开实施例中所涉及到的模块可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,模块的名称在某种情况下并不构成对该模块本身的限定,例如,接收模块还可以被描述为"接收目标数据的模块”。

[0091] 本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。

[0092] 在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。

[0093] 根据本公开的一个或多个实施例,示例1提供了一种基于大语言模型的数据展示方法,所述方法包括:接收目标数据,其中,所述目标数据用于确定展示界面中的展示内容;基于所述目标数据、大语言模型以及所述大语言模型对应的提示词,确定展示所述目标数据对应的界面布局信息,其中,所述界面布局信息通过JavaScript扩展语法JSX代码表示;对所述界面布局信息进行编译,获得所述界面布局信息对应的可执行代码;基于所述可执行代码和所述目标数据进行渲染,生成所述展示界面并展示。

[0094] 根据本公开的一个或多个实施例,示例2提供了示例1的方法,所述大语言模型对应有多个候选提示词;所述基于所述目标数据、大语言模型以及所述大语言模型对应的提示词,确定展示所述目标数据对应的界面布局信息,包括:根据所述目标数据和所述候选提示词进行匹配,确定与所述目标数据匹配的目标提示词;将所述目标数据和所述目标提示词输入所述大语言模型,获得所述界面布局信息。

[0095] 根据本公开的一个或多个实施例,示例3提供了示例1的方法,所述大语言模型对应的提示词 中包含以下类型中的至少一者:布局引导子提示词,用于所述大语言模型确定所述展示界面对应的排版结构;样式引导子提示词,用于所述大语言模型确定展示界面中的展示内容对应的样式;布局对象子提示词,用于所述大语言模型确定所述展示界面中的布局对象所属的图标库和 / 或图表类型库;内容生成规范子提示词,用于表示所述大语言模型的内容生成的约束规则;组件子提示词,用于表示所述大语言模型对应的可使用的页面展示组件以及所述页面展示组件对应的场景信息。

[0096] 根据本公开的一个或多个实施例,示例4提供了示例3的方法,所述基于所述目标数据、大语言模型以及所述大语言模型对应的提示词,确定展示所述目标数据对应的界面布局信息,包括 :根据所述目标数据和所述大语言模型对应的子提示词的类型,确定所述类型下的子提示词;将所述大语言模型对应的子提示词进行合并,获得所述大语言模型的目标提示词;将所述目标数据和所述目标提示词输入所述大语言模型,获得所述界面布局信息。

[0097] 根据本公开的一个或多个实施例,示例5提供了示例1的方法,所述对所述界面布局信息进行编译,获得所述界面布局信息对应的可执行代码,包括:基于所述界面布局信息构建编译服务调用请求,并将所述编译服务调用请求发送至编译服务,其中,所述编译服务为预先封装的超文本传输协议HTTP服务;接收所述编译服务返回的可执行代码。

[0098] 根据本公开的一个或多个实施例,示例6提供了示例5的方法,所述编译服务中通过一独立线程响应一所述编译服务调用请求。

[0099] 根据本公开的一个或多个实施例,示例7提供了示例1的方法,所述可执行代码为JS代码;所述基于所述可执行代码和所述目标数据进行渲染,生成所述展示界面并展示,包括:创建所述展示界面对应的界面代码,所述界面代码中包含内联框架组件;在所述内联框架组件中以链接的方式注入所述JS代码;基于更新后的界面代码进行渲染,获得所述展示界面,其中,所述展示界面中所述内联框架组件对应的区域展示基于所述目标数据确定的展示内容。

[0100] 根据本公开的一个或多个实施例,示例8提供了示例7的方法,所述JS代码中包含多个子组件的JS代码,所述界面代码中包含多个所述内联框架组件,每一所述子组件的JS代码对应一所述内联框架组件;所述在所述内联框架组件中以链接的方式注入所述JS代码,包括:针对每一所述内联框架组件,在所述内联框架组件中以链接的方式注入一所述子组件的JS代码。

[0101] 根据本公开的一个或多个实施例,示例9提供了一种基于大语言模型的数据展示装置,所述装置包括:接收模块,用于接收目标数据,其中,所述目标数据用于确定展示界面中的展示内容;确定模块,用于基于所述目标数据、大语言模型以及所述大语言模型对应的提示词,确定展示所述目标数据对应的界面布局信息,其中,所述界面布局信息通过JavaScript扩展语法JSX代码表示;编译模块,用于对所述界面布局信息进行编译,获得所述界面布局信息对应的可执行代码;渲染模块,用于基于所述可执行代码和所述目标数据进行渲染,生成所述展示界面并展示。

[0102] 根据本公开的一个或多个实施例,示例10提供了一种计算机可读介质,其上存储有计算机程序,该计算机程序被处理装置执行时实现示例1-8中任一项所述方法的步骤。

[0103] 根据本公开的一个或多个实施例,示例11提供了一种电子设备,包括:存储装置,其上存储有计算机程序;处理装置,用于执行所述存储装置中的所述计算机程序,以实现示例1-8中任一项所述方法的步骤。

[0104] 根据本公开的一个或多个实施例,示例12提供了一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现示例1-8中任一项所述的方法的步骤。

[0105] 以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。

[0106] 此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。

[0107] 尽管已经采用特定于结构特征和 / 或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。< / script>

Claims

1. A data display method based on a large language model, characterized in that: The method comprises: receiving target data, wherein the target data is used to determine display content in a display interface; Determine, based on the target data, the large language model, and the prompt word corresponding to the large language model, to display interface layout information corresponding to the target data, wherein the interface layout information is represented by JavaScript extended syntax JSX code; Compiling the interface layout information to obtain executable code corresponding to the interface layout information; Rendering is performed based on the executable code and the target data to generate and display the display interface.

2. The data display method according to claim 1, characterized in that: The large language model corresponds to multiple candidate prompt words; The determining, based on the target data, the large language model, and the prompt word corresponding to the large language model, to display interface layout information corresponding to the target data includes: Matching the target data with the candidate prompt words to determine a target prompt word that matches the target data; The target data and the target prompt word are input into the large language model to obtain the interface layout information.

3. The data display method according to claim 1, characterized in that: The prompt words corresponding to the large language model include at least one of the following types: Layout guidance sub-prompt words, used by the large language model to determine the layout structure corresponding to the display interface; Style-guiding sub-prompt words, used by the large language model to determine the style corresponding to the display content in the display interface; Layout object sub-prompt word, used by the large language model to determine the icon library and / or chart type library to which the layout object in the display interface belongs; Content generation specification sub-prompt word, used to represent the constraint rules for content generation of the large language model; The component sub-prompt word is used to indicate the usable page display component corresponding to the large language model and the scenario information corresponding to the page display component.

4. The data display method according to claim 3, characterized in that: The determining, based on the target data, the large language model, and the prompt word corresponding to the large language model, to display interface layout information corresponding to the target data includes: Determining a sub-prompt word of the type according to the target data and the sub-prompt word corresponding to the large language model; Merging the sub-prompt words corresponding to the large language model to obtain the target prompt word of the large language model; The target data and the target prompt word are input into the large language model to obtain the interface layout information.

5. The data display method according to claim 1, characterized in that: The compiling the interface layout information to obtain executable code corresponding to the interface layout information includes: Constructing a compilation service call request based on the interface layout information, and sending the compilation service call request to a compilation service, wherein the compilation service is a pre-packaged Hypertext Transfer Protocol (HTTP) service; Receive the executable code returned by the compilation service.

6. The data display method according to claim 5, characterized in that: The compilation service responds to the compilation service call request through an independent thread.

7. The data display method according to claim 1, characterized in that: The executable code is JS code; The rendering based on the executable code and the target data, generating the display interface and displaying it, includes: Creating interface code corresponding to the display interface, wherein the interface code includes an inline frame component; Injecting the JS code into the inline frame component in a link manner; Rendering is performed based on the updated interface code to obtain the display interface, wherein the area corresponding to the inline frame component in the display interface displays the display content determined based on the target data.

8. The data display method according to claim 7, characterized in that: The JS code includes JS codes of multiple sub-components, the interface code includes multiple inline frame components, and the JS code of each sub-component corresponds to one inline frame component; Injecting the JS code into the inline frame component in a link manner includes: For each of the inline frame components, a JS code of the subcomponent is injected into the inline frame component in a link manner.

9. A data display device based on a large language model, characterized in that: The device comprises: A receiving module, configured to receive target data, wherein the target data is used to determine display content in the display interface; a determination module, configured to determine, based on the target data, the large language model, and the prompt word corresponding to the large language model, interface layout information corresponding to the target data, wherein the interface layout information is represented by JavaScript extended syntax JSX code; A compiling module, configured to compile the interface layout information to obtain executable code corresponding to the interface layout information; A rendering module is used to render based on the executable code and the target data, generate the display interface and display it.

10. A computer-readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processing device, the steps of the data display method according to any one of claims 1 to 8 are implemented.

11. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of the data presentation method according to any one of claims 1 to 8.

12. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the data display method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Data processing method and device, storage medium and electronic equipment

    CN118567772A

  • Visual chart generation method, device and equipment and readable storage medium

    CN118762101A

  • Data page generation method and related equipment

    CN118897676A

  • User interface generation method and device and storage medium

    CN119130786A

  • Chart generation method and device, equipment and medium

    CN119357382A