Question and answer method, device and equipment for operation and maintenance of cloud platform
Through an intelligent question-and-answer system combining vectorized processing and large models, the historical cloud platform operation and maintenance data provides accurate answers, solving the problems of improving skills and efficiency of cloud platform operation and maintenance teams, and improving the professional skills and question-and-answer system of operation and maintenance personnel accuracy.
Patent Information
- Application Number
- CN202411265371.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2025-01-10
AI Technical Summary
The cloud platform operation and maintenance team faces problems of large personnel changes and rapid professional technology development, which leads to enterprises that need to continuously invest resources in talent training and skill training, and how to use historical data to improve the professional skills and efficiency of operation and maintenance personnel.
By vectorizing the text question information of cloud platform operation and maintenance, compute the similarity and correlation scores with the preset data, filter out the vector data that meets the threshold, and input it into the fine-tuning training large model to generate the answer. Provide intelligent Q&A services.
It improves the relevance and accuracy of the cloud platform operation and maintenance Q&A system, helps operation and maintenance personnel obtain accurate and professional answers, improves operation and maintenance efficiency and skill level, and solves the problem of large model hallucinations.
Smart Images

Figure CN119293157A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer data processing technology, and in particular to a question-and-answer technology for cloud platform operation and maintenance. Background Art
[0002] Cloud platform operation and maintenance is a technology-intensive and rapidly developing field. Cloud platform operation and maintenance personnel not only need to master the core technologies of cloud computing, such as virtualization, automated deployment, cloud service management, etc., but also need to have an in-depth understanding of multiple technical fields such as network, security, storage and database, and also need to have the ability to handle complex system problems and emergencies, as well as rich practical experience. However, the cloud platform operation and maintenance industry is also inevitably facing the problems of rapid development of professional technology and high talent mobility in the industry. This leads to the company's cloud platform operation and maintenance team often facing large personnel changes and the alternation of new and old personnel. The company needs to continuously invest resources in talent training and professional knowledge and skills training.
[0003] Enterprises can collect and organize historical cloud platform operation and maintenance data that is public to the enterprise and / or third parties, and build a cloud platform operation and maintenance database. The data can cover various areas of the cloud platform, such as Linux, containers, middleware, etc., and include not only records of daily operation and maintenance tasks, but also professional problems and their solutions in specific situations.
[0004] How to use historical cloud platform operation and maintenance data to improve the professional skills of enterprise operation and maintenance personnel and improve the operation and maintenance efficiency of enterprise cloud platforms is the technical problem to be solved by this application. Summary of the invention
[0005] The purpose of the present invention is to provide a question-and-answer method, device and equipment for cloud platform operation and maintenance, so as to at least partially solve the technical problem of how to utilize historical cloud platform operation and maintenance data, improve the professional skills of enterprise operation and maintenance personnel, and improve the efficiency of enterprise cloud platform operation and maintenance.
[0006] According to one aspect of the present invention, a question-answering method for cloud platform operation and maintenance is provided, characterized in that the method comprises:
[0007] Vectorize the obtained text question information about cloud platform operation and maintenance to obtain question information vector data;
[0008] Calculate the similarity between the question information vector data and each vector data in the preset cloud platform operation and maintenance data vector set, and determine a number of vector data whose similarity values meet a preset threshold value according to the similarity value of each vector data;
[0009] Calculate the correlation score between each vector data in the plurality of vector data and the question information vector data, sort them according to the correlation scores, determine a preset number of vector data with the highest correlation scores, and obtain a preset number of cloud platform operation and maintenance text data corresponding to the preset number of vector data from a preset cloud platform operation and maintenance data text set;
[0010] The preset number of cloud platform operation and maintenance text data and the text question information are input into the fine-tuned trained large model to obtain answers corresponding to the text question information.
[0011] Optionally, the construction of the cloud platform operation and maintenance data vector set includes:
[0012] Obtain some historical cloud platform operation and maintenance text data;
[0013] Perform vectorization processing on each historical cloud platform operation and maintenance text data to obtain the subject vector data, summary vector data and text vector data corresponding to each historical cloud platform operation and maintenance text data;
[0014] All topic vector data, summary vector data and text vector data are grouped together to construct a cloud platform operation and maintenance data vector set.
[0015] Optionally, the vectorization processing of each historical cloud platform operation and maintenance text data to obtain the subject vector data, summary vector data and text vector data corresponding to each historical cloud platform operation and maintenance text data includes:
[0016] Determine the subject text data, summary text data and body text data corresponding to each historical cloud platform operation and maintenance text data;
[0017] The subject text data, summary text data and main text data are respectively vectorized to obtain the subject vector data, summary vector data and main text vector data corresponding to each historical cloud platform operation and maintenance text data.
[0018] Optionally, the cloud platform operation and maintenance data vector set includes:
[0019] A topic vector data subset, a summary vector data subset, and a text vector data subset, wherein the topic vector data subset includes the topic vector data corresponding to all historical cloud platform operation and maintenance text data, the summary vector data subset includes the summary vector data corresponding to all historical cloud platform operation and maintenance text data, and the text vector data subset includes the text vector data corresponding to all historical cloud platform operation and maintenance text data; wherein,
[0020] The determining of a plurality of vector data whose similarity values meet a preset threshold value includes:
[0021] Based on a preset hierarchical search strategy, the subject vector data subset, summary vector data subset and text vector data subset are traversed and searched in sequence to determine a number of vector data whose similarity values meet a preset threshold.
[0022] Optionally, the construction of the cloud platform operation and maintenance data text set includes:
[0023] The plurality of historical cloud platform operation and maintenance text data are grouped into a set to construct a cloud platform operation and maintenance data text set.
[0024] Optionally, the fine-tuning training of the large model after the fine-tuning training includes:
[0025] Determine the first text data and the second text data corresponding to each historical cloud platform operation and maintenance text data, wherein the first text data includes the question text, reference text, random interference text and answer text corresponding to the historical cloud platform operation and maintenance text data, and the second text data includes the question text, random interference text and answer text corresponding to the historical cloud platform operation and maintenance text data;
[0026] All the first text data and the second text data are grouped together to construct a large model fine-tuning data set;
[0027] Based on the large model fine-tuning dataset, LLaMA-Factory is used to fine-tune the large model to obtain a large model after fine-tuning training.
[0028] Optionally, if the question information about the cloud platform operation and maintenance is in a non-text format, before the vectorization processing is performed, the method further includes:
[0029] The obtained non-textual question information about cloud platform operation and maintenance is converted into textual question information.
[0030] According to another aspect of the present invention, a question-answering device for cloud platform operation and maintenance is provided, wherein the device comprises:
[0031] The first module is used to vectorize the text question information obtained about the operation and maintenance of the cloud platform to obtain question information vector data;
[0032] The second module is used to calculate the similarity between the question information vector data and each vector data in the preset cloud platform operation and maintenance data vector set, and determine a number of vector data whose similarity values meet a preset threshold value according to the similarity value of each vector data;
[0033] The third module is used to calculate the correlation score between each vector data in the plurality of vector data and the question information vector data, and sort them according to the correlation scores, determine a preset number of vector data with the highest correlation scores, and obtain a preset number of cloud platform operation and maintenance text data corresponding to the preset number of vector data from a preset cloud platform operation and maintenance data text set;
[0034] The fourth module is used to input the preset number of cloud platform operation and maintenance text data and the text question information into the fine-tuned trained large model to obtain answers corresponding to the text question information.
[0035] Compared with the prior art, the present invention provides a method, device and equipment for question answering of cloud platform operation and maintenance. The method includes: vectorizing the obtained text question information about cloud platform operation and maintenance to obtain question information vector data; calculating the similarity between the question information vector data and each vector data in the preset cloud platform operation and maintenance data vector set, and determining a number of vector data whose similarity values meet a preset threshold value according to the similarity value of each vector data; calculating the correlation score between each vector data in the several vector data and the question information vector data, and sorting them according to the correlation score, determining a preset number of vector data with the highest correlation score, and obtaining a preset number of cloud platform operation and maintenance text data corresponding to the preset number of vector data from the preset cloud platform operation and maintenance data text set; inputting the preset number of cloud platform operation and maintenance text data and the text question information into the fine-tuned trained large model to obtain the answer corresponding to the text question information.
[0036] The technical effects that the present invention can bring are:
[0037] Provided are a cloud platform operation and maintenance question and answer method, device and equipment, which can intelligently provide accurate and professional answers to cloud platform operation and maintenance questions raised by users. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0039] Figure 1 A schematic diagram of a question-answering method for cloud platform operation and maintenance according to one aspect of the present invention;
[0040] Figure 2 A schematic diagram of a question-answering device for cloud platform operation and maintenance according to another aspect of the present invention is shown;
[0041] The same or similar reference numerals in the drawings represent the same or similar components. DETAILED DESCRIPTION
[0042] The present invention is further described in detail below in conjunction with the accompanying drawings.
[0043] In a typical configuration of each embodiment of the present invention, the execution subject of the method, each trusted party of the system and / or each module of the device may include one or more processors (CPU), input / output interface, network interface and memory.
[0044] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0045] Computer readable media may include permanent and non-permanent, removable and non-removable media, and may be implemented by any method or technology to store information. Information may be computer readable instructions, data structures, modules of programs, or other data. Computer storage media may include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory media such as modulated data signals and carrier waves.
[0046] With the continuous advancement of natural language processing technology, intelligent question-answering systems based on large models have been widely used. Large models originated from the integration of deep learning and natural language processing, aiming to create complex algorithms that can understand and generate natural language texts. The introduction of the Transformer model laid the foundation for the emergence and development of large models. The Transformer model uses the self-attention mechanism to process sequence data. Through this mechanism, it can effectively capture the long-distance dependencies between the previous and next texts in the sequence data, and can capture the dependencies between different positions within the sequence when processing sequence data. The self-attention mechanism generates the query Q (query), key K (key) and value V (value) for attention calculation through input, and uses the dot product of Q and K as the attention score to identify the degree of association between each input element and other elements. Then, the attention score is Softmaxed to obtain the weight of each input, and then the weight is applied to the value V to obtain the weighted vector, and finally added to obtain the output. Finally, the self-attention mechanism generates a new vector representation for each element in the sequence data. The self-attention mechanism can be easily extended to sequences of different lengths, unlike RNN (Recurrent Neural Network) which is limited by the sequence length.
[0047] However, as a large model, there is also the illusion of a large model. RAG (Retrieval-augmented Generation) technology can solve this problem to a certain extent.
[0048] The present application seeks to protect a technical solution for cloud platform operation and maintenance question and answer system, which is based on maintained cloud platform operation and maintenance historical data and can intelligently provide accurate and professional answers to cloud platform operation and maintenance questions raised by users through the combination of a large model's prompt function and RAG technology, thereby providing support and services for cloud platform operation and maintenance personnel and effectively improving the question and answer relevance and accuracy of the cloud platform operation and maintenance question and answer system of the present application, solving the large model illusion problem to a certain extent.
[0049] In order to further illustrate the technical means adopted by the present invention and the effects achieved, the technical scheme of the present invention is clearly and completely described below in conjunction with the accompanying drawings and various embodiments.
[0050] Figure 1 A schematic diagram of a question-answering method for cloud platform operation and maintenance according to one aspect of the present invention is shown, wherein the method of one embodiment includes:
[0051] S101 vectorizes the obtained text question information about cloud platform operation and maintenance to obtain question information vector data;
[0052] S102 calculates the similarity between the question information vector data and each vector data in the preset cloud platform operation and maintenance data vector set, and determines a number of vector data whose similarity values meet a preset threshold value according to the similarity value of each vector data;
[0053] S103 calculates the correlation score between each vector data in the plurality of vector data and the question information vector data, and sorts them according to the correlation scores, determines a preset number of vector data with the highest correlation scores, and obtains a preset number of cloud platform operation and maintenance text data corresponding to the preset number of vector data from a preset cloud platform operation and maintenance data text set;
[0054] S104 inputs the preset number of cloud platform operation and maintenance text data and the text question information into the fine-tuned trained large model to obtain answers corresponding to the text question information.
[0055] The method of this embodiment is implemented by a device 100 installed with corresponding software and hardware to achieve intelligent answers to questions input by users about cloud platform operation and maintenance. The device 100 can be a computer device and / or a cloud. The computer device includes but is not limited to a personal computer, a laptop, an industrial computer, a server, a network host, a single network server or a network server cluster; the cloud is composed of a large number of computers or network servers based on cloud computing (Cloud Computing), wherein cloud computing is a type of distributed computing, a virtual supercomputer composed of a group of loosely coupled computer sets.
[0056] Here, the computer device and / or cloud are only examples. Other existing or future devices and / or resource sharing platforms that are applicable to the present application should also be included in the protection scope of the present application and are incorporated herein by reference.
[0057] In this embodiment, in step S101, the device 100 vectorizes the acquired text question information about cloud platform operation and maintenance to obtain question information vector data.
[0058] When a user asks a question related to the operation and maintenance of the cloud platform, the device 100 can obtain the corresponding text question information, and the device 100 vectorizes the text question information to obtain the corresponding question information vector data. As an example, the general vector model BGE-M3 model can be used to vectorize the text question information to obtain the corresponding question information vector data.
[0059] Continuing with this embodiment, in step S102, the device 100 calculates the similarity between the question information vector data and each vector data in the preset cloud platform operation and maintenance data vector set, and determines a number of vector data whose similarity values meet a preset threshold value based on the similarity value of each vector data.
[0060] Among them, the device 100 can calculate the similarity between the question information vector data and each vector data in the pre-constructed cloud platform operation and maintenance data vector set, and determine a number of vector data whose similarity values meet a preset threshold value based on the calculated similarity value of each vector data. As an exemplary example, a clustering operation can be performed on all vector data in the pre-constructed cloud platform operation and maintenance data vector set stored in a vector database (such as milvus, or other vector databases), for example, using the Keans clustering algorithm, and then calculating the Euclidean distance between the question information vector data and each vector data in the cloud platform operation and maintenance data vector set to obtain the similarity value between the question information vector data and each vector data in the cloud platform operation and maintenance data vector set, and then determining a number of vector data whose similarity values meet a preset threshold value.
[0061] Optionally, in step S102, the construction of the cloud platform operation and maintenance data vector set includes:
[0062] Obtain some historical cloud platform operation and maintenance text data;
[0063] Vectorize each historical cloud platform operation and maintenance text data to obtain the subject vector data, summary vector data and text vector data corresponding to each historical cloud platform operation and maintenance text data;
[0064] All topic vector data, summary vector data and text vector data are grouped together to construct a cloud platform operation and maintenance data vector set.
[0065] Among them, the historical cloud platform operation and maintenance data in the field of cloud platform operation and maintenance disclosed by enterprises and / or third parties can be collected and sorted, for example, the daily log records of cloud platform operation and maintenance in the past, and the problem manifestations and solutions under abnormal conditions of the cloud platform, etc. If necessary, the collected historical cloud platform data is also cleaned to remove useless data, such as interference data, redundant data, etc., and obtain several historical cloud platform operation and maintenance text data. Then, each acquired historical cloud platform operation and maintenance text data is vectorized to obtain the subject vector data, summary vector data and text vector data corresponding to each historical cloud platform operation and maintenance text data. Then all the subject vector data, summary vector data and text vector data are formed into a set to construct a cloud platform operation and maintenance data vector set. Among them, a vector database (such as milvus, or other vector databases) can be used to store the cloud platform operation and maintenance data vector set. As an exemplary example, the general vector model BGE-M3 model can be used to vectorize each historical cloud platform operation and maintenance text data to obtain the subject vector data, summary vector data and text vector data corresponding to each historical cloud platform operation and maintenance text data.
[0066] Optionally, the vectorization processing of each historical cloud platform operation and maintenance text data to obtain the subject vector data, summary vector data and text vector data corresponding to each historical cloud platform operation and maintenance text data includes:
[0067] Determine the subject text data, summary text data and body text data corresponding to each historical cloud platform operation and maintenance text data;
[0068] The subject text data, summary text data and main text data are respectively vectorized to obtain the subject vector data, summary vector data and main text vector data corresponding to each historical cloud platform operation and maintenance text data.
[0069] Among them, the historical cloud platform operation and maintenance text data includes network data related to cloud platform operation and maintenance obtained from the network, log data of daily operation of the cloud platform, and technical documents related to cloud platform operation and maintenance, etc., and the corresponding subject text data, summary text data and body text data can be determined according to each historical cloud platform operation and maintenance text data. For example, cloud platform operation and maintenance text data is usually web page text data, wherein the title of the web page text can be determined as the subject text data, and the web page text can be content-refined by a large model to obtain summary text data, and the web page text can be used as the body text data. An exemplary example is that the subject text data, summary text data and body text data corresponding to each historical cloud platform operation and maintenance text data can be determined by a large language model, such as Baidu's Wenxin Yiyan and Alibaba's Tongyi Qianwen. Then, each subject text data, summary text data and body text data are vectorized respectively by the general vector model BGE-M3 model to obtain the subject vector data, summary vector data and body vector data corresponding to each historical cloud platform operation and maintenance text data. If a cloud platform operation and maintenance text data is large, for example, more than 2,000 words, it can usually be divided into multiple chunks first, and then for each chunk, the summary text data and the main text data are determined and vectorized, wherein the chunking logic can be to segment the cloud platform operation and maintenance text data by line breaks. A vector database (such as milvus) can be used to store the subject vector data, summary vector data, and main text vector data corresponding to each historical cloud platform operation and maintenance text data, wherein each vector data will be assigned a unique identifier when stored in the database, and the respective unique identifiers of the subject vector data, summary vector data, and main text vector data corresponding to the same historical cloud platform operation and maintenance text data and the unique identifier assigned to the historical cloud platform operation and maintenance text data when stored in the database will exist in the same database.
[0070] Optionally, the cloud platform operation and maintenance data vector set includes:
[0071] A topic vector data subset, a summary vector data subset, and a text vector data subset, wherein the topic vector data subset includes the topic vector data corresponding to all historical cloud platform operation and maintenance text data, the summary vector data subset includes the summary vector data corresponding to all historical cloud platform operation and maintenance text data, and the text vector data subset includes the text vector data corresponding to all historical cloud platform operation and maintenance text data; wherein,
[0072] The determining of a plurality of vector data whose similarity values meet a preset threshold value includes:
[0073] Based on a preset hierarchical search strategy, the subject vector data subset, summary vector data subset and text vector data subset are traversed and searched in sequence to determine a number of vector data whose similarity values meet a preset threshold.
[0074] In this optional embodiment, in step S102, the constructed cloud platform operation and maintenance data vector set may include three subsets: a subject vector data subset, a summary vector data subset, and a text vector data subset. The subject vector data subset includes the subject vector data corresponding to all historical cloud platform operation and maintenance text data, the summary vector data subset includes the summary vector data corresponding to all historical cloud platform operation and maintenance text data, and the text vector data subset includes the text vector data corresponding to all historical cloud platform operation and maintenance text data.
[0075] Among them, according to the preset subset retrieval strategy, the topic vector data subset, the summary vector data subset and the text vector data subset can be traversed and retrieved in turn, and a number of vector data that meet the preset threshold in each subset can be determined respectively. As an example, a preset threshold can be set for each subset. Assuming that the preset threshold for the topic vector data subset is 0.9, and the preset thresholds for the summary vector data subset and the text vector data subset are both 0.5, when determining whether the similarity value between the question information vector data and each vector data in the cloud platform operation and maintenance data vector set meets the preset threshold, first traverse and retrieve the topic vector data subset, and match each topic vector data in the subset one by one. If its similarity value with the question information vector data is greater than 0.9, the topic vector data is filtered out. Then, for each topic vector data with a similarity value less than or equal to 0.9, the corresponding summary vector data in the summary vector data subset is traversed and retrieved. If the similarity value with the question information vector data is greater than 0.5, the corresponding summary vector data is also filtered out; finally, for each summary vector data with a similarity value less than or equal to 0.5, the corresponding text vector data in the text vector data subset is traversed and retrieved. If the similarity with the question information vector data is greater than 0.5, the corresponding text vector data is also filtered out. The hierarchically filtered topic vector data, summary vector data, and text vector data are several vector data whose similarity values meet the preset threshold. This optional embodiment can improve retrieval accuracy and efficiency through hierarchical retrieval.
[0076] Continuing with this embodiment, in step S103, the device 100 may calculate the correlation score between each vector data among the several vector data and the question information vector data, and sort them according to the correlation scores, determine a preset number of vector data with the highest correlation scores, and obtain a preset number of cloud platform operation and maintenance text data corresponding to the preset number of vector data from a preset cloud platform operation and maintenance data text set.
[0077] Wherein, the correlation score between each screened vector data and the question information vector data can be calculated. As an exemplary example, the GBE-ReRanker-Large model can be called to calculate the correlation score between each screened vector data and the question information vector data. Wherein, the screened vector data are sorted according to the calculated correlation score, and a preset number (for example, the first K) of vector data with the highest correlation score are determined. Wherein, based on the unique identifier of each vector data of the preset number of vector data determined, the unique identifier of the corresponding cloud platform operation and maintenance text data is searched from the relevant database table, and then the corresponding preset number of cloud platform operation and maintenance text data is obtained from the preset cloud platform operation and maintenance data text set according to the unique identifier of the cloud platform operation and maintenance text data.
[0078] Optionally, in step S103, the construction of the cloud platform operation and maintenance data text set includes:
[0079] The plurality of historical cloud platform operation and maintenance text data are grouped into a set to construct a cloud platform operation and maintenance data text set.
[0080] After obtaining several historical cloud platform operation and maintenance text data, these several historical cloud platform operation and maintenance text data can be combined into a set to construct a cloud platform operation and maintenance data text set. The cloud platform operation and maintenance data text set can be stored in a MySQL database, where each cloud platform operation and maintenance text data has a unique identifier, and its association with the unique identifier of the corresponding topic vector data, summary vector data, and text vector data is stored in the relevant database table of the MySQL data.
[0081] Continuing with this embodiment, in step S104, the preset number of cloud platform operation and maintenance text data and the text question information may be input into the fine-tuned trained large model to obtain an answer corresponding to the text question information.
[0082] Among them, the text question information and a preset number of cloud platform operation and maintenance text data can be spliced and input into a large model that has been fine-tuned and trained to obtain an answer corresponding to the text question information.
[0083] Optionally, in step S104, the fine-tuning training of the large model after the fine-tuning training includes:
[0084] Determine the first text data and the second text data corresponding to each historical cloud platform operation and maintenance text data, wherein the first text data includes the question text, reference text, random interference text and answer text corresponding to the historical cloud platform operation and maintenance text data, and the second text data includes the question text, random interference text and answer text corresponding to the historical cloud platform operation and maintenance text data;
[0085] All the first text data and the second text data are grouped together to construct a large model fine-tuning data set;
[0086] Based on the large model fine-tuning dataset, LLaMA-Factory is used to fine-tune the large model to obtain a large model after fine-tuning training.
[0087] First, a data set for fine-tuning and training the large model is constructed. Each acquired historical cloud platform operation and maintenance text data can be processed, wherein each historical cloud platform operation and maintenance text data can be stored in the form of a question-answer pair. Each historical cloud platform operation and maintenance text data can be processed by the large model according to a preset prompt template (prompt), and its corresponding first text data and second text data can be determined, wherein the first text data corresponding to each historical cloud platform operation and maintenance text data includes the question text, reference text, random interference text and answer text corresponding to the historical cloud platform operation and maintenance text data, and the second text data includes the question text, random interference text and answer text corresponding to the historical cloud platform operation and maintenance text data, wherein for each historical cloud platform operation and maintenance text data, its main text can be used as a reference text, and the main text text can be selected from other historical cloud platform operation and maintenance text data as a random interference text, and the general large model is used to summarize the main text as the answer text. Then all the first text data and the second text data are used as sample data to form a set to construct a large model fine-tuning data set.
[0088] Among them, a general large model can be selected, for example, Ali's Tongyi Qianwen, and the specific large model can be Qwen2-7B, and the selected large model can be fine-tuned and trained using the above-mentioned data set. Among them, the large model can be fine-tuned and trained using LLaMA-Factory according to the constructed large model fine-tuning data set to obtain a large model after fine-tuning training. When training with reference to the prompt template, if the sample data is the first text data, including the reference text, as a supplementary explanation, if the sample data is the second text data, there is no reference text. During fine-tuning training, the second text data can also be added as sample data by deleting the reference text in the first text data. When the large model tries to read the reference text and finds that there is no relevant information, it can get the answer based on the previous learning content, instead of having to rely on the reference text for deduction to get the answer, or reply randomly, to avoid the problem of large model hallucination.
[0089] Among them, the text question information and the preset number of cloud platform operation and maintenance text data are spliced and input into the fine-tuned and trained large model, and in addition to obtaining the answer corresponding to the text question information, the reference information corresponding to the text question information can also be obtained. Among them, if the answer corresponding to the text question information includes web page data, the reference message includes the corresponding website URL; if the answer corresponding to the text question information includes a document, the reference message includes the document name, and the document text can be downloaded by clicking the name.
[0090] Among them, the text question information, the corresponding answers and reference information can be sorted into corresponding first text data and second text data as new sample data, and updated to the large model fine-tuning data set to continuously iterate and fine-tune the training of the large model, so as to provide more accurate and efficient intelligent question and answer services in the field of cloud platform operation and maintenance.
[0091] Optionally, if the question information about the cloud platform operation and maintenance is in a non-text format, before step S101, the method further includes:
[0092] The obtained non-textual question information about cloud platform operation and maintenance is converted into textual question information.
[0093] Among them, if the questions raised by the user in the field of cloud platform operation and maintenance are raised through voice or video, the original question information obtained is in non-text format and needs to be converted into text question information first, and then in step S101, the text question information is vectorized to obtain question information vector data.
[0094] Among them, if the collected original historical cloud platform operation and maintenance data is not in text format, such as audio or video, it also needs to be converted into text data after collection to obtain historical cloud platform operation and maintenance text data, and then a cloud platform operation and maintenance data text set is constructed based on the obtained historical cloud platform operation and maintenance text data. The historical cloud platform operation and maintenance text data is vectorized to construct a historical cloud platform operation and maintenance data vector set.
[0095] Through the above-mentioned embodiments and optional embodiments, when providing intelligent question-answering services in the field of cloud platform operation and maintenance, the ability of the fine-tuned trained large model to recognize effective information about the problem can be improved, and the ability of the fine-tuned trained large model to generate accurate and reliable answers when the information of the problem is incomplete or noisy is enhanced, and accurate and professional answers corresponding to the questions can be intelligently given.
[0096] In this embodiment and / or optional embodiment, data processing can be implemented using Python language, and Python language can also be used to write relevant codes for calling large language models for model fine-tuning and answer generation. In the webpage interactive end implementing this embodiment, the Flask framework can be used to implement interactive functions. In order to ensure the smooth progress of text data vectorization, similarity calculation, large model fine-tuning training, and answers based on large models after fine-tuning training, a device 100 and / or a server equipped with a high-performance GPU can be used, for example, NVIDIA's A100. In addition, for storing the historical cloud platform operation and maintenance data of this product, and the data storage for the smooth completion of large model fine-tuning, the hard disk capacity should not be less than 1T.
[0097] Figure 2 A question-and-answer device for cloud platform operation and maintenance according to another aspect of the present invention is shown, wherein the device of one embodiment includes:
[0098] The first module 210 is used to vectorize the obtained text question information about cloud platform operation and maintenance to obtain question information vector data;
[0099] The second module 220 is used to calculate the similarity between the question information vector data and each vector data in the preset cloud platform operation and maintenance data vector set, and determine a number of vector data whose similarity values meet a preset threshold value according to the similarity value of each vector data;
[0100] The third module 230 is used to calculate the correlation score between each vector data in the plurality of vector data and the question information vector data, and sort them according to the correlation scores, determine a preset number of vector data with the highest correlation scores, and obtain a preset number of cloud platform operation and maintenance text data corresponding to the preset number of vector data from a preset cloud platform operation and maintenance data text set;
[0101] The fourth module 240 is used to input the preset number of cloud platform operation and maintenance text data and the text question information into the fine-tuned trained large model to obtain an answer corresponding to the text question information.
[0102] In this embodiment, the apparatus has the same software and hardware environment as the device 100 for executing the aforementioned method embodiment and / or optional embodiment.
[0103] In this embodiment, the text question information obtained about the operation and maintenance of the cloud platform can be vectorized through the first module 210 of the device to obtain question information vector data. When a user asks a question related to the operation and maintenance of the cloud platform, the first module 210 of the device can obtain the corresponding text question information, and the text question information can be vectorized to obtain the corresponding question information vector data.
[0104] Continuing in this embodiment, through the second module 220 of the device, the similarity between the question information vector data and each vector data in the preset cloud platform operation and maintenance data vector set can be calculated, and according to the similarity value of each vector data, several vector data whose similarity values meet the preset threshold are determined. Wherein, through the second module 220 of the device, the similarity between the question information vector data and each vector data in the pre-built cloud platform operation and maintenance data vector set can be calculated, and according to the calculated similarity value of each vector data, several vector data whose similarity values meet the preset threshold are determined.
[0105] Continuing with this embodiment, through the third module 230 of the device, the correlation score between each vector data among the plurality of vector data and the question information vector data can be calculated, and sorted according to the correlation score to determine a preset number of vector data with the highest correlation score, and a preset number of cloud platform operation and maintenance text data corresponding to the preset number of vector data is obtained from a preset cloud platform operation and maintenance data text set.
[0106] Continuing in this embodiment, through the fourth module 240 of the device, the preset number of cloud platform operation and maintenance text data and the text question information can be input into the fine-tuned trained large model to obtain an answer corresponding to the text question information. The text question information and the determined preset number of cloud platform operation and maintenance text data can be spliced and input into the fine-tuned trained large model to obtain an answer corresponding to the text question information.
[0107] Through the device of the above-mentioned embodiment, when providing intelligent question-answering services in the field of cloud platform operation and maintenance, the ability of the large model after fine-tuning training to recognize effective information of the problem can be improved, and the ability of the large model after fine-tuning training to generate accurate and reliable answers when the information of the problem is incomplete or noisy is enhanced, and accurate and professional answers corresponding to the questions can be given intelligently.
[0108] In each embodiment and / or optional embodiment of the above-mentioned device, the unmentioned parts in the method steps performed by each module are the same as those in the aforementioned related method embodiments and / or optional embodiments, and will not be repeated here.
[0109] According to yet another aspect of the present invention, a computer-readable medium is provided, wherein the computer-readable medium stores computer-readable instructions, and the computer-readable instructions can be executed by a processor to implement the aforementioned method.
[0110] It should be noted that the various method embodiments of the present invention can be implemented in software and / or a combination of software and hardware. The software program involved in the present invention can be executed by a processor to implement the steps or functions of the above-mentioned various embodiments. Similarly, the software program of the present invention (including related data structures) can be stored in a computer-readable recording medium.
[0111] In addition, a part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. The program instruction for calling the method of the present invention may be stored in a fixed or removable recording medium, and / or transmitted through a data stream in a broadcast or other signal-bearing medium, and / or stored in a working memory of a computer device that operates according to the program instruction.
[0112] According to another aspect of the present invention, there is also provided a question-and-answer device for cloud platform operation and maintenance, the device comprising: a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the device is triggered to execute methods and / or technical solutions such as the aforementioned embodiments and / or optional embodiments.
[0113] It is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the device claim can also be implemented by one unit or device through software and / or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
Claims
1. A question-answering method for cloud platform operation and maintenance, characterized in that: The method comprises: Vectorize the obtained text question information about cloud platform operation and maintenance to obtain question information vector data; Calculate the similarity between the question information vector data and each vector data in the preset cloud platform operation and maintenance data vector set, and determine a number of vector data whose similarity values meet a preset threshold value according to the similarity value of each vector data; Calculate the correlation score between each vector data in the plurality of vector data and the question information vector data, sort them according to the correlation scores, determine a preset number of vector data with the highest correlation scores, and obtain a preset number of cloud platform operation and maintenance text data corresponding to the preset number of vector data from a preset cloud platform operation and maintenance data text set; The preset number of cloud platform operation and maintenance text data and the text question information are input into the fine-tuned trained large model to obtain answers corresponding to the text question information.
2. The method according to claim 1, characterized in that The construction of the cloud platform operation and maintenance data vector set includes: Obtain some historical cloud platform operation and maintenance text data; Perform vectorization processing on each historical cloud platform operation and maintenance text data to obtain the subject vector data, summary vector data and text vector data corresponding to each historical cloud platform operation and maintenance text data; All topic vector data, summary vector data and text vector data are grouped together to construct a cloud platform operation and maintenance data vector set.
3. The method according to claim 2, characterized in that The vectorization processing is performed on each historical cloud platform operation and maintenance text data to obtain the subject vector data, summary vector data and text vector data corresponding to each historical cloud platform operation and maintenance text data, including: Determine the subject text data, summary text data and body text data corresponding to each historical cloud platform operation and maintenance text data; The subject text data, summary text data and main text data are respectively vectorized to obtain the subject vector data, summary vector data and main text vector data corresponding to each historical cloud platform operation and maintenance text data.
4. The method according to claim 2, characterized in that: The cloud platform operation and maintenance data vector set includes: A topic vector data subset, a summary vector data subset, and a text vector data subset, wherein the topic vector data subset includes the topic vector data corresponding to all historical cloud platform operation and maintenance text data, the summary vector data subset includes the summary vector data corresponding to all historical cloud platform operation and maintenance text data, and the text vector data subset includes the text vector data corresponding to all historical cloud platform operation and maintenance text data; wherein, The determining of a plurality of vector data whose similarity values meet a preset threshold value includes: Based on a preset hierarchical search strategy, the subject vector data subset, summary vector data subset and text vector data subset are traversed and searched in sequence to determine a number of vector data whose similarity values meet a preset threshold.
5. The method according to claim 2, characterized in that: The construction of the cloud platform operation and maintenance data text set includes: The plurality of historical cloud platform operation and maintenance text data are grouped into a set to construct a cloud platform operation and maintenance data text set.
6. The method according to claim 5, characterized in that The fine-tuning training of the large model after the fine-tuning training includes: Determine the first text data and the second text data corresponding to each historical cloud platform operation and maintenance text data, wherein the first text data includes the question text, reference text, random interference text and answer text corresponding to the historical cloud platform operation and maintenance text data, and the second text data includes the question text, random interference text and answer text corresponding to the historical cloud platform operation and maintenance text data; All the first text data and the second text data are grouped together to construct a large model fine-tuning data set; Based on the large model fine-tuning dataset, LLaMA-Factory is used to fine-tune the large model to obtain a large model after fine-tuning training.
7. The method according to claim 1, characterized in that If the question information about the cloud platform operation and maintenance is in a non-text format, before the vectorization processing is performed, the method further includes: The obtained non-textual question information about cloud platform operation and maintenance is converted into textual question information.
8. A question-answering device for cloud platform operation and maintenance, characterized in that: The device comprises: The first module is used to vectorize the text question information obtained about the operation and maintenance of the cloud platform to obtain question information vector data; The second module is used to calculate the similarity between the question information vector data and each vector data in the preset cloud platform operation and maintenance data vector set, and determine a number of vector data whose similarity values meet a preset threshold value according to the similarity value of each vector data; The third module is used to calculate the correlation score between each vector data in the plurality of vector data and the question information vector data, and sort them according to the correlation scores, determine a preset number of vector data with the highest correlation scores, and obtain a preset number of cloud platform operation and maintenance text data corresponding to the preset number of vector data from a preset cloud platform operation and maintenance data text set; The fourth module is used to input the preset number of cloud platform operation and maintenance text data and the text question information into the fine-tuned trained large model to obtain answers corresponding to the text question information.
9. A computer-readable medium, characterized in that Computer readable instructions are stored thereon, and the computer readable instructions are executed by a processor to implement the method according to any one of claims 1 to 7.
10. A question-answering device for cloud platform operation and maintenance, characterized in that: The device comprises: one or more processors; and A memory storing computer readable instructions which, when executed, cause the processor to perform the operations of the method as claimed in any one of claims 1 to 7.