Data expression and interaction methods, systems, and devices based on artificial intelligence
Through a dual-channel generation mechanism, structured data is verified and associated with a unique card identifier. Large models only insert reference markers, and semantic components are generated according to a constrained interface description language. This solves the problem of balancing data accuracy and component diversity in financial streaming interactions, achieving a balance between data accuracy and presentation diversity.
Patent Information
- Application Number
- CN202611629232.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-21
- Publication Date
- 2026-11-17
AI Technical Summary
In existing financial streaming interactions based on large models, the accuracy of financial data and the diversity of component presentation are mutually exclusive under a single generation channel, making it impossible to balance both.
A dual-channel generation mechanism is adopted. After verification, the structured data is associated with the unique card identifier outside the model. Only reference markers are inserted into the large model. Semantic components are generated according to the constrained interface description language, and event stream push is carried out in conjunction with atomic segmentation.
It achieves a balance between data accuracy and component diversity in financial streaming interactions, ensuring data accuracy and presentation diversity while providing progressive presentation and business loop.
Smart Images

Figure CN123117129A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of semantic analysis, and in particular to a data expression and interaction method, system and device based on artificial intelligence. Background Technology
[0002] With the development of artificial intelligence technology, conversational interaction centered on large models is rapidly being implemented in the financial sector. Users submit requests for individual stock analysis, fund selection, and business transactions via natural language, which are then routed by the server to the appropriate intelligent agent to retrieve financial data and generate an answer. This scenario places two demands on the output of the answer: First, financial data such as market data and financial indicators must be accurate and traceable; any errors in numerical values or code will directly affect the user's investment decisions. Second, the answer needs to be presented with rich components such as charts, cards, and lists, and support streaming output, allowing users to progressively read the answer during its generation process, rather than waiting for the entire answer to be generated.
[0003] In existing technologies, streaming interactions based on large models typically involve the model directly generating streaming text carrying data. Financial data is written into the model output in text form, and the front end renders it segment by segment as ordinary text. To enrich the presentation, some solutions further allow the model to directly generate chart descriptions or component descriptions containing data in the output, which are then parsed and rendered by the front end. To ensure data reliability, another solution converts the text results into component pages for display after the entire response has been generated.
[0004] However, regardless of whether financial data is directly generated by the model or presented through model paraphrasing, the data has already entered the model's generation path. Models inherently possess a risk of misrepresentation regarding factual content such as numerical values and security codes. Furthermore, once streamed output is sent, it cannot be reversed, and erroneous data will be directly presented to the user. Solutions that convert the entire response into components afterward require waiting for the complete response to be generated, making it impossible to present it in segments progressively during the streaming process, thus sacrificing the streaming experience. Therefore, the accuracy of financial data requires that it not be generated by the model, while the diversity of component presentation requires the model to participate in structured output. These two requirements are mutually exclusive under the existing single generation channel, making it impossible for current large-model-based financial streaming interactions to simultaneously meet the demands for data accuracy and diverse component presentation.
[0005] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention
[0006] The main purpose of this application is to provide a data expression and interaction method, system and device based on artificial intelligence, which aims to solve the technical problem that in the existing financial streaming interaction based on large models, the accuracy of financial data and the diversity of component presentation are mutually exclusive and cannot be taken into account under a single generation channel.
[0007] To achieve the above objectives, this application proposes a data expression and interaction method based on artificial intelligence, the method comprising: Perform intent recognition and entity recognition on user input to obtain scene labels and entity sets; Based on the scene tags, the user input is routed to the corresponding intelligent agent, and financial data associated with the entity set is retrieved to generate an answer framework; The component expression plan is generated based on the answer framework, and the components are divided into a first category of components to be supported by data and a second category of components with semantic expression based on the component expression plan; For the first type of component, the verified structured data is associated with the unique card identifier generated by the structured data, and the large model is driven to insert a card reference mark referencing the unique card identifier in the streaming text; for the second type of component, the large model is driven to output the component description according to the constrained interface description language. Based on preset semantic boundaries, the streaming text carrying the card reference markers and component descriptions is atomically segmented, and an event stream carrying fragment type indications and component ready status is sent to the client; In response to a client's triggering of a business card bound to an entity in the entity set, the entity and permission requirements bound to the business card are verified, and the business process associated with the entity is entered.
[0008] In one embodiment, the step of retrieving financial data associated with the entity set to generate a response framework includes: The corresponding intelligent agent is invoked based on the scene label; The intelligent agent performs parallel operations on the entity set, including knowledge base retrieval, market data tool invocation, and natural language query conversion, to obtain retrieval results. The search results are assembled according to a preset answer structure to obtain an answer framework that carries the data reference location.
[0009] In one embodiment, the step of generating a component expression plan based on the response framework includes: The components to be inserted are determined based on the data reference positions in the answer framework, resulting in a component list; For each component in the component list, match the card type, data source, and semantic position of insertion into the streaming text to generate a component expression plan; Based on the data source, components whose data source is a structured data source are classified into the first category of components that need data support, and components from other data sources are classified into the second category of components that express semantics, thus obtaining the component classification result.
[0010] In one embodiment, the step of associating the verified structured data with a unique card identifier generated from the structured data includes: Candidate structured data are obtained based on the data source of the first type of component in the component expression plan; The candidate structured data is validated for validity and timeliness, and the candidate structured data that passes the validation is taken as the validated structured data. A unique card identifier is generated for the verified structured data, and the unique card identifier, component type, data version, and data timestamp are associated with the verified structured data to obtain a card registration record. The card registration record is then sent to the client, or the client can retrieve it with a delay based on the unique card identifier.
[0011] In one embodiment, the step of driving the large model to insert a card reference tag referencing the unique card identifier in the streaming text includes: A list of available cards is generated based on the card registration records, and the list of available cards includes the unique card identifier; Provide the available card list to the large model, and constrain the large model to select only from the available card list; The large model is driven to insert card reference tags with a preset tag format into the streaming text according to the semantic position specified by the component expression plan, so as to obtain streaming text carrying card reference tags.
[0012] In one embodiment, the step of driving the large model to output component descriptions according to a constrained interface description language includes: Construct constrained prompt words based on the semantic position of the second type of components in the component expression plan; The driving model outputs a component description containing a component type field within the card code block based on the constrained prompt words. The component type includes summary cards, chapter titles, or insight list cards. The component description and the card reference mark are alternately inserted into the same streaming text according to the semantic position specified by the component expression plan to obtain the complete streaming text.
[0013] In one embodiment, the step of atomically segmenting the streaming text carrying the card reference marker and component description according to a preset semantic boundary, and sending an event stream carrying a fragment type indication and component ready state to the client includes: Detect the closure status of at least one semantic boundary among card reference markers, code blocks, lists, tables, reference blocks, and formula blocks in the streaming text to obtain closed segments and unclosed segments; For the unclosed segments, transmission is delayed; for the closed segments, the segment type indication is determined based on the card reference markers or component descriptions contained in the segment. The closed segment, along with the corresponding segment type indicator and component ready state, is encapsulated into an event stream. For components containing charts or asynchronous data, once the corresponding structured data has been obtained and the chart has been drawn, the ready state indicating that the component can be displayed is written into the event stream and sent to the client.
[0014] In one embodiment, the method further includes: Based on the components that are allowed to operate in the component expression plan, the securities code, target page identifier, business type and permission requirements are injected, and the injected business parameters are bound to the entities in the entity set to obtain the business card; In response to the client's triggering of the business card, the system verifies the permission requirements carried by the business card and enters the business process associated with the bound entity. The client receives a session identifier and operation log returned by the client based on the unique card identifier corresponding to the service card. The returned content is then associated with the structured data displayed to the client to obtain audit records.
[0015] Furthermore, to achieve the above objectives, this application also proposes an artificial intelligence-based data expression and interaction system, which includes: The intent recognition module is used to perform intent recognition and entity recognition on user input to obtain scene labels and entity sets; The intelligent agent routing module is used to route the user input to the corresponding intelligent agent according to the scene label, and retrieve financial data associated with the entity set to generate an answer framework; The component processing module is used to generate a component expression plan based on the answer framework, and to divide the components into a first type of components to be supported by data and a second type of components with semantic expression based on the component expression plan; The dual-channel generation module is used to associate the verified structured data with the unique card identifier generated from the structured data for the first type of component, and drive the large model to insert a card reference mark referencing the unique card identifier in the streaming text; for the second type of component, it drives the large model to output the component description according to the constrained interface description language. The segmentation and sending module is used to atomically segment the streaming text carrying the card reference mark and component description according to the preset semantic boundary, and send an event stream carrying the fragment type indication and component ready status to the client; The business interaction module is used to respond to the client's triggering of a business card bound to an entity in the entity set, verify the entity and permission requirements bound to the business card, and enter the business process associated with the entity.
[0016] Furthermore, to achieve the above objectives, this application also proposes an artificial intelligence-based data expression interaction device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the artificial intelligence-based data expression interaction method described above.
[0017] This application proposes an artificial intelligence-based data expression interaction method, system, and device. The method includes: performing intent recognition and entity recognition on user input to obtain scene tags and entity sets; routing user input to the corresponding intelligent agent based on scene tags, retrieving financial data associated with the entity set to generate a response framework; generating a component expression plan based on the response framework, and dividing the components into a first type of components to be supported by data and a second type of components with semantic expression based on the component expression plan; for the first type of components, associating the verified structured data with a unique card identifier generated from the structured data, and driving the large model to insert a card reference mark referencing the unique card identifier in the streaming text; for the second type of components, driving the large model to output component descriptions according to a constrained interface description language; atomically segmenting the streaming text carrying card reference marks and component descriptions according to preset semantic boundaries, and sending an event stream carrying fragment type indications and component ready status to the client; responding to the client's triggering of business cards of entities in the bound entity set, verifying the entities and permission requirements bound to the business cards, and entering the business process associated with the entities. This application employs a dual-channel generation mechanism. After verification, structured data is associated with a unique card identifier outside the model, and only a reference marker is inserted into the large model. Semantic components are generated according to a constrained interface description language. Combined with atomic segmentation of event stream push, this solves the problem of balancing data accuracy and component diversity in financial streaming interaction, achieving a balance between the two. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart illustrating an embodiment of the data expression and interaction method based on artificial intelligence in this application. Figure 2This is a flowchart illustrating Embodiment 2 of the data expression and interaction method based on artificial intelligence in this application; Figure 3 This is a flowchart illustrating Embodiment 3 of the data expression and interaction method based on artificial intelligence in this application; Figure 4 This is a flowchart illustrating Embodiment 4 of the data expression and interaction method based on artificial intelligence in this application; Figure 5 This is a flowchart illustrating Embodiment 5 of the data expression and interaction method based on artificial intelligence in this application; Figure 6 This is a flowchart illustrating Embodiment Six of the data expression and interaction method based on artificial intelligence in this application; Figure 7 This is a flowchart illustrating Embodiment Seven of the data expression and interaction method based on artificial intelligence in this application; Figure 8 A simplified flowchart illustrating the data expression and interaction method based on artificial intelligence provided in Embodiment 8 of this application; Figure 9 This is a schematic diagram of the module structure of the data expression and interaction system based on artificial intelligence, as described in an embodiment of this application. Figure 10 This is a schematic diagram of the device structure of the hardware operating environment involved in the data expression and interaction method based on artificial intelligence in the embodiments of this application.
[0021] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0022] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0023] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0024] In existing financial streaming interactions based on large models, there is a problem that the accuracy of financial data and the diversity of component presentation are mutually exclusive under a single generation channel, making it impossible to balance both.
[0025] This application provides a solution with a dual-channel generation mechanism. After verification, structured data is associated with a unique card identifier outside the model, and only a reference mark is inserted into the large model. Semantic components are generated according to a constrained interface description language. Combined with atomic segmentation of event stream push, this solution solves the problem of the inability to balance data accuracy and component diversity in financial streaming interaction, achieving both.
[0026] Based on this, embodiments of this application provide a data expression and interaction method based on artificial intelligence, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the data expression and interaction method based on artificial intelligence in this application.
[0027] In this embodiment, the data expression and interaction method based on artificial intelligence includes steps S10 to S60: Step S10: Perform intent recognition and entity recognition on the user input to obtain scene labels and entity sets.
[0028] It should be noted that, in this embodiment, user input refers to natural language requests received by the client, generated by the user through text input, speech transcription, or selection of page controls; intent recognition is the process by which the system determines the category of the needs expressed by the user input, and the determination result is output in the form of scene tags; entity recognition is the process by which the system extracts financial business objects with clear business meanings from the user input, and the extraction result is output in the form of entity sets; scene tags refer to tag information used to identify the business scenario to which the user input belongs, and scene tags include business processing, individual stock analysis, fund screening, and online Q&A; an entity set is a collection of one or more entities, and entities include code information such as securities codes and fund codes that can uniquely identify financial business objects.
[0029] This embodiment aims to transform unstructured natural language requests into machine-routable and searchable structured information. The scene tag determines the intelligent agent and its retrieval tool combination used for retrieval, and the entity set determines the specific financial business object targeted by the retrieval. This avoids repeatedly parsing the original statement during the retrieval stage and enables ambiguous expressions in multi-turn dialogues to be normalized into clear scenes and entities, thereby improving the accuracy of routing and the recall rate of retrieval.
[0030] In one possible implementation, the system rewrites the user input question before performing intent recognition, transforming colloquial and figurative expressions into semantically complete independent questions, and then classifies the rewritten questions according to the scenario. In another possible implementation, intent recognition is achieved through a pre-trained classification model, which uses a preset scenario set as its output space, including scenario labels such as business processing, individual stock analysis, fund screening, and online Q&A. In yet another possible implementation, entity recognition is achieved through at least one of regular expression matching, keyword dictionary matching, and named entity recognition models, extracting securities codes or fund codes as entities from the user input or the rewritten questions.
[0031] Step S20: Based on the scene label, route the user input to the corresponding intelligent agent, retrieve the financial data associated with the entity set, and generate an answer framework.
[0032] It should be noted that in this embodiment, an agent refers to a service unit pre-configured for a specific scenario label. Each agent is bound to a set of retrieval tools, a knowledge base scope, and prompt word templates that match its scenario. Financial data refers to data associated with entities in the entity set, sourced from retrieval sources such as research reports, company announcements, market data, financial indicators, and knowledge bases. Retrieval refers to the process by which an agent calls its bound set of retrieval tools to obtain financial data associated with the entity set from various retrieval sources. The answer framework refers to the skeleton structure used to organize the answer content. The answer framework specifies the paragraph topics contained in the answer and the data reference positions corresponding to each paragraph topic. The data reference positions are used to mark the empty spaces that need to be filled with structured data.
[0033] This embodiment aims to ensure that the retrieval behavior is accurately matched with the scenario. Since different scenario tags require different data sources, retrieval depths and answer organization methods, having a dedicated intelligent agent perform the retrieval can ensure that the retrieval results are closely aligned with the scenario requirements.
[0034] In one possible implementation, the agent performs three types of retrieval operations in parallel: knowledge base retrieval, market data tool invocation, and natural language query conversion. Natural language query conversion involves converting user-inputted or rewritten questions into structured query statements and then querying the market data database or financial database. In another possible implementation, the answer framework is organized into a paragraph structure with a general-specific-general structure. Each paragraph topic has one or more data reference positions attached, and the number of data reference positions corresponds to the types of financial data required for that paragraph topic.
[0035] Step S30: Generate a component expression plan based on the answer framework, and divide the components into a first type of components to be supported by data and a second type of components with semantic expression based on the component expression plan.
[0036] It should be noted that in this embodiment, the component expression plan is a planning information generated based on the answer framework, used to arrange the components in the answer. The component expression plan specifies the component type, data source, and semantic position of each component in the streaming text. The semantic position refers to the description of the paragraph topic and its order in the streaming text. A component refers to the basic unit that constitutes the content presented in the answer. Components include forms such as cards, charts, text blocks, and entry controls. The first type of component that needs data support refers to components whose correct presentation depends on accurate and verified structured data. Typical forms of the first type of component include K-line cards, fund flow cards, and structured result lists. The second type of component with semantic expression refers to components that are mainly based on semantic organization and content summarization and can be generated by a large model without external structured data. Typical forms of the second type of component include summary cards, chapter titles, and insight list cards.
[0037] This embodiment aims to complete the overall arrangement of all components before streaming generation begins; the component expression plan determines the components to be inserted and their semantic positions based on the paragraph topics and data reference positions in the answer framework, so that the overall structure of the answer is determined before streaming generation, avoiding structural drift during the generation process; component division provides the accuracy of financial data and the diversity of component program presentation.
[0038] In one possible implementation, when the scene label indicates individual stock analysis, the system will configure the component presentation plan as text analysis, K-line cards that can be switched between securities and benchmark indices, fund flow cards, and securities details entry.
[0039] In one specific implementation, the answer framework includes a "Technical Analysis" paragraph topic with a data reference location for candlestick data attached to that paragraph topic. The system then arranges a candlestick card component for that semantic location in the component expression plan. The data source for this candlestick card component is specified as the market database, thus classifying it as a first type of component requiring data support. Simultaneously, the system arranges a summary card component for the "Comprehensive Conclusion" paragraph topic. The data source for this summary card component is specified as large model generation, thus classifying it as a second type of component for semantic expression.
[0040] Step S40: For the first type of component, associate the verified structured data with the unique card identifier generated by the structured data, and drive the large model to insert a card reference mark referencing the unique card identifier in the streaming text; for the second type of component, drive the large model to output the component description according to the constrained interface description language.
[0041] It should be noted that in this embodiment, the verified structured data is structured data that has undergone data validity verification and data timeliness verification. Data validity verification is used to verify the completeness of the data fields and the rationality of the values. Data timeliness verification is used to verify whether the data timestamp meets the globally unique identifier generated by the system for the verified structured data. The unique card identifier, along with the component type, data version, and data timestamp, is associated with the verified structured data. The large model refers to the large language model. Streaming text refers to the answer text that is continuously generated and pushed segment by segment. Card reference markers are data content inserted into the streaming text that references the unique card identifier and does not contain the verified structured data. The syntax of card reference markers can be in the form of "" or equivalent syntax. The constrained interface description language refers to the markup language that limits the syntax structure and vocabulary set and is used to describe the type and layout of components. The component description refers to the text output by the large model according to the constrained interface description language, which describes the type and content organization of the second type of components.
[0042] This embodiment aims to allocate the guarantee of data accuracy and the generation of diverse presentations to two independent channels. For the first type of component, since the card reference markers do not carry any data content, financial data does not pass through the generation path of the large model at all, thus eliminating the risk that the large model will create illusions about factual content such as numerical values and securities codes and present them directly in the streaming output. For the second type of component, the constrained interface description language restricts the free generation of the large model to a range that is grammatically parsable and type-enumerable. The outputs of the two channels are finally merged into the same streaming text, so that the parts with high accuracy requirements and the parts with semantic expression as the main focus coexist in the same answer, thereby taking into account both data accuracy and presentation diversity.
[0043] In one possible implementation, the system provides a list of available cards to the large model, which includes unique card identifiers that have been generated, and constrains the large model to select only card reference tags from the list of available cards to insert into the streaming text; in another possible implementation, the constrained interface description language is carried out in card code blocks, and the large model outputs component descriptions containing component type fields within the card code blocks, where component types include summary cards, chapter titles, or insight list cards.
[0044] Step S50: Atomically segment the streaming text carrying the card reference mark and component description according to the preset semantic boundary, and send an event stream carrying the fragment type indication and component ready state to the client.
[0045] It should be noted that in this embodiment, the preset semantic boundary is a pre-defined boundary type used to define the semantically complete units in the streaming text. The preset semantic boundary includes at least card reference markers, card code blocks, lists, tables, reference blocks, and formula blocks. Atomic segmentation refers to the process by which the system segments the streaming text carrying card reference markers and component descriptions into the smallest indivisible semantic fragments according to the preset semantic boundary. Each segment obtained is an atomic fragment. Fragment type indication is a field in the event stream used to identify the type of the corresponding fragment. The fragment type is determined based on the card reference markers or component descriptions contained in the fragment. Component readiness status is a field in the event stream used to identify whether the verified structured data of the corresponding component has been obtained and whether the chart has been drawn. The event stream refers to the sequence of events continuously pushed by the system to the client. The events in the event stream carry atomic fragments and their fragment type indications, or carry component readiness status. This embodiment aligns the client's rendering behavior with the semantic type of the fragments through atomic segmentation.
[0046] In one possible implementation, the system detects the closure status of preset semantic boundaries such as card reference markers, card code blocks, lists, tables, reference blocks, and formula blocks in the streaming text. For unclosed segments detected, the system delays their transmission in the event stream until the segment is closed, so that unclosed segments are not sent as ordinary text segments.
[0047] Step S60: In response to the client's triggering of a business card bound to an entity in the entity set, verify the entity and permission requirements bound to the business card, and enter the business process associated with the entity.
[0048] It should be noted that, in this embodiment, the business card is an interactive card that can be triggered by the client, generated by injecting business parameters into the component that allows business operations in the component expression plan. The business card contains the securities code, target page identifier, business type, permission requirements, and session association identifier. Triggering refers to the click, selection, or other operations performed by the client on the business card. Permission requirements refer to the permission status required to execute the business corresponding to the business card. Business process refers to the business handling process associated with the entity bound to the business card, which includes entering the securities details page, entering the fund purchase process, etc.
[0049] This embodiment is used to build a closed loop between data presentation and business processing, avoiding misalignment between the presented object and the processing object, and preventing the entry into the business process when permissions are insufficient, thereby ensuring both object consistency and operational compliance in the interaction closed loop.
[0050] In one possible implementation, the system injects a securities code, target page identifier, business type, permission requirements, and session association identifier into a component that is allowed to perform business operations according to the component expression plan, and binds the injected business parameters with entities in the entity set to obtain a business card.
[0051] This application achieves a balance between data accuracy, component diversity, progressive presentation, and business closure in financial streaming interaction by using a scenario-based routing retrieval and response generation framework, a dual-channel component expression plan, structured data that is verified and associated with a unique card identifier outside the model, large models that only insert reference markers or are generated according to a constrained interface description language, streaming text that is atomically segmented into event streams, and a complete chain of business card-triggered verification entering the business process.
[0052] Furthermore, referring to Figure 2 The second embodiment of the data expression and interaction method based on artificial intelligence in this application provides a flowchart, based on the above. Figure 2 The illustrated embodiment further refines the step of "retrieving financial data associated with the entity set to generate a response framework" in step S20, including steps A201-A203: Step A201: Invoke the corresponding intelligent agent according to the scene label; Step A202: The intelligent agent performs parallel operations on the entity set, including knowledge base retrieval, market data tool invocation, and natural language conversion query, to obtain the retrieval results; Step A203: Assemble the search results according to the preset answer structure to obtain an answer framework carrying the data reference location.
[0053] It should be noted that, in this embodiment, knowledge base retrieval refers to the process by which the intelligent agent retrieves knowledge-based content such as research reports and company announcements for entities in the entity set within the bound knowledge base; market data tool invocation refers to the process by which the intelligent agent invokes the bound market data service interface to obtain market data associated with entities in the entity set; natural language to query conversion refers to the process of converting user-inputted or rewritten questions into structured query statements and executing queries against the market data database or financial database to obtain structured data such as financial indicators; the financial data in the search results comes from retrieval sources such as research reports, company announcements, market data, financial indicators, and knowledge bases; the preset answer structure refers to the pre-defined skeleton structure used to specify the topics of each paragraph in the answer and their arrangement order; the answer frame refers to the frame obtained by assembling the search results according to the preset answer structure, specifying the topics of each paragraph in the answer and the corresponding data reference positions; the data reference position refers to the information in the answer frame used to mark the empty spaces that need to be filled with structured data, and the number of data reference positions corresponds to the types of financial data required for the corresponding paragraph topics.
[0054] This application uses scene tags to call corresponding intelligent agents, performs knowledge base retrieval, market data tool invocation, and natural language conversion query in parallel on the entity set, and assembles the retrieval results into a response framework carrying data reference positions according to a preset response structure, thereby realizing accurate scene retrieval, parallel acquisition of heterogeneous data, and decoupling of structured data.
[0055] In one possible implementation, the correspondence between scene tags and agents is pre-configured in a mapping table. The system queries the mapping table using scene tags and calls the mapped agent.
[0056] In one possible implementation, the intelligent agent corresponding to the individual stock analysis scenario tag is bound to the market data service interface, research report knowledge base, and financial indicator library; the intelligent agent corresponding to the fund screening scenario tag is bound to the fund database and screening condition parsing tool; and the intelligent agent corresponding to the online question-and-answer scenario tag is bound to the general knowledge base.
[0057] In one possible implementation, the three-way search is dispatched and executed as concurrent tasks. If any one search fails, it is filled with an empty result, without blocking the execution and aggregation of the other two searches.
[0058] In one possible implementation, natural language query conversion is achieved through a large model, which converts the rewritten question into a structured query statement corresponding to the table structure of a financial indicator database or market data database; or it is achieved through a query template, where entities from the rewritten question are filled into the query template to generate a structured query statement.
[0059] In one possible implementation, each paragraph topic includes one or more data reference locations. The technical analysis paragraph topic includes data reference locations for candlestick chart data, the capital flow paragraph topic includes data reference locations for capital flow data, and the individual stock fundamentals paragraph topic includes data reference locations for financial indicators.
[0060] Furthermore, referring to Figure 3 The third embodiment of the data expression and interaction method based on artificial intelligence in this application provides a flowchart, based on the above. Figure 3 The illustrated embodiment further refines the step of "generating a component expression plan based on the answer framework" in step S30, including steps A301 to A303: Step A301: Determine the components to be inserted based on the data reference positions in the answer framework to obtain a component list.
[0061] It should be noted that, in this embodiment, the components to be inserted refer to the presentation units that need to be displayed in the streaming text and used to carry financial data. Components include forms such as cards, charts, text blocks, and entry controls; the component list refers to a list compiled from all the determined components to be inserted. The system traverses the data reference positions attached to each paragraph topic in the answer framework, determines the components to be inserted that can carry the presentation of the financial data according to the type of financial data indicated by each data reference position, and summarizes each component to be inserted along with its correspondence with the data reference position to obtain the component list.
[0062] Additionally, it should be noted that the components to be inserted can be determined through a preset mapping between financial data types and component forms.
[0063] In one possible implementation, the data reference position of K-line data is mapped to K-line cards, the data reference position of fund flow data is mapped to fund flow cards, and the data reference position of financial indicators is mapped to a structured result list. In another possible implementation, the components can also be determined by including components that do not rely on data support, such as chapter titles, in the component list based on the paragraph themes in the answer framework, so that the component list covers both data carrying and semantic organization presentation requirements.
[0064] Step A302: Match card type, data source, and semantic position of insertion into the streaming text for each component in the component list to generate a component expression plan.
[0065] It should be noted that, in this embodiment, card type refers to the type of presentation format adopted by the component when rendering on the client side. Card types include K-line cards, fund flow cards, structured result lists, summary cards, chapter titles, and insight list cards, etc.; data source refers to the identifier of the data provider of the content presented by the component. Data sources include market databases, financial databases, and large model generation; semantic position refers to the description of the paragraph theme and its order in which the component is located in the streaming text. The streaming text is the answer text that is continuously generated and pushed out in a segment-by-segment manner; component expression plan refers to the planning information used to arrange each component in the answer. The component expression plan specifies the card type, data source, and semantic position of each component inserted into the streaming text. It can also specify whether business operations are allowed and the corresponding business parameters.
[0066] This embodiment is used to complete the overall arrangement of all components before streaming generation begins; wherein, semantic position matching anchors each component to the corresponding paragraph topic of the answer framework, and the overall structure of the answer is determined before streaming generation, avoiding structural drift during the generation process; card type matching adapts the presentation form of each component to the nature of the financial data it carries; and data source matching explicitly determines the data supplier of each component.
[0067] In one possible implementation, when the scene label indicates individual stock analysis, the component expression plan is configured to include text analysis, switchable K-line cards for securities and benchmark indices, fund flow cards, and a securities details entry, wherein the securities details entry is configured to allow business operations.
[0068] Step A303: Based on the data source, components whose data source is a structured data source are classified into the first type of components to be supported by data, and components from other data sources are classified into the second type of components for semantic expression, thus obtaining the component classification result.
[0069] It should be noted that, in this embodiment, structured data sources refer to data sources that store and supply financial data in a structured form, including market data databases and financial databases; the first type of components that need data support refers to components whose correct presentation of content depends on verified structured data, including candlestick charts, fund flow charts, and structured result lists; the second type of components that express semantics refers to components whose presentation is mainly based on semantic organization and content summarization and whose content is generated and presented by a large model, including summary cards, chapter titles, and insight list cards.
[0070] In one possible implementation, components whose data source is designated as a market data database or a financial database are classified as first-class components, and components whose data source is designated as a large model generation are classified as second-class components. Since the component classification is completed before the streaming generation begins, the verification of financial data and the generation of unique card identifiers corresponding to the first-class components do not have to wait for the large model generation progress. The constraint configuration of the constrained interface description language applicable to the second-class components can also be prepared in advance, thereby shortening the overall startup latency of streaming output.
[0071] This application determines the components to be inserted by the data reference position in the answer framework to obtain a component list, generates a component expression plan for each component by matching card type, data source and semantic position of insertion into the streaming text, divides the first type of components to be supported by data and the second type of components with semantic expression according to the data source, and realizes the determination and division of complete component mapping, overall arrangement before generation and dual-channel division of labor.
[0072] Furthermore, referring to Figure 4 The fourth embodiment of the data expression and interaction method based on artificial intelligence in this application provides a flowchart, based on the above. Figure 4 The embodiment shown further refines the step of "associating the verified structured data with the unique card identifier generated from the structured data" in step S40, including steps A401 to A403: Step A401: Obtain candidate structured data based on the data source of the first type of component in the component expression plan; Step A402: Perform validity and timeliness checks on the candidate structured data, and use the candidate structured data that passes the checks as the checked structured data. Step A403: Generate a unique card identifier for the verified structured data, and associate the unique card identifier, component type, data version, and data timestamp with the verified structured data to obtain a card registration record. Send the card registration record to the client, or allow the client to retrieve it with a delay based on the unique card identifier.
[0073] It should be noted that, in this embodiment, candidate structured data refers to financial data in a structured form that has not yet been verified, obtained by the system from the structured data source based on the data source of the first type of component to be supported by the data. Validity verification refers to the verification method that verifies the completeness of the fields and the rationality of the values in the candidate structured data; timeliness verification refers to the verification method that verifies whether the data timestamps of the candidate structured data meet the scenario's requirements for data freshness.
[0074] Additionally, it should be noted that: Unique Card Identifier refers to a globally unique identifier generated by the system for verified structured data; Component Type refers to the type of presentation used by the component during client-side rendering; Data Version refers to the version information that identifies the order in which verified structured data is retrieved or refreshed; Data Timestamp refers to the production time of the data corresponding to the verified structured data; Card Registration Record refers to the record obtained after associating the Unique Card Identifier, Component Type, Data Version, and Data Timestamp with the verified structured data; Delayed Fetch is the method by which the client retrieves the Card Registration Record and its associated verified structured data from the card data interface based on the Unique Card Identifier when it needs to render a component.
[0075] This application obtains candidate structured data from the data source of the first type of component that needs data support. After validity and timeliness verification, the verified structured data is obtained. A unique card identifier is generated for it and associated with the component type, data version and data timestamp to obtain the card registration record. The data is then distributed by sending or delayed retrieval, thereby achieving targeted data acquisition, dual verification, traceability of external associations, and decoupling from the main text push.
[0076] In one possible implementation, candidate structured data is extracted from the retrieval results, that is, from the retrieval results obtained by the agent performing knowledge base retrieval, market data tool invocation and natural language conversion query in parallel, data corresponding to the data source of the first type of component is extracted; or candidate structured data is obtained by targeted query based on the data source, that is, daily K-line sequence and capital flow data are obtained when the data source is a market data database, and financial indicator data are obtained through structured query statements when the data source is a financial database.
[0077] In one possible implementation, the validity check verifies that the date, opening price, closing price, highest price, lowest price, and trading volume fields of the daily candlestick chart are not empty, and that the closing price is positive and the absolute value of the price change is within a reasonable range; the timeliness check verifies whether the difference between the data timestamp and the current time is less than a preset freshness threshold, with a higher freshness requirement for intraday scenarios and a relaxed requirement for the latest trading day for post-market scenarios; candidate structured data that fails the check is not registered, the system discards the candidate structured data and triggers a re-acquisition, or the corresponding component is downgraded to text presentation.
[0078] In one possible implementation, the unique card identifier is generated by concatenating elements such as component type, entity, and timestamp; when the data of the same component is refreshed during the session, the system generates a new data version and a new unique card identifier, thereby preventing the client from using expired data.
[0079] In one possible implementation, the client retrieves the card registration record and associated verified structured data from the card data interface in a deferred manner based on the unique card identifier when the component needs to be rendered.
[0080] Furthermore, referring to Figure 5 The fifth embodiment of the data expression and interaction method based on artificial intelligence in this application provides a flowchart, based on the above. Figure 5 The embodiment shown further refines the step of "driving the large model to insert a card reference mark referencing the unique card identifier in the streaming text" in step S40, including steps A501 to A503: Step A501: Generate a list of available cards based on the card registration records, wherein the list of available cards includes the unique card identifier; Step A502: Provide the available card list to the large model, and constrain the large model to select only from the available card list; Step A503: Drive the large model to insert card reference tags with a preset tag format into the streaming text according to the semantic position specified by the component expression plan, so as to obtain the streaming text carrying the card reference tags.
[0081] It should be noted that, in this embodiment, the unique card identifier refers to the globally unique identifier generated by the system for verified structured data; the available card list refers to a closed set of unique card identifiers that can be referenced, generated based on card registration records; the component expression plan specifies the semantic position of each component inserted into the streaming text; the semantic position refers to the description of the paragraph topic and its order in which the component is located in the streaming text; the streaming text is the answer text that is continuously generated and pushed out segment by segment; the preset tag format refers to the pre-agreed tag syntax used to write card references in the streaming text; the card reference tag refers to the tag written by the large model according to the preset tag format, used to reference the unique card identifier and without carrying data content; the streaming text carrying the card reference tag refers to the streaming text with the card reference tag inserted.
[0082] This application generates a list of available cards containing unique card identifiers based on card registration records, provides this list to a large model, and constrains the large model to select only from the list. It then drives the large model to insert card reference tags in a preset format into the streaming text according to the semantic positions specified by the component expression plan, resulting in streaming text carrying card reference tags. This achieves closed constraints on the large model's card selection behavior to the real registration identifier, anti-illusion isolation where card reference tags only reference unique card identifiers without carrying data content, consistent anchoring of component presentation order to the topic of the answer framework paragraphs, and friendly support for unified client parsing and atomic segmentation with fixed-format tags. Thus, it lays a constrained generation layer support for balancing data accuracy and component presentation diversity in financial streaming interactions.
[0083] In one possible implementation, the list of available cards includes only the unique card identifiers in each card registration record; each unique card identifier in the list of available cards also includes the component type and suggested semantic position, which the large model can select according to paragraph topic alignment.
[0084] In one possible implementation, when the validated structured data is refreshed during a session and a new data version and a new unique card identifier are generated, the list of available cards is updated accordingly, and the old identifier is removed from the list to prevent large models from referencing expired cards.
[0085] In one possible implementation, constraints are implemented through prompts. The system injects a list of available cards along with constraint instructions that only identifiers within the list can be referenced and no data content can be written in the markers into the prompts of the large model. Alternatively, constraints can be implemented through output validation. The system validates the identifiers referenced by the card reference markers output by the large model. Card reference markers that reference identifiers outside the list are removed, or the large model is triggered to regenerate the corresponding fragment, or the corresponding component is downgraded to text presentation.
[0086] In one possible implementation, the preset tag format is double square bracket syntax, and the card reference tag is in the form of a double square bracket tag referencing the unique card identifier kd_600519_20260920; or it is a self-closing tag form, where the card reference tag carries the unique card identifier with the tag attribute.
[0087] In one specific implementation, the system has completed the verification and registration of the daily K-line sequence and capital flow data for 600519, obtaining two card registration records. Based on these two card registration records, the system generates a list of available cards {kd_600519_20260920, fund_600519_20260920}. The system injects this list, along with a constraint instruction that only identifiers within the list can be referenced and no data content can be written in the tags, into the prompt words of the large model, constraining the large model to select only from this list. The system drives the large model to generate streaming text according to the semantic positions specified in the component expression plan. When it reaches the technical aspect section, it inserts a card reference tag for kd_600519_20260920; when it reaches the capital aspect section, it inserts a card reference tag for fund_600519_20260920, resulting in streaming text carrying card reference tags.
[0088] Furthermore, referring to Figure 6 The sixth embodiment of the data expression and interaction method based on artificial intelligence in this application provides a flowchart, based on the above. Figure 6 The embodiment shown further refines the step of "driving the large model to output component descriptions according to the constrained interface description language" in step S40, including steps A601 to A603: Step A601: Construct constrained prompt words based on the semantic position of the second type of component in the component expression plan; Step A602: Drive the large model to output a component description containing a component type field within the card code block based on the constrained prompt words. The component type includes summary cards, chapter titles, or insight list cards. Step A603: Alternately insert the component description and the card reference mark into the same streaming text according to the semantic position specified by the component expression plan to obtain the complete streaming text.
[0089] It should be noted that, in this embodiment, the second type of semantic expression component is a component mainly based on semantic organization and content summarization, with data sourced from the large model; semantic position refers to the description of the paragraph topic and its order within the streaming text; constrained prompt words are prompt information constructed to drive the large model to output component descriptions, which embeds the grammatical constraints of the constrained interface description language and the semantic position specifications of the second type of component; the constrained interface description language refers to a pre-set, grammatically and lexically restricted component description language used to constrain the large model's expression of the second type of component in a structured and parsable form; card code block refers to the code block area in the streaming text that carries the component description, delineated by a specified delimiter; component type refers to the type of presentation form adopted by the component when rendered on the client side, and the component types of the second type of component specifically include summary cards, chapter titles, or insight list cards; complete streaming text refers to streaming text that simultaneously carries component descriptions and card reference markers.
[0090] This application constructs constrained prompt words based on the semantic positions of the second type of components in the component expression plan. This drives the large model to output component descriptions containing component type fields such as summary cards, chapter titles, or insight list cards within the card code block based on the constrained prompt words. Then, the component descriptions and card reference tags are alternately inserted into the same streaming text according to the semantic positions specified in the component expression plan to obtain the complete streaming text. This achieves the pre-injection of the syntactic constraints and semantic position specifications of the constrained interface description language, the controllable utilization of the large model's semantic induction ability within the limited language range, and the output of structurally unified and parsable component descriptions. It also achieves the confluence and arrangement of the first type of component data presentation and the semantic presentation of the second type of component semantic expression in the same stream, with the client only needing to parse once to render all components uniformly. This lays the foundation for balancing data accuracy and component presentation diversity in financial streaming interaction at the semantic expression and dual-channel confluence level.
[0091] In one possible implementation, the constrained prompts include the syntax specifications of the constrained interface description language and an enumeration of allowed component types, prohibiting the output of component types outside the enumeration for large models; it also includes field definitions for each component type, such as the component description of a summary card including a title and summary content field, the component description of a chapter title including a title and order field, and the component description of an insight list card including a title and list item field; the card code blocks are delimited by fenced code blocks with specified language identifiers, and the client can locate the component description using a unified parsing rule.
[0092] In one possible implementation, the constrained prompts also include style constraints, requiring component descriptions to be concise and conform to financial terminology standards.
[0093] In one possible implementation, the large model is driven to generate the complete streaming text in one go. When the model reaches the semantic position of the first type of component, a card reference mark is inserted, and when it reaches the semantic position of the second type of component, a card code block is output. The alternation order follows the paragraph topic order of the answer framework to ensure that the structure of the complete streaming text is consistent with the answer framework.
[0094] In one possible implementation, card code blocks and card reference tags are both output as an indivisible whole during the streaming process, avoiding the component descriptions or tags being broken up by the streaming output. For data blocks that are not fully transmitted during the streaming output, an intelligent parsing algorithm is used to complete and close the data block. In addition, when the semantic positions of the second type of component and the first type of component are adjacent under the same paragraph topic, the component description and card reference tag are allowed to be arranged adjacently, and the client renders them sequentially according to the order of the received stream.
[0095] Furthermore, referring to Figure 7 The seventh embodiment of the data expression and interaction method based on artificial intelligence in this application provides a flowchart, based on the above. Figure 7 The embodiment shown further refines the step S50, which involves "atomically segmenting the streaming text carrying the card reference marker and component description according to a preset semantic boundary, and sending an event stream carrying a fragment type indication and component ready state to the client," and includes steps A701 to A703: Step A701: Detect the closure status of at least one semantic boundary among card reference markers, code blocks, lists, tables, reference blocks, and formula blocks in the streaming text to obtain closed segments and unclosed segments; Step A702: Determine the segment type indicator for the closed segment based on the card reference mark or component description contained in the segment; Step A703: Encapsulate the closed segment, the corresponding segment type indicator, the component ready state, and the unclosed segment into an event stream. For components containing charts or asynchronous data, after the corresponding structured data has been obtained and the chart has been drawn, write the ready state of the component that can be displayed into the event stream and send it to the client.
[0096] It should be noted that, in this embodiment, the streaming text carrying card reference markers and component descriptions refers to the streaming text that simultaneously inserts card reference markers and component descriptions, i.e., the complete streaming text obtained after dual-channel convergence; the preset semantic boundary refers to the pre-set boundary used to define the semantically complete unit in the streaming text, including at least one of card reference markers, code blocks, lists, tables, reference blocks, and formula blocks; the code block is the code block area in the streaming text delimited by delimiters, and the card code block carrying the component description is a type of code block; atomic segmentation refers to the processing method of segmenting the streaming text into semantically complete presentation units according to the preset semantic boundaries; the closed state refers to the state of whether the initial delimitation and the final delimitation of the semantic boundary have been paired completely; the closed segment refers to the segment whose semantic boundaries have been paired completely and is semantically self-complete; the unclosed segment refers to the segment whose initial delimitation has appeared but whose final delimitation has not yet appeared and is still being generated; delayed sending refers to the processing method of temporarily suspending the push of unclosed segments and sending them after they are closed.
[0097] Additionally, it should be noted that: fragment type indicator refers to information that identifies the content type contained in a closed fragment; component readiness status refers to status information indicating whether a component is ready to be displayed; event flow refers to a stream organized and pushed to the client in units of events, with each event in the event flow carrying closed fragments and corresponding fragment type indicators and component readiness status; progressive rendering refers to a presentation method in which the client receives and renders segment by segment as the event flow progresses; asynchronous data is structured data that is not yet ready during the streaming text process and needs to be acquired asynchronously; chart drawing refers to the process of converting structured data into a chart presentation format.
[0098] Additionally, it should be noted that unclosed segments are generated and written to the event stream and sent to the client without delay. The client performs intelligent parsing on the unclosed segments. Unclosed segments that are successfully parsed are rendered as real-time accumulated text, while unclosed segments that fail to be parsed are displayed as loading blocks with a delay. The client then completes the structure of the unclosed segments that failed to be parsed using a preset structure completion algorithm. The completed unclosed segments are displayed to the user without waiting for semantic boundary closure. Intelligent parsing refers to the client's parsing process that determines whether the generated content of an unclosed segment can be rendered independently without relying on end delimitation. Real-time accumulated text refers to the content of unclosed segments that the client gradually receives and accumulates from the event stream. Content that only has initial delimitation but does not have a renderable structure is judged as failing intelligent parsing and is displayed by the client as a loading block with a delay. The loading block is a placeholder block indicating that the corresponding segment content is being generated or parsed.
[0099] In one possible implementation, unclosed segments that fail to be parsed by intelligent parsing are completed by the client using a preset structural completion algorithm. The preset structural completion algorithm completes the missing end delimiters and structural elements according to the boundary type. The unclosed segments after structural completion are displayed to the user without waiting for the semantic boundary to close, thus reducing the latency from generation to presentation of the unclosed segments.
[0100] In one possible implementation, the detection is achieved by performing delimiter matching on the text already generated during the convection generation process. Card reference marks are determined to be closed based on the overall output of the preset mark format, code blocks are determined to be closed based on the pairing of fence delimiters, lists are determined to be closed based on the start of the entry symbol and the end of the list, tables are determined to be closed based on the completeness of the header separator row and the data row, and reference blocks and formula blocks are determined to be closed based on the pairing of their respective delimiters.
[0101] In one possible implementation, the card reference marker and the card code block carrying the component description participate in atomic segmentation as indivisible atomic units. They are only determined to be closed segments after their overall output, thus avoiding the segmentation and disassembly of the marker and component description. Unclosed segments are temporarily stored in a buffer. After they are closed, the whole segment is used as a closed segment to determine the segment type indicator and is emitted with the event stream.
[0102] In one possible implementation, the component's ready state includes two values: not ready and ready. Pure semantic components that do not contain charts or asynchronous data carry the ready state upon fragment closure. Components containing charts or asynchronous data initially carry the not ready state, with the client rendering a placeholder skeleton first. Furthermore, chart drawing is completed on the server side; the system draws the validated structured data as a chart image or generates a chart configuration and then writes it to the ready state. The ready state is written to the event stream as a ready state update event, independent of fragment events. The ready state update event arrives later than the corresponding fragment event, and the client processes them according to the order of event arrival.
[0103] This application detects the closure status of six semantic boundaries in the streaming text, delays the sending of unclosed segments, determines the segment type indication for closed segments and encapsulates them together with the component readiness status into an event stream. Charts or asynchronous components are written to the readiness status after data acquisition and chart drawing. This achieves segment-level integrity assurance with semantic closure as the sending threshold, client-side type-based rendering and distribution driven by segment type indication, and on-demand display that decouples streaming text progression from data chart readiness. While shortening the initial screen wait time, it ensures the semantic integrity and display quality of each presentation unit, thus laying a progressive presentation level support for balancing data accuracy and component presentation diversity in financial streaming interactions.
[0104] Furthermore, the method further includes steps A801-A803: Step A801: Based on the components allowed for business operations in the component expression plan, inject the securities code, target page identifier, business type, and permission requirements, and bind the injected business parameters to the entities in the entity set to obtain the business card; Step A802: In response to the client's triggering of the business card, verify the permission requirements carried by the business card and enter the business process associated with the bound entity; Step A803: Receive the session identifier and operation log returned by the client based on the unique card identifier corresponding to the service card, associate the returned content with the structured data displayed to the client, and obtain the audit record.
[0105] It should be noted that, in this embodiment, the component that allows business operations refers to the permission conditions that the component expression plan plans to support triggering business and triggering the business card to enter the business process; business parameters refer to the securities code, target page identifier, business type, and permission requirements injected into the component that allows business operations; entity set refers to the set of entities involved in the user's question, obtained through entity identification; entity refers to financial objects such as securities and companies in the set; business card refers to the card that can be triggered to enter the business process after injecting business parameters and binding it with entities in the entity set; trigger refers to the interactive operation such as clicking performed by the client on the business card; audit record refers to the record obtained by associating the returned content with the structured data displayed to the client, used for traceability and verification.
[0106] This application injects securities codes, target page identifiers, business types, and permission requirements into components that allow business operations and binds them to entities to obtain business cards. Upon triggering, permissions are verified before entering the associated business process. The returned data is then received according to the unique card identifier and associated with the structured data displayed to the client to obtain audit records, thereby achieving direct access to business without leaving the page, pre-verification of permissions, and traceable operation logs.
[0107] In one possible implementation, the component types that allow business operations include transaction cards, self-selection cards, and information subscription cards. The component expression plan determines whether to set such components and their semantic positions based on scenario tags.
[0108] In one possible implementation, the injected security code is taken from the security entity in the entity set, and the target page identifier and business type are determined together by the scenario tag and component type.
[0109] Furthermore, referring to Figure 8This application provides a simplified flowchart of the data expression and interaction method based on artificial intelligence in its eighth embodiment. A user sends a question to the financial intelligent agent system: "Analyze the latest trend of product A." The system identifies the user's intent and determines that the request is a single demand, i.e., a single intent, and enters the expert routing mode: the user request is sent to the routing agent, which classifies the request's execution intent, identifies it as a stock analysis request, and routes it to a stock analysis expert. The stock analysis expert performs stock trend analysis based on retrieved stock market data, capital flows, and information, producing an answer that includes industry review, stock fundamentals, technical analysis, capital flows, and a comprehensive conclusion. This answer enters the streaming expression link, undergoing card registration, constrained generation, and event... After the request flow is sent, the client progressively renders a candlestick chart card, a fund flow card, and a summary card. The market analysis expert, fund analysis expert, hot topic analysis expert, and financial report analysis expert were not activated in this request. Subsequently, the user continued to send questions in the same session: "Let's see how the overall market performance of related sectors is today, compare it with the performance of my consumer-themed fund, and then help me summarize the key points of the latest financial report for product A." The system recognized that this request contained multiple intentions, including sector market analysis, fund comparison analysis, and financial report interpretation, and entered the scheduling-execution mode: the main agent decomposed the multi-intention request, obtaining three sub-tasks: sector market analysis, fund comparison analysis, and financial report key point interpretation, and then executed scheduling, assigning the three sub-tasks to the sub-agents respectively. Agent A (Market Analysis), Sub-Agent B (Fund Analysis), and Sub-Agent C (Financial Report Analysis) operate within their respective responsibilities, retrieving market data, fund data, and financial data databases, independently performing analysis, and returning sub-results. The main agent receives the results from each sub-agent and aggregates them, combining sector market conclusions, fund comparison conclusions, and financial report highlights into a single, complete final response. The semantic positions of sector market cards, fund net asset value comparison cards, and financial report summary cards are arranged according to the component presentation plan. After event flow distribution, the client progressively renders all components on the same interface. Single-intent requests are routed one-to-one to a single financial expert via a routing agent, while multi-intent requests are broken down and scheduled by the main agent for parallel execution by multiple sub-agents before converging. Both modes share the same intent recognition entry point. The system automatically selects the execution mode based on the complexity of the user's intent, achieving precise and direct access to single requests and divide-and-conquer for complex requests. The content produced by each expert and sub-agent is presented through a unified streaming presentation link, balancing data accuracy and component presentation diversity.
[0110] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the data expression and interaction method based on artificial intelligence in this application. Any simple modifications based on this technical concept are within the protection scope of this application.
[0111] This application also provides a data expression and interaction system based on artificial intelligence. Please refer to [link / reference]. Figure 9 The artificial intelligence-based data expression and interaction system includes: The intent recognition module 10 is used to perform intent recognition and entity recognition on user input to obtain scene labels and entity sets; The intelligent agent routing module 20 is used to route the user input to the corresponding intelligent agent according to the scene label, and retrieve financial data associated with the entity set to generate an answer framework; The component processing module 30 is used to generate a component expression plan based on the answer framework, and to divide the components into a first type of components to be supported by data and a second type of components with semantic expression based on the component expression plan; The dual-channel generation module 40 is used to associate the verified structured data with the unique card identifier generated from the structured data for the first type of component, and drive the large model to insert a card reference mark referencing the unique card identifier in the streaming text; for the second type of component, it drives the large model to output the component description according to the constrained interface description language. The segmentation and sending module 50 is used to atomically segment the streaming text carrying the card reference mark and component description according to the preset semantic boundary, and send an event stream carrying the fragment type indication and component ready status to the client; The business interaction module 60 is used to respond to the client's triggering of a business card bound to an entity in the entity set, verify the entity and permission requirements bound to the business card, and enter the business process associated with the entity.
[0112] The AI-based data expression and interaction system provided in this application, employing the AI-based data expression and interaction method described in the above embodiments, can solve the technical problem in existing large-model-based financial streaming interactions where the accuracy of financial data and the diversity of component presentation are mutually exclusive and cannot be simultaneously addressed under a single generation channel. Compared with the prior art, the beneficial effects of the AI-based data expression and interaction system provided in this application are the same as those of the AI-based data expression and interaction method provided in the above embodiments, and other technical features of the AI-based data expression and interaction system are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0113] This application provides an artificial intelligence-based data expression and interaction device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the artificial intelligence-based data expression and interaction method in the first embodiment described above.
[0114] The following is for reference. Figure 10 This document illustrates a structural schematic diagram of an AI-based data expression and interaction device suitable for implementing embodiments of this application. The AI-based data expression and interaction device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 10 The AI-based data expression and interaction device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0115] like Figure 10 As shown, an AI-based data expression interaction device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory 1002 or a program loaded from a storage device 1003 into a random access memory 1004. The random access memory 1004 also stores various programs and data required for the operation of the AI-based data expression interaction device. The processing unit 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems can be connected to the input / output interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows AI-based data expression interaction devices to wirelessly or wiredly communicate with other devices to exchange data. While the figures show AI-based data expression interaction devices with various systems, it should be understood that implementing or having all of the systems shown is not required. More or fewer systems may be implemented alternatively.
[0116] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0117] The AI-based data expression and interaction device provided in this application, employing the AI-based data expression and interaction method described in the above embodiments, can solve the technical problem in existing large-model-based financial streaming interactions where the accuracy of financial data and the diversity of component presentation are mutually exclusive and cannot be simultaneously addressed under a single generation channel. Compared with the prior art, the beneficial effects of the AI-based data expression and interaction device provided in this application are the same as those of the AI-based data expression and interaction method provided in the above embodiments, and other technical features in this AI-based data expression and interaction device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0118] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0119] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0120] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A data expression and interaction method based on artificial intelligence, characterized in that, Applied to the server side, the method includes: Perform intent recognition and entity recognition on user input to obtain scene labels and entity sets; Based on the scene tags, the user input is routed to the corresponding intelligent agent, and financial data associated with the entity set is retrieved to generate an answer framework; The component expression plan is generated based on the answer framework, and the components are divided into a first category of components to be supported by data and a second category of components with semantic expression based on the component expression plan; For the first type of component, the verified structured data is associated with the unique card identifier generated by the structured data, and the large model is driven to insert a card reference mark referencing the unique card identifier in the streaming text; for the second type of component, the large model is driven to output the component description according to the constrained interface description language. Based on preset semantic boundaries, the streaming text carrying the card reference markers and component descriptions is atomically segmented, and an event stream carrying fragment type indications and component ready status is sent to the client; In response to a client's triggering of a business card bound to an entity in the entity set, the entity and permission requirements bound to the business card are verified, and the business process associated with the entity is entered.
2. The data expression and interaction method based on artificial intelligence as described in claim 1, characterized in that, The steps of the framework for generating responses by retrieving financial data associated with the entity set include: The corresponding intelligent agent is invoked based on the scene label; The intelligent agent performs parallel operations on the entity set, including knowledge base retrieval, market data tool invocation, and natural language query conversion, to obtain retrieval results. The search results are assembled according to a preset answer structure to obtain an answer framework that carries the data reference location.
3. The data expression and interaction method based on artificial intelligence as described in claim 1, characterized in that, The step of generating a component expression plan based on the answer framework includes: The components to be inserted are determined based on the data reference positions in the answer framework, resulting in a component list; For each component in the component list, match the card type, data source, and semantic position of insertion into the streaming text to generate a component expression plan; Based on the data source, components whose data source is a structured data source are classified into the first category of components that need data support, and components from other data sources are classified into the second category of components that express semantics, thus obtaining the component classification result.
4. The data expression and interaction method based on artificial intelligence as described in claim 1, characterized in that, The step of associating the verified structured data with the unique card identifier generated from the structured data includes: Candidate structured data are obtained based on the data source of the first type of component in the component expression plan; The candidate structured data is validated for validity and timeliness, and the candidate structured data that passes the validation is taken as the validated structured data. A unique card identifier is generated for the verified structured data, and the unique card identifier, component type, data version, and data timestamp are associated with the verified structured data to obtain a card registration record. The card registration record is then sent to the client, or the client can retrieve it with a delay based on the unique card identifier.
5. The data expression and interaction method based on artificial intelligence as described in claim 4, characterized in that, The step of inserting a card reference marker referencing the unique card identifier into the streaming text of the driving large model includes: A list of available cards is generated based on the card registration records, and the list of available cards includes the unique card identifier; Provide the available card list to the large model, and constrain the large model to select only from the available card list; The large model is driven to insert card reference tags with a preset tag format into the streaming text according to the semantic position specified by the component expression plan, so as to obtain streaming text carrying card reference tags.
6. The data expression and interaction method based on artificial intelligence as described in claim 1, characterized in that, The steps for the driving large model to output component descriptions according to the constrained interface description language include: Construct constrained prompt words based on the semantic position of the second type of components in the component expression plan; The driving model outputs a component description containing a component type field within the card code block based on the constrained prompt words. The component type includes summary cards, chapter titles, or insight list cards. The component description and the card reference mark are alternately inserted into the same streaming text according to the semantic position specified by the component expression plan to obtain the complete streaming text.
7. The data expression and interaction method based on artificial intelligence as described in claim 1, characterized in that, The step of atomically segmenting the streaming text carrying the card reference marker and component description according to the preset semantic boundary, and sending an event stream carrying the fragment type indication and component ready state to the client includes: Detect the closure status of at least one semantic boundary among card reference markers, code blocks, lists, tables, reference blocks, and formula blocks in the streaming text to obtain closed segments and unclosed segments; For the closed segment, the segment type indicator is determined based on the card reference markers or component descriptions contained in the segment; The closed segments, along with the corresponding segment type indicators, component ready states, and unclosed segments, are encapsulated into an event stream. For components containing charts or asynchronous data, once the corresponding structured data has been obtained and the chart has been drawn, the ready state indicating that the component can be displayed is written into the event stream and sent to the client.
8. The data expression and interaction method based on artificial intelligence as described in claim 1, characterized in that, The method further includes: Based on the components that are allowed to operate in the component expression plan, the securities code, target page identifier, business type and permission requirements are injected, and the injected business parameters are bound to the entities in the entity set to obtain the business card; In response to the client's triggering of the business card, the system verifies the permission requirements carried by the business card and enters the business process associated with the bound entity. The client receives a session identifier and operation log returned by the client based on the unique card identifier corresponding to the service card. The returned content is then associated with the structured data displayed to the client to obtain audit records.
9. A data expression and interaction system based on artificial intelligence, characterized in that, The AI-based data expression and interaction system includes: The intent recognition module is used to perform intent recognition and entity recognition on user input to obtain scene labels and entity sets; The intelligent agent routing module is used to route the user input to the corresponding intelligent agent according to the scene label, and retrieve financial data associated with the entity set to generate an answer framework; The component processing module is used to generate a component expression plan based on the answer framework, and to divide the components into a first type of components to be supported by data and a second type of components with semantic expression based on the component expression plan; The dual-channel generation module is used to associate the verified structured data with the unique card identifier generated from the structured data for the first type of component, and drive the large model to insert a card reference mark referencing the unique card identifier in the streaming text; for the second type of component, it drives the large model to output the component description according to the constrained interface description language. The segmentation and sending module is used to atomically segment the streaming text carrying the card reference mark and component description according to the preset semantic boundary, and send an event stream carrying the fragment type indication and component ready status to the client; The business interaction module is used to respond to the client's triggering of a business card bound to an entity in the entity set, verify the entity and permission requirements bound to the business card, and enter the business process associated with the entity.
10. A data expression and interaction device based on artificial intelligence, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the artificial intelligence-based data expression interaction method as described in any one of claims 1 to 8.
