A Method and System for Integrating a Report Center in an AI Assistant

Through the deep integration of AI assistant and report center, using iframe tags and temporary data IDs, combined with large model services, the problem of repeated development in the integration of traditional report center and AI assistant is solved, and dynamic generation and snapshot saving of reports is realized, improving system efficiency and user experience.

CN118966179BActive Publication Date: 2025-08-05SUZHOU RUIYUN INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411448613.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-08-05
Estimated Expiration
2044-10-17

AI Technical Summary

Technical Problem

In the prior art, the integration of traditional reporting centers and AI assistants relies on repeated development, which increases operational costs and system complexity, and users need to regenerate pages when viewing historical reports, affecting response speed and user experience.

Method used

Through the deep integration of AI assistant and report center, using iframe tags and temporary data IDs, combined with large model services, dynamic generation and snapshot storage of reports are realized, duplicate development is avoided, and memory usage and data transfer processes are optimized.

Benefits of technology

Improves the efficiency and accuracy of report generation, reduces memory usage and system complexity, and improves user experience and system response speed, especially when viewing historical reports without regenerating pages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118966179B_ABST
    Figure CN118966179B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for integrating a report center in an AI assistant, including: when the backend of the AI assistant receives a request to generate a report, it calls the large model service to obtain the expected report category information; according to the extracted report category information, the backend of the AI assistant sends a request to the backend of the report center to obtain all the basic data of the specified category report; through the basic data of the report, the backend of the AI assistant calls the large model service to obtain and save the SQL statements required for the report, and returns the temporary storage data id of the SQL statements to the frontend of the AI assistant; when the backend of the AI assistant receives a request from the backend of the report center to obtain the SQL statements based on the temporary storage data id, it sends the SQL statements to the backend of the report center; when the backend of the AI assistant receives a save request from the frontend of the AI assistant, it saves the corresponding report screenshot data. By utilizing the existing report center function and combining the natural language processing ability of the AI assistant, the present invention realizes the dynamic generation and snapshot saving of reports.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electronic digital data processing, and more particularly to the technical field of information retrieval. Specifically, it is a method and system for integrating a report center in an AI assistant. Background Art

[0002] A report center is an information system for centrally managing and presenting various business data reports. It usually includes a series of tools and services aimed at helping enterprises or organizations collect, process, analyze, and present data from different sources more effectively. The main purpose of the report center is to provide timely and accurate data views to management and employees for better decision-making.

[0003] An AI assistant can deeply understand and respond to complex and changing user needs through advanced natural language processing, machine learning, and large models such as GPT. Traditional report centers highly rely on professional IT personnel for operation and maintenance and updates, which not only increases the operating costs of enterprises but also limits the flexibility and response speed of the report center. To overcome these challenges, combining the AI assistant with the report center to achieve the rapid integration and intelligent management of the report center has become an urgent problem to be solved.

[0004] Therefore, it is necessary to improve the method for integrating the report center in the prior art to solve the above problems. Summary of the Invention

[0005] The present invention overcomes the deficiencies of the prior art and provides a method for integrating a report center in an AI assistant, aiming to solve the problem of avoiding redeveloping reports in the AI assistant and the need not to regenerate the report page every time when users view the report history of the AI assistant.

[0006] To achieve the above object, the technical solution adopted by the present invention is: A method for integrating a report center in an AI assistant, including:

[0007] S1. The backend of the AI assistant receives a request to generate a report, calls the large model service, and obtains the expected report category information;

[0008] S2. The backend of the AI assistant sends a request to the backend of the report center according to the extracted report category information to obtain all the basic data of the specified category of reports;

[0009] S3. The AI assistant backend calls the large model service through the basic data of the report, obtains and saves the SQL statements required for the report, and returns the temporary data ID of the SQL statements to the AI assistant frontend; the temporary data ID is used to trigger the AI assistant frontend to create a hidden iframe tag, and the page URL address of the iframe tag points to the report center frontend, and the page URL address is appended with the temporary data ID; the iframe tag is used to trigger the report center frontend to send a report construction request to the report center backend and attach the temporary data ID.

[0010] S4. The AI assistant backend receives the request from the report center backend to obtain the SQL statements according to the temporary data ID, and sends the SQL statements to the report center backend; the SQL statements are used to trigger the report center backend to return the queried report data to the report center frontend for rendering and taking a screenshot of the report; the report screenshot is used to trigger the report center frontend to transfer the report screenshot data to the AI assistant frontend.

[0011] S5. The AI assistant backend receives the save request from the AI assistant frontend and saves the corresponding report screenshot data; the save request is used to trigger the AI assistant frontend to destroy the report center frontend page, remove the hidden iframe tag, and render the report screenshot data to present the report content to the user.

[0012] In a preferred embodiment of the present invention, in step S1, when the AI assistant frontend receives the conversation message sent by the user and detects that the user needs to generate a report, it sends a request to generate a report to the AI assistant backend; the conversation message is obtained from the text in the input box and the messages sent by the user in the message queue.

[0013] The AI assistant frontend is provided with an event listener for capturing the user's input operations on the interface, including: keyboard input, mouse click, and touch screen operation.

[0014] When the event listener is triggered by the user's operation of sending a conversation message, the AI assistant frontend obtains the conversation message input by the user through the API.

[0015] In a preferred embodiment of the present invention, in step S1, the AI assistant frontend maintains a keyword list, and the keywords in the keyword list are associated with the requirements for generating a report; the keywords include: report, statistics, report, and chart.

[0016] After receiving the user's message, the AI assistant frontend performs keyword matching on the message content to determine whether the user has expressed the intention to generate a report, and calculates the score through cosine similarity , where is the weight of querying the th keyword, is the The weight of a keyword is the total number of keywords, representing the degree of willingness to generate a report through a score. When the score is not less than 0.5, the front-end of the AI assistant directly proceeds with the steps of generating a report.

[0017] When the score is less than 0.5 and greater than 0, the front-end of the AI assistant uses natural language processing technology to perform semantic analysis on the user's message;

[0018] Based on the results of keyword matching and semantic analysis, the front-end of the AI assistant performs intention recognition. When it recognizes that the user's intention is to generate a report, the front-end of the AI assistant triggers an operation to send a request to generate a report to the back-end of the AI assistant.

[0019] In a preferred embodiment of the present invention, in step S3, the back-end of the AI assistant calls the API interface of the large model service through an HTTP request.

[0020] In a preferred embodiment of the present invention, the method for generating the temporary data id is one of UUID, hash function, and serial number + salt value, or a combination of multiple methods.

[0021] In a preferred embodiment of the present invention, in step S3, the front-end of the AI assistant inserts a <iframe>The label is set to be hidden and invisible through CSS; the src attribute of the iframe label is set to point to the URL of the front end of the report center, with the temporary data id appended;

[0022] In a preferred embodiment of the present invention, in step S4,

[0023] S41. The back end of the report center sends a request to the back end of the AI assistant to obtain the SQL statement through the temporary data id;

[0024] S42. The back end of the report center executes the SQL statement and returns the query result report data to the front end of the report center.

[0025] In a preferred embodiment of the present invention, in step S4, after the front end of the report center obtains the report data, it constructs complete chart information through the chart library and takes a screenshot of the report. After the front end of the report center completes the report screenshot, it transmits the obtained screenshot data to the outside of the iframe, that is, the front end of the AI assistant. The report screenshot is an image data encoded in base64.

[0026] In a preferred embodiment of the present invention, in step S5,

[0027] S51. After receiving the report screenshot data, the front end of the AI assistant sends a save request to the back end of the AI assistant;

[0028] S52. The front end of the AI assistant destroys the front-end page of the report center and removes the hidden iframe label;

[0029] S53. The front end of the AI assistant renders the report screenshot data in the interface and presents the report content to the user.

[0030] The present invention provides a system integrating a report center in an AI assistant, including:

[0031] The front-end module of the AI assistant, which is used to receive user input, is responsible for displaying the generated report snapshot, and communicates with the back-end module according to the user's further instructions;

[0032] The back-end module of the AI assistant, which is used to process requests from the front-end module, is responsible for communicating with the large model service, obtaining the necessary SQL statements, and coordinating the generation and transmission of report data, and saving the report snapshot;

[0033] The back-end module of the report center, which is used to store and manage all data related to the report. When receiving a request with a temporary data id, it executes the corresponding SQL query and returns the result to the front end of the report center for rendering;

[0034] The front-end module of the report center,It is used to display the data provided by the backend of the report center, render it into a visual report form, generate a report snapshot, and pass the snapshot data to the front end of the AI assistant;

[0035] The large model module is used to generate SQL statements.

[0036] The present invention solves the defects existing in the background technology, and the present invention has the following beneficial effects:

[0037] (1) The present invention provides a method and system for integrating a report center in an AI assistant. By utilizing the existing functions of the report center without repeated development and combining the natural language processing capabilities of the AI assistant, it realizes the dynamic generation and snapshot saving of reports. It uses the temporary data ID and hidden iframe tags to optimize the report generation process, not only avoiding the memory problem caused by multiple iframe loads, but also significantly improving the user experience. Especially when viewing the report snapshots in the historical conversation, there is no need to regenerate the report page, greatly improving the response speed and efficiency of the system.

[0038] (2) Through the lifecycle management of the iframe element, the present invention effectively avoids the problem of excessive memory usage; during the report generation process, the front end of the AI assistant creates an iframe element, but immediately removes the iframe element and destroys the front end of the report center after the report is completed, ensuring that the iframe element does not exist on the page for a long time, thus avoiding the increase in memory usage caused by multiple iframes and effectively preventing the browser page from crashing; compared with the prior art, it further achieves the effect of optimizing memory usage and enhancing system stability.

[0039] (3) Through the temporary data id, the present invention realizes the efficient data transfer between the AI assistant and the report center. After the backend of the AI assistant generates an SQL statement, it generates a temporary data id and returns it to the front end of the AI assistant; when the front end of the AI assistant creates an iframe tag, it attaches this temporary data id to the URL address, thus realizing the cross-page transfer of data; avoiding the direct interaction between the front end of the AI assistant and the backend of the report center, reducing the complexity and maintenance difficulty of the system, and at the same time ensuring the accuracy and efficiency of data transfer. Compared with the prior art, it further achieves the effect of optimizing the data transfer process and improving the system scalability.

[0040] (4) By the step of the backend of the AI assistant calling the large model service to generate SQL statements, the present invention realizes the intelligence of report queries. After the backend of the AI assistant receives the request to generate a report, it calls the large model service, extracts the report type from the user message, and generates the corresponding report query SQL statement, utilizing the natural language processing and machine learning technologies of the AI assistant,It can accurately understand the user's intention, generate SQL statements that meet the user's needs, and improve the accuracy and efficiency of report generation; compared with the prior art, it further achieves the effects of intelligent report query and reduction of manual intervention.

[0041] (5) Through the step of generating chart pictures at the front end of the report center and transmitting them to the front end of the AI assistant, the snapshot function of the report content is realized. After the front end of the report center completes report rendering, it generates chart pictures and transmits the picture data to the front end of the AI assistant. When the user views the historical conversation records, the front end of the AI assistant can directly display these chart pictures without regenerating the report page, significantly improving the user experience and system response speed. Compared with the prior art, it further achieves the effects of optimizing the report viewing process and reducing system resource consumption. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings;

[0043] Figure 1 is a flowchart of the method of the preferred embodiment of the present invention;

[0044] Figure 2 is a module design diagram of the preferred embodiment of the present invention;

[0045] Figure 3 is a timing diagram of the AI assistant integrated with the report center of the preferred embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0046] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the 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,All fall within the scope of protection of the present invention.

[0047] In the following description, many specific details are set forth in order to provide a thorough understanding of the present invention. However, the present invention may be implemented in other ways different from those described herein. Therefore, the scope of protection of the present invention is not limited by the specific embodiments disclosed below.

[0048] Application Overview:

[0049] Through the deep integration of the AI assistant and the report center, the present invention combines the AI assistant with the report center to achieve the rapid integration and intelligent management of the report center, improve the depth and breadth of report analysis, and provide more accurate and timely data support for enterprise decision-making.

[0050] In the prior art, there are still obvious deficiencies in the aspect of the AI assistant outputting reports: the prior art requires the AI assistant to generate a report page and develop report functions according to each user request, which occupies a large amount of memory. The integration of the traditional report center and the AI assistant often requires repeated development of report functions, increasing the complexity of the system and the difficulty of maintenance, and seriously affecting the user experience and the response speed of the system.

[0051] In order to reduce the memory occupation of report content, achieve seamless docking with the existing report center page, and avoid repeated development of report-related functions, the present invention manages the life cycle of the iframe tag through the iframe technology to achieve the rapid and efficient integration of the AI assistant and the report center. When the user views the AI assistant history, the report content snapshot technology is introduced, and the snapshot mechanism of the report content is optimized to improve the overall performance of the system and the user experience.

[0052] As shown in Figure 1 and Figure 3, a method for integrating a report center in an AI assistant includes the steps of:

[0053] S1. The backend of the AI assistant receives a request to generate a report, calls the large model service, and obtains the expected report category information;

[0054] S2. The backend of the AI assistant sends a request to the backend of the report center according to the extracted report category information,Obtain all the basic data of the specified category report;

[0055] S3. The AI assistant backend calls the large model service through the basic data of the report, obtains and saves the SQL statement required for the report, and returns the temporary data id of the SQL statement to the AI assistant frontend; the temporary data id is used to trigger the AI assistant frontend to create a hidden iframe tag, and the page URL address of the iframe tag points to the report center frontend, and the page URL address is appended with the temporary data id; the iframe tag is used to trigger the report center frontend to send a report construction request to the report center backend and attach the temporary data id;

[0056] S4. The AI assistant backend receives the request from the report center backend to obtain the SQL statement according to the temporary data id, and sends the SQL statement to the report center backend; the SQL statement is used to trigger the report center backend to return the queried report data to the report center frontend for rendering and taking a screenshot of the report; the report screenshot is used to trigger the report center frontend to transfer the report screenshot data to the AI assistant frontend;

[0057] S5. The AI assistant backend receives the save request from the AI assistant frontend and saves the corresponding report screenshot data; the save request is used to trigger the AI assistant frontend to destroy the report center frontend page, remove the hidden iframe tag, and render the report screenshot data to present the report content to the user.

[0058] In step S1, the AI assistant frontend receives the conversation message sent by the user, detects that the user needs to generate a report, and sends a request to generate a report to the AI assistant backend;

[0059] The AI assistant frontend is provided with an event listener for capturing the user's input operations on the interface, including: keyboard input, mouse click, and touch screen operation;

[0060] When the event listener is triggered by the user's operation of sending a conversation message, the AI assistant frontend obtains the conversation message input by the user through the API;

[0061] The conversation message is obtained from the text in the input box and the messages sent by the user in the message queue;

[0062] In step S1, the AI assistant frontend maintains a keyword list, and the keywords in the keyword list are associated with the requirements for generating a report; the keywords include: report, statistics, report, and chart;

[0063] After receiving the user message, the AI assistant frontend performs keyword matching on the message content to determine whether the user has expressed the intention to generate a report,Calculate the score through cosine similarity , where is the weight of querying the th keyword, is the weight of the th keyword in the message content, is the total number of keywords. The degree of willingness to generate a report is represented by the score. When the score is not less than 0.5, the AI assistant front-end directly proceeds with the steps of generating a report.

[0064] When the score is less than 0.5 and greater than 0, the AI assistant front-end uses natural language processing technology to perform semantic analysis on the user's message; by parsing the semantics of the conversation message, the front-end can accurately determine whether the user needs to generate a report, as well as the type and content of the report expected by the user.

[0065] Based on the results of keyword matching and semantic analysis, the AI assistant front-end performs intent recognition. When it recognizes that the user's intent is to generate a report, the AI assistant front-end will trigger an operation to send a request to generate a report to the AI assistant back-end.

[0066] In step S2, the basic data includes: report description and report field introduction;

[0067] The content of the report description includes: the theme of the report, data range, data source, and data update frequency; the role of the report description is to provide an overview of the report, explaining the main content and purpose of the report;

[0068] The content of the report field introduction includes: field name, field type, field meaning, and possible value range or unit; the role of the report field introduction is to explain each field in the report in detail, explaining the meaning and use of the report data.

[0069] In step S3, the AI assistant back-end calls the API interface of the large model service through an HTTP request;

[0070] The large model service refers to a highly intelligent service based on deep learning and machine learning technologies,It can handle complex natural language understanding tasks; the large model services are provided in the form of cloud services, and the AI assistant backend remotely calls these services through the network without the need to deploy and maintain complex models locally;

[0071] In this application, the large model service can understand the user's intention based on the basic data of the report and generate corresponding SQL query statements;

[0072] In step S3, the staging data id is a unique identifier used in this invention to identify and track the temporarily stored SQL statement data, ensuring that these data can be correctly referenced between different services;

[0073] By using the staging data id, it is possible to avoid regenerating SQL statements every time a report is generated, thereby reducing the repetitive workload and improving efficiency;

[0074] The method for generating the staging data id is one of UUID, hash function, and serial number + salt value, or a combination of multiple methods;

[0075] The iframe tag is an element in HTML that allows another web page to be loaded within the current page; in this application, the iframe tag is set to be hidden. To avoid interfering with the user interface, the iframe tag will load another web page. If it is visible, the user will see content unrelated to the current operation. By setting it to be hidden, it can ensure that the user only focuses on the current operation and interface without being disturbed by other content.

[0076] In step S3, the AI assistant front-end inserts an <iframe> tag in HTML and sets the style to be hidden and invisible through CSS: style="display:none;";

[0077] Set the src attribute of the iframe tag to point to the URL of the report center front-end and append the staging data id;

[0078] In step S3, by appending the staging data id to the URL address, cross-page data transfer is achieved. When the iframe tag loads the page of the report center front-end, the report center front-end can obtain the staging data id by parsing the URL address, thereby knowing the SQL statements and report data that need to be requested;

[0079] Since the iframe tag loads the page of the report center front-end and carries the staging data id, it can trigger the report center front-end to send a report construction request to the report center back-end, so that the AI assistant front-end does not directly interact with the report center back-end,It can also indirectly generate and display reports through the iframe tag;

[0080] In step S4,

[0081] S41. The backend of the report center sends a request to the backend of the AI assistant to obtain the SQL statement through the temporary data id;

[0082] S42. The backend of the report center executes the SQL statement and returns the query result report data to the front end of the report center;

[0083] In step S4, after the front end of the report center obtains the report data, it constructs complete chart information through the chart library and takes a screenshot of the report. After the front end of the report center completes the report screenshot, it transmits the obtained screenshot data to the outside of the iframe, that is, the front end of the AI assistant. The report screenshot is an image data encoded in base64;

[0084] In step S5,

[0085] S51. After receiving the report screenshot data, the front end of the AI assistant sends a save request to the backend of the AI assistant;

[0086] S52. The front end of the AI assistant destroys the front-end page of the report center and removes the hidden iframe tag;

[0087] S53. The front end of the AI assistant renders the report screenshot data in the interface and presents the report content to the user;

[0088] The user can quickly view the snapshot of the report content without waiting for the report center to regenerate the report page. By using the temporary data id and the iframe tag, the direct interaction between the front end of the AI assistant and the backend of the report center is avoided, reducing the complexity and maintenance difficulty of the system.

[0089] Through the life cycle management of the iframe element, the problem of excessive memory usage is effectively avoided; during the report generation process, the front end of the AI assistant will create an iframe element, but after the report is completed, the iframe element will be immediately removed and the front end of the report center will be destroyed, ensuring that the iframe element will not exist on the page for a long time, thus avoiding the increase in memory usage caused by multiple iframes and effectively preventing the browser page from crashing.

[0090] As shown in Figure 2, a system integrating a report center in an AI assistant,Including:

[0091] An AI assistant front-end module, which is used to receive user input, capture user interaction behaviors through event listeners, is responsible for displaying the generated report snapshots, and communicates with the back-end module according to further instructions from the user;

[0092] An AI assistant back-end module, which is used to process requests from the front-end module, is responsible for communicating with the large model service, obtaining necessary SQL statements, coordinating the generation and transmission of report data, and saving report snapshots;

[0093] A report center back-end module, which is used to store and manage all data related to reports, including basic data, SQL query results, and report data. When receiving a request with a staging data ID, it will execute the corresponding SQL query and return the result to the report center front-end for rendering;

[0094] A report center front-end module, which is used to display the data provided by the report center back-end, render it into a visual report form, generate report snapshots, and pass the snapshot data to the AI assistant front-end;

[0095] A large model module, which is used to return report categories and generate SQL statements.

[0096] Based on the ideal embodiments of the present invention as an inspiration, through the above description, relevant personnel can completely make various changes and modifications without departing from the technical idea of this invention. The technical scope of this invention is not limited to the content in the specification, and the technical scope must be determined according to the scope of the claims.,< / iframe>

Claims

1. A method for integrating a report center into an AI assistant, characterized in that: Including steps: S1. The AI assistant backend receives a request to generate a report and calls the big model service to obtain the desired report category information. S2. The AI assistant backend sends a request to the report center backend based on the extracted report category information to obtain all basic data for the specified category report; S3. The AI assistant backend uses the basic data of the report to call the big model service, obtain and save the SQL statement required for the report, and return the temporary data ID of the SQL statement to the AI assistant frontend. The temporary data ID is used to trigger the AI assistant frontend to create a hidden iframe tag. The page URL address of the iframe tag points to the report center frontend, and the page URL address is appended with the temporary data ID. The iframe tag is used to trigger the report center frontend to send a report build request to the report center backend, along with the temporary data ID. S4. The AI assistant backend receives a request from the report center backend to obtain an SQL statement based on the temporary data ID, and sends the SQL statement to the report center backend. The SQL statement is used to trigger the report center backend to return the queried report data to the report center frontend for rendering and report screenshots. The report screenshots are used to trigger the report center frontend to pass the report screenshot data to the AI assistant frontend. S5. The AI assistant backend receives the save request from the AI assistant frontend and saves the corresponding report screenshot data. The save request is used to trigger the AI assistant frontend to destroy the report center frontend page, remove the hidden iframe tag, and render the report screenshot data to present the report content to the user. In step S1, the AI assistant front end receives a conversation message sent by the user, detects that the user needs to generate a report, and sends a request to generate the report to the AI assistant back end; the conversation message is obtained from the text in the input box and the message sent by the user in the message queue; The AI assistant front-end is equipped with an event listener to capture user input operations on the interface, including keyboard input, mouse clicks, and touch screen operations; When the event listener is triggered by the user sending a conversation message, the AI assistant front-end obtains the conversation message entered by the user through the API; In step S1, the AI assistant front-end maintains a keyword list. The keywords in the keyword list are associated with the requirements for generating reports. Keywords include: report, statistics, report and chart. After receiving a user message, the AI assistant front-end matches the message content with keywords to determine whether the user has expressed the intention to generate a report, and calculates the score through cosine similarity. Among them, w i is the weight of querying the i-th keyword, w i ′ is the weight of the i-th keyword in the message content, n is the total number of keywords, and the score represents the degree of willingness to generate a report. When the score is not less than 0.5, the AI assistant front-end directly generates the report; When the score is lower than 0.5 and greater than 0, the AI assistant front-end uses natural language processing technology to perform semantic analysis on the user message; Based on the results of keyword matching and semantic analysis, the AI assistant front-end performs intent recognition. When it recognizes that the user's intention is to generate a report, the AI assistant front-end triggers the operation of sending a request to generate a report to the AI assistant back-end.

2. The method for integrating a report center into an AI assistant according to claim 1, characterized in that: In step S3, the AI assistant backend calls the API interface of the large model service through an HTTP request.

3. The method for integrating a report center into an AI assistant according to claim 1, characterized in that: The temporary data ID is generated by using one of the following methods: UUID, hash function, and serial number + salt value, or a combination of multiple methods.

4. The method for integrating a report center into an AI assistant according to claim 1, characterized in that: In step S3, the AI assistant front end inserts a <iframe>The tag is styled as hidden and invisible through CSS; the src attribute of the iframe tag is set to point to the URL of the front end of the report center, and the temporary data ID is attached.

5. The method for integrating a report center into an AI assistant according to claim 1, characterized in that: In step S4, S41. The report center backend sends a request to the AI assistant backend to obtain the SQL statement using the temporary data ID. S42: The report center backend executes the SQL statement and returns the report data obtained by the query to the report center frontend.

6. The method for integrating a report center into an AI assistant according to claim 4, characterized in that: In step S4, after the report center front end obtains the report data, it constructs complete chart information through the chart library and takes a report screenshot. After the report center front end completes the report screenshot, it passes the obtained screenshot data to the outside of the iframe, that is, the AI assistant front end. The report screenshot is a base64-encoded image data.

7. The method for integrating a report center into an AI assistant according to claim 1, characterized in that: In step S5, S51. After receiving the report screenshot data, the AI assistant front-end sends a save request to the AI assistant back-end; S52. The AI Assistant front-end destroys the report center front-end page and removes the hidden iframe tag; S53. The AI assistant front end renders the report screenshot data in the interface and presents the report content to the user.

8. A system for integrating a report center into an AI assistant, based on the method for integrating a report center into an AI assistant according to any one of claims 1 to 7, characterized in that: include: The AI assistant front-end module receives user input, displays the generated report snapshot, and communicates with the back-end module based on further user instructions; The AI assistant backend module is used to process requests from the frontend module. It is responsible for communicating with the large model service, obtaining SQL statements, coordinating the generation and transmission of report data, and saving report snapshots. The report center backend module is used to store and manage all report-related data. When receiving a request with a temporary data ID, it executes the corresponding SQL query and returns the result to the report center frontend for rendering; The report center front-end module is used to display the data provided by the report center back-end, render it into a visual report format, generate report snapshots, and pass the snapshot data to the AI assistant front-end; Large model module, used to generate SQL statements. .< / iframe>

Citation Information

Patent Citations

  • Embedded method of external system, workflow system, equipment and storage medium

    CN110874278A

  • Data query method and system, storage medium and computer program product

    CN118690062A