Question and answer method, device, equipment and storage medium
By responding to user queries during monocrystalline silicon production, identifying text fragments, and performing access control desensitization, the inefficiency caused by manual searching is solved, enabling fast and accurate information retrieval and secure data access.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- QINGHAI GOKIN SOLAR TECH CO LTD
- Filing Date
- 2026-03-31
- Publication Date
- 2026-07-03
Smart Images

Figure CN122332437A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a question-answering method, apparatus, device, and storage medium. Background Technology
[0002] As a core material in the semiconductor industry chain, monocrystalline silicon has a complex production process involving numerous strict operating procedures and key process parameters.
[0003] In actual production processes, relevant personnel typically need to manually search for and use this technical information. Specifically, when operators need to look up operating procedures or key process parameters, they must retrieve the required information one by one from technical documents scattered across different servers or hard drives.
[0004] However, because these technical documents are scattered, manually searching them would require operators to repeatedly search across multiple storage locations, wasting a lot of time and resulting in low information retrieval efficiency. Summary of the Invention
[0005] This application provides question-and-answer methods, apparatus, devices, and storage media to solve the problems of low search efficiency and long search time caused by manual search.
[0006] In a first aspect, embodiments of this application provide a question-and-answer method, applied to a client, including:
[0007] In response to a user-inputted question, at least one first text fragment corresponding to the question is determined;
[0008] Based on the question information and at least one of the first text fragments, determine the first question-and-answer result;
[0009] Determine the permission parameters corresponding to the user, the permission parameters being used to indicate the range of data and / or resources that the user is allowed to access;
[0010] Based on the permission parameters, the first question and answer result is anonymized to obtain the second question and answer result;
[0011] Output the result of the second question and answer.
[0012] In one possible implementation, determining at least one first text fragment corresponding to the question information includes:
[0013] The question information is formatted to obtain at least one keyword;
[0014] Perform vector transformation on the keywords to obtain at least one first query vector corresponding to the keywords;
[0015] Identify at least one first text segment that corresponds to the first query vector.
[0016] In one possible implementation, determining at least one first text fragment corresponding to the first query vector includes:
[0017] Obtain a behavior history vector library, which includes: multiple second query vectors, and a first document identifier corresponding to each second query vector;
[0018] For any first query vector, determine the first semantic similarity between the first query vector and each second query vector, and if any first semantic similarity is greater than or equal to a first preset similarity, obtain the first document content based on the first document identifier corresponding to the first semantic similarity;
[0019] The first text fragment is determined from the content of the first document based on the first query vector.
[0020] In one possible implementation, the method further includes:
[0021] When all first semantic similarities are less than the first preset similarity, a high-frequency historical vector library is obtained. The high-frequency historical vector library includes: multiple third query vectors, and a second document identifier corresponding to each third query vector.
[0022] For any first query vector, determine the second semantic similarity between the first query vector and each of the third query vectors, and if any second semantic similarity is greater than or equal to the second preset similarity, obtain the second document content based on the second document identifier corresponding to the second semantic similarity;
[0023] The first text fragment is determined from the content of the second document based on the first query vector.
[0024] In one possible implementation, the method further includes:
[0025] If all second semantic similarities are less than the second preset similarity, a full document vector library is obtained. The full document vector library includes: multiple fourth query vectors, and a third document identifier corresponding to each fourth query vector.
[0026] For any first query vector, determine the third semantic similarity between the first query vector and each of the fourth query vectors, and if any third semantic similarity is greater than or equal to the third preset similarity, obtain the third document content according to the third document identifier corresponding to the third semantic similarity;
[0027] The first text fragment is determined from the content of the third document based on the first query vector.
[0028] In one possible implementation, the step of desensitizing the first question-and-answer result based on the permission parameters to obtain the second question-and-answer result includes:
[0029] Based on the permission parameters, the first question and answer result is verified to obtain the verification result.
[0030] If the verification result indicates that the first question and answer result contains content that cannot be accessed by the user, the first question and answer result is anonymized based on the permission parameters to obtain the second question and answer result.
[0031] In one possible implementation, determining the permission parameters corresponding to the user includes:
[0032] Determine the user's role attributes;
[0033] Based on the role attributes, obtain the permission parameters corresponding to the user.
[0034] In one possible implementation, the method further includes:
[0035] Based on the second question and answer result, a de-identification prompt message is generated, which is used to indicate that the second question and answer result has been de-identified.
[0036] Secondly, embodiments of this application provide a question-and-answer device applied to a client, comprising:
[0037] The determination module is used to determine at least one first text fragment corresponding to the user's input question information in response to the question information;
[0038] The determining module is further configured to determine a first question-and-answer result based on the question information and at least one of the first text fragments;
[0039] The determining module is further configured to determine permission parameters corresponding to the user, wherein the permission parameters are used to indicate the range of data and / or resources that the user is allowed to access;
[0040] The processing module is used to perform desensitization processing on the first question-and-answer result based on the permission parameters to obtain the second question-and-answer result;
[0041] The output module is used to output the second question-and-answer result.
[0042] In one possible implementation, the processing module is further configured to format the question information to obtain at least one keyword;
[0043] The processing module is further configured to perform vector transformation processing on the keywords to obtain at least one first query vector corresponding to the keywords;
[0044] The determining module is specifically used to determine at least one first text segment corresponding to the first query vector.
[0045] In one possible implementation, the apparatus further includes: an acquisition module;
[0046] The acquisition module is used to acquire a behavior history vector library, which includes: multiple second query vectors and a first document identifier corresponding to each second query vector;
[0047] The determining module is further configured to determine, for any one of the first query vectors, the first semantic similarity between the first query vector and each of the second query vectors;
[0048] The acquisition module is further configured to acquire the content of the first document based on the first document identifier corresponding to the first semantic similarity when any first semantic similarity is greater than or equal to the first preset similarity;
[0049] The determining module is specifically used to determine the first text fragment from the content of the first document based on the first query vector.
[0050] In one possible implementation, the acquisition module is further configured to acquire a high-frequency historical vector library when all first semantic similarities are less than a first preset similarity, the high-frequency historical vector library including: a plurality of third query vectors, and a second document identifier corresponding to each third query vector;
[0051] The determining module is further configured to, for any one of the first query vectors, determine the second semantic similarity between the first query vector and each of the third query vectors;
[0052] The acquisition module is further configured to acquire the content of the second document based on the second document identifier corresponding to the second semantic similarity when any second semantic similarity is greater than or equal to the second preset similarity;
[0053] The determining module is specifically used to determine the first text fragment from the content of the second document based on the first query vector.
[0054] In one possible implementation, the acquisition module is further configured to acquire a full document vector library when all second semantic similarities are less than the second preset similarity, the full document vector library including: a plurality of fourth query vectors, and a third document identifier corresponding to each of the fourth query vectors;
[0055] The determining module is further configured to determine, for any one of the first query vectors, the third semantic similarity between the first query vector and each of the fourth query vectors;
[0056] The acquisition module is further configured to acquire the third document content based on the third document identifier corresponding to the third semantic similarity when any third semantic similarity is greater than or equal to the third preset similarity.
[0057] The determining module is specifically used to determine the first text fragment from the content of the third document based on the first query vector.
[0058] In one possible implementation, the device further includes: a verification module;
[0059] The verification module is used to perform permission verification on the first question-and-answer result based on the permission parameters, and obtain the verification result.
[0060] The processing module is specifically used to perform desensitization processing on the first question and answer result based on the permission parameters when the verification result indicates that the first question and answer result contains content that cannot be accessed by permission, so as to obtain the second question and answer result.
[0061] In one possible implementation, the determining module is further configured to determine the user's role attributes;
[0062] The acquisition module is specifically used to acquire the permission parameters corresponding to the user based on the role attributes.
[0063] In one possible implementation, the apparatus further includes: a generation module;
[0064] The generation module is used to generate a de-identification prompt message based on the second question and answer result. The de-identification prompt message is used to indicate that the second question and answer result has been de-identified.
[0065] Thirdly, embodiments of this application provide a question-and-answer device, including: a memory and a processor;
[0066] The memory stores computer-executed instructions;
[0067] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.
[0068] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.
[0069] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.
[0070] The question-and-answer method, apparatus, device, and storage medium provided in this application first respond to user-inputted question information, determine at least one corresponding first text fragment, and then determine a first question-and-answer result based on the question information and these first text fragments. Next, it determines the user-corresponding permission parameters; then, based on the permission parameters, it performs desensitization processing on the first question-and-answer result to obtain a second question-and-answer result and outputs it. This method, through intelligent question-and-answer combined with permission-based desensitization, solves the problems of low search efficiency and long time consumption caused by manual searching, thereby providing reliable question-and-answer results to relevant personnel while ensuring data security and complying with user permissions. Attached Figure Description
[0071] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0072] Figure 1 Flowchart of the question-and-answer method provided in this application Figure 1 ;
[0073] Figure 2 Flowchart of the question-and-answer method provided in this application Figure 2 ;
[0074] Figure 3 Flowchart of the question-and-answer method provided in this application Figure 3 ;
[0075] Figure 4 A schematic diagram of the question-and-answer device provided in this application;
[0076] Figure 5 A schematic diagram of the question-and-answer device provided in this application.
[0077] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0078] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0079] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0080] As a core material in the semiconductor industry chain, monocrystalline silicon has a complex production process involving numerous strict operating procedures and key process parameters.
[0081] In actual production processes, relevant personnel typically need to manually search for and use this technical information. Specifically, when operators need to look up operating procedures or key process parameters, they must retrieve the required information one by one from technical documents scattered across different servers or hard drives.
[0082] However, because these technical documents are scattered, manually searching them would require operators to repeatedly search across multiple storage locations, wasting a lot of time and resulting in low information retrieval efficiency.
[0083] The question-and-answer method provided in this application first matches a corresponding first text fragment based on the user's input question information. Then, it combines the question information and the first text fragment to generate a first question-and-answer result. Next, it determines the user's corresponding permission parameters to clarify the scope of data and resources they can access. Based on these permission parameters, it performs anonymization processing on the first question-and-answer result to obtain a second question-and-answer result, which is then finally output. This method, by combining intelligent question-and-answer matching generation with user permission anonymization control, solves the problems of low search efficiency and long processing times caused by manual searching, thereby ensuring the security and compliance of data access.
[0084] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.
[0085] Figure 1 Flowchart of the question-and-answer method provided in this application Figure 1 This is applied to the client side. The executing entity in this application embodiment can be, for example, a question-and-answer system deployed on the client side, such as... Figure 1 As shown, the method includes:
[0086] S101. In response to the user's input of a question, determine at least one first text fragment corresponding to the question.
[0087] Among them, the query information refers to the text or instruction information entered by the user with the intention of querying in order to obtain technical answers, operation guidance or process parameters.
[0088] A text fragment refers to a localized piece of text extracted from a complete technical document that has independent semantic meaning and is relevant to the query content. Text fragments can take the form of paragraphs, clauses, or key sentences. Examples include "The heating rate of the monocrystalline silicon growth furnace should be controlled within 2°C per minute" extracted from a monocrystalline silicon process manual, or "Acid solutions must be used sequentially during cleaning" extracted from a monocrystalline silicon operating specification.
[0089] Understandably, the questions entered by users have a clear query intent and direction. Therefore, by identifying relevant text fragments corresponding to the user's question, we can effectively avoid interference from irrelevant information, narrow down the scope of subsequent information processing, and thus improve the efficiency and accuracy of answer generation.
[0090] The method for obtaining user input question information in this step can be, for example, the user manually enters the text question through the interface, or the user enters the question through voice and the system converts the voice to text, or the user selects a preset question template to submit. This application does not impose any special restrictions on this.
[0091] S102. Determine the first question-and-answer result based on the question information and at least one first text fragment.
[0092] The first question-and-answer result refers to the original, complete answer generated after integrating and reasoning based on the user's question information and matching relevant text fragments, without any permission-sensitive processing. For example, if a user asks "argon flow control standards for monocrystalline silicon growth," the system will generate a complete answer including specific flow values, control requirements, and operating instructions based on relevant process document fragments; this is the first question-and-answer result.
[0093] The purpose of this step is to sort out, summarize, and organize the relevant text fragments based on the user's question intent, thereby transforming the scattered document content into a coherent and complete answer.
[0094] S103. Determine the permission parameters corresponding to the user. The permission parameters are used to indicate the range of data and / or resources that the user is allowed to access.
[0095] The purpose of this step is to determine the boundaries and scope of data such as technical documents and process parameters that the current user is allowed to access.
[0096] Understandably, given that monocrystalline silicon production involves a large amount of sensitive technical information, including core processes and key parameters, personnel in different positions have different access permissions. Therefore, by defining user permission parameters, unauthorized users can be effectively prevented from accessing sensitive content, thereby preventing data leaks and unauthorized access.
[0097] S104. Based on the permission parameters, the first question and answer result is anonymized to obtain the second question and answer result.
[0098] The purpose of this step is to perform permission adaptation processing on the first question-and-answer result containing complete information based on the user's corresponding permission parameters, filter or hide sensitive content that the user does not have permission to view, and obtain a second question-and-answer result that conforms to the user's access scope.
[0099] Understandably, since the first Q&A result contains complete technical information, it may include core monocrystalline silicon processes, confidential parameters, and other content that is only accessible to specific personnel. Therefore, by anonymizing the first Q&A result based on access permissions, it can be ensured that users only access information within their authorized scope.
[0100] S105, Output the second question and answer result.
[0101] The purpose of this step is to provide the user with the question and answer results after permission verification and desensitization, so that the user can obtain valid information within their own permission scope.
[0102] Understandably, the second question-and-answer result is secure content that has had sensitive information removed and is adapted to user permissions. Therefore, this result can be directly output, thus satisfying users' query needs for monocrystalline silicon-related processes and parameters while avoiding the leakage of confidential or unauthorized information.
[0103] The question-and-answer method provided in this application responds to user-inputted questions, determines at least one corresponding text fragment, generates preliminary question-and-answer results based on this information, then determines user-to-user permission parameters to indicate the scope of data and resources the user can access, thereby de-identifying the preliminary question-and-answer results, and finally outputs question-and-answer results that conform to the user's permissions. This method solves the problems of low search efficiency and long time consumption caused by manual searching, realizes fast and accurate information retrieval and secure data access, and improves work efficiency and information utilization.
[0104] Figure 2 Flowchart of the question-and-answer method provided in this application Figure 2 ,like Figure 2 As shown, in this embodiment... Figure 1 Based on the embodiments, the question-and-answer method is described in detail, which includes:
[0105] S201. In response to the user's input question information, format the question information to obtain at least one keyword.
[0106] Keywords refer to words or technical terms extracted from the query information after formatting, which reflect the user's query intent.
[0107] Formatting processes include, but are not limited to: text cleaning and word segmentation.
[0108] In this step, for example, the system can first respond to the user's input query information by performing text cleaning to remove redundant characters, special symbols, and invalid interjections; then, based on the cleaned query information, the system can perform word segmentation to extract keywords that represent the query intent.
[0109] S202. Perform vector transformation on the keywords to obtain at least one first query vector corresponding to the keywords.
[0110] Understandably, by performing vector transformation on keywords, a first query vector corresponding to these keywords can be generated, thereby converting semantic information in text form into numerical form that can be used for mathematical calculations.
[0111] S203. Determine at least one first text segment corresponding to the first query vector.
[0112] Understandably, the first query vector is obtained by performing vector transformation on the keywords. Therefore, the first query vector can be used as a basis to determine the first text segment corresponding to the vector.
[0113] S204. Determine the first question-and-answer result based on the question information and at least one first text fragment.
[0114] Optionally, this application provides a possible implementation method, including: inputting the question information and at least a first text fragment into a pre-trained monocrystalline silicon question-answering model to obtain a first question-answering result output by the monocrystalline silicon question-answering model.
[0115] The purpose of this step is to use a trained monocrystalline silicon question-and-answer model to process user questions and related text fragments, integrating scattered technical information into complete and standardized answers, thereby improving the accuracy and professionalism of the responses.
[0116] Optionally, this application provides a training process for a single-crystal silicon question-answering model, including:
[0117] The first step is to determine the training dataset and the test dataset based on multiple sets of historical question-and-answer data for monocrystalline silicon.
[0118] The training dataset is used to train the monocrystalline silicon question-answering model. The test dataset is used to evaluate the model's question-answering performance after training is complete.
[0119] Understandably, by dividing multiple sets of historical question-and-answer data, training and testing datasets can be separated, providing a data source for the subsequent construction, training, and validation of the monocrystalline silicon question-and-answer model.
[0120] The second step is to train the initial model based on the training dataset to obtain candidate question-answering models.
[0121] The initial model can be, for example, a pre-trained language model. Pre-trained language models can be pre-trained on large-scale general corpora to learn the semantic features, contextual relationships, and sentence structure of texts. Based on this, they can be fine-tuned for specific domains to adapt to question-answering tasks in the monocrystalline silicon professional field.
[0122] The purpose of this step is to use historical question-and-answer data on monocrystalline silicon in the training dataset to train and optimize the parameters of the initial model in a targeted manner, so that the initial model can learn and fit the inherent laws and characteristics of professional knowledge such as monocrystalline silicon production process, operation specifications, and parameter control, and transform the general pre-trained model into a candidate question-and-answer model adapted to the monocrystalline silicon production scenario.
[0123] Understandably, the first step is to standardize and preprocess multiple sets of historical question-and-answer data in the training dataset, extracting user question information, corresponding text fragments, and standard answer content from each set of data. Professional terms are uniformly labeled, and inconsistent content is standardized. At the same time, abnormal question-and-answer pairs with missing data, incorrect expression, or semantic confusion are removed. Finally, these are integrated to form a standardized training feature set with a unified format and standardized content, ensuring that the data format fully matches the input requirements of the initial model and avoiding abnormal data from affecting the training effect.
[0124] Subsequently, the functions required for model training are configured, cross-entropy loss is selected as the loss function for model training, and an adaptive learning rate optimizer is selected as the model optimization algorithm. Cross-entropy loss is used to quantify the degree of difference between the model-generated answer and the standard answer, and the adaptive learning rate optimizer is used to adjust the model parameters in reverse according to the difference value to improve the question-answer matching accuracy.
[0125] Next, the standardized training feature set is input in batches into the initial pre-trained language model. The model learns the relationship between the question information and the text fragments based on a semantic understanding algorithm and outputs preliminary question-and-answer results. During training, the difference between the model output and the standard answer is calculated in real time using cross-entropy loss, and the model parameters are iteratively updated using an optimizer to continuously reduce the difference and improve question-and-answer accuracy. When the loss function converges to a preset threshold and the question-and-answer accuracy reaches the standard, training stops, thereby obtaining a candidate question-and-answer model with stable monocrystalline silicon professional question-and-answer capabilities.
[0126] The third step is to test the candidate question-answering models based on the test dataset and obtain the test results.
[0127] The purpose of this step is to use a test dataset to validate the performance of the trained candidate question-answering models.
[0128] Understandably, firstly, the test dataset contains multiple sets of historical question-and-answer data on monocrystalline silicon, which undergo standardized preprocessing consistent with the training dataset. This involves extracting user questions, relevant text fragments, and standard answers, standardizing the terminology, removing abnormal and erroneous data, and integrating them into a standardized test feature set that perfectly matches the input format of the candidate question-and-answer model. This ensures that the test data is standardized and consistent, and avoids data deviations affecting the test results.
[0129] Subsequently, the evaluation metrics required for model testing were configured, with question-answering accuracy and semantic similarity selected as core evaluation metrics, supplemented by answer fluency and professional compliance as auxiliary evaluation criteria. Question-answering accuracy is used to measure the consistency between the model output results and the standard answer, semantic similarity is used to evaluate the degree of matching between the model's answer and the user's question intent, and answer fluency and professional compliance are used to determine whether the output content conforms to the single-crystal silicon process description specifications.
[0130] Next, the preprocessed standardized test feature set is input into the candidate question-answering model in batches. The model outputs corresponding question-answering results based on the learned monocrystalline silicon expertise. Subsequently, quantitative results such as accuracy and semantic similarity are calculated using preset evaluation indicators to comprehensively judge the accuracy, fluency, and professionalism of the model's answers. Finally, all evaluation results are integrated to form a complete test result, which is used to determine whether the candidate question-answering model's performance meets the preset standards, thus obtaining the test result of the candidate question-answering model.
[0131] The fourth step is to determine the candidate question-answering model as the monocrystalline silicon question-answering model if the test result is passed.
[0132] The purpose of this step is to determine the candidate question-answering model as a usable monocrystalline silicon question-answering model, provided that the test results are deemed satisfactory.
[0133] Understandably, the test result is that the test passed, which reflects that the candidate question answering model has reached the preset standards in terms of question answering accuracy, semantic matching degree and other indicators on the independent test dataset. This indicates that the model has a stable question answering ability for unknown process problems and there is no overfitting, irrelevant answer or professional error.
[0134] The fifth step is to retrain the candidate question-answering model if the test result is a failure, until the test is passed.
[0135] Understandably, if the test result is unsuccessful, the training dataset is reused to retrain the candidate question-answering model that did not meet the preset performance standard. The training process uses the previously preset loss function, optimization algorithm, and training logic, continuously iterating and optimizing the model parameters. After each secondary training, the model is retested using the test dataset until the model's question-answering accuracy, semantic matching degree, and other metrics reach the preset passing standard, thus completing the model training.
[0136] S205. Determine the user's role attributes.
[0137] Understandably, different users have different access permissions. Therefore, in order to facilitate subsequent permission verification of the first question and answer results, it is necessary to determine the user's role attributes.
[0138] This step determines user role attributes in ways such as using the account identifier the user uses to log in on the client. When a user logs in on the client, they enter authentication information such as their username and password. The system can then use this input information to obtain the account identifier and query the backend database or user management system to determine the user's corresponding role attributes.
[0139] S206. Based on the role attributes, obtain the permission parameters corresponding to the user. The permission parameters are used to indicate the range of data and / or resources that the user is allowed to access.
[0140] It is understandable that users with different roles and security levels have different access to monocrystalline silicon technical data, process parameters, and other information.
[0141] Therefore, corresponding permission parameters can be obtained based on role attributes, thereby enabling identity-based management of data access, preventing unauthorized access to sensitive information, and ensuring data security.
[0142] S207. Perform permission verification on the first question and answer result based on the permission parameters, and obtain the verification result.
[0143] The purpose of this step is to determine whether there is any information in the first question and answer results that the user does not have permission to view.
[0144] Understandably, the content in the first question and answer result is compared with the user's permission scope one by one to identify whether there is any information that the user does not have permission to view, thereby determining whether it contains content that the user does not have permission to access.
[0145] S208. If the verification result indicates that the first question and answer result contains content that cannot be accessed by permission, the first question and answer result is anonymized based on the permission parameters to obtain the second question and answer result.
[0146] The purpose of this step is to process sensitive and unauthorized information according to permission parameters when the first question-and-answer result is determined to contain content that the user does not have permission to access, and generate a second question-and-answer result that conforms to the user's access permissions.
[0147] Understandably, if the first question-and-answer result contains content that the user lacks permission to access, directly outputting it might lead to issues such as sensitive information leakage and unauthorized access. Therefore, the first question-and-answer result can be processed by deleting, masking, or replacing it based on permission parameters. Content that exceeds the user's permissions can be removed or hidden, and only the normal information that the user is authorized to view can be retained. The statements can then be reorganized to obtain the second question-and-answer result.
[0148] S209. Output the results of the second question and answer.
[0149] Optionally, after outputting the second question-and-answer result, this application further includes: receiving user feedback information and updating and optimizing the pre-trained monocrystalline silicon question-and-answer model based on the feedback information to improve the accuracy and adaptability of the model's question-and-answer process; at the same time, storing the question information, the second question-and-answer result, the text fragment, and the role attributes into a pre-built log access record table, which is used to record the system interaction process.
[0150] S210. Based on the second question and answer result, generate a desensitization prompt message. The desensitization prompt message is used to indicate that the second question and answer result has been desensitized.
[0151] The purpose of this step is to generate a corresponding prompt message after the second question-and-answer result has been anonymized, clearly informing the user that the currently displayed question-and-answer result has been anonymized in accordance with permission requirements.
[0152] Understandably, generating de-identified prompts allows users to clearly understand that some content has been hidden due to permission restrictions, preventing users from mistakenly believing that the answer is incomplete or that information is missing, and enhancing users' awareness of data security management.
[0153] Optionally, after generating the anonymized prompt based on the second question-and-answer result, the information can be displayed above or below the question-and-answer result display area on the client, sent to the user's registered mobile phone number via SMS, or pushed to the user via email. This application does not impose any special restrictions on this.
[0154] The question-and-answer method provided in this application first performs word segmentation and keyword vector conversion on the user's question information to obtain a first query vector and match the corresponding first text fragment. Then, it combines the question information and the first text fragment to determine the first question-and-answer result. Subsequently, it obtains permission parameters through role attributes and performs permission verification on the first question-and-answer result based on the permission parameters. It then performs desensitization processing on content that is not authorized to be accessed to obtain a second question-and-answer result and outputs it. At the same time, it generates desensitization prompt information based on the second question-and-answer result.
[0155] This method combines keyword vector retrieval with permission verification and desensitization to achieve rapid and accurate matching and acquisition of technical information, while effectively controlling the scope of data access. This improves query efficiency while ensuring data security and access compliance.
[0156] Figure 3 Flowchart of the question-and-answer method provided in this application Figure 3 ,like Figure 3 As shown, this embodiment, based on the above embodiments, provides a detailed description of the process for determining at least one first text segment corresponding to the first query vector. The method includes:
[0157] S301. Obtain the behavior history vector library, which includes: multiple second query vectors, and the first document identifier corresponding to each second query vector.
[0158] Understandably, the behavioral history vector library is built based on a user's historical query behavior, reflecting the user's past query intent and retrieved content. Therefore, this behavioral history vector library can be obtained to perform semantic matching based on the user's historical query behavior.
[0159] This step of obtaining the behavior history vector library can be done in various ways, such as from the client's local cache, directly from the client's local database, or from cloud storage. This application does not impose any special restrictions on this.
[0160] S302. For any first query vector, determine the first semantic similarity between the first query vector and each second query vector, and if any first semantic similarity is greater than or equal to the first preset similarity, obtain the content of the first document based on the first document identifier corresponding to the first semantic similarity.
[0161] The first semantic similarity is used to characterize the degree of semantic similarity between the first query vector and each second query vector. The higher the first semantic similarity, the higher the semantic similarity between the two; the lower the first semantic similarity, the lower the semantic similarity between the two.
[0162] The first document content refers to the complete knowledge base document or technical information that is associated with historical highly similar queries and is pointed to by the first document identifier.
[0163] The first preset similarity can be, for example, 95% or 99%. This application does not impose any special restrictions on this.
[0164] The purpose of this step is to determine whether the question information currently entered by the user has already appeared in the query history.
[0165] Understandably, firstly, the similarity between any first query vector and each second query vector is calculated to obtain the corresponding first semantic similarity; then, if any first semantic similarity is greater than or equal to the first preset similarity, it means that the question information currently entered by the user has appeared in the historical query records, so the corresponding first document content can be obtained based on the first document identifier corresponding to the first semantic similarity.
[0166] S303. Determine the first text fragment from the content of the first document based on the first query vector.
[0167] The first text fragment is a local text content extracted from the complete first document content based on its semantic relevance to the first query vector.
[0168] The purpose of this step is to perform semantic matching based on the current query vector after obtaining the complete content of the first document, and to filter out the local text content that is most relevant to the query intent, thereby avoiding the use of the full text content and improving the accuracy of the question-and-answer results.
[0169] S304. If all first semantic similarities are less than the first preset similarity, obtain a high-frequency historical vector library. The high-frequency historical vector library includes: multiple third query vectors, and a second document identifier corresponding to each third query vector.
[0170] Understandably, if all the first semantic similarities are less than the first preset similarity, it means that the question information currently entered by the user has not appeared in the user's personal query history.
[0171] Therefore, a high-frequency historical vector library can be obtained. This high-frequency historical vector library is built based on the historical query behavior of multiple users and can reflect the high-frequency query intent and historical search content of a large number of users.
[0172] This step of obtaining the high-frequency historical vector library can be done in various ways, such as from the client's local cache, directly from the client's local database, or from cloud storage. This application does not impose any special restrictions on this.
[0173] S305. For any first query vector, determine the second semantic similarity between the first query vector and each third query vector, and if any second semantic similarity is greater than or equal to the second preset similarity, obtain the second document content according to the second document identifier corresponding to the second semantic similarity.
[0174] The second semantic similarity is used to characterize the degree of semantic similarity between the first query vector and each third query vector. The higher the second semantic similarity, the higher the semantic similarity between the two; the lower the second semantic similarity, the lower the semantic similarity between the two.
[0175] The second document content refers to the complete knowledge base document or technical information associated with high-frequency historical queries and pointed to by the second document identifier.
[0176] The second preset similarity can be, for example, 95% or 99%. This application does not impose any special restrictions on this.
[0177] The purpose of this step is to determine whether the question information currently entered by the user has already appeared in the high-frequency historical query records.
[0178] Understandably, firstly, the similarity between any first query vector and each third query vector is calculated to obtain the corresponding second semantic similarity; then, if any second semantic similarity is greater than or equal to the second preset similarity, it means that the question information currently entered by the user has already appeared in the high-frequency historical query records, so the corresponding second document content can be obtained based on the document identifier corresponding to the second semantic similarity.
[0179] This approach addresses the limitation of not being able to determine the first text fragment from the behavioral history vector library, thereby enabling the rapid retrieval of relevant documents even when there is no match in the individual's history, ensuring a smooth retrieval process and improving the success rate of question answering.
[0180] S306. Determine the first text fragment from the content of the second document based on the first query vector.
[0181] Understandably, after obtaining the content of the second document, semantic matching can be performed based on the first query vector to locate and extract the local text most relevant to the user's query from the full text, and remove irrelevant content. This can avoid directly using the full text content and improve the accuracy of the question-and-answer results.
[0182] S307. If all second semantic similarities are less than the second preset similarity, obtain the full document vector library. The full document vector library includes: multiple fourth query vectors, and the third document identifier corresponding to each fourth query vector.
[0183] Understandably, if all second semantic similarities are less than the second preset similarity, it means that the question information currently entered by the user has not appeared in the high-frequency historical query records.
[0184] Therefore, a full document vector library can be obtained. This full document vector library is built around all technical information and document data related to monocrystalline silicon. It can cover all document resources corresponding to various queries in the field of monocrystalline silicon, solve the problem of relatively scattered technical documents, and provide complete data support for accurate retrieval in subsequent scenarios without historical matching.
[0185] This step of obtaining the full document vector library can be done in several ways, such as from the client's local cache, directly from the client's local database, or from cloud storage. This application does not impose any special restrictions on this method.
[0186] S308. For any first query vector, determine the third semantic similarity between the first query vector and each fourth query vector, and if any third semantic similarity is greater than or equal to the third preset similarity, obtain the third document content based on the third document identifier corresponding to the third semantic similarity.
[0187] The third semantic similarity is used to characterize the degree of semantic similarity between the first query vector and each of the fourth query vectors in the full document vector library. The higher the third semantic similarity, the higher the semantic similarity between the two; the lower the third semantic similarity, the lower the semantic similarity between the two.
[0188] Third-party document content refers to complete knowledge base documents or technical materials that are associated with highly similar queries in the full document vector library and are pointed to by a third-party document identifier.
[0189] The third preset similarity can be, for example, 95% or 99%. This application does not impose any special restrictions on this.
[0190] The purpose of this step is to determine whether the question information currently entered by the user can be retrieved as a match in the full document vector library.
[0191] Understandably, firstly, the current user's first query vector is semantically compared with all fourth query vectors in the full document vector library, and the corresponding third semantic similarity is calculated. Then, if any third semantic similarity is greater than or equal to the third preset similarity, it means that the user's current question information can be retrieved as matching content in the full document vector library. Therefore, the third document content can be obtained based on the third document identifier corresponding to the third semantic similarity.
[0192] This method can solve the problem of not being able to obtain relevant documents when there are no matching results in the user's personal historical queries or general high-frequency historical queries, thus providing a fallback in the retrieval process and ensuring the continuity and effectiveness of the question-and-answer service.
[0193] S309. Determine the first text fragment from the content of the third document based on the first query vector.
[0194] Understandably, after obtaining the content of the third document, semantic matching can be performed based on the first query vector to locate and extract the local text most relevant to the user's query from the full text, remove irrelevant content, and filter out text fragments that meet the question-and-answer requirements.
[0195] The question-answering method provided in this application first obtains a behavioral history vector library, calculates the semantic similarity between a first query vector and a second query vector, and if the threshold is met, retrieves the content and determines the text fragment based on the corresponding document identifier; if the threshold is not met, it continues to match the high-frequency historical vector library for similarity comparison and document retrieval; if the threshold is still not met, it searches the entire document vector library to finally determine the required text fragment. This method achieves rapid and accurate acquisition of text fragments related to the query vector through multi-level vector library retrieval, sequentially performing semantic matching from the behavioral history vector library, the high-frequency historical vector library to the entire document vector library.
[0196] Figure 4 A schematic diagram of the question-and-answer device provided in this application is shown below. Figure 4 As shown, applied to a client, the question-and-answer device 400 provided in this embodiment includes:
[0197] The determining module 401 is used to determine at least one first text fragment corresponding to the question information input by the user in response to the question information.
[0198] The determining module 401 is also used to determine the first question-and-answer result based on the question information and at least one first text fragment;
[0199] The determination module 401 is also used to determine the permission parameters corresponding to the user, the permission parameters being used to indicate the range of data and / or resources that the user is allowed to access;
[0200] Processing module 402 is used to de-identify the first question and answer result based on permission parameters to obtain the second question and answer result;
[0201] Output module 403 is used to output the second question and answer result.
[0202] In one possible implementation, the processing module 402 is further configured to format the query information to obtain at least one keyword;
[0203] The processing module 402 is also used to perform vector transformation processing on the keywords to obtain at least one first query vector corresponding to the keywords;
[0204] The determination module 401 is specifically used to determine at least one first text segment corresponding to the first query vector.
[0205] In one possible implementation, the device further includes: an acquisition module 404;
[0206] The acquisition module 404 is used to acquire the behavior history vector library, which includes: multiple second query vectors, and a first document identifier corresponding to each second query vector;
[0207] The determination module 401 is also used to determine the first semantic similarity between the first query vector and each second query vector for any given first query vector;
[0208] The acquisition module 404 is also used to acquire the content of the first document based on the first document identifier corresponding to the first semantic similarity when any first semantic similarity is greater than or equal to the first preset similarity;
[0209] The determination module 401 is specifically used to determine the first text fragment from the content of the first document based on the first query vector.
[0210] In one possible implementation, the acquisition module 404 is further configured to acquire a high-frequency historical vector library when all first semantic similarities are less than a first preset similarity. The high-frequency historical vector library includes: multiple third query vectors and a second document identifier corresponding to each third query vector.
[0211] The determination module 401 is also used to determine the second semantic similarity between the first query vector and each third query vector for any given first query vector;
[0212] The acquisition module 404 is also used to acquire the content of the second document based on the second document identifier corresponding to the second semantic similarity when any second semantic similarity is greater than or equal to the second preset similarity;
[0213] The determination module 401 is specifically used to determine the first text fragment from the content of the second document based on the first query vector.
[0214] In one possible implementation, the acquisition module 404 is further configured to acquire a full document vector library when all second semantic similarities are less than the second preset similarity. The full document vector library includes: multiple fourth query vectors and a third document identifier corresponding to each fourth query vector.
[0215] The determination module 401 is also used to determine the third semantic similarity between the first query vector and each fourth query vector for any given first query vector;
[0216] The acquisition module 404 is also used to acquire the content of the third document based on the third document identifier corresponding to the third semantic similarity when any third semantic similarity is greater than or equal to the third preset similarity.
[0217] The determination module 401 is specifically used to determine the first text fragment from the content of the third document based on the first query vector.
[0218] In one possible implementation, the device further includes: a verification module 405;
[0219] The verification module 405 is used to perform permission verification on the first question and answer result based on the permission parameters, and obtain the verification result.
[0220] The processing module 402 is specifically used to perform desensitization processing on the first question and answer result based on the permission parameters when the verification result indicates that there is content that cannot be accessed by permission in the first question and answer result, so as to obtain the second question and answer result.
[0221] In one possible implementation, the determining module 401 is further configured to determine the user's role attributes;
[0222] The 404 error message indicates that the module is used to retrieve the permission parameters corresponding to the user based on the role attributes.
[0223] In one possible implementation, the apparatus further includes: a generation module 406;
[0224] The generation module 406 is used to generate a de-identification prompt message based on the second question and answer result. The de-identification prompt message is used to indicate that the second question and answer result has been de-identified.
[0225] The question-and-answer device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0226] Figure 5 A schematic diagram of the question-and-answer device provided in this application. Figure 5 As shown, the electronic device 500 provided in this embodiment includes at least one processor 501 and a memory 502. Optionally, the device 400 further includes a communication component 503. The processor 501, memory 502, and communication component 503 are connected via a bus 504.
[0227] In a specific implementation, at least one processor 501 executes computer execution instructions stored in memory 502, causing at least one processor 501 to perform the above-described method.
[0228] The specific implementation process of processor 501 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0229] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0230] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0231] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0232] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0233] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.
[0234] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0235] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0236] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0237] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0238] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0239] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0240] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0241] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A question-and-answer method, characterized in that, Applied to a client, the method includes: In response to a user-inputted question, at least one first text fragment corresponding to the question is determined; Based on the question information and at least one of the first text fragments, determine the first question-and-answer result; Determine the permission parameters corresponding to the user, the permission parameters being used to indicate the range of data and / or resources that the user is allowed to access; Based on the permission parameters, the first question and answer result is anonymized to obtain the second question and answer result; Output the result of the second question and answer.
2. The method according to claim 1, characterized in that, The determination of at least one first text segment corresponding to the question information includes: The question information is formatted to obtain at least one keyword; Perform vector transformation on the keywords to obtain at least one first query vector corresponding to the keywords; Identify at least one first text segment that corresponds to the first query vector.
3. The method according to claim 2, characterized in that, Determining at least one first text segment corresponding to the first query vector includes: Obtain a behavior history vector library, which includes: multiple second query vectors, and a first document identifier corresponding to each second query vector; For any first query vector, determine the first semantic similarity between the first query vector and each second query vector, and if any first semantic similarity is greater than or equal to a first preset similarity, obtain the first document content based on the first document identifier corresponding to the first semantic similarity; The first text fragment is determined from the content of the first document based on the first query vector.
4. The method according to claim 3, characterized in that, The method further includes: When all first semantic similarities are less than the first preset similarity, a high-frequency historical vector library is obtained. The high-frequency historical vector library includes: multiple third query vectors, and a second document identifier corresponding to each third query vector. For any first query vector, determine the second semantic similarity between the first query vector and each of the third query vectors, and if any second semantic similarity is greater than or equal to the second preset similarity, obtain the second document content based on the second document identifier corresponding to the second semantic similarity; The first text fragment is determined from the content of the second document based on the first query vector.
5. The method according to claim 4, characterized in that, The method further includes: If all second semantic similarities are less than the second preset similarity, a full document vector library is obtained. The full document vector library includes: multiple fourth query vectors, and a third document identifier corresponding to each fourth query vector. For any first query vector, determine the third semantic similarity between the first query vector and each of the fourth query vectors, and if any third semantic similarity is greater than or equal to the third preset similarity, obtain the third document content according to the third document identifier corresponding to the third semantic similarity; The first text fragment is determined from the content of the third document based on the first query vector.
6. The method according to any one of claims 1-5, characterized in that, The process of de-identifying the first question-and-answer result based on the permission parameters to obtain the second question-and-answer result includes: Based on the permission parameters, the first question and answer result is verified to obtain the verification result. If the verification result indicates that the first question and answer result contains content that cannot be accessed by the user, the first question and answer result is anonymized based on the permission parameters to obtain the second question and answer result.
7. The method according to any one of claims 1-5, characterized in that, The determination of the permission parameters corresponding to the user includes: Determine the user's role attributes; Based on the role attributes, obtain the permission parameters corresponding to the user.
8. The method according to any one of claims 1-5, characterized in that, The method further includes: Based on the second question and answer result, a de-identification prompt message is generated, which is used to indicate that the second question and answer result has been de-identified.
9. A question-and-answer device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-8.