Front-end AI dialogue data management system and method

By designing asynchronous data flow management, state management, streaming data control, Markdown rendering engine and expansion module in the front-end AI dialogue system, the problems of data processing delay, complex state management, insufficient custom display capabilities and limited scalability are solved, and an efficient, personalized and flexible data management system is realized.

CN119806867AActive Publication Date: 2025-04-11ZHEJIANG WANYOUMALI NETWORK TECHNOLOGY CO LTD

Patent Information

Application Number
CN202411968154.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-11
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

The existing front-end AI dialogue system has problems such as delay in data processing, complex state management, insufficient custom display capabilities and limited scalability, which affects user experience and system upgrades.

Method used

A front-end AI dialogue data management system is designed, using asynchronous data flow management module, state management module, streaming data control module, Markdown rendering engine and expansion module to realize real-time data transmission, state consistency, personalized display and high scalability.

Benefits of technology

It significantly reduces data processing latency, ensures consistency between the user interface and backend data, provides diversified display capabilities, and adapts to the expansion of different business needs, improving user experience and system flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119806867A_ABST
    Figure CN119806867A_ABST
Patent Text Reader

Abstract

The invention is suitable for the field of data management, and provides a front-end AI dialogue data management system and method, and the system comprises an asynchronous data flow management module; a state management module; a streaming data control module; a Markdown rendering engine is adopted; the beneficial effects of the invention are that the asynchronous data flow management module realizes high-efficiency synchronization of front-end and rear-end data, significantly reduces the data processing delay, and the state management module ensures the consistency of a user interface and rear-end data, optimizes the user experience, and improves the user experience. The built-in advanced Markdown rendering engine supports various self-defined grammars, so that the output content of the AI can be flexibly subjected to personalized rendering, modular design is adopted, customization and expansion can be performed according to service requirements, and the method is suitable for different application scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of data management, and in particular relates to a front-end AI dialogue data management system and method thereof. Background Art

[0002] Today, artificial intelligence dialogue systems have been widely integrated into all walks of life and have become a key factor in improving the competitiveness of enterprises. However, there are still many problems in front-end data management and user experience.

[0003] On the one hand, data processing is seriously delayed. In the traditional architecture, the front-end and back-end rely on synchronous requests. For example, in online consultation scenarios, after the patient describes the symptoms, the front-end needs to wait for the back-end to analyze the symptoms, retrieve the medical records and generate medical advice. The long blank period can easily cause anxiety and reduce the experience. On the other hand, AI dialogue state management is complicated. When users frequently switch topics and trace back the conversation, the front-end state is prone to confusion. For example, knowledge point prompt errors frequently occur in the learning tutoring system. At the same time, the customized display capabilities are lacking and mostly limited to text. It is impossible to display pictures of scenic spots and route maps during travel consultations, and it is difficult to meet diverse needs. In addition, the scalability is limited, and the closed architecture customized for specific scenarios requires code reconstruction when business expansion occurs, which is time-consuming and labor-intensive, and hinders system upgrades.

[0004] Therefore, there is an urgent need for an efficient front-end data management system and method to solve problems such as data processing delays, complex state management, insufficient customized display, and limited scalability. Summary of the invention

[0005] The purpose of the present invention is to provide a front-end AI dialogue data management system and method thereof, aiming to solve the problems raised in the above-mentioned background technology.

[0006] The present invention is implemented in this way. On the one hand, a front-end AI dialogue data management system comprises:

[0007] An asynchronous data flow management module is used to use asynchronous data flow technology to send the request input by the front-end user to the AI ​​back-end without blocking the main thread, and continuously monitor the response data from the AI ​​back-end. When new data is received, the subsequent processing flow is triggered to ensure the real-time transmission of data between the front-end and the back-end, and reduce the response delay; the asynchronous data flow technology includes RxJS or Redux Thunk;

[0008] State management module, which is built based on Vuex, Pinia or Redux, and is used to record the interaction status information of each stage, including user input history, AI response status, and current dialogue round, during the whole process of user-AI interaction. The state management mechanism ensures data consistency, so that the user interface synchronously displays the latest status;

[0009] The streaming data control module is used to monitor the data flow between users and AI in real time, and transmit and update the front-end data in a timely and accurate manner according to the status changes during the interaction process. When the user modifies the question midway or AI adds new prompt information, the front-end display content is adjusted to ensure the timeliness and correctness of the interface display;

[0010] Markdown rendering engine, which is a built-in advanced rendering engine that supports multiple custom syntaxes. When receiving the results in Markdown format returned by the AI ​​backend, it converts them into rich text format for rendering and display according to the user's pre-set requirements, so as to provide diversified display capabilities;

[0011] Extension modules are dynamically loaded during system startup or operation based on different business needs. They interact with the core system through unified interface specifications to achieve personalized expansion of system functions and adapt to various scenarios from simple conversations to complex multi-round interactions.

[0012] The present invention provides a front-end AI dialogue data management system and method thereof, and its beneficial technical effects include:

[0013] (1) Reduced latency: The asynchronous data flow management module enables efficient synchronization of data between the front-end and back-end, significantly reducing data processing latency.

[0014] (2) Data consistency: The state management module ensures the consistency between the user interface and the backend data, thus optimizing the user experience.

[0015] (3) Personalized display: The built-in advanced Markdown rendering engine supports a variety of custom syntaxes, allowing AI output content to be flexibly personalized.

[0016] (4) High scalability: The system adopts a modular design and can be customized and expanded according to business needs to adapt to different application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a system architecture diagram of a front-end AI dialogue data management system.

[0018] Figure 2 It is a workflow diagram of a front-end AI dialogue data management method.

[0019] Figure 3 It is a state management flowchart of the front-end AI dialogue data management method.

[0020] Figure 4 It is a working principle diagram of the Markdown rendering engine of the front-end AI dialogue data management system.

[0021] Figure 5 It is a schematic diagram of the extension module of the front-end AI dialogue data management system. DETAILED DESCRIPTION

[0022] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0023] The specific implementation of the present invention is described in detail below in conjunction with specific embodiments.

[0024] The present invention provides a front-end AI dialogue data management system and method thereof, which solve the technical problems in the background technology.

[0025] As another preferred embodiment of the present invention, on the other hand, a front-end AI dialogue data management system comprises:

[0026] An asynchronous data flow management module is used to use asynchronous data flow technology to send the request input by the front-end user to the AI ​​back-end without blocking the main thread, and continuously monitor the response data from the AI ​​back-end. When new data is received, the subsequent processing flow is triggered to ensure the real-time transmission of data between the front-end and the back-end, and reduce the response delay; the asynchronous data flow technology includes RxJS or Redux Thunk;

[0027] State management module, which is built based on Vuex, Pinia or Redux, and is used to record the interaction status information of each stage, including user input history, AI response status, and current dialogue round, during the whole process of user-AI interaction. The state management mechanism ensures data consistency, so that the user interface synchronously displays the latest status;

[0028] The streaming data control module is used to monitor the data flow between users and AI in real time, and transmit and update the front-end data in a timely and accurate manner according to the status changes during the interaction process. When the user modifies the question midway or AI adds new prompt information, the front-end display content is adjusted to ensure the timeliness and correctness of the interface display;

[0029] Markdown rendering engine, which is a built-in advanced rendering engine that supports multiple custom syntaxes. When receiving the results in Markdown format returned by the AI ​​backend, it converts them into rich text format for rendering and display according to the user's pre-set requirements, so as to provide diversified display capabilities;

[0030] Extension modules are used to be dynamically loaded during system startup or operation according to different business needs. They interact with the core system through unified interface specifications to achieve personalized expansion of system functions and adapt to various scenarios from simple dialogues to complex multi-round interactions.

[0031] Before sending the user request, the asynchronous data flow management module converts and encapsulates the request format to adapt to the communication protocol with the AI ​​backend, and when monitoring the AI ​​response data, a data monitoring callback function is set to promptly notify the relevant modules for processing when the data is received;

[0032] The state management module initializes the default interaction state during the system initialization phase, including the initial state when the user is not logged in and the default conversation topic. It records the current interaction state synchronously at the moment the user request is issued, and continuously updates the state as the data interaction progresses, recording whether the AI ​​has received the request, whether the processing has started, and the processing progress information. When an exception occurs that causes the interaction state to be chaotic, the state is automatically rolled back to the last stable state.

[0033] When the streaming data control module receives partial data or updated data from the AI ​​from the asynchronous data stream management module, it determines the validity and priority of the data based on the current interaction status. For text fragments, it is displayed in the answer area of ​​the front-end interface in an appended manner; for structured data, it is preliminarily parsed before displaying;

[0034] The Markdown rendering engine loads preset custom syntax rules and default rendering styles at startup. When encountering unrecognizable syntax or rendering errors, it uses a downgrade processing method to display the unrenderable part in the original text form and record an error log.

[0035] As another preferred embodiment of the present invention:

[0036] (I) System initialization:

[0037] At the system startup stage, each core module is initialized first. The asynchronous data flow management module configures the connection parameters with the AI ​​backend, establishes a stable communication channel, and sets the callback function for data monitoring. The state management module initializes the default interaction state, such as the initial state when the user is not logged in, the default conversation topic, etc. The Markdown rendering engine loads the preset custom syntax rules and default rendering style. The extension module scans the available extension package directory, identifies and records the loadable module information.

[0038] (II) User interaction process:

[0039] When the user logs in and enters a request, the front-end interface triggers the corresponding event and passes the request to the asynchronous data flow management module. The module sends the request to the AI ​​backend according to the predetermined protocol and starts a listening thread to wait for a response.

[0040] The state management module updates the interaction status in real time, records the detailed information of the user's request in the state tree, and marks the current conversation as entering the request sending stage.

[0041] Once the asynchronous data flow management module receives partial response data from the AI ​​backend, it immediately notifies the streaming data control module. The module determines how to display the data based on the current state. For example, if it is a text fragment, it is directly displayed in the answer area of ​​the front-end interface in an appended manner; if it is structured data, it is first parsed and then displayed.

[0042] When the complete AI response arrives and contains Markdown content, the Markdown rendering engine deeply renders it, replacing the original temporary display content on the front-end interface with the rendered rich text, presenting the user with the final exquisite result.

[0043] During the entire interaction process, if business needs trigger the loading conditions of extension modules, such as entering a specific business scenario or the user selecting a specific function, the system dynamically loads the corresponding extension modules, and the extension modules are connected to the core process to enhance system functions.

[0044] (III) Exception handling:

[0045] If the asynchronous data flow management module encounters abnormal situations such as connection interruption and timeout during data transmission, the retry mechanism will be triggered immediately. According to the preset retry strategy, it will try to reconnect to the AI ​​backend and send requests multiple times. At the same time, a friendly error message will be fed back to the user interface, such as "Network connection abnormality, please try again later".

[0046] When encountering an exception, the state management module records the time, type, and related context information of the exception for subsequent troubleshooting. If the exception causes the interaction state to be chaotic, the state can be automatically rolled back to the last stable state to ensure the stability of the system.

[0047] For the Markdown rendering engine, if it encounters unrecognizable syntax or rendering errors, it will use a downgrade processing method to display the unrendered part in the original text form and record the error log for subsequent optimization by developers.

[0048] As a preferred embodiment of the present invention:

[0049] The front-end AI dialogue data management method includes:

[0050] Step 1: The user inputs a request in text, voice or other forms through the front-end interface;

[0051] Step 2: After the front end receives the user request, the asynchronous data flow management module starts immediately, converts and encapsulates the user request format, sends it to the AI ​​back end through an efficient asynchronous transmission channel, and starts a listening thread for the AI ​​response data;

[0052] Step 3: The current interaction status is recorded synchronously at the moment the user request is sent, including the request time and request content summary. The status is continuously updated as the data interaction progresses, recording whether the AI ​​has received the request, whether it has started processing, and the processing progress.

[0053] Step 4: The streaming data control module intervenes to determine the validity and priority of the data based on the current interaction status, and pushes the latest data to the front-end interface for display in a timely manner;

[0054] Step 5: If the AI ​​backend returns a result and the result contains content in Markdown format, the Markdown rendering engine starts to parse the Markdown syntax and converts the AI ​​output result into rich text format in combination with the user-defined rendering rules;

[0055] Step 6: According to the special needs of different businesses, the system can dynamically load specific extension modules at startup or during operation.

[0056] In order to load the above-mentioned method and system and enable it to run smoothly, the system, in addition to the various modules mentioned above, may also include more or fewer components than described above, or a combination of certain components, or different components, for example, it may include input and output devices, network access devices, buses, processors and memories, etc.

[0057] The processor may be a central processing unit, or other general-purpose processors, digital signal processors, application-specific integrated circuits, off-the-shelf programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the system, and various interfaces and lines are used to connect various parts.

[0058] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0059] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

[0060] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A front-end AI dialogue data management system, characterized in that: The system comprises: An asynchronous data flow management module is used to use asynchronous data flow technology to send the request input by the front-end user to the AI ​​back-end without blocking the main thread, and continuously monitor the response data from the AI ​​back-end. When new data is received, the subsequent processing flow is triggered to ensure the real-time transmission of data between the front-end and the back-end, and reduce the response delay; the asynchronous data flow technology includes RxJS or Redux Thunk; State management module, which is built based on Vuex, Pinia or Redux, and is used to record the interaction status information of each stage, including user input history, AI response status, and current dialogue round, during the whole process of user-AI interaction. The state management mechanism ensures data consistency, so that the user interface synchronously displays the latest status; The streaming data control module is used to monitor the data flow between users and AI in real time, and transmit and update the front-end data in a timely and accurate manner according to the state changes during the interaction process. When the user modifies the question midway or AI adds new prompt information, the front-end display content is adjusted to ensure the timeliness and correctness of the interface display; Markdown rendering engine, which is a built-in advanced rendering engine that supports multiple custom syntaxes. When receiving the results in Markdown format returned by the AI ​​backend, it converts them into rich text format for rendering and display according to the user's pre-set requirements, so as to provide diversified display capabilities; Extension modules are dynamically loaded during system startup or operation based on different business needs. They interact with the core system through unified interface specifications to achieve personalized expansion of system functions and adapt to various scenarios from simple conversations to complex multi-round interactions.

2. The front-end AI dialogue data management system according to claim 1, characterized in that: Before sending the user request, the asynchronous data flow management module converts and encapsulates the request format to adapt to the communication protocol with the AI ​​backend, and when monitoring the AI ​​response data, a data monitoring callback function is set to promptly notify the relevant modules for processing when the data is received.

3. The front-end AI dialogue data management system according to claim 1, characterized in that: During the system initialization phase, the state management module initializes the default interaction state, including the initial state when the user is not logged in and the default conversation topic. It synchronously records the current interaction state at the moment the user request is issued, and continuously updates the state as data interaction progresses, recording whether the AI ​​has received the request, whether processing has started, and processing progress information. When an exception occurs that causes confusion in the interaction state, the state is automatically rolled back to the last stable state.

4. The front-end AI dialogue data management system according to claim 1, characterized in that: When the streaming data control module receives partial data or updated data from the AI ​​from the asynchronous data stream management module, it determines the validity and priority of the data based on the current interaction status. For text fragments, they are displayed in the answer area of ​​the front-end interface in an appended manner; for structured data, preliminary analysis is performed before display.

5. The front-end AI dialogue data management system according to claim 1, characterized in that: The Markdown rendering engine loads preset custom syntax rules and default rendering styles when it starts up. When encountering unrecognizable syntax or rendering errors, it uses a downgraded processing method to display the unrendered part in the original text form and record an error log.

6. A front-end AI dialogue data management method, characterized in that: The front-end AI dialogue data management system according to any one of claims 1 to 5 is applied, and the method comprises: Step 1: The user inputs a request in text, voice or other forms through the front-end interface; Step 2: After the front end receives the user request, the asynchronous data flow management module starts immediately, converts and encapsulates the user request format, sends it to the AI ​​back end through an efficient asynchronous transmission channel, and starts a listening thread for the AI ​​response data; Step 3: The current interaction status is recorded synchronously at the moment the user request is sent, including the request time and request content summary. The status is continuously updated as the data interaction progresses, recording whether the AI ​​has received the request, whether it has started processing, and the processing progress. Step 4: The streaming data control module intervenes to determine the validity and priority of the data based on the current interaction status, and pushes the latest data to the front-end interface for display in a timely manner; Step 5: If the AI ​​backend returns a result and the result contains content in Markdown format, the Markdown rendering engine starts to parse the Markdown syntax and converts the AI ​​output result into rich text format in combination with the user-defined rendering rules; Step 6: According to the special needs of different businesses, the system can dynamically load specific extension modules at startup or during operation.

Citation Information

Patent Citations

  • Front-end and back-end synchronous management method and system based on visual display

    CN113254914A

  • Interacting with applications via dynamically updating natural language processing

    CN114600081A

  • Interaction information processing method and device and storage medium

    CN118012309A

  • Self-evolving Artificial Intelligent cyber robot system and offer method

    KR1020090086805A

Cited By

  • AI streaming output rich text real-time rendering method based on minimum rendering unit recognition

    CN120763417A

  • AI streaming output rich text real-time rendering method based on minimum rendering unit identification

    CN120763417B

  • Real-time distribution method, system and equipment for AI dialogue streams based on publishing and subscribing mode, medium and program product

    CN121567542A

  • An AI conversation flow real-time distribution method, system, device, medium and program product based on a publish-subscribe mode

    CN121567542B

  • Front-end interaction method, system and device based on artificial intelligence, medium and product

    CN121680696A