Question and answer method and system based on big data analysis
Through local deployment and big data analysis, combined with the Transformer model and industrial coding library, the data transmission delay and security issues of the large model question and answer system are solved, the accuracy of question and answer and data processing capabilities are improved, and the efficiency of industrial analysis and policy research is achieved. application.
Patent Information
- Application Number
- CN202410616999.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-17
- Publication Date
- 2024-08-23
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing large model question answering system relies on cloud deployment, has data transmission delays and data security issues, and lacks professional large models in specific fields, resulting in low accuracy of question and answer results, making it difficult to efficiently utilize big data resources and improve industrial analysis and policy research capabilities. .
It adopts localized deployment of industrial large language prediction tools, combines the Transformer model to conduct Q&A with users, and conducts training and matching through the industrial coding library and policy library to provide targeted answers, reduce dependence on the cloud, and improve data processing capabilities and Q&A accuracy.
Through localized deployment and big data analysis, data transmission delays are reduced, Q&A response speed and accuracy are improved, big data processing capabilities are enhanced, application interfaces for policy research and industry analysis are realized, and user experience and data value are improved.
Smart Images

Figure CN118535696A
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of artificial intelligence technology, and in particular relates to a question-answering method and system based on big data analysis. Background Art
[0002] With the development of artificial intelligence and big data technology, the increasingly mature AI technology is gradually turning to industries in some industrial fields, especially strategic emerging industries, such as the new generation of information technology industry, high-end equipment manufacturing industry, new materials industry, biological industry, new energy automobile industry, new energy industry, energy conservation and environmental protection industry, digital creative industry, related service industry and other nine strategic emerging industries. Computers "learn" relevant professional knowledge, simulate the thinking and technical reasoning of professionals, and thus provide reliable solutions and suggestions. That is, computers become brains produced by professional knowledge fed by large models (or large language models), simulate the thinking and reasoning of professionals, and provide suggestions for industrial consulting.
[0003] Big model technology has become an important tool for processing complex data and providing efficient question-answering services. However, in existing technologies, big model question-answering systems mostly rely on cloud deployment, which has shortcomings such as data transmission delays and data security issues. At the same time, there is a lack of professional big models in specific fields, and the accuracy of question-answering results depends on the increase in data volume, which has low accuracy. How to efficiently use big data resources and improve industry analysis and policy research capabilities is a problem that needs to be solved urgently. Summary of the invention
[0004] The purpose of the embodiment of the present invention is to provide a question-answering method and system based on big data analysis, which can be professionally customized for industrial clusters, and through a locally deployed industrial big language prediction tool, conduct question-answering with users based on a Transformer model, perceive the industries and policies that users want to know about, and give targeted answers; in this way, on the one hand, it reduces dependence on cloud deployment and overcomes the existing deficiencies such as data transmission delays and data security issues; on the other hand, it utilizes big data resources to enhance industry analysis and policy research capabilities; it can be widely used in government affairs, investment promotion, government-enterprise collaboration, industrial innovation and upgrading and other fields.
[0005] One objective of an embodiment of the present invention is to provide a question-answering method based on big data analysis, the method comprising the following steps:
[0006] Locally deploy the industry big language prediction tool and train the industry big language prediction tool;
[0007] Among them, the codes required by the industry code library are obtained through the prompt project to establish the industry code library; based on the keyword matching technology, the policies that have a positive correlation with the industries represented by the industry code library are matched and collected to form a policy library, and a sample set is made based on the policy library to train the industry big language prediction tool;
[0008] Converting the user's question-and-answer input into a text sequence based on the first model interface;
[0009] Input the text sequence into a trained industry language prediction tool, determine whether the prediction result of the industry language prediction tool hits at least two index items in the industry coding library, if not, guide the user to input again through the second model interface, if yes, output the prediction result of the industry language prediction tool;
[0010] Through big data analysis of the forecast results output by the industry big language forecasting tool, the industrial policies required by users in the policy database can be inferred;
[0011] Output the industrial policy and give the local implementation data of the industrial policy.
[0012] Furthermore, the method further comprises:
[0013] In the process of converting text sequences, the codes of the chat coding library are called to guide users to ask questions and answer them, so as to guide the direction of questions and answers to related industries;
[0014] The encoding of the chit-chat encoding library is skipped when generating a text sequence.
[0015] Furthermore, before the step of inputting the text sequence into the trained industry language prediction tool, the text sequence is preprocessed;
[0016] The preprocessing specifically includes:
[0017] The text data and structured data in the text sequence are represented by word embedding through the word embedding model, mapped into a question-answer record representation matrix, and normalized;
[0018] The question-answer record representation matrix is increased or decreased by a certain amount of data to meet the data generation needs of the industry's big language prediction tools.
[0019] Furthermore, wherein the first model interface is connected to a Transformer model, the method further comprises:
[0020] Storing the user's previous historical question records, which include the user's questions and answers to the questions;
[0021] When using the Transformer model for question and answer, the historical question record is called to better understand the user's question and answer input.
[0022] The steps of locally deploying the industry big language prediction tool and training the industry big language prediction tool specifically include:
[0023] Locally deploy the industry big language prediction tool, connect the Transformer model and database subsystem through the application interface. The database subsystem includes the chat coding library, policy library, and industry coding library;
[0024] Obtain industry data and policy data of relevant industries and create training sets and test sets;
[0025] Train the industry's large language prediction tool through the training set;
[0026] The trained industry big language prediction tool is tested and verified through the test set to obtain a trained industry big language prediction tool.
[0027] Furthermore, the step of analyzing the prediction results output by the industry big language prediction tool through big data to infer the industrial policies required by users in the policy library specifically includes:
[0028] Receive prediction results from industry big language prediction tools;
[0029] Obtain the interpretation of industrial policies in the policy database by relevant institutions through big data, and judge the relevance of industrial policies and related industries based on the importance and popularity of the interpretation of industrial policies;
[0030] Sort by relevance;
[0031] When inferring the industrial policy required by the user, at least one industrial policy with a high ranking is selected.
[0032] An embodiment of the present invention provides a question-answering system based on big data analysis, which is used in the method, wherein the system comprises: a database subsystem and a large model question-answering management subsystem, wherein the database subsystem comprises a chat coding library, a policy library, and an industry coding library; the large model question-answering management subsystem comprises a question-answering module, an analysis module, a reasoning module, and an output module, wherein the analysis module and the reasoning module are connected to an industry large language prediction tool;
[0033] The question-answering module converts the user's question-answering input into a text sequence based on the first model interface;
[0034] The analysis module is used to input the text sequence into the trained industry language prediction tool, determine whether the prediction result of the industry language prediction tool hits at least two index items in the industry coding library, if not, guide the user to input again through the second model interface, and if yes, output the prediction result of the industry language prediction tool;
[0035] The reasoning module uses big data to analyze the prediction results output by the industry big language prediction tool to infer the industrial policies required by users in the policy library;
[0036] The output module is used to output the industrial policy and provide local implementation data of the industrial policy.
[0037] Furthermore, the question-answer module includes a question-answer guiding unit and a coding multiplexing unit;
[0038] The question-and-answer guiding unit is used to call the code of the chat code library to guide the user to ask questions and answer questions, so as to guide the direction of the questions and answers to related industries;
[0039] The encoding multiplexing unit is used to skip the encoding of the chat encoding library when generating a text sequence.
[0040] Furthermore, the system also includes a large model deployment module for locally deploying the industry large language prediction tool and training the industry large language prediction tool.
[0041] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, the steps of the question-and-answer method based on big data analysis as described above are implemented.
[0042] A question-and-answer method based on big data analysis provided by an embodiment of the present invention has achieved the following beneficial effects compared with the existing technology: the method integrates big data analysis and big language model technology, reduces data transmission delay and improves the response speed of question and answer through localized deployment; integrates industrial big language prediction tools, big data and other artificial intelligence technologies to enhance the processing capabilities of big data and improve the accuracy of question and answer; and can also provide an application interface to facilitate users to call big data analysis data to realize policy research and industrial analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 A flowchart of a question-answering method based on big data analysis provided by an embodiment of the present invention;
[0044] Figure 2 This is a first sub-flow chart of a question-answering method based on big data analysis in an embodiment of the present invention;
[0045] Figure 3 This is a second sub-flow chart of a question-answering method based on big data analysis in an embodiment of the present invention;
[0046] Figure 4 This is a third sub-flow chart of a question-answering method based on big data analysis in an embodiment of the present invention;
[0047] Figure 5 This is a fourth sub-flow chart of a question-answering method based on big data analysis in an embodiment of the present invention;
[0048] Figure 6 is a fifth sub-flow chart of a question-answering method based on big data analysis in an embodiment of the present invention;
[0049] Figure 7 A structural block diagram of a question-answering system based on big data analysis provided by an embodiment of the present invention;
[0050] Figure 8 It is a structural block diagram of the database subsystem in an embodiment of the present invention;
[0051] Fig. 9 A structural block diagram of another question-answering system based on big data analysis provided by an embodiment of the present invention;
[0052] Fig.10 It is a structural block diagram of the question-answering module in an embodiment of the present invention;
[0053] Fig.11 1 is a block diagram of the internal structure of a computer device in an embodiment of the present invention. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0055] Definition: Big data analysis refers to methods, tools and applications used to collect, process and derive insights from different large and high-speed data sets. These data sets may come from various sources, such as industrial control networks, web pages, mobile applications, emails, social media and networked smart devices. They usually refer to data generated at high speed in various forms, ranging from structured (database tables, Excel tables) to semi-structured (XML files, web pages) to unstructured (images, audio files). Traditional forms of data analysis software cannot support this level of complexity and scale, and big data analysis can do a lot when processing such data.
[0056] For example: In the medical industry, big data analysis provides a more comprehensive data-driven approach to decision-making, helping medical equipment providers discover new methods of clinical care based on patient data trends and improve the experience of doctors and patients.
[0057] Large language models (i.e., large models) are one of the important research directions in the field of artificial intelligence in recent years. They have powerful language understanding and generation capabilities and have broad application potential for natural language processing tasks. Through deep network structures and self-attention mechanisms, they can effectively capture contextual information in texts and understand the logical relationships and semantic meanings in sentences. This has enabled large language models to achieve remarkable results in tasks such as text classification, sentiment analysis, entity recognition, and question answering. Its rich encoding information and huge number of parameters can form a huge implicit graph database. Extracting knowledge from it and constructing a graph database through prompting technology has been proven to have significant effects.
[0058] Figure 1 A flowchart of a question-answering method based on big data analysis provided by an embodiment of the present invention may specifically include steps S101 to S105:
[0059] S101. Locally deploy the industry big language prediction tool and train the industry big language prediction tool;
[0060] Among them, the codes required by the industry code library are obtained through the prompt project to establish the industry code library; based on the keyword matching technology, the policies that have a positive correlation with the industries represented by the industry code library are matched and collected to form a policy library, and a sample set is made based on the policy library to train the industry big language prediction tool; the positive correlation can be determined by the ratio of similarity, for example, a similarity of more than 75% is positively correlated; the industry big language prediction tool is an industry big model (or big language model).
[0061] S102, converting the user's question and answer input into a text sequence based on the first model interface;
[0062] In this step, the first model interface connects the front-end question-answering interface with the Transformer model. The Transformer model can answer questions and calculate the dependency between adjacent words and words that are far apart. As a question-answering framework, it can better interact with users than general deep learning models and convert or output users' natural language questions into computer-recognizable text sequences.
[0063] Generally, Transformer consists of an encoder and a decoder, where the encoder is used to learn the representation of the input (the input can be a speech or text sequence), and the general process of encoding includes word embedding, position embedding, and the addition of word embedding and position embedding; the decoder is used to generate the output sequence; the general process of decoding includes: the input is processed by the attention mechanism, residual addition (Add), layer normalization (Norm), ("Add" and "Norm" may be more than once), and a carefully calculated and reconstructed word vector representation is output. The word vector representation is a new and easier to understand data form.
[0064] S103, input the text sequence into a trained industry language prediction tool, determine whether the prediction result of the industry language prediction tool hits at least two index items in the industry coding library, if not, guide the user to input again through the second model interface, if yes, output the prediction result of the industry language prediction tool, the second model interface connects the Transformer model and the chat classifier, and the chat classifier calls the code of the chat coding library;
[0065] Take the new energy industry as an example: the policy database includes policies promulgated and implemented by relevant departments, which can be obtained manually or through web crawlers or API downloads; the establishment of the industry coding database is similar; the index items in the industry coding database include: brand and model (domestic brand, joint venture brand, foreign brand), price range (less than 100,000 yuan, 100,000 yuan to 200,000 yuan, more than 200,000 yuan), displacement (less than 1.0L, 1.0L-1.6L, 1.6L-2.0L, more than 2.0L), power type (plug-in hybrid drive, extended-range drive, pure electric drive, fuel drive), etc.
[0066] Generally, the policy applicable to the current query location can be determined based on the brand and model, such as: purchase tax exemption policy, local subsidy policy, charging preferential policy, park parking preferential or exemption policy, etc. The accurate policy can be further determined based on the two index items.
[0067] S104, inferring the industrial policies required by users in the policy database by analyzing the prediction results output by the industry big language prediction tool through big data;
[0068] Among them, big data analysis: can collect and process industrial data in real time or in advance. The collection sources include: local area network, Web network, mobile network and cloud. The processing methods include but are not limited to normalization, verification, sorting and screening of data, as well as cleaning. Cleaning means correcting and removing conflicts, redundancies, invalid / incomplete fields and format errors in the data set;
[0069] After that, the data is analyzed through tools and techniques such as data mining, AI, predictive analysis, machine learning and statistical analysis.
[0070] Big data analysis can explore the implementation of national policies, local policies, regional policies, etc.
[0071] In one scenario of this step, Figure 3 As shown, before the step of inputting the text sequence into the trained industry language prediction tool, the text sequence is preprocessed; the preprocessing specifically includes:
[0072] S301, embedding the text data and structured data in the text sequence into words through a word embedding model, and mapping them into a question-answer record representation matrix;
[0073] S302, increasing or decreasing the question and answer record representation matrix by a certain amount of data to meet the data generation requirements of the industry big language prediction tool, wherein the question and answer record representation matrix is specifically the industry, state, and question and answer record representation matrix Z;
[0074] It should be noted that this triplet representation matrix is a direct application of the prior art and is a conventional method, and is not specifically limited here.
[0075] S105. Output the industrial policy and provide local implementation data of the industrial policy.
[0076] In this embodiment, the method integrates big data analysis and big language model technology, reduces data transmission delay and improves the response speed of the question-answering system through localized deployment; integrates artificial intelligence technologies such as industrial big language prediction tools to enhance the processing capabilities of big data and improve the accuracy of questions and answers; and can also provide an application interface to facilitate users to call big data analysis data to realize policy research and industry analysis; allows users to view results in a visual form to improve user experience; collects user feedback, continuously optimizes the model, and improves the system's adaptability.
[0077] For example, in the automobile industry, especially the new energy automobile industry, industrial policies include: supporting the new energy automobile industry, specifically providing tax exemptions and subsidies for vehicle production and sales, etc. Local implementation includes: new car purchase discounts, purchase tax exemptions, government subsidies, local subsidies, battery replacement or charging discounts, parking discounts or exemptions, etc.;
[0078] When users have a need to purchase a car, they can use this method to query industry-related policies, make recommendations for their car purchases, achieve substantial cost savings, and thus potentially reduce the user's car purchase costs.
[0079] In one embodiment, taking the steel industry as an example: policies include but are not limited to domestic policies, policies of other countries, etc. As users, it is extremely important for steel dealers to understand relevant industry policies in a timely manner to make profits or avoid losses. This method can help users understand relevant industry policies based on user input, enhance the value of industry knowledge data and industry analysis and research methods, so as to help them improve their profit methods or reduce losses.
[0080] In one embodiment, Figure 2 As shown, the method also includes:
[0081] S201, calling the code of the chat code library to guide the user to ask questions and answer questions, so as to guide the direction of the questions and answers to related industries;
[0082] S202, skipping the encoding of the chat encoding library when generating a text sequence;
[0083] Among them, for guided questions and answers, a chat classifier is built and training data is obtained for training. The training data includes a series of classified conversation data, each of which has a corresponding label, indicating that it belongs to a certain chat category;
[0084] Use a text understanding classifier (such as the FastText model) to classify the training data into small talk.
[0085] Integrate the trained FastText model into the industry's big language prediction tool to obtain a trained chat classifier;
[0086] In addition, after receiving the user's question, the chat classifier predicts the chat category of the question and provides a corresponding reply based on the prediction result; at the same time, skipping the encoding of the chat encoding library when generating the text sequence can reduce the subsequent processing data volume and avoid interference with the prediction classification.
[0087] As mentioned above, adding a chat classifier can avoid misleading question and answer results and classify questions, that is, screen whether they are related to the industry. If they are related, the questions and answers will be conducted normally. If they are not related, the robot will enter the chat. During the chat process, the question and answer direction will continue to be guided towards industry-related industries, such as the automobile industry, steel industry, etc.
[0088] The chat classifier can directly call the existing open source API interface, which is a direct application of the existing technology and will not be described in detail here.
[0089] In one embodiment, Figure 5 As shown, the steps of locally deploying the industry big language prediction tool and training the industry big language prediction tool specifically include:
[0090] S501. Locally deploy the industry big language prediction tool, connect the Transformer model and database subsystem through the application interface. The database subsystem includes the chat coding library, policy library, and industry coding library;
[0091] S502, obtain industry data and policy data of relevant industries, and create training sets and test sets;
[0092] S503, training the industry big language prediction tool through the training set;
[0093] Among them, the training of industrial big language prediction tools is an existing technology and will not be described in detail here.
[0094] S504: Testing and verifying the trained industry big language prediction tool through a test set to obtain a trained industry big language prediction tool.
[0095] In one embodiment, Figure 4 As shown, the method also includes:
[0096] S401, storing the user's previous historical question records, where the historical question records include the user's questions and answers to the questions;
[0097] S402: When using the Transformer model for question and answer, the historical question record is called to better understand the user's question and answer input.
[0098] In the Transformer model, the session object can be used to save the entities of the user's previous questions or problems. If the entity in the previous question does not find a new head entity in the next sentence, it will inherit the entity of the previous question and be spliced together. Since multiple rounds of questions and answers can be performed, the questions and answers can be more closely related to the industry topic and eventually get the correct answer.
[0099] In one embodiment, Figure 6 As shown, the steps of analyzing the prediction results output by the industry big language prediction tool through big data to infer the industrial policies required by users in the policy library specifically include:
[0100] S601, receiving the prediction result of the industry big language prediction tool;
[0101] In one scenario, take new energy vehicles as an example: the user asks for multiple rounds of dialogue, and the output after the Transformer model is: domestic, new energy, 100,000-200,000 yuan range, plug-in hybrid drive, SUV sedan; the prediction result of the industry big language prediction tool may be a specific brand and model, such as: Song PLUSDM-i;
[0102] S602. Obtain the interpretation of industrial policies in the policy database by relevant institutions through big data, and judge the relevance of industrial policies and related industries based on the importance and popularity of the interpretation of industrial policies;
[0103] Relevant institutions such as taxation authorities at all levels, development and reform commissions at all levels, local vehicle management offices, etc.
[0104] S603, sorting according to the level of relevance;
[0105] S604, when inferring the industrial policy required by the user, selecting at least one industrial policy with a top ranking;
[0106] Generally, a ranking of the display interfaces (between five and ten) can be given, and at the same time, the first one or three can be highlighted or marked with color.
[0107] In another embodiment, Figure 7 As shown, a question-answering system based on big data analysis is used for the method, the system comprising: a database subsystem 200 and a large model question-answering management subsystem 100, the database subsystem 200 comprising a chat coding library 210, a policy library 220, and an industry coding library 230; the large model question-answering management subsystem 100 comprises a question-answering module 110, an analysis module 120, a reasoning module 130, and an output module 140, the analysis module 120 and the reasoning module 130 are connected to an industry large language prediction tool 150;
[0108] The question-answer module 110 converts the user's question-answer input into a text sequence based on the first model interface;
[0109] The analysis module 120 is used to input the text sequence into the trained industry language prediction tool 150, determine whether the prediction result of the industry language prediction tool 150 hits at least two index items in the industry coding library, if not, guide the user to input again through the second model interface, and if yes, output the prediction result of the industry language prediction tool 150;
[0110] The reasoning module 130 uses big data to analyze the prediction results output by the industry big language prediction tool 150 to infer the industrial policies required by users in the policy library;
[0111] The output module 140 is used to output the industrial policy and provide local implementation data of the industrial policy.
[0112] In an example of this embodiment, Figure 8 As shown, the database subsystem 200 includes: a chat code library 210, a policy library 220, an industry code library 230, and an expert library 240;
[0113] Among them, the chat coding library 210 includes chat coding and coding closely related to the industry, the policy library 220 includes policies for various industries, and the industry coding library 230 includes industry terms, nouns or commercial descriptions of products in various industries; the expert library 240 includes experts in the industry, as well as experts' interpretation, understanding and suggestions on policies, interpretation, understanding and promotion of industries, etc.; the question and answer results can be output as reference suggestions or prompts.
[0114] The chat coding library 210, policy library 220, and industry coding library 230 are also deployed locally to reduce latency and improve efficiency.
[0115] In this example, the codes of the chat code library 210 can be established and optimized by a chat classifier;
[0116] In addition, the chat classifier can be trained first, including:
[0117] Get training data, which includes a series of classified conversation data. Each conversation has a corresponding label, indicating that it belongs to a certain chat category.
[0118] Use the FastText model to classify the training data into small talk.
[0119] Integrate the trained FastText model into the database subsystem 200 to obtain a trained chat classifier;
[0120] After receiving the user's question, the chat classifier predicts the chat category of the question and provides a corresponding reply based on the prediction result;
[0121] Similarly, the policy database 220, the industry code database 230, and the expert database 240 can also construct similar classifiers to collect, organize, and update data.
[0122] In one embodiment, Fig. 9 As shown, the system further includes a large model deployment module 300 for locally deploying the industrial large language prediction tool 150 and training the industrial large language prediction tool 150 .
[0123] In an example of this embodiment, the system also includes an interface calling module 400, which is used to call an application interface (API interface) to connect the industrial big language prediction tool 150 with the database subsystem 200, so as to facilitate the localized deployment of the industrial big language prediction tool 150 and train the industrial big language prediction tool 150.
[0124] In an example of this embodiment, Fig.10 As shown, the question-answering module 110 includes a Transformer model unit, a question-answering guiding unit 111, and a coding multiplexing unit 112;
[0125] Among them, the Transformer model unit converts the user's question and answer input into a text sequence based on the Transformer model;
[0126] The question-answering guiding unit 111 is connected to the Transformer model unit, and can call the code of the chat coding library to guide the user to ask questions, so as to guide the question-answering direction to the relevant industry;
[0127] The code multiplexing unit 112 is connected to the question-answer guiding unit 111 and the chat code library, and can call the code of the chat code library in S202 for duplicate checking, so as to skip the code of the chat code library when generating a text sequence.
[0128] In this example, the role of the code multiplexing unit 112 is similar to data cleaning;
[0129] After cleaning the data, named entity recognition technology is used to extract available entity data and construct conceptual entities that match the industry to facilitate industry indexing and representation; this facilitates the big language prediction tool (i.e., big language model) to generate knowledge in the form of triples around the conceptual entities indexed by the industry. During the knowledge generation process in the form of triples, the big language prediction tool can perform feature extraction, classification, and knowledge structuring on the input data through deep learning. Of course, the big language model is an application of existing technology and will not be described in detail here.
[0130] In another embodiment, Fig.11 As shown, a computer device includes a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, the steps of the question-answering method based on big data analysis as described above are implemented.
[0131] Fig.11 The internal structure diagram of a computer device in one embodiment is shown. The computer device includes a processor, a memory, a network interface, an input device and a display screen connected via a system bus. Among them, the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program, which, when executed by the processor, enables the processor to implement a question-and-answer method based on big data analysis. The internal memory may also store a computer program, which, when executed by the processor, enables the processor to execute a question-and-answer method based on big data analysis. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or may be a button, trackball or touchpad provided on the housing of the computer device, or may be an external keyboard, touchpad or mouse, etc.
[0132] It should be understood that, although each step in the flow chart of each embodiment of the present invention is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have strict order restrictions, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.
[0133] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0134] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0135] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
[0136] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A question-answering method based on big data analysis, characterized in that: The method comprises: Locally deploy the industry big language prediction tool and train the industry big language prediction tool; Among them, the codes required by the industry code library are obtained through the prompt project to establish the industry code library; based on the keyword matching technology, the policies that have a positive correlation with the industries represented by the industry code library are matched and collected to form a policy library; Based on the first model interface, the user's question and answer input is converted into a text sequence; wherein, in the process of converting the text sequence, the code of the chat coding library is called to guide the user to ask questions and answer questions, so as to guide the direction of the questions and answers to related industries; when generating the text sequence, the code of the chat coding library is skipped; Input the text sequence into a trained industry language prediction tool, determine whether the prediction result of the industry language prediction tool hits at least two index items in the industry coding library, if not, guide the user to input again through the second model interface, if yes, output the prediction result of the industry language prediction tool; Through big data analysis of the forecast results output by the industry big language forecasting tool, the industrial policies required by users in the policy database can be inferred; Output the industrial policy and give the local implementation data of the industrial policy.
2. The method according to claim 1, characterized in that Before inputting the text sequence into the trained industry language prediction tool, preprocessing the text sequence; The preprocessing specifically includes: The text data and structured data in the text sequence are represented by word embedding through the word embedding model, mapped into a question-answer record representation matrix, and normalized; The question-answer record representation matrix is increased or decreased by a certain amount of data to meet the data generation needs of the industry's big language prediction tools.
3. The method according to claim 1, characterized in that The first model interface is connected to the Transformer model, and the method further includes: Storing the user's previous historical question records, which include the user's questions and answers to the questions; When using the Transformer model for question and answering, the historical question record is called to better understand the user's question and answer input.
4. The method according to claim 1, characterized in that: The steps of locally deploying the industry big language prediction tool and training the industry big language prediction tool specifically include: Locally deploy the industry big language prediction tool, connect the Transformer model and database subsystem through the application interface. The database subsystem includes the chat coding library, policy library, and industry coding library; Obtain industry data and policy data of relevant industries and create training sets and test sets; Train the industry's large language prediction tool through the training set; The trained industry big language prediction tool is tested and verified through the test set to obtain a trained industry big language prediction tool.
5. The method according to claim 1, characterized in that: The step of analyzing the prediction results output by the industry big language prediction tool through big data to infer the industrial policies required by users in the policy library specifically includes: Receive prediction results from industry big language prediction tools; Obtain the interpretation of industrial policies in the policy database by relevant institutions through big data, and judge the relevance of industrial policies and related industries based on the importance and popularity of the interpretation of industrial policies; Sort by relevance; When inferring the industrial policy required by the user, at least one industrial policy with a high ranking is selected.
6. A question-answering system based on big data analysis, used in the method according to any one of claims 1 to 5, characterized in that: The system includes: a database subsystem and a large model question and answer management subsystem, the database subsystem includes a chat coding library, a policy library, and an industry coding library; the large model question and answer management subsystem includes a question and answer module, an analysis module, a reasoning module, and an output module, and the analysis module and the reasoning module are connected to an industry large language prediction tool; The question-answering module converts the user's question-answering input into a text sequence based on the first model interface; The analysis module is used to input the text sequence into the trained industry language prediction tool, determine whether the prediction result of the industry language prediction tool hits at least two index items in the industry coding library, if not, guide the user to input again through the second model interface, and if yes, output the prediction result of the industry language prediction tool; The reasoning module uses big data to analyze the prediction results output by the industry big language prediction tool to infer the industrial policies required by users in the policy library; The output module is used to output the industrial policy and provide local implementation data of the industrial policy.
7. The system according to claim 6, characterized in that The question-answer module includes a question-answer guiding unit and a coding multiplexing unit; The question-and-answer guiding unit is used to call the code of the chat code library to guide the user to ask questions and answer questions, so as to guide the direction of the questions and answers to related industries; The encoding multiplexing unit is used to skip the encoding of the chat encoding library when generating a text sequence.
8. The system according to claim 6, characterized in that The system also includes a large model deployment module for locally deploying the industry large language prediction tool and training the industry large language prediction tool.
Citation Information
Patent Citations
Policy question and answer method and system based on large language model and knowledge graph technology
CN117725170A
Data retrieval method, device and equipment based on large language model and storage medium
CN117725182A
Government information consultation system based on large language model
CN117932025A
