Visual data processing method and device, electronic equipment and storage medium
By using the indicator extraction model and enterprise business database system in the treasurer system, responding to user questions and processing relevant data, the problem of insufficient automatic visual data processing solution for the treasurer system in the existing technology is solved, and a wider application scope and more effective data processing and display are achieved.
Patent Information
- Application Number
- CN202311648319.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-04
- Publication Date
- 2025-06-06
AI Technical Summary
The prior art has not yet provided a customized automatic visual data processing solution for the treasurer system, resulting in a narrow application range of visual data processing products.
By responding to the question information entered by the user in the questioning interface, the data indicators associated with the questioning information are extracted based on the indicator extraction model, and the corresponding business data is obtained in the enterprise business database system based on these data indicators, and the data is processed according to the pre-configured processing rules, and answer information is generated and sent to the user.
It realizes a visual data processing solution for the treasurer system, expands the application scope of visual data processing products, and can more effectively process and display data related to the treasurer system.
Smart Images

Figure CN120104683A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence and data processing technology, and in particular to a visual data processing method, device, electronic device and storage medium. Background Art
[0002] With the rapid development of visualization and data processing technologies, current intelligent data visualization interaction technologies mainly involve three aspects: data preprocessing, visualization representation, and interactive operations. Natural interaction based on technologies such as natural language processing and speech recognition has also become a current research hotspot.
[0003] At present, the treasury system is a complex vertical system that connects to multi-source data. Although some data companies have produced some automatic visualization products, no product has yet established a customized solution for treasuries, making the application scope of visualization data processing products relatively narrow. Summary of the invention
[0004] In view of this, the purpose of the present application is to provide a visual data processing method, device, electronic device and storage medium, to obtain data indicators associated with query information, obtain corresponding first business data in a preset enterprise business database system according to the data indicators and obtain corresponding processing results according to pre-configured processing rules, generate corresponding answer information according to the business data and send the answer information to the user, thereby realizing a solution for visual data processing for the treasury system and improving the application scope of visual data processing products.
[0005] In a first aspect, an embodiment of the present application provides a visual data processing method, the method comprising:
[0006] In response to question information input by a user in a questioning interface, extracting data indicators associated with the question information based on an indicator extraction model; wherein the indicator extraction model is obtained based on a plurality of training data acquired by a preset dialogue model, the plurality of training data including vector model training data and keyword model training data;
[0007] Acquire corresponding first business data in a preset enterprise business database system according to the data indicator;
[0008] Processing the first business data according to a pre-configured processing rule to obtain a corresponding processing result; wherein the processing rule includes directly outputting the first business data, or processing the first business data based on a preset calculation formula to obtain second business data and then outputting the second business data;
[0009] Generate corresponding answer information according to the business data, and send the answer information to the user to display the answer information on the question interface; the answer information includes at least one of the following: text results generated by the business data, and chart results generated by the business data.
[0010] In a possible implementation, the indicator extraction model includes a vector model and a keyword model, the data indicator includes a first data indicator, a second data indicator, and a third data indicator, and extracting the data indicator associated with the intention of the question information based on the indicator extraction model includes:
[0011] Extracting keywords of the question information based on the keyword model, and determining the data indicator according to the probability distribution of the keywords; wherein the data indicator includes a first data indicator and a second data indicator associated with the first data indicator;
[0012] Based on the vector model, similarity is judged between the question information and the indicators in the enterprise business database system, and a third data indicator is determined according to the judgment result; wherein the indicators in the enterprise business database system are collected based on a preset corpus collection method;
[0013] The first data indicator, the second data indicator and the third data indicator are weighted and a final data indicator is determined based on a preset screening criterion.
[0014] In a possible implementation manner, the vector model training data and the keyword model training data are obtained by the following steps:
[0015] Generate a corresponding target number of questions for each indicator in the enterprise business database system based on the preset dialogue model;
[0016] Combining all questions in pairs to obtain question pairs, and marking the question pairs to obtain training data for the vector model;
[0017] All questions and the indicators are combined to obtain question-indicator pairs, and the question-indicator pairs are marked to obtain training data for the keyword model.
[0018] In a possible implementation, before acquiring the corresponding first business data in a preset enterprise business database system according to the data indicator, the method further includes:
[0019] Verifying whether the user's authority meets the preset search requirements based on the enterprise business database system;
[0020] If so, it is allowed to obtain business data in the preset enterprise business database system according to the data indicators.
[0021] In a possible implementation, the acquiring corresponding first business data in a preset enterprise business database system according to the data indicator includes:
[0022] Accessing the corresponding business interface in the enterprise business database system based on the data indicator;
[0023] The corresponding first service data is read based on the service interface.
[0024] In a possible implementation manner, generating corresponding answer information according to the business data includes:
[0025] Determine a chart display method corresponding to the business data based on a preset chart matching algorithm, and generate a corresponding chart result based on the chart display method; and / or,
[0026] The business data is input into a preset template prompt, and a corresponding text result is generated based on the dialogue model.
[0027] In a possible implementation, the method further includes:
[0028] The question information input by the user, the text result and / or the chart result are stored based on a preset database.
[0029] In a second aspect, an embodiment of the present application further provides a visual data processing device, the device comprising:
[0030] An extraction module, configured to extract data indicators associated with the question information based on an indicator extraction model in response to question information input by a user in the question interface; wherein the indicator extraction model is obtained based on a plurality of training data acquired by a preset dialogue model, and the plurality of training data includes vector model training data and keyword model training data;
[0031] A first acquisition module, used to acquire corresponding first business data in a preset enterprise business database system according to the data indicator;
[0032] A second acquisition module is used to process the first business data according to a pre-configured processing rule to obtain a corresponding processing result; wherein the processing rule includes directly outputting the first business data, or processing the first business data based on a preset calculation formula to obtain second business data and then outputting the second business data;
[0033] A generation module is used to generate corresponding answer information based on the business data and send the answer information to the user so as to display the answer information on the question interface; the answer information includes at least one of the following: a text result generated by the business data, a chart result generated by the business data.
[0034] In a possible implementation, the indicator extraction model includes a vector model and a keyword model, the data indicator includes a first data indicator, a second data indicator and a third data indicator, and the extraction module is specifically used to:
[0035] Extracting keywords of the question information based on the keyword model, and determining the data indicator according to the probability distribution of the keywords; wherein the data indicator includes a first data indicator and a second data indicator associated with the first data indicator;
[0036] Based on the vector model, similarity is judged between the question information and the indicators in the enterprise business database system, and a third data indicator is determined according to the judgment result; wherein the indicators in the enterprise business database system are collected based on a preset corpus collection method;
[0037] The first data indicator, the second data indicator and the third data indicator are weighted and a final data indicator is determined based on a preset screening criterion.
[0038] In a possible implementation manner, the vector model training data and the keyword model training data are obtained by the following steps:
[0039] Generate a corresponding target number of questions for each indicator in the enterprise business database system based on the preset dialogue model;
[0040] Combining all questions in pairs to obtain question pairs, and marking the question pairs to obtain training data for the vector model;
[0041] All questions and the indicators are combined to obtain question-indicator pairs, and the question-indicator pairs are marked to obtain training data for the keyword model.
[0042] In a possible implementation, the visualized data processing device further includes:
[0043] A verification module, used for verifying whether the authority of the user meets the preset retrieval requirements based on the enterprise business database system before obtaining the corresponding first business data in the preset enterprise business database system according to the data indicator;
[0044] The third acquisition module is used to allow the business data to be acquired in a preset enterprise business database system according to the data indicators.
[0045] In a possible implementation manner, the first acquisition module is specifically configured to:
[0046] Accessing the corresponding business interface in the enterprise business database system based on the data indicator;
[0047] The corresponding first service data is read based on the service interface.
[0048] In a possible implementation manner, the generating module is specifically used to:
[0049] Determine a chart display method corresponding to the business data based on a preset chart matching algorithm, and generate a corresponding chart result based on the chart display method; and / or,
[0050] The business data is input into a preset template prompt, and a corresponding text result is generated based on the dialogue model.
[0051] In a possible implementation, the visualized data processing device further includes:
[0052] The storage module is used to store the question information input by the user, the text result and / or the chart result based on a preset database.
[0053] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of the visual data processing method as described in any one of the first aspects.
[0054] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the visual data processing method described in any one of the first aspects are executed.
[0055] The embodiments of the present application provide a visualized data processing method, device, electronic device and storage medium. In response to question information input by a user in a question interface, data indicators associated with the question information are extracted based on an indicator extraction model, wherein the indicator extraction model is obtained based on multiple training data obtained by a preset dialogue model, and the multiple training data include vector model training data and keyword model training data. According to the data indicators, corresponding first business data are obtained in a preset enterprise business database system, and the first business data is processed according to pre-configured processing rules to obtain corresponding processing results, wherein the processing rules include directly outputting the first business data, or processing the first business data based on a preset calculation formula to obtain second business data and then outputting it, generating corresponding answer information according to the business data, and sending the answer information to the user to display the answer information on the question interface, and the answer information includes at least one of the following: text results generated by the business data and chart results generated by the business data. The present application extracts data indicators associated with the question information based on an indicator extraction model in response to the question information input by the user in the question interface, obtains the corresponding first business data in a preset enterprise business database system according to the data indicators and processes it according to pre-configured processing rules to obtain the corresponding processing results, generates corresponding answer information according to the business data and sends the answer information to the user, thereby realizing a solution for visual data processing for the treasury system and improving the application scope of visual data processing products.
[0056] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0058] Figure 1 is a flow chart of a visual data processing method according to an embodiment of the present application;
[0059] Figure 2 It is an architectural diagram for realizing the visualized data processing method of the present application;
[0060] Figure 3 It is a schematic diagram of the pairwise matching of problems;
[0061] Figure 4 It is a schematic diagram of the matching of indicators and questions;
[0062] Figure 5 It is a schematic diagram of the question interface;
[0063] Figure 6 is a flow chart of a visual data processing method according to another embodiment of the present application;
[0064] Figure 7 is a flow chart of a visual data processing method according to another embodiment of the present application;
[0065] Figure 8 is a flow chart of a visual data processing method according to another embodiment of the present application;
[0066] Fig. 9 is a flow chart of a visual data processing method according to another embodiment of the present application;
[0067] Fig.10 is a structural schematic diagram of a visual data processing device according to an embodiment of the present application;
[0068] Fig.11 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0069] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0070] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0071] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0072] Considering the rapid development of visual data processing technology, the current intelligent data visualization interaction technology mainly involves three aspects: data preprocessing, visual representation and interactive operation. Data preprocessing technology can process data from various sources and types, including structured data, unstructured data and time series data, and convert data into a form suitable for visualization through data cleaning, conversion and dimensionality reduction. Visual representation can be realized in various forms such as static charts, dynamic charts, interactive charts, and visual animations, and automatic visualization based on technologies such as artificial intelligence and machine learning has also become a current hot topic. In terms of interactive operation, various operations such as dragging, zooming, filtering, and association can be realized, which facilitates users to explore and understand data, and natural interaction based on technologies such as natural language processing and speech recognition has also become a current research hotspot. At present, the treasury system is a complex system in the vertical field that connects to multi-source data. Although some data companies have produced some automatic visualization products, no products have established tailor-made solutions for treasury, making the application scope of visual data processing products relatively narrow.
[0073] Those skilled in the art may also understand that the treasury system is connected to multiple sources of data, including but not limited to: bank account management system, budget management system, funds settlement platform, debt financing management system, financial derivatives system, bill system, supply chain financial service management system, accounts receivable management system, financial company core system, financial company online banking system, master data system, treasury portal and other internal systems, as well as the integration of key accounting indicators of some accounting systems and external data source information such as financial market trends, customer public opinion, etc.
[0074] To address this problem, the present application provides a visual data processing method, device, electronic device and storage medium, which extracts data indicators associated with the question information based on an indicator extraction model in response to the question information input by the user in the question interface, obtains the corresponding first business data in a preset enterprise business database system according to the data indicators and processes the data according to pre-configured processing rules to obtain the corresponding processing results, generates corresponding answer information according to the business data and sends the answer information to the user, thereby realizing a solution for visual data processing for the treasury system and improving the application scope of visual data processing products.
[0075] Figure 1 is a flow chart of a visual data processing method according to an embodiment of the present application. Figure 1 As shown, the visualized data processing method of the embodiment of the present application may specifically include:
[0076] S101 , in response to question information input by a user in a questioning interface, extracting data indicators associated with the question information based on an indicator extraction model.
[0077] It should be noted that the present application can be applied to a visual data processing system, and the question interface can be the front-end interface of the system.
[0078] In the embodiment of the present application, the question interface is the front-end interface for users to ask questions, the question information is the information input by the user in the question interface, the indicator extraction model is obtained based on a variety of training data obtained by a preset dialogue model, the various training data include vector model training data and keyword model training data, the indicator extraction model includes a vector model and a keyword model, that is, the indicator extraction model is obtained by model training based on the vector model training data and the keyword model training data, and the vector model training data and the keyword model training data are obtained by the preset dialogue model, when the user initiates a question in the question interface, that is, inputs question information, in response to the question information input by the user in the question interface, the question information is input into the indicator extraction model, and the indicator extraction model outputs data indicators associated with the question information for subsequent processing. For example, Figure 2 As shown, the user inputs the question information "What is the net profit growth rate of a certain company in 2021", and the keywords "a certain company, 2021, net profit" filtered out by the vector model and keyword model are the data indicators associated with the question.
[0079] Optionally, the preset dialogue model may be a large language dialogue model, which may be specifically a large language dialogue model launched by various companies, which will not be described in detail here and may be set according to actual conditions.
[0080] Optionally, the vector model training data and keyword model training data are obtained by the following steps:
[0081] Based on the preset dialogue model, a corresponding target number of questions is generated for each indicator in the enterprise business database system; all questions are combined in pairs to obtain question pairs, and the question pairs are marked to obtain training data for the vector model; all questions and indicators are combined to obtain question-indicator pairs, and the question-indicator pairs are marked to obtain training data for the keyword model. Among them, the indicators in the enterprise business database system are collected based on the preset corpus collection method. For example, more than 300 business indicators are collected, involving financing guarantee systems, account capital systems, capital settlement systems, capital budget systems, large-screen monitoring systems, financial derivatives systems, and user-defined indicators.
[0082] It should be noted that the enterprise business database system is a pre-set enterprise business database. This application is described using the treasury system as an example, but does not constitute a limitation to this. It can be set specifically according to actual conditions.
[0083] For example, for more than 300 business indicators in the treasury system, 20 questions are generated for each indicator based on the dialogue model. Specifically, all questions are combined in pairs. The question pairs from the same indicator are recorded as positive examples, and the opposite are recorded as negative examples, which are the vector model training data. For example Figure 3 As shown, it indicates the matching between two questions; all questions and indicators are combined with each other, and those where the indicators match the questions are recorded as positive examples, and those where the indicators match the questions are recorded as negative examples, which are the keyword model training data, for example Figure 4 As shown, it means that the indicators and the questions match each other.
[0084] To continue, after obtaining the vector model training data and the keyword model training data, continue to obtain the vector model and the keyword model.
[0085] Optionally, adjust the layer structure of the preset vector model to obtain an adjusted vector model; train the adjusted vector model based on the keyword model training data, and optimize the vector model according to the evaluation results of the trained vector model to obtain the keyword model. For example, here BERT (Bidirectional Encoder Representations from Transformers, a pre-trained language model) is used as the preset vector model, and the pre-trained BERT model is loaded using the Transformers library (an open source library) of Hugging Face (an open source machine learning library) or other available libraries, and the keyword model training data is divided into three parts: training set, validation set, and test set. The training set and validation set are pre-processed, and the text is converted into a format that the BERT model can understand. The text is encoded using a tokenizer (a text decomposition algorithm), and it is ensured that the length of the input to the BERT model does not exceed the input limit of the BERT model. Then, in order to fine-tune the BERT model to recognize keywords, some modifications are made to the BERT model, that is, a fully connected layer is added to the last hidden layer of the BERT model. , and connect its output to another fully connected layer, which outputs a probability distribution representing keywords, and replaces the original BertForSequenceClassification class, and changes to the cross loss function for training. During the training process, the validation set is used for model evaluation, and the hyperparameters are adjusted to obtain the best performance. After the training is completed, the performance of the model is evaluated using the test set. According to the evaluation results, the model can be further optimized, such as adjusting hyperparameters, adding more layers, or using other preset vector models. In short, the keyword model can be obtained by loading the pre-trained BERT model, data preprocessing, adjusting the model structure, training the model, and evaluating the optimization.
[0086] Optionally, a preset vector model is trained based on the vector model training data to obtain a trained vector model. For example, the vector model training data is used to train common vector models such as Cosent and Bert, and the training is evaluated on a test set.
[0087] It should be noted that two domain models were obtained through training. Combined with the open source big data model, we can more accurately understand the questions asked by users in this industry.
[0088] S102: Acquire corresponding first business data in a preset enterprise business database system according to the data indicator.
[0089] In an embodiment of the present application, the first business data, i.e., the business data directly corresponding to the data indicator, is the business data that can be directly queried in the enterprise business database system. According to step S101, the data indicator associated with the question information is extracted, and the first business data corresponding to the data indicator is obtained in the preset enterprise business database system for subsequent processing.
[0090] S103: Process the first business data according to a pre-configured processing rule to obtain a corresponding processing result.
[0091] In an embodiment of the present application, the processing rules include directly outputting the first business data, or processing the first business data based on a preset calculation formula to obtain the second business data and then outputting it, the second business data being new business data calculated by the calculation formula, and processing the first business data according to the pre-configured processing rules to obtain the corresponding processing result, i.e., the first business data or the second business data, for subsequent processing.
[0092] It should be noted that the preset calculation formula can be a financial indicator formula built into the enterprise business database system. For example, a financial indicator formula is ""asset-liability ratio": (["total liabilities", "total assets"],"total liabilities / total assets × 100")", and the asset-liability ratio needs to be calculated. The asset-liability ratio calculated according to this formula is the second business data.
[0093] S104, generating corresponding answer information according to the business data, and sending the answer information to the user, so as to display the answer information on the question interface.
[0094] In the embodiment of the present application, the answer information is the information returned to the user in response to the question information. The answer information includes at least one of the following: a text result generated by business data, a chart result generated by business data, and the corresponding answer information is generated according to the business data, and the answer information is sent to the user to display the answer information on the question interface. For example, Figure 5 As shown, the left side of the figure shows the graphical results, and the right side of the figure shows the text results.
[0095] The visualized data processing method provided in the embodiment of the present application responds to question information input by a user in a question interface, extracts data indicators associated with the question information based on an indicator extraction model, wherein the indicator extraction model is obtained based on a plurality of training data obtained by a preset dialogue model, the plurality of training data including vector model training data and keyword model training data, obtains corresponding first business data in a preset enterprise business database system according to the data indicators, processes the first business data according to pre-configured processing rules, and obtains corresponding processing results, wherein the processing rules include directly outputting the first business data, or processing the first business data based on a preset calculation formula to obtain second business data and then outputting the data, generates corresponding answer information according to the business data, and sends the answer information to the user to display the answer information on the question interface, wherein the answer information includes at least one of the following: text results generated by the business data, and chart results generated by the business data. The visual data processing method of the present application extracts data indicators associated with the question information based on an indicator extraction model in response to the question information input by the user in the question interface, obtains the corresponding first business data in a preset enterprise business database system according to the data indicators and processes the data according to pre-configured processing rules to obtain the corresponding processing results, generates corresponding answer information according to the business data and sends the answer information to the user, thereby realizing a solution for visual data processing for the treasury system and improving the application scope of visual data processing products.
[0096] Further, such as Figure 6 As shown, the step S101 in the above embodiment of “extracting data indicators associated with the intention of the question information based on the indicator extraction model” may specifically include the following steps:
[0097] S601, extracting keywords from the question information based on the keyword model, and determining data indicators according to the probability distribution of the keywords.
[0098] It should be noted that the data indicator includes a first data indicator, a second data indicator and a third data indicator; the data indicator includes a first data indicator and a second data indicator associated with the first data indicator; wherein the first data indicator is an indicator directly obtained by the keyword model, and the second data indicator is an indicator of a new word summarized and interpreted from the question information and associated with the first data indicator, which cannot be directly obtained. For example, Figure 2 As shown, the first data indicator is "a certain company, 2021, net profit", the second data indicator is "a certain company's 2020 financial data, a certain company's 2021 financial data", and the third data indicator is directly obtained by the vector model. Figure 2 As shown, the third data indicator is "net profit growth rate".
[0099] In an embodiment of the present application, keywords of the question information are extracted based on the keyword model obtained in the above embodiment. Specifically, the user's question information is input into a keyword model, such as a fine-tuned BERT model, and the probability distribution of the keywords is obtained. According to the probability distribution of the keywords, the one with a larger probability of appearing is selected as the data indicator.
[0100] S602: Perform similarity judgment between the question information and the indicators in the enterprise business database system based on the vector model, and determine the third data indicator according to the judgment result.
[0101] In an embodiment of the present application, a vector model obtained based on the above embodiment performs a similarity judgment on the question information and the indicators in the enterprise business database system, that is, the user's question information is input into the vector model, and a similarity judgment is performed on the indicators in the enterprise business database system, and the third data indicator is determined based on the judgment result.
[0102] Optionally, the user's question information can be input into the vector model, and similarity can be judged with the indicators in the enterprise business database system, and according to the accuracy of the vector model performance during vector model training (for example, the accuracy is evaluated through a test set during vector model training), a weighted average is performed, and several indicators with the highest scores are selected as the third data indicator. For example, the indicators with the highest scores obtained by multiplying the similarity and the accuracy are the third data indicators.
[0103] S603, performing weighted processing on the first data indicator, the second data indicator, and the third data indicator, and determining a final data indicator based on a preset screening criterion.
[0104] In the embodiment of the present application, the screening criteria are preset criteria for determining the final data indicator, and the first data indicator, the second data indicator, and the third data indicator are weighted (for example, the weights corresponding to the accuracy evaluation through the test set during vector model training as above) to determine the final data indicator based on the preset screening criteria. For example, the screening criteria is set to the data indicator with the largest weighted score as the final data indicator, and the indicator with the highest weighted score after weighted averaging is the final data indicator.
[0105] It should be noted that after obtaining the first data indicator, the second data indicator and the third data indicator, they need to be merged and sorted. Specifically, all data indicators are merged into a unified list. The way of merging depends on personal needs. Among them, a common method is to use some form of weighted merging, such as TF-IDF weighting or the score predicted by the machine learning model. Another method is to simply merge all data indicators, and then use other methods for secondary filtering and sorting as needed; then, the corresponding data indicators are weighted according to the accuracy of the model during training, and the weighted scores are arranged from high to low, and the first ranked is the final data indicator.
[0106] Further, such as Figure 7 As shown, before "obtaining corresponding first business data in a preset enterprise business database system according to the data indicator" in step S102 of the above embodiment, the visualized data processing method of the embodiment of the present application may further include the following steps:
[0107] S701, verifying whether the user's authority meets the preset search requirements based on the enterprise business database system.
[0108] In the embodiment of the present application, the retrieval requirement is a preset requirement on whether the user's authority can obtain the corresponding data. The enterprise business database system verifies whether the user's authority meets the preset retrieval requirement, and performs subsequent processing based on the verification result.
[0109] S702: If not, it is allowed to obtain business data in the preset enterprise business database system according to the data indicators.
[0110] In the embodiment of the present application, if the authority of the verified user meets the preset retrieval requirements, it is allowed to obtain business data in the preset enterprise business database system according to the data indicators.
[0111] Further, such as Figure 8 As shown, the step S102 in the above embodiment of “obtaining corresponding first business data in a preset enterprise business database system according to the data indicator” includes the following steps:
[0112] S801, access the corresponding business interface in the enterprise business database system based on the data index.
[0113] In the embodiment of the present application, the corresponding business interface in the enterprise business database system is accessed based on the data indicator to perform docking with the enterprise business database system.
[0114] S802: Read corresponding first business data based on the business interface.
[0115] In the embodiment of the present application, according to the business interface accessed in step S801, the corresponding first business data is read based on the business interface.
[0116] It should be noted that the system calls the code to read the business interface of the data indicator so that the business interface returns the business data.
[0117] Further, such as Fig. 9 As shown, the "generating corresponding answer information according to the business data" in step S104 in the above embodiment may include the following steps:
[0118] S901, determining a chart display method corresponding to the business data based on a preset chart matching algorithm, and generating a corresponding chart result based on the chart display method.
[0119] In the embodiment of the present application, the chart matching algorithm is a pre-set visualization algorithm for automatically matching business data with chart results, determining the chart display method corresponding to the business data based on the preset chart matching algorithm, and generating corresponding chart results based on the chart display method. It should be noted that the system will automatically call the corresponding form of the matplotlib library to display the chart.
[0120] Optionally, determine the category of the business data returned by the business interface, select a chart display format under the category, and use drawing code to convert the business data and chart display format into a chart result.
[0121] It should be noted that the chart matching algorithm divides the data types returned by the business interface into three categories: discrete-discrete, discrete-numeric, and numeric-numeric. The main difference is that the number of discrete value types is limited, while the numeric type can be any value. The chart display method is determined according to the three different types of returned business data. Different categories have different chart display methods. Among them, under discrete-discrete type, bar charts, pie charts, tree diagrams, tables, etc. can be used to display the distribution and relationship of categorical data; under discrete-numeric type, histograms, box plots, dot plots, line charts, etc. can be used to display the relationship between a categorical variable and a numerical variable, or to display the distribution of categorical data. The system can even pre-set rules, for example For example, when the business data is a time series, a line graph is used first, and when there are fewer discrete numerical types, a histogram is used first; in the numerical-numerical type, scatter graphs, line graphs, bar graphs, etc. can be used to display the relationship between two numerical variables, or to display the trend change of a numerical variable. In a scatter graph, the horizontal axis represents one variable, the vertical axis represents another variable, and each point represents a pair of observations. Regression lines, trend lines, or fitting curves are added to describe the relationship between the variables, correlation coefficients or p-values are added to evaluate the correlation between variables, and statistics such as mean, median, and standard deviation are added to describe the center and dispersion of the data, thereby realizing the data visualization of this application and completing the automatic conversion of business data into charts.
[0122] and / or,
[0123] S902, inputting business data into a preset template prompt, and generating corresponding text results based on the dialogue model.
[0124] In the embodiment of the present application, the template prompt is a template of a preset text result, business data is input into the preset template prompt, and a corresponding text result is generated based on the dialogue model.
[0125] Furthermore, the visualized data processing method of the embodiment of the present application may also include the following steps:
[0126] The question information, text results and / or chart results input by the user are stored based on a preset database.
[0127] In the embodiment of the present application, the database is a library pre-set for storing data, and the question information, text results and / or chart results input by the user are stored based on the preset database.
[0128] It should be noted that the present application can use the python fastapi architecture to implement dialogues, use chromadb to store the output results of the vector model, i.e. the third data indicator, and mysql to store the dialogue history, i.e. the user's question information, text results and / or chart results. Whenever a user asks a question, the backend automatically calls the indicator retrieval function, determines the relevant data indicators, obtains data from the business interface, calculates the relevant data indicators, and then converts them into visual chart results, presents them to the user, and automatically generates text results in combination with the business data, thereby realizing the dialogue management function of the present application.
[0129] To further illustrate, for example, the python fastapi architecture is used to build a dialogue-based visual data interaction system, including: model training, indicator retrieval, indicator visualization, natural language dialogue and other functions. Among them, the model training module collects domain knowledge, generates semantic training data, vector training data, keyword model training data, and trains and saves the optimal model; the indicator retrieval module uses recall and sorting strategies to understand user input, selects the most relevant business interface for indicator access and calculates; the indicator visualization module uses a chart matching algorithm to determine the chart display method, calls the corresponding Matplotlib graphics library to display data, and uses natural language generation technology to generate picture descriptions; the dialogue management module uses a database to store dialogue information and historical records, and generates natural language responses to user questions.
[0130] Fig.10 is a flow chart of a visual data processing device according to an embodiment of the present application. Fig.10 As shown, the visualized data processing device 1000 of the embodiment of the present application may specifically include:
[0131] The extraction module 1001 is used to extract data indicators associated with the question information based on the indicator extraction model in response to the question information input by the user in the question interface. The indicator extraction model is obtained based on a variety of training data obtained by a preset dialogue model, and the various training data include vector model training data and keyword model training data.
[0132] The first acquisition module 1002 is used to acquire corresponding first business data in a preset enterprise business database system according to the data indicator.
[0133] The second acquisition module 1003 is used to process the first business data according to a pre-configured processing rule to obtain a corresponding processing result, wherein the processing rule includes directly outputting the first business data, or processing the first business data based on a preset calculation formula to obtain the second business data and then outputting it.
[0134] The generation module 1004 is used to generate corresponding answer information according to the business data, and send the answer information to the user so as to display the answer information on the question interface; the answer information includes at least one of the following: text results generated by the business data, and chart results generated by the business data.
[0135] In a possible implementation, the indicator extraction model includes a vector model and a keyword model, the data indicator includes a first data indicator, a second data indicator and a third data indicator, and the extraction module is specifically used to:
[0136] Extracting keywords from the question information based on the keyword model, and determining data indicators according to the probability distribution of the keywords; wherein the data indicators include a first data indicator and a second data indicator associated with the first data indicator;
[0137] Based on the vector model, similarity judgment is performed between the question information and the indicators in the enterprise business database system, and a third data indicator is determined according to the judgment result; wherein the indicators in the enterprise business database system are collected based on a preset corpus collection method;
[0138] The first data indicator, the second data indicator and the third data indicator are weighted and the final data indicator is determined based on the preset screening criteria.
[0139] In a possible implementation, the vector model training data and the keyword model training data are obtained by the following steps:
[0140] Generate the corresponding target number of questions for each indicator in the enterprise business database system based on the preset dialogue model;
[0141] Combine all questions in pairs to get question pairs, and label the question pairs to get training data for the vector model;
[0142] All questions and indicators are combined to obtain question-indicator pairs, and the question-indicator pairs are labeled to obtain training data for the keyword model.
[0143] In a possible implementation, the visualized data processing device further includes:
[0144] A verification module, used to verify whether the user's authority meets the preset retrieval requirements based on the enterprise business database system before obtaining the corresponding first business data in the preset enterprise business database system according to the data indicator;
[0145] The third acquisition module is used to allow the business data to be acquired in a preset enterprise business database system according to the data indicators.
[0146] In a possible implementation manner, the first acquisition module is specifically configured to:
[0147] Access the corresponding business interface in the enterprise business database system based on data indicators;
[0148] The corresponding first business data is read based on the business interface.
[0149] In a possible implementation, the generating module is specifically used for:
[0150] Determine a chart display method corresponding to the business data based on a preset chart matching algorithm, and generate a corresponding chart result based on the chart display method; and / or,
[0151] Enter business data into the preset template prompt and generate corresponding text results based on the dialogue model.
[0152] In a possible implementation, the visualized data processing device further includes:
[0153] The storage module is used to store the question information, text results and / or chart results input by the user based on a preset database.
[0154] The visual data processing device provided in the embodiment of the present application responds to question information input by a user in a question interface, and extracts data indicators associated with the question information based on an indicator extraction model, wherein the indicator extraction model is obtained based on multiple training data obtained by a preset dialogue model, and the multiple training data include vector model training data and keyword model training data. According to the data indicators, corresponding first business data is obtained in a preset enterprise business database system, and the first business data is processed according to pre-configured processing rules to obtain corresponding processing results, wherein the processing rules include directly outputting the first business data, or processing the first business data based on a preset calculation formula to obtain second business data and then outputting it, generating corresponding answer information according to the business data, and sending the answer information to the user to display the answer information on the question interface, and the answer information includes at least one of the following: text results generated by the business data and chart results generated by the business data. The visual data processing device of the present application extracts data indicators associated with the question information based on the indicator extraction model in response to the question information input by the user in the question interface, obtains the corresponding first business data in the preset enterprise business database system according to the data indicator and processes it according to the pre-configured processing rules to obtain the corresponding processing results, generates corresponding answer information according to the business data and sends the answer information to the user, thereby realizing a solution for visual data processing for the treasury system and improving the application scope of the visual data processing product.
[0155] like Fig.11As shown, an electronic device 1100 provided in an embodiment of the present application includes: a processor 1101, a memory 1102 and a bus, wherein the memory 1102 stores machine-readable instructions executable by the processor 1101. When the electronic device is running, the processor 1101 communicates with the memory 1102 via the bus, and the processor 1101 executes the machine-readable instructions to perform the steps of the above-mentioned visualized data processing method.
[0156] Specifically, the above-mentioned memory 1102 and processor 1101 can be general-purpose memory and processor, which are not specifically limited here. When the processor 1101 runs the computer program stored in the memory 1102, the above-mentioned visualized data processing method can be executed.
[0157] Corresponding to the above-mentioned visualized data processing method, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned visualized data processing method are executed.
[0158] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0159] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0160] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0161] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the deployment method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.
[0162] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A visual data processing method, It is characterized in that The method comprises: In response to question information input by a user in a questioning interface, extracting data indicators associated with the question information based on an indicator extraction model; wherein the indicator extraction model is obtained based on a plurality of training data acquired by a preset dialogue model, the plurality of training data including vector model training data and keyword model training data; Acquire corresponding first business data in a preset enterprise business database system according to the data indicator; Processing the first business data according to a pre-configured processing rule to obtain a corresponding processing result; wherein the processing rule includes directly outputting the first business data, or processing the first business data based on a preset calculation formula to obtain second business data and then outputting the second business data; Generate corresponding answer information according to the business data, and send the answer information to the user to display the answer information on the question interface; the answer information includes at least one of the following: text results generated by the business data, and chart results generated by the business data.
2. The data processing method according to claim 1, It is characterized in that The indicator extraction model includes a vector model and a keyword model, the data indicator includes a first data indicator, a second data indicator and a third data indicator, and the data indicator associated with the intention of the question information is extracted based on the indicator extraction model, including: Extracting keywords of the question information based on the keyword model, and determining the data indicator according to the probability distribution of the keywords; wherein the data indicator includes a first data indicator and a second data indicator associated with the first data indicator; Based on the vector model, similarity is judged between the question information and the indicators in the enterprise business database system, and a third data indicator is determined according to the judgment result; wherein the indicators in the enterprise business database system are collected based on a preset corpus collection method; The first data indicator, the second data indicator and the third data indicator are weighted and a final data indicator is determined based on a preset screening criterion.
3. The data processing method according to claim 2, It is characterized in that The vector model training data and the keyword model training data are obtained by the following steps: Generate a corresponding target number of questions for each indicator in the enterprise business database system based on the preset dialogue model; Combining all questions in pairs to obtain question pairs, and marking the question pairs to obtain training data for the vector model; All questions and the indicators are combined to obtain question-indicator pairs, and the question-indicator pairs are marked to obtain training data for the keyword model.
4. The data processing method according to claim 1, It is characterized in that Before acquiring the corresponding first business data in a preset enterprise business database system according to the data indicator, the method further includes: Verifying whether the user's authority meets the preset search requirements based on the enterprise business database system; If so, it is allowed to obtain business data in the preset enterprise business database system according to the data indicators.
5. The data processing method according to claim 1, It is characterized in that The obtaining corresponding first business data in a preset enterprise business database system according to the data indicator includes: Accessing the corresponding business interface in the enterprise business database system based on the data indicator; The corresponding first service data is read based on the service interface.
6. The data processing method according to claim 1, It is characterized in that The generating corresponding answer information according to the business data includes: Determine a chart display method corresponding to the business data based on a preset chart matching algorithm, and generate a corresponding chart result based on the chart display method; and / or, The business data is input into a preset template prompt, and a corresponding text result is generated based on the dialogue model.
7. The data processing method according to claim 1, It is characterized in that The method further comprises: The question information input by the user, the text result and / or the chart result are stored based on a preset database.
8. A visual data processing device, It is characterized in that The device comprises: An extraction module, configured to extract data indicators associated with the question information based on an indicator extraction model in response to question information input by a user in the question interface; wherein the indicator extraction model is obtained based on a plurality of training data acquired by a preset dialogue model, and the plurality of training data includes vector model training data and keyword model training data; A first acquisition module, used to acquire corresponding first business data in a preset enterprise business database system according to the data indicator; A second acquisition module is used to process the first business data according to a pre-configured processing rule to obtain a corresponding processing result; wherein the processing rule includes directly outputting the first business data, or processing the first business data based on a preset calculation formula to obtain second business data and then outputting the second business data; A generation module is used to generate corresponding answer information based on the business data and send the answer information to the user so as to display the answer information on the question interface; the answer information includes at least one of the following: a text result generated by the business data, a chart result generated by the business data.
9. An electronic device, It is characterized in that include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the visual data processing method as described in any one of claims 1 to 7 are performed.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the steps of the visualized data processing method according to any one of claims 1 to 7.
Citation Information
Cited By
Data visualization method, device and system of distributed database, equipment and medium
CN121743399A