Detailed Description
Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. It should be understood that the description is only illustrative and is not intended to limit the scope of the invention. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the invention. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the present invention.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where expressions like at least one of "A, B and C, etc. are used, the expressions should generally be interpreted in accordance with the meaning as commonly understood by those skilled in the art (e.g.," a system having at least one of A, B and C "shall include, but not be limited to, a system having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
In the technical scheme of the invention, the acquisition, storage, application and the like of the related personal information of the user accord with the regulations of related laws and regulations, necessary security measures are taken, and the public order harmony is not violated.
First, technical terms described herein are explained and illustrated as follows.
Data source: is the basis of a data warehouse, i.e., the data source of the system, and typically contains various internal and external information of the enterprise, such as various business data information that exists in an in-line database.
Data cleaning: is the process of rechecking and checking data, with the aim of deleting duplicate information, correcting errors that exist, and providing data consistency.
Data warehouse: is used to store structured data (database tables, excel worksheets) and semi-structured data (XML files, web pages) for reporting and analysis. Data flows from various sources (such as databases) and is typically cleaned and standardized before reaching the warehouse. Because data warehouses can store large amounts of information, users can easily access large amounts of historical data that can be used for data mining, data visualization, and other forms of business intelligence reporting.
Word segmentation: a space or other boundary marker is automatically added between words in chinese text. When data mining, accurate recommendation and the like are performed, a Chinese word segmentation technology is often used to segment sentences into words for subsequent processing and modeling.
Neural network: is an algorithm mathematical model which simulates the behavior characteristics of an animal neural network and processes distributed parallel information. The network relies on the complexity of the system and achieves the purpose of processing information by adjusting the relationship of the interconnection among a large number of nodes.
Natural language processing: by utilizing natural language processing technology, the system can perform semantic analysis, keyword extraction, entity recognition and the like on the user questions, and accurately understand the user requirements.
Machine learning: machine learning is a branch of artificial intelligence that enables computer systems to learn and refine automatically through data and experience without explicit programming. It relies on statistics, optimization methods and algorithm design to achieve pattern discovery and knowledge extraction from large amounts of data.
Virtual digital person: refers to a virtual character having a digitized appearance. Unlike robots with entities, virtual digital people exist depending on display devices, and many virtual people known in the art can be displayed by mobile phones, computers or smart large-screen devices. The virtual digital person is preferably characterized by the following three aspects: firstly, the appearance of the owner has the characteristics of specific looks, sexes, characters and the like; secondly, the behavior of the owner has the ability of language, facial expression and limb action expression; thirdly, the idea of the owner has the capability of identifying the external environment and exchanging interaction with the person. In a comprehensive view, the multifunctional entertainment system has four aspects of capability, namely image capability, perception capability, expression capability and entertainment interaction capability.
Text-To-SQL: the natural language description is converted into the corresponding SQL query statement, so that people are assisted in querying massive databases. The Text-to-SQL technique converts (parses) the question to be queried into an SQL statement, queries the result from the database by the statement, and finally feeds the result back to the user.
Card: when the user puts forward the making requirement of the intelligent report, the user refers to the information which needs to be acquired, such as 'opponent client name', 'opponent client is in the line', and the like, and the requirement fields are combined in the card according to the corresponding logic to be used as the follow-up query condition.
The generation and the production of the report form become important components in daily work of banking industry, and based on report form data, marketing personnel can realize the design of a product marketing scheme, management personnel can realize the management of assessment performance and the like. In the aspect of report making, the existing technical scheme mainly has three implementation modes, namely, a report is made by using a traditional manual mode; secondly, manually writing SQL sentences to obtain query data; thirdly, the developer is online to a related system platform, and the frequently used data information of the business personnel is changed into a generalized report for downloading application.
First, the traditional manual report making method and the manual way of writing SQL sentences are inadequate in many scenarios. This approach is time consuming and laborious, especially when the traffic is large and the data complexity is high. For example, a marketer may need to query multiple data points to analyze market dynamics when it is desired to formulate a new marketing strategy. However, conventional methods often rely on technical team assistance, which undoubtedly increases response time, making it difficult for the enterprise to react quickly. In today's business environment, rapid response to market changes often means to occupy competing opportunities.
Second, with the help of developers, some enterprises develop data query platforms. Although this alleviates the problem to some extent, there are still significant drawbacks. At the beginning of communication with the developer, the user can only acquire a predetermined report style. This means that when market changes or minor changes in user requirements occur, the report may not meet those requirements. In addition, most of the existing data query platforms only provide basic data display functions, and lack the capability of generating intelligent reports. Especially today, where data visualization is becoming more and more important, such platforms have insufficient capabilities in generating personalized, highly visualized charts, which have made it difficult to meet the needs of modern enterprises.
Based on this, an embodiment of the present invention provides a report generating method, which is characterized in that the method includes: acquiring user demand text data, wherein the user demand text data comprises text information of user expression demands; inputting the user demand text data into a pre-trained intention classification model to obtain a predicted user intention, wherein the predicted user intention is used for representing intention understanding of the user demand text data; invoking a digital person interface to enable a digital person to interact with a user based on the predicted user intention, and acquiring a confirmed user intention based on an interaction result; acquiring target intention data from a service database by using a Text-To-SQL technology based on the confirmed user intention; and generating a report based on the target intention data. According To the report generating method provided by the invention, through the intention classification model, the digital person and the Text-To-SQL technology, the system can automatically understand and determine the user requirement, and translate the user requirement into the SQL query statement, so that the workload of manual query and data processing is reduced, the target data can be efficiently acquired, the complex manual query process is reduced, and the computer performance is improved; meanwhile, due to automatic processing, the system can generate a report rapidly after a user makes a request, and the user does not need to wait too long, so that the required information can be obtained rapidly, and the satisfaction degree of the user is improved; in addition, through the report automatically generated, errors possibly introduced by manual operation are reduced, and the accuracy and the credibility of the data are improved.
It should be noted that the report generating method, device, equipment and medium determined by the invention can be used in the technical field of big data and the technical field of artificial intelligence, can also be used in the financial field, and can also be used in various fields except the technical field of big data and the technical field of artificial intelligence as well as the financial field. The application fields of the report generation method, the report generation device, the report generation equipment and the report generation medium provided by the embodiment of the invention are not limited.
In the technical scheme of the invention, the related user information (including but not limited to user personal information, user image information, user equipment information, such as position information and the like) and data (including but not limited to data for analysis, stored data, displayed data and the like) are information and data authorized by a user or fully authorized by all parties, and the processing of the related data such as collection, storage, use, processing, transmission, provision, disclosure, application and the like are all conducted according to the related laws and regulations and standards of related countries and regions, necessary security measures are adopted, no prejudice to the public welfare is provided, and corresponding operation inlets are provided for the user to select authorization or rejection.
Fig. 1A schematically illustrates an application scenario diagram of a report generation method, apparatus, device, medium according to an embodiment of the present invention.
As shown in fig. 1A, an application scenario 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various communication client applications, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only) may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (by way of example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that, the report generating method provided by the embodiment of the present invention may be generally executed by the server 105. Accordingly, the report generating device provided by the embodiment of the present invention may be generally disposed in the server 105. The report generating method provided by the embodiment of the present invention may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the report generating apparatus provided by the embodiment of the present invention may also be provided in a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105.
It should be understood that the number of terminal devices, networks and servers in fig. 1A is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
FIG. 1B schematically illustrates a schematic diagram of an intelligent reporting service platform in accordance with embodiments of the present invention.
As shown in fig. 1B, the intelligent report service platform of this embodiment is based on a CTP6 platform framework, which includes an infrastructure layer, a service layer, an access layer, and a presentation layer. The infrastructure layer calls source codes and API interfaces of supporting application systems such as a data center, a digital person background, a jieba word segmentation tool, NLP, text-To-SQL and the like so as To provide infrastructure and technical support of a platform; the service layer is used for providing business logic and back-end services of the core, including defining how tasks move from one step to the next, and the like; the access layer serves as a front door of the platform, and functions for allowing external systems and users to access the service layer can include load balancing responsible for distributing traffic to ensure balanced loads of the respective servers or services; the presentation layer provides an interface for the user to interact with the services of the platform. In addition, monitoring across multiple layers can be provided to ensure that the system is operating properly and to discover problems in time.
In the embodiment of the invention, the intelligent question and answer and chart back transmission can be realized by logging in the corresponding websites of the terminal equipment 101, 102 and 103 to link the intelligent report server.
It should be understood that the architecture of the intelligent reporting service platform in FIG. 1B is merely illustrative. Other similar functions or structures of the intelligent report service platform can be included according to the implementation requirements.
Fig. 2 schematically shows a flowchart of a report generating method according to an embodiment of the invention.
As shown in fig. 2, the report generating method 200 of this embodiment may include operations S210 to S250.
In operation S210, user-required text data including text information of user expression requirements is acquired.
In the embodiment of the invention, a user can log in the intelligent report system and send the personalized data requirement of the financial business of the institution, which is acquired in an intention, to the system in a voice or text input mode.
Fig. 3 schematically shows a flowchart of a method for obtaining text information of a user's needs according to an embodiment of the invention.
As shown in fig. 3, the method for obtaining text information of user requirements in this embodiment may include operations S310 to S330.
In operation S310, user input information including voice and/or text information is acquired.
In embodiments of the present invention, the user may enter his own needs in a variety of ways, which may include voice, text, or a combination of both.
In response to the user input information including the voice information, the voice information in the user input information is converted into text information using automatic voice recognition in operation S320.
In embodiments of the present invention, if the user inputs speech information, the speech content may be converted to text by Automatic Speech Recognition (ASR) techniques. Specifically, after the ASR system captures the sound signal, acoustic features may be extracted by extracting spectral information of the audio, and the acoustic features may be decoded and text generated by a speech recognition model trained based on a large amount of speech and text data, and a language model trained based on the text data.
In operation S330, text preprocessing is performed on the text information in the user input information and the text information converted by the voice information, so as to obtain text data required by the user.
In the embodiment of the invention, text pretreatment can be carried out on the text information input by the user and the text information converted by voice so as to more accurately understand and meet the intention and the requirement of the user. Specifically, the text information provided by the user and the text part in the speech information converted by the ASR can be combined to obtain a complete text data set; noise, such as extra spaces, line breaks, or other special characters, may be removed for the merged text data to ensure cleanliness and consistency of the text. Further, a vocabulary correction technology can be applied to automatically correct spelling errors or replace wrong vocabularies in the text, so that the accuracy of the text is improved; punctuation marks are important elements for pointing to text meaning and structure, incorrect punctuation use can be corrected, and grammar correctness and fluency of the text are ensured; in some cases, stop words, i.e., words that frequently appear in text but lack actual meaning, may also be removed to extract more meaningful keywords and phrases, and to normalize the text, ensuring that the text uses consistent case, format, and expression to improve consistency of subsequent processing.
Referring back to fig. 2, in operation S220, the user demand text data is input into a pre-trained intent classification model, and a predicted user intent is obtained, wherein the predicted user intent is used to represent an intent understanding of the user demand text data.
In embodiments of the present invention, user demand text data may be processed and input into a pre-trained intent classification model to predict user intent, which will analyze the understanding text and predict the most likely user intent.
Fig. 4 schematically shows a flow chart of a method of obtaining a predicted user intent in accordance with an embodiment of the invention.
As shown in fig. 4, the obtaining of the predicted user intention of the embodiment may include operations S410 to S440, and the operations S410 to S440 may at least partially perform the above-described operation S220.
In operation S410, the user-required text data is segmented into required words or required vocabulary units by using a segmentation tool.
In the embodiment of the invention, an applicable word segmentation tool, such as a jieba word segmentation library commonly used in Chinese text analysis, can be imported, and text is segmented into words or vocabulary units according to language rules and models by the word segmentation tool; after processing by the word segmentation tool, the system obtains a word list in which each element represents a segmented word or vocabulary unit. For word lists, the system may perform further word cleaning to remove words of shorter or nonsensical length to preserve meaningful words. Finally, the system will get a word list that has been subjected to word segmentation, which will be a sequence of words or vocabulary units.
In operation S420, the required word or required vocabulary unit is converted into a required word vector.
In embodiments of the present invention, the required words or required vocabulary units may be further subjected to Natural Language Processing (NLP). Specifically, a suitable Word vector model is selected, such as Word2Vec, gloVe, fastText, which is trained by large-scale text data, and the vocabulary is mapped to vectors in a high-dimensional space; after the word vector model is selected, pre-trained word vector models, which typically contain a vocabulary and corresponding word vectors, need to be loaded; for each word or vocabulary unit in the demand, the system will look up its corresponding word vector in the model, possibly using special tags or other strategies to handle if the vocabulary is not present in the model. The choice of a word vector model affects the dimension of the word vector, which is typically an important parameter affecting model performance and resource requirements. Finally, for each required word or vocabulary unit, the system obtains a corresponding word vector that can represent the position and meaning of each vocabulary in semantic space.
In operation S430, features are extracted from the required word vector, and a required numerical vector is obtained.
In the embodiment of the invention, the required word vectors corresponding to each word or word unit in the required text can be summarized or combined firstly, which can be completed by various methods, one common method is to calculate the average value of all required word vectors, add all required word vectors, and then divide the required word vectors by the number of words to obtain the average required word vector; if certain words are more important in demand, the system may assign weights to each demand word vector and then calculate a weighted average. And taking the summarized or combined vector as a required numerical vector to realize feature extraction. In addition, for high-dimensional demand word vectors or demand value vectors, the system may consider reducing dimensions to reduce computational complexity and memory footprint.
In operation S440, the demand value vector is input into a pre-trained intention classification model, and a predicted user intention is output.
In an embodiment of the invention, the intent classification model is trained based on a support vector machine model. The support vector machine is a commonly used machine learning algorithm for classification and regression tasks. The intention classification model based on the support vector machine can be trained by a training set comprising text data of user expression requirements and corresponding intention labels, and is obtained through processes of super-parameter tuning, model evaluation and the like. The demand value vector is input into the intent classification model and a predicted user intent is obtained, thereby helping the system to better understand the user's intent and demand in order to provide more accurate responses and services.
In embodiments of the present invention, the intent classification model may infer from the input demand value vector to determine the most likely user intent, and the model may generate a probability distribution indicating the likelihood of each intent; the system will select the highest probability of intent as the predicted user intent, which is typically the intent that the model considers most likely to match the input text. Furthermore, a threshold value may be set, which is taken as the final prediction result only when the probability of intent exceeds the threshold value.
Referring back to fig. 2, in operation S230, a digital human interface is invoked to interact with the user based on the predicted user intention, and the confirmed user intention is acquired based on the interaction result.
FIG. 5 schematically illustrates a flow chart of a method of invoking a digital human interface to interact with a user in accordance with an embodiment of the invention.
As shown in fig. 5, the method of invoking the digital human interface to interact with the user of this embodiment may include operations S510 to S520, and operations S510 to S520 may at least partially perform operation S230 described above.
In operation S510, based on the predicted user intention, a multi-round conversation is conducted with the user using the digital person, the contents of the multi-round conversation including a query for the predicted user intention, confirmation of the user intention, and satisfaction of the user demand.
In embodiments of the present invention, the system may invoke a digital human interface, which is an interface for interacting with a user, which may be a text chat window, a voice assistant, etc., for conducting multiple rounds of conversations. The digital person may reply or ask the user in a confirmatory manner based on the predicted user intent to ensure that the user's intent is properly understood and to meet the user's needs.
In embodiments of the present invention, in a first round of conversation, a digital person may be involved in greetings, guide a user into a topic or field, and based on predicted user intent, the digital person may present relevant questions to the user to confirm the user's intent and needs, which may be open to encourage the user to provide more detailed information; after the user answers the question, the digital person follows up the dialogue to confirm the user's intention to ensure that the user's needs are properly understood, and if necessary, the digital person may ask the question again to clarify; once the digital person confirms the user's intent, it will take corresponding action to meet the user's needs. This may involve querying a database, providing information, performing operations, and so forth. Furthermore, in multiple rounds of conversations, the digital person may provide feedback or challenges based on the user's answers and behaviors to further refine and meet the user's needs.
In embodiments of the present invention, after user intent validation, the system may store the validated user intent in memory or temporary variables for later use.
Fig. 6 schematically shows a flow chart of a method of digital person generation of a response according to an embodiment of the invention.
As shown in fig. 6, the method of generating a response by a digital person of this embodiment may include operation S610, and the operation S610 may at least partially perform operation S510 described above.
In operation S610, in the course of invoking the digital person interface to perform a multi-round conversation with the user, the digital person parses and generates a response using a natural language processing method based on the answer of the user, wherein the response is generated in the form of a feedback to the user to demand a deck card.
According to embodiments of the present invention, when a user answers a question of a system or provides information, a digital person may parse the user answer through natural language processing techniques, wherein steps such as word segmentation, part-of-speech tagging, syntactic analysis, etc., may be involved to understand the user's intent and the provided information.
According to embodiments of the present invention, after parsing the user answer, the digital person may attempt to identify the user's intent, similar to previous intent classification, but in this case the digital person may be more concerned with the context of the conversation and the questions before the user. Based on the parsing result and the intention recognition of the user answer, a corresponding response may be generated. Among other things, it may involve the use of templates, rule engines, or more advanced generation methods, such as neural network generation.
In embodiments of the present invention, the response may be fed back to the user in the form of a card for the user to more conveniently view and understand the information, which provides the user with a more intuitive, personalized conversational experience. The cards can be in a picture-text mixed arrangement mode, so that information is easier to read and understand. In the card, a combination of user needs is presented, which may include questions posed by the user, answers to the system, other relevant information, and possible operational options or suggestions.
It can be seen that in accordance with embodiments of the present invention, in a multi-round conversation, the system maintains context information to ensure that the response is relevant to the previous conversation. This helps ensure that the user does not have to repeatedly provide information while also making the conversation more coherent.
According to an embodiment of the present invention, a challenge process may also be performed. The challenge process can be applied in two scenarios: firstly, when describing the condition of generating the report, the user can utilize a digital human interface to interact with the user in a query mode so as to further refine the data extraction scheme; the user can inquire the result generated by the primary report, and in the page, the key inquiry information displayed by the report is simulated into cards, namely, the one-time inquiry result is data information feedback composed of a plurality of cards. The data report can be dynamically generated by adding or subtracting cards.
Referring back to fig. 5, in operation S520, in response to reaching a condition for ending the dialog, the confirmed user intention is acquired.
In embodiments of the present invention, multiple rounds of conversations may continue based on the user's answers and the system's responses until the user's needs are met or the conversation ends. When the user's requirements are met or the dialog reaches an end condition, the system ends the multiple rounds of dialog and presents the user with thank you or other appropriate end language.
In accordance with embodiments of the present invention, in a multi-round conversation, the system may define a series of conditions for determining when the conversation may be ended. These conditions may be that a particular question posed by the user, a demand is met, or that the dialog has reached a certain turn.
In the embodiment of the invention, the system obtains the final result through multiple rounds of inquiry and correction in the process of communicating with the user through voice or words. Therefore, the process of inquiry is also a process of system learning, and the processing capacity of the system is stronger with the increase of data information and the more training times. Based on the above analysis, one example of a multi-round dialog is given below:
1) The user puts forward the demand through the system: "help me obtain a report, unit choose hundred million yuan, sort select line code, category select mechanism deposit, mechanism select branch, time choose last half year, obtain the data sheet of the special field of Japanese organization deposit";
2) The system recognizes the user's needs and feeds back: "whether consultation is required: is a statement in institutional/corporate/savings/same business deposit? ";
3) User answer: report information of institutions deposit and companies deposit respectively;
4) The system recognizes the user's needs and challenges: "whether consultation is required: in institution deposit and company deposit, unit selection of billions, sorting selection of row codes, category selection of institution deposit, selection of division of institutions, selection of time selection of last half a year, acquisition of data table of special field of daily institution deposit? ";
5) User answer: "yes";
6) The system feeds back the data table and the visual chart.
According to the embodiment of the invention, the corpus of digital people can be constructed based on the collection of the question and answer templates required by the user, the input of the domain knowledge base and the feedback and evaluation of the user. The question and answer templates can be formed according to queries, questions or answers which are provided by a user in history or real time and responses provided by a system, and can also be collected according to a history question and answer template database; since the digital person serves a specific domain, specialized knowledge and services can also be extracted from the knowledge base of that domain; in addition, user feedback, ratings, and questions to digital persons may be collected to identify and improve the user experience.
Referring back To fig. 2, in operation S240, target intention data is acquired from the business database using Text-To-SQL technology based on the confirmed user intention.
Fig. 7 schematically shows a flowchart of a method of acquiring target intention data according to an embodiment of the invention.
As shown in fig. 7, the method of acquiring target intention data of this embodiment may include operations S710 to S720, and the operations S710 to S720 may at least partially perform the above-described operation S240.
In operation S710, the confirmed user intention is input To the Text-To-SQL platform, and an SQL query statement is acquired.
In the embodiment of the invention, the confirmed user intention can be provided To a Text-To-SQL platform, and the platform can analyze the intention and generate a complete SQL query statement which covers specific aspects of the user requirement, such as query conditions, association tables and the like.
In operation S720, the SQL query statement is input into a service database, and target intention data is obtained, wherein the service database is constructed based on the financial service data of the institution obtained in real time.
In the embodiment of the invention, the financial business data of the institutions can be acquired in real time based on three parts of a self-research and management layer cockpit system of the banks and a client marketing system of the institutions so as to build a business database. And the acquired hundreds of fields are subjected to data cleaning and data warehouse construction according to the dimension adaptation (dimension name, dimension type, weight level, entity type and dimension attribute) and data set adaptation (dimension, index and numerical value) principles.
In the embodiment of the invention, SQL query sentences obtained from the Text-To-SQL platform can be input into a service database To execute query operation; the database can extract target intention data meeting the query conditions from the stored data according to the input SQL query statement and return a query result, wherein the query result can be a data set containing required data or one or more records.
In an embodiment of the present invention, the Text-To-SQL platform includes a pre-constructed Text-To-SQL corpus, wherein the corpus information in the Text-To-SQL corpus includes: based on the question-answer templates of the digital person; real-time communication content between the digital person and the user; and corpus information actively added by a manual mode.
Specifically, a Text-To-SQL corpus can be constructed by: the corpus is constructed by combining word segmentation technology and neural network model, and the work is To improve the accuracy of Text-To-SQL conversion so as To break through the bottleneck that the Chinese Text-To-SQL research has fewer data sets and larger translation structural language error; a large number of diversified question-answer example sentences can be compiled, question-answer templates are manufactured, and the like, so that the question answer capability of the continuous training system is realized on the basis of the feedback result of the user in a mode that a digital person inquires the user whether to need to consult the question; integrating information of multiple modes such as Text, structured data and the like into a Text-To-SQL corpus To provide more comprehensive corpus integration; and evaluating and screening according To report results generated by the system, retaining high-quality samples, removing samples with inaccurate feedback, realizing high-quality sample screening, assisting in responding To question and answer contents of users correctly, and further perfecting a Text-To-SQL corpus.
It should be noted that, due To the diversity of Chinese expression, the current Text-To-SQL technique has an unsatisfactory processing effect in a large-scale and full-scale scene. The embodiment of the invention applies the technology to the banking industry under the financial business line of institutions, and greatly improves the accuracy of semantic analysis through strong specialization and scene specific conditions, thereby improving the expressive force of a semantic analysis model.
Referring back to fig. 2, in operation S250, a report is generated based on the target intention data.
In the embodiment of the invention, the report can be generated according to the user requirement by using the acquired target intention data. This may involve converting the data into a visual chart, table, or other reporting form.
Fig. 8 schematically shows a flow chart of a method of generating a visualization chart from data according to an embodiment of the invention.
As shown in fig. 8, the method of generating a visual chart through data of this embodiment may include operations S810 to S830.
In operation S810, a business intelligence interface is invoked to generate a visualization chart based on the target intent data.
In embodiments of the present invention, a Business Intelligence (BI) interface or tool, which may be a software tool capable of generating various charts and reports, may be invoked to provide target intent data obtained from a database to the business intelligence interface, which may select an appropriate chart type and presentation based on the nature of the data and the needs of the user. The business intelligence interface may generate a visual chart, such as a bar chart, a line chart, a pie chart, a radar chart, etc., based on the data and the user's requirements.
The visual chart is transmitted to the user in operation S820.
In the embodiment of the invention, the generated visual chart can be sent to the user in the modes of application interface, email, short message and the like.
In operation S830, the visual chart is modified in response to the user optimization requirement to perfect the generated report.
In the embodiment of the invention, when the user proposes that the generated chart needs to be modified to meet the specific requirement, the system analyzes the optimization requirement of the user, and adjusts parameters of the chart, such as chart data content, type, color, label and the like, so as to meet the personalized requirement of the user.
Fig. 9 schematically shows a flow chart of a method of content modification of a visual chart according to an embodiment of the invention.
As shown in fig. 9, the method of modifying the content of the visual chart of this embodiment may include operations S910 to S930.
In operation S910, the confirmed user intention and target intention data are re-acquired based on the user optimization requirement, and the visual chart is modified based on the re-acquired target intention data.
In an embodiment of the present invention, the system may re-extract data related to the target intent from the database if the user's optimization needs require re-acquisition of the data. When a user queries data fields present in the data warehouse, multiple rounds of conversations may be entered, combined To generate a latest query card, and the chart is updated in conjunction with Text-To-SQL techniques.
In operation S920, a manual intervention is performed based on the user optimization requirement, and the visual chart is modified based on a result of the manual intervention.
In an embodiment of the present invention, the manual intervention phase is entered when a user queries data fields that are not present in the data warehouse. The user can submit a data demand application, send a mail to a mail box of a research and development personnel by calling a mail reminding interface, and expand a data report in a data lake after the data report passes the audit.
In operation S930, data correction is performed based on the user optimization requirement, and the visual chart is modified based on the result of the data correction.
In the embodiment of the invention, when the problem which is queried by the user is a question class, if the data information of the report is deviated from the real data, the data correction stage is entered. And (3) synchronous query of the data information is completed by using an API interface for data extraction, and the report generation accuracy is checked through multiparty data sources.
It should be noted that, the method for modifying the content of the visual chart in the above embodiment does not limit the report type, that is, the method can be used for other report forms.
According To the report generating method provided by the invention, through the intention classification model, the digital person and the Text-To-SQL technology, the system can automatically understand and determine the user requirement, and translate the user requirement into the SQL query statement, so that the workload of manual query and data processing is reduced, the target data can be efficiently acquired, the complex manual query process is reduced, and the computer performance is improved; meanwhile, due to automatic processing, the system can generate a report rapidly after a user makes a request, and the user does not need to wait too long, so that the required information can be obtained rapidly, and the satisfaction degree of the user is improved; in addition, through the report automatically generated, errors possibly introduced by manual operation are reduced, and the accuracy and the credibility of the data are improved. Specifically, the following beneficial effects are brought:
1. Simplifying the data report generation flow: on one hand, the workload of manually writing SQL query sentences and processing data is reduced, and the working efficiency is improved; on the other hand, the intervention of a developer is not needed, and the related flow of source code writing or multiplexing research and development and online is omitted, so that the report is simpler to manufacture;
2. acceleration of response speed: by means of the Text-to-SQL technology, query sentences can be rapidly generated and data can be extracted, and response time is intelligently shortened;
3. and the feedback accuracy is improved: the user demands can be more accurately understood through digital person, machine learning and natural language processing technologies, and misunderstanding and wrong answer are avoided;
4. personalized information presentation: the generated report provides the information most relevant to the user demand based on the user demand and the target intention data, and enhances the presentation of the content of interest of the user;
5. user engagement: the user can select the chart type, style and the like in the digital human interface interaction so as to meet the personalized requirements of the user, and the participation degree and satisfaction degree of the user are improved;
6. reducing a learning threshold: through automatic processing and automatic report generation, the user does not need to be familiar with complex database query language, and the learning threshold of the using system is reduced;
7. Wide application prospect: the method can be widely applied to the fields of enterprise data analysis, business decision support, market research, user personalized recommendation and the like, and helps users to realize efficient decisions.
Based on the report generating method, the invention also provides a report generating device. The device will be described in detail below in connection with fig. 10.
Fig. 10 schematically shows a block diagram of a report generating apparatus according to an embodiment of the present invention.
As shown in fig. 10, the report generating apparatus 1000 according to this embodiment includes a user demand text data acquisition module 1010, a predicted user intention acquisition module 1020, a confirmed user intention acquisition module 1030, a target intention data acquisition module 1040, and a report generating module 1050.
The user-required text data obtaining module 1010 may be configured to obtain user-required text data, where the user-required text data includes text information of a user expression requirement. In an embodiment, the user demand text data obtaining module 1010 may be configured to perform the operation S210 described above, which is not described herein.
The predicted user intent acquisition module 1020 may be configured to input the user-desired text data into a pre-trained intent classification model to acquire a predicted user intent, wherein the predicted user intent is used to represent an intended understanding of the user-desired text data. In an embodiment, the predicted user intention obtaining module 1020 may be configured to perform the operation S220 described above, which is not described herein.
The confirmed user intent acquisition module 1030 may be used to invoke a digital person interface to cause a digital person to interact with a user based on the predicted user intent and to acquire a confirmed user intent based on the interaction result. In an embodiment, the confirmed user intention obtaining module 1030 may be used to perform the operation S230 described above, which is not described herein.
The target intent data retrieval module 1040 may be configured To retrieve target intent data using Text-To-SQL techniques based on the confirmed user intent. In an embodiment, the target intention data obtaining module 1040 may be used to perform the operation S240 described above, which is not described herein.
The report generation module 1050 may be configured To obtain target intent data from a business database using Text-To-SQL techniques based on the confirmed user intent. In an embodiment, the report generating module 1050 may be configured to perform the operation S250 described above, which is not described herein.
According to an embodiment of the present invention, the user-required text data obtaining module 1010 may include a user input information obtaining unit, a voice information converting unit, and a text preprocessing unit.
The user input information obtaining unit may be configured to obtain user input information, where the user input information includes voice and/or text information. In an embodiment, the user input information obtaining unit may be configured to perform the operation S310 described above, which is not described herein.
The voice information converting unit may be configured to convert voice information in the user input information into text information using automatic voice recognition in response to the user input information including the voice information. In an embodiment, the voice information converting unit may be configured to perform the operation S320 described above, which is not described herein.
The text preprocessing unit can be used for preprocessing text of text information in the user input information and text information converted through voice information to obtain text data required by the user. In an embodiment, the text preprocessing unit may be configured to perform the operation S330 described above, which is not described herein.
According to an embodiment of the present invention, the predicted user intention obtaining module 1020 may include a word segmentation unit, a required word vector conversion unit, a required numerical value vector obtaining unit, and a predicted user intention output unit.
The word segmentation unit can be used for segmenting the user demand text data into demand words or demand vocabulary units by using a word segmentation tool. In an embodiment, the word segmentation unit may be used to perform the operation S410 described above, which is not described herein.
The required word vector conversion unit may be configured to convert the required word or the required vocabulary unit into a required word vector. In an embodiment, the required word vector conversion unit may be configured to perform the operation S420 described above, which is not described herein.
The required value vector obtaining unit may be configured to extract a feature from the required word vector to obtain a required value vector. In an embodiment, the required value vector obtaining unit may be configured to perform the operation S430 described above, which is not described herein.
The predicted user intention output unit may be configured to input the demand value vector into a pre-trained intention classification model, and output a predicted user intention. In an embodiment, the predicted user intention output unit may be used to perform the operation S440 described above, which is not described herein.
According to an embodiment of the present invention, the confirmed user intention obtaining module 1030 may include a multi-turn dialogue module and a confirmed user intention obtaining unit.
The multi-round dialog module may be configured to conduct a multi-round dialog with a user using a digital person based on the predicted user intent, the content of the multi-round dialog including a query for the predicted user intent, confirmation of the user intent, and satisfaction of the user demand. In an embodiment, the multi-round dialogue module may be used to perform the operation S510 described above, which is not described herein.
The confirmed user intention obtaining unit may be configured to obtain the confirmed user intention in response to reaching a condition for ending the dialogue. In an embodiment, the confirmed user intention obtaining unit may be used to perform the operation S520 described above, which is not described herein.
According to an embodiment of the invention, the multi-round dialog module may comprise a response unit.
The response unit can be used for analyzing and generating a response by a digital person by using a natural language processing method based on the answer of the user in the process of calling the digital person interface to conduct multi-round dialogue with the user, wherein the response is generated by using a form of feeding back to the user to demand a card. In an embodiment, the response unit may be configured to perform the operation S610 described above, which is not described herein.
According to an embodiment of the present invention, the target intention data acquisition module 1040 may include a query statement acquisition unit and a target intention data acquisition unit.
The query sentence acquisition unit may be configured To input the confirmed user intention into a Text-To-SQL platform To acquire an SQL query sentence. In an embodiment, the query term obtaining unit may be configured to perform the operation S710 described above, which is not described herein.
The target intention data acquisition unit inputs the SQL query statement into a service database to acquire target intention data, wherein the service database is constructed based on the financial service data of the institutions acquired in real time. In an embodiment, the target intention data obtaining unit may be configured to perform the operation S720 described above, which is not described herein.
According to an embodiment of the present invention, the report generation module 1050 may include a visualization chart generation unit, a transmission unit, and a report generation unit.
The visual chart generation unit may be configured to invoke a business intelligence interface to generate a visual chart based on the target intent data. In an embodiment, the visualization chart generating unit may be configured to perform the operation S810 described above, which is not described herein.
The transmitting unit may be configured to transmit the visualization chart to a user. In an embodiment, the sending unit may be configured to perform the operation S820 described above, which is not described herein.
The report generation unit can be used for responding to the optimization requirement of the user and modifying the visual chart so as to perfect the generated report. In an embodiment, the report generating unit may be configured to perform the operation S830 described above, which is not described herein.
According to an embodiment of the present invention, the report generating apparatus 1000 may further include a modification module.
The modification module may include a first modification unit, a second modification unit, or a third modification unit.
The first modification unit may be configured to re-acquire the confirmed user intention and target intention data based on the user optimization requirement, and modify the visual chart based on the re-acquired target intention data. In an embodiment, the first modification unit may be configured to perform the operation S910 described above, which is not described herein.
The second modification unit may be configured to perform manual intervention based on the user optimization requirement, and modify the visual chart based on a result of the manual intervention. In an embodiment, the second modification unit may be configured to perform the operation S920 described above, which is not described herein.
The third modification unit may be configured to perform data modification based on the user optimization requirement, and modify the visual chart based on a result of the data modification. In an embodiment, the third modification unit may be configured to perform the operation S930 described above, which is not described herein.
Any of the user demand text data acquisition module 1010, the predicted user intent acquisition module 1020, the confirmed user intent acquisition module 1030, the target intent data acquisition module 1040, and the report generation module 1050 may be combined in one module to be implemented, or any of them may be split into a plurality of modules, according to an embodiment of the present invention. Alternatively, at least some of the functionality of one or more of the modules may be combined with at least some of the functionality of other modules and implemented in one module. According to embodiments of the present disclosure, at least one of the user-desired text data acquisition module 1010, the predicted user intent acquisition module 1020, the confirmed user intent acquisition module 1030, the target intent data acquisition module 1040, and the report generation module 1050 may be implemented at least in part as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system-on-chip, a system-on-substrate, a system-on-package, an Application Specific Integrated Circuit (ASIC), or as hardware or firmware in any other reasonable manner of integrating or packaging the circuitry, or as any one of or a suitable combination of any of the three implementations of software, hardware, and firmware. Alternatively, at least one of the user demand text data retrieval module 1010, the predicted user intent retrieval module 1020, the confirmed user intent retrieval module 1030, the target intent data retrieval module 1040, and the report generation module 1050 may be implemented at least in part as a computer program module that, when executed, performs the corresponding functions.
Fig. 11 schematically shows a block diagram of an electronic device adapted for a report generating method according to an embodiment of the invention.
As shown in fig. 11, an electronic device 1100 according to an embodiment of the present invention includes a processor 1101 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 1102 or a program loaded from a storage section 1108 into a Random Access Memory (RAM) 1103. The processor 1101 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. The processor 1101 may also include on-board memory for caching purposes. The processor 1101 may comprise a single processing unit or a plurality of processing units for performing the different actions of the method flow according to an embodiment of the invention.
In the RAM 1103, various programs and data necessary for the operation of the electronic device 1100 are stored. The processor 1101, ROM 1102, and RAM 1103 are connected to each other by a bus 1104. The processor 1101 performs various operations of the method flow according to the embodiment of the present invention by executing programs in the ROM 1102 and/or the RAM 1103. Note that the program may be stored in one or more memories other than the ROM 1102 and the RAM 1103. The processor 1101 may also perform various operations of the method flow according to an embodiment of the present invention by executing programs stored in the one or more memories.
According to an embodiment of the invention, the electronic device 1100 may also include an input/output (I/O) interface 1105, the input/output (I/O) interface 1105 also being connected to the bus 1104. The electronic device 1100 may also include one or more of the following components connected to the I/O interface 1105: an input section 1106 including a keyboard, a mouse, and the like; an output portion 1107 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 1108 including a hard disk or the like; and a communication section 1109 including a network interface card such as a LAN card, a modem, and the like. The communication section 1109 performs communication processing via a network such as the internet. The drive 1110 is also connected to the I/O interface 1105 as needed. Removable media 1111, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is installed as needed in drive 1110, so that a computer program read therefrom is installed as needed in storage section 1108.
The present invention also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present invention.
According to embodiments of the present invention, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example, but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the invention, the computer-readable storage medium may include ROM 1102 and/or RAM 1103 described above and/or one or more memories other than ROM 1102 and RAM 1103.
Embodiments of the present invention also include a computer program product comprising a computer program containing program code for performing the method shown in the flowcharts. The program code means for causing a computer system to carry out the methods provided by embodiments of the present invention when the computer program product is run on the computer system.
The above-described functions defined in the system/apparatus of the embodiment of the present invention are performed when the computer program is executed by the processor 1101. The systems, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the invention.
In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program can also be transmitted, distributed over a network medium in the form of signals, downloaded and installed via the communication portion 1109, and/or installed from the removable media 1111. The computer program may include program code that may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program can be downloaded and installed from a network via the communication portion 1109, and/or installed from the removable media 1111. The above-described functions defined in the system of the embodiment of the present invention are performed when the computer program is executed by the processor 1101. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the invention.
According to embodiments of the present invention, program code for carrying out computer programs provided by embodiments of the present invention may be written in any combination of one or more programming languages, and in particular, such computer programs may be implemented in high-level procedural and/or object-oriented programming languages, and/or in assembly/machine languages. Programming languages include, but are not limited to, such as Java, c++, python, "C" or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a wide area network (WAAN), or may be connected to an external computing device (e.g., connected through the internet using an internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The embodiments of the present invention are described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present invention. Although the embodiments are described above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the invention, and such alternatives and modifications are intended to fall within the scope of the invention.