File analysis method and device based on multiple models, equipment and medium
By using multi-model technology in file analysis, combined with background information of query content, historical chat records and text content, the problem of insufficient comprehensiveness and accuracy of file analysis results in the existing technology is solved, and more personalized and efficient file analysis.
Patent Information
- Application Number
- CN202411228366.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2025-02-07
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, there are problems in document analysis that the analysis results are insufficient inadequate, insufficient accuracy, and inability to personalize analysis.
By extracting text from the analysis file based on the first preset model, query content, historical chat records and text content are integrated into file background information, and file analysis is performed through the second preset model selected by the client combined with file background information.
It improves the comprehensiveness, accuracy and personalization of file analysis results, and can better meet the analysis needs of different users.
Smart Images

Figure CN119398033A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of artificial intelligence technology, and specifically relates to a file analysis method, device, equipment and medium based on multiple models. Background Art
[0002] File analysis is the process of analyzing and organizing the contents of files based on user questions, aiming to help users understand and grasp the information in files more quickly and provide guidance and assistance for their actual work. With the development of society, the amount of online file information has exploded, and how to efficiently and accurately analyze files has gradually become a hot topic.
[0003] In the prior art, file analysis often uses an existing large language model to perform text recognition and text processing on the currently received file based on the user's query content, or specially trains a large language model for a certain text type and uses the model to perform text analysis on the file. However, the prior art directly analyzes the file to be analyzed through a single model, and its training corpus is often in text form, which cannot process files that require image interpretation, nor can it accurately analyze files in context. There are problems with the comprehensiveness and accuracy of the analysis results. At the same time, due to different preferences of different users for analysis results, it is impossible to achieve personalized file analysis for different users using the prior art. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a file analysis method, device, equipment and medium based on multiple models, which solves the problems of insufficient comprehensiveness, insufficient accuracy and inability to personalize analysis of analysis results when using existing technologies for file analysis. By extracting text from the file to be analyzed based on a first preset model, integrating query content, historical chat records and text content into file background information, and performing file analysis in combination with the file background information through a second preset model selected by the client, the comprehensiveness, accuracy and personalization of the file analysis results can be improved.
[0005] In a first aspect, an embodiment of the present application provides a file analysis method based on multiple models, the method comprising:
[0006] Upon receiving the query content and the corresponding file to be analyzed sent by the client, obtaining the pre-stored historical chat records and text content of the file to be analyzed, integrating the query content, the historical chat records and the text content to obtain file background information of the file to be analyzed, wherein the query content includes text query content and image query content, and the text content is obtained by extracting the text of the file to be analyzed based on the first preset model;
[0007] receiving a model selection instruction from the client, and determining a second preset model selected by the client according to the model selection instruction;
[0008] The file background information and the file to be analyzed are input into the second preset model, so as to perform file analysis on the file to be analyzed based on the second preset model to obtain a file analysis result.
[0009] Optionally, before obtaining the pre-stored historical chat records and text content of the file to be analyzed, the method further includes:
[0010] A file to be analyzed is received, and the file to be analyzed is input into a first preset model to extract text content in the file to be analyzed based on the first preset model.
[0011] Optionally, the step of integrating the query content, the historical chat records and the text content to obtain the file background information of the file to be analyzed includes:
[0012] According to preset keyword parts of speech, respectively identify the query keywords in the query content, the record keywords in the historical chat records, and the text keywords in the text content;
[0013] Calculating a first similarity between the query keyword and the record keyword, and calculating a second similarity between the query keyword and the text keyword;
[0014] Screening the historical chat records and the text content based on a preset similarity threshold, the first similarity, and the second similarity to obtain record background information and text background information;
[0015] The background information structure of the file to be analyzed is determined according to preset prompt sentence construction rules, and the query content, the record background information and the text background information are integrated according to the background information structure to obtain the file background information of the file to be analyzed.
[0016] Optionally, before receiving the model selection instruction from the client, the method further includes:
[0017] Identify the model identifiers of the answer sentences in the historical chat records, and count the occurrence probabilities of the model identifiers, wherein the model identifiers are identifiers of at least two preset models;
[0018] Sorting the at least two preset models by usage popularity according to the occurrence probabilities, and determining the model display priority of the preset models according to the usage popularity sorting results;
[0019] The at least two preset models are displayed to the client based on the model display priority, so that the client can perform model selection.
[0020] Optionally, after inputting the file background information and the file to be analyzed into the second preset model to perform file analysis on the file to be analyzed based on the second preset model to obtain a file analysis result, the method further includes:
[0021] receiving satisfaction feedback information from the client regarding the analysis result of the to-be-analyzed file, and determining the parameters to be adjusted of the second preset model according to the satisfaction feedback information;
[0022] A target preset model that meets the parameters to be adjusted is identified, and the model display priority is updated based on the target preset model so that the client can reselect a model.
[0023] Optionally, the inputting the file background information and the file to be analyzed into the second preset model to perform file analysis on the file to be analyzed based on the second preset model to obtain a file analysis result includes:
[0024] Identify the image identifier in the file to be analyzed, and search for the image description information in the file background information based on the image identifier;
[0025] The image description information and the file to be analyzed are input into the second preset model, so that the second preset model analyzes the image in the file to be analyzed based on the image description information to obtain an image analysis result.
[0026] Optionally, after inputting the picture description information and the file to be analyzed into the second preset model so that the second preset model analyzes the picture in the file to be analyzed based on the picture description information to obtain a picture analysis result, the method further includes:
[0027] receiving accuracy evaluation information of the image analysis result from the client, and determining analysis missing items in the image analysis result according to the accuracy evaluation information;
[0028] Reintegrate the query content, the historical chat records and the text content according to the analysis missing items to obtain file background update information of the file to be analyzed;
[0029] The file background update information and the file to be analyzed are re-inputted into the second preset model, so that the second preset model re-analyzes the image in the file to be analyzed based on the file background update information to obtain an updated image analysis result.
[0030] In a second aspect, an embodiment of the present application provides a file analysis device based on multiple models, the device comprising:
[0031] A text content acquisition module, for acquiring the pre-stored historical chat records and text content of the file to be analyzed upon receiving the query content and the corresponding file to be analyzed sent by the client;
[0032] A file background integration module, used to integrate the query content, the historical chat records and the text content to obtain file background information of the file to be analyzed, the query content includes text query and image query, and the text content is obtained by extracting the text of the file to be analyzed based on the first preset model;
[0033] A model selection module, configured to receive a model selection instruction from the client, and determine a second preset model selected by the client according to the model selection instruction;
[0034] The file analysis module is used to input the file background information and the file to be analyzed into the second preset model, so as to analyze the file to be analyzed based on the second preset model.
[0035] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.
[0036] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0037] In the fifth aspect, an embodiment of the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium, and at least one processor of the device reads and executes the computer program from the computer-readable storage medium, so that the device performs the method described in the first aspect.
[0038] In an embodiment of the present application, when receiving the query content sent by the client and the corresponding file to be analyzed, the historical chat records and text content of the file to be analyzed that are pre-stored are obtained, and the query content, the historical chat records and the text content are integrated to obtain the file background information of the file to be analyzed, the query content includes text query content and image query content, and the text content is obtained by extracting the text of the file to be analyzed based on the first preset model; receiving the model selection instruction of the client, and determining the second preset model selected by the client according to the model selection instruction; inputting the file background information and the file to be analyzed into the second preset model, so as to perform file analysis on the file to be analyzed based on the second preset model to obtain the file analysis result. Through the above-mentioned file analysis method based on multiple models, the problems of insufficient comprehensiveness, insufficient accuracy and inability to personalize the analysis when performing file analysis using the existing technology are solved. By extracting the text of the file to be analyzed based on the first preset model, the query content, the historical chat records and the text content are integrated into the file background information, and the file analysis is performed by combining the file background information with the second preset model selected by the client, the comprehensiveness, accuracy and personalization of the file analysis result can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 is a flowchart of a file analysis method based on multiple models provided in an embodiment of the present application;
[0040] Figure 2 is a flowchart of another multi-model-based file analysis method provided in an embodiment of the present application;
[0041] Figure 3 This is a historical chat record map provided by this application;
[0042] Figure 4 It is the preset model display interface of the client display interface provided by this application;
[0043] Figure 5 is a flowchart of the picture analysis provided in the embodiment of the present application;
[0044] Figure 6 It is a structural block diagram of a file analysis device based on multiple models provided in an embodiment of the present application;
[0045] Figure 7 It is a structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all the contents are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.
[0047] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0048] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0049] First of all, the usage scenario of this solution can be a scenario of performing file analysis based on the user's query information, especially a scenario of performing file analysis and interpretation on files with pictures. By performing text extraction on the file to be analyzed based on the first preset model, integrating the query content, historical chat records and text content into file background information, and performing file analysis based on the second preset model selected by the client combined with the file background information, the comprehensiveness, accuracy and personalization of the file analysis results can be improved. Based on the above usage scenarios, it can be understood that the executor of this solution can be a server.
[0050] In the following, in conjunction with the accompanying drawings, a multi-model-based file analysis method, device, equipment and medium provided by an embodiment of the present application are described in detail through specific embodiments and their application scenarios.
[0051] Figure 1 : is a flowchart of a file analysis method based on multiple models provided in an embodiment of the present application. Figure 1 As shown, the specific steps include:
[0052] S101, upon receiving the query content and the corresponding file to be analyzed sent by the client, obtaining the pre-stored historical chat records and text content of the file to be analyzed, and integrating the query content, historical chat records and text content to obtain the file background information of the file to be analyzed.
[0053] The query content may be information sent by the client to indicate the client's search intention. For example, questions, prompt words or keywords sent by the client. The file to be analyzed may be a document or data set corresponding to the query content for content interpretation. The file to be analyzed may include text data and image data, so the query content may include text query content and image query content at the same time. The historical chat record may be the query content sent by the client before the current moment and the data of the file analysis result corresponding to the query content fed back by the preset model. The text content may be information presented in text form in the file to be analyzed. The text content may include all the text content in the file to be analyzed. The preset model may be a model that can perform text analysis on the file to be analyzed based on the user's query content. The file background information may be objective information that has an explanatory or limiting effect on the file to be analyzed. The file background information may include the field of the file to be analyzed, the premise for the realization of each content in the file to be analyzed, and the association relationship between each content. The file background information is obtained based on the query content, the historical chat record and the text content. The first preset model may be a pre-trained tool for extracting text content in a file. For example, the kimi model. Text extraction may be an operation of identifying and outputting the text content in the file to be analyzed.
[0054] In one embodiment, when the query content and the corresponding file to be analyzed sent by the client are received, the historical chat records and text content of the pre-stored file to be analyzed can be obtained. The query content and the corresponding file to be analyzed can be sent by the client at the same time or at different times, and the file to be analyzed can be sent repeatedly by the client. The historical chat records and text content corresponding to the file to be analyzed pre-stored in the storage unit can be obtained according to the file identifier or file name of the file to be analyzed. Duplicate information in the query content, historical chat records and text content can be identified, and the duplicate information in the text content and / or historical chat records can be deleted so that the information in the query content, historical chat records and text content is not repeated, and the query content, historical chat records and text content obtained after the deletion are merged to obtain the file background information of the file to be analyzed.
[0055] In one embodiment, optionally, before obtaining the pre-stored historical chat records and text content of the file to be analyzed, the method further includes:
[0056] A file to be analyzed is received, and the file to be analyzed is input into a first preset model to extract text content in the file to be analyzed based on the first preset model.
[0057] In one embodiment, the file to be analyzed may be received through an interface with a client, and the file to be analyzed may be input into a first preset model, so that the text content in the file to be analyzed may be recognized and output through the first preset model.
[0058] This solution can improve the efficiency of text content extraction by using a pre-trained model to extract text content in the file to be analyzed.
[0059] In one embodiment, optionally, the query content, historical chat records and text content are integrated to obtain file background information of the file to be analyzed, including:
[0060] According to the preset keyword parts of speech, the query keywords in the query content, the record keywords in the historical chat records, and the text keywords in the text content are respectively identified;
[0061] Calculating a first similarity between the query keyword and the record keyword, and calculating a second similarity between the query keyword and the text keyword;
[0062] Screening the historical chat records and text content based on a preset similarity threshold, a first similarity, and a second similarity to obtain record background information and text background information;
[0063] The background information structure of the file to be analyzed is determined according to the preset prompt sentence construction rules, and the file background information of the file to be analyzed is obtained by integrating the query content, record background information and text background information according to the background information structure.
[0064] Among them, the preset keyword part of speech may be a part of speech of a word that is preset to describe or guide the preset model to generate a specific result. The query keyword may be a word in the query content whose part of speech conforms to the preset keyword part of speech. The record keyword may be a word in the historical chat record whose part of speech conforms to the preset keyword part of speech. The text keyword may be a word in the text content whose part of speech conforms to the preset keyword part of speech. The first similarity may be the probability of repeated keywords between the query keyword and the record keyword. For example, the first similarity may be obtained by dividing the number of identical keywords in the query keyword and the record keyword by the sum of the number of query keywords and the number of record keywords. The second similarity may be the probability of repeated keywords between the query keyword and the text keyword. The preset similarity threshold may be a preset minimum similarity value for filtering key content in the historical chat record and the text content. For example, if the first similarity is greater than the preset similarity threshold, it means that the query keyword is a keyword that appears multiple times in the historical chat record, and the content corresponding to the keyword in the historical chat record may be the key content. The record background information may be the key content filtered out in the chat record. The text background information may be the key information filtered out in the text content. The preset prompt sentence construction rule may be a preset requirement for limiting the structure or form of the prompt. The background information structure may be the information composition order of the background information when the content of the background information is the recorded background information and the text background information.
[0065] In one embodiment, the query keywords with the same part of speech as the preset keyword in the query content, the record keywords with the same part of speech as the preset keyword in the historical chat records, and the text keywords with the same part of speech as the preset keyword in the text content can be identified respectively according to the preset keyword part of speech. The first similarity between the query keyword and the record keyword and the second similarity between the query keyword and the text keyword are calculated respectively according to the number of occurrences of each keyword. The historical chat records are filtered for key content according to the preset similarity threshold and the first similarity to obtain the record background information, and the text content is filtered for key content according to the preset similarity threshold and the second similarity to obtain the text background information. The background information structure of the file to be analyzed is determined according to the preset prompt statement construction rules, the record background information and the text background information, and the query content, the record background information and the text background information are merged according to the background information structure integration to obtain the file background information of the file to be analyzed.
[0066] This solution uses preset keyword parts of speech to identify keywords in query content, historical chat records and text content, calculates the similarity between keywords and performs content screening based on a preset similarity threshold, and integrates the screened content according to a preset structure to obtain file background information of the file to be analyzed, thereby achieving the purpose of constructing file background information for the query content and improving the relevance of the file background information to the query content.
[0067] S102, receiving a model selection instruction from the client, and determining a second preset model selected by the client according to the model selection instruction.
[0068] The second preset model may be a pre-set tool for performing content analysis on the file to be analyzed based on the query content. Content analysis includes text analysis and image analysis.
[0069] In one embodiment, at least two preset models that are pre-set may be displayed to the display interface of the client, and a model selection instruction from the client may be received. The model selection instruction may be received by a click operation or a selection operation from the client. The second preset model selected by the client is determined according to the model selection instruction. Since different users have different preferences for the parsing logic of the file or the format of the parsing result, the file analysis may be performed based on the second preset model selected by the client, which is conducive to improving the user's satisfaction with the parsing result.
[0070] S103: input the file background information and the file to be analyzed into a second preset model, so as to perform file analysis on the file to be analyzed based on the second preset model to obtain a file analysis result.
[0071] In one embodiment, the file background information can be input into the second preset model as a prompt word or keyword for file analysis, and the file to be analyzed can be input into the second preset model at the same time, so that the second preset model can be used to perform file analysis on the file to be analyzed according to the file background information to obtain a file analysis result. In addition to the query content, the file background information in this solution also combines historical chat records and text content, which is beneficial to the accuracy of the analysis of the file to be analyzed, and this solution can also achieve the purpose of analyzing the images in the file based on the text content in the file to be analyzed, thereby improving the comprehensiveness of the analysis.
[0072] The technical solution provided by the embodiment of the present application, when receiving the query content sent by the client and the corresponding file to be analyzed, obtains the pre-stored historical chat records and text content of the file to be analyzed, integrates the query content, the historical chat records and the text content to obtain the file background information of the file to be analyzed, the query content includes text query content and image query content, and the text content is obtained by extracting the text of the file to be analyzed based on the first preset model; receives the model selection instruction of the client, determines the second preset model selected by the client according to the model selection instruction; inputs the file background information and the file to be analyzed into the second preset model, so as to perform file analysis on the file to be analyzed based on the second preset model to obtain the file analysis result. Through the above-mentioned file analysis method based on multiple models, the problems of insufficient comprehensiveness, insufficient accuracy and inability to personalize the analysis when using the existing technology for file analysis are solved. By extracting the text of the file to be analyzed based on the first preset model, integrating the query content, historical chat records and text content into file background information, and performing file analysis by combining the file background information with the second preset model selected by the client, the comprehensiveness, accuracy and personalization of the file analysis result can be improved.
[0073] Figure 2 This is a flowchart of another multi-model-based file analysis method provided in an embodiment of the present application.
[0074] like Figure 2 As shown, the specific steps include:
[0075] S201, upon receiving the query content and the corresponding file to be analyzed sent by the client, obtaining the pre-stored historical chat records and text content of the file to be analyzed, and integrating the query content, historical chat records and text content to obtain file background information of the file to be analyzed.
[0076] S202, identifying the model identifiers of the answer sentences in the historical chat records, and counting the occurrence probability of each model identifier, where the model identifiers are identifiers of at least two preset models.
[0077] The model identifier may be a mark used to distinguish different preset models.
[0078] In one embodiment, different answer statements in the historical chat records may be generated by the same or different preset models, and the answer statement may carry the model identifier of the preset model that generated the statement, identify the model identifier of each answer statement, and count the occurrence probability of each model identifier based on the number of occurrences of each model identifier.
[0079] Figure 3 This is the historical chat record map provided by this application. Figure 3 As shown, this solution is to express the identifier of the preset model in the form of text, wherein the answer statements corresponding to "Question 1" and "Question 2" are both answered by preset model 1, and the answer statement corresponding to "Question 2" is answered by preset model 2, and the answer format or structure of different preset models may be different. Users can choose the corresponding preset model according to their own needs.
[0080] S203: sorting the usage popularity of at least two preset models according to the occurrence probability, and determining the model display priority of the preset models according to the usage popularity sorting result.
[0081] In one embodiment, at least two preset models may be ranked by usage heat according to the occurrence probability of each model identifier. If the usage heat ranking is obtained by arranging in descending order of usage frequency, the preset model corresponding to the model identifier with a higher occurrence probability has a higher usage heat ranking result. The usage heat ranking result may be used as the model display priority of the preset model, that is, the preset model with a higher usage heat ranking result has a higher priority in display on the display interface of the client.
[0082] S204: Display at least two preset models to the client based on the model display priority, so that the client can select a model.
[0083] In one embodiment, at least two preset models may be displayed on a display interface of the client according to the model display priority, so that the client can select a model.
[0084] S205, receiving a model selection instruction from the client, and determining a second preset model selected by the client according to the model selection instruction.
[0085] S206: Input the file background information and the file to be analyzed into the second preset model, so as to perform file analysis on the file to be analyzed based on the second preset model to obtain a file analysis result.
[0086] In one embodiment, optionally, after inputting the file background information and the file to be analyzed into the second preset model to perform file analysis on the file to be analyzed based on the second preset model to obtain a file analysis result, the method further includes:
[0087] Receive satisfaction feedback information from the client regarding the analysis result of the file to be analyzed, and determine the parameters to be adjusted of the second preset model according to the satisfaction feedback information;
[0088] Identify the target preset model that meets the parameters to be adjusted, and update the model display priority based on the target preset model so that the client can reselect the model.
[0089] The satisfaction feedback information may include the user's satisfaction with the analysis result of the to-be-analyzed file, the reason for dissatisfaction, and adjustment suggestions, etc. The target preset model may be a model having the same file analysis capability as the second preset model and having model parameters that conform to the parameters to be adjusted of the second preset model.
[0090] In one embodiment, satisfaction feedback information of the client on the analysis result of the file to be analyzed can be received, and the content that the client is dissatisfied with in the analysis result and the adjustment suggestions for the dissatisfied content can be determined based on the satisfaction feedback information, and the parameters to be adjusted of the second preset model can be determined based on the adjustment suggestions. It is identified whether there is a target preset model that meets the parameters to be adjusted among at least two preset models, that is, a preset model whose generated result meets the adjustment suggestions of the client for the dissatisfied content. If so, the target preset model is displayed first so that the client can reselect the model.
[0091] Figure 4 It is the preset model display interface of the client display interface provided by this application. Figure 4 As shown, the user can select the required second preset model by clicking the selected option on the left side of the preset model, and the preset models can be displayed in order of priority.
[0092] This solution determines the target preset model through the client's satisfaction feedback information on the analysis results of the file to be analyzed, and updates the model display priority based on the target preset model. This can achieve the purpose of updating the second preset model without changing the preset model parameters, further improving the user's satisfaction with the file analysis results.
[0093] The technical solution provided in the embodiment of the present application determines the popularity ranking of the model identifiers by the client by identifying the probability of occurrence of each model identifier, and determines the model display priority of the preset model according to the popularity ranking result. This can achieve the purpose of setting the model display priority according to the user's model usage habits or preferences, thereby improving the user's efficiency in model selection.
[0094] Figure 5 This is a flowchart of the picture analysis provided by the embodiment of the present application. Figure 5 As shown, the specific steps include:
[0095] S501, identifying a picture identifier in a file to be analyzed, and searching for picture description information in file background information based on the picture identifier.
[0096] The image identifier may be a mark used to distinguish an image from text or to distinguish different images. The image identifier may be presented in the form of text or graphics. The image description information may be text used to describe information such as the image content, format, and size.
[0097] In one embodiment, it is possible to identify whether there is a mark identical to a preset picture identifier in the file to be analyzed, determine the mark as the picture identifier to be analyzed, and search the file background information for information associated with the picture identifier as the picture description information.
[0098] S502: Input the image description information and the file to be analyzed into the second preset model, so that the second preset model analyzes the image in the file to be analyzed based on the image description information to obtain an image analysis result.
[0099] In one embodiment, the image description information can be input into the second preset model as a prompt word or keyword, and the file to be analyzed can be input into the second preset model at the same time, so that the image in the file to be analyzed can be analyzed by the second preset model based on the image description information to obtain the image analysis result.
[0100] In one embodiment, optionally, after the image description information and the file to be analyzed are input into the second preset model so that the second preset model analyzes the image in the file to be analyzed based on the image description information to obtain the image analysis result, the method further includes:
[0101] Receive accuracy evaluation information of the image analysis result from the client, and determine the analysis missing items in the image analysis result according to the accuracy evaluation information;
[0102] Reintegrate the query content, historical chat records and text content according to the missing items in the analysis to obtain the file background update information of the file to be analyzed;
[0103] The file background update information and the file to be analyzed are re-inputted into the second preset model, so that the second preset model re-analyzes the image in the file to be analyzed based on the file background update information to obtain an updated image analysis result.
[0104] The accuracy evaluation information may be information sent by the user to evaluate whether the image analysis result is comprehensive compared to the query content. The accuracy evaluation information may include the query content that has been analyzed and the query content that has not been analyzed in the image analysis result. The missing items in the analysis may be query items or query requests that exist in the query content but do not exist in the image analysis result. For example: the query content includes the identification Figure 1 Action and extraction of characters Figure 1 Plant species and evaluation Figure 1 If the image analysis results only include the recognition results of the person's actions and the recognition results of the plant species, the missing items in the analysis can be Figure 1 Evaluation of the aesthetics.
[0105] In one embodiment, the accuracy evaluation information of the image analysis result can be received from the client, and the query content that has not been analyzed in the accuracy evaluation information can be identified to determine the analysis missing items in the image analysis result. The weights of the analysis missing items in the query content, historical chat records, and text content can be adjusted to increase the weights of the analysis missing items, and the query content, historical chat records, and text content can be reintegrated according to the adjusted weights to obtain the file background update information of the file to be analyzed. The file background update information and the file to be analyzed are re-input into the second preset model, so that the image in the file to be analyzed is re-analyzed based on the file background update information by the second preset model to obtain the image analysis update result.
[0106] This solution determines the missing items in the image analysis results by receiving the accuracy evaluation information of the image analysis results from the client, and reintegrates the file background update information to obtain the image analysis update results, which can improve the comprehensiveness and accuracy of the file analysis.
[0107] The technical solution provided in the embodiment of the present application can achieve the purpose of analyzing the images in the file to be analyzed in combination with the context information by searching for the image description information in the file background information based on the image identifier, and inputting the image description information and the file to be analyzed into the second preset model to obtain the image analysis result, thereby improving the efficiency and accuracy of the image analysis.
[0108] Figure 6 It is a structural block diagram of a file analysis device based on multiple models provided in an embodiment of the present application.
[0109] like Figure 6 As shown, specifically including the following:
[0110] The text content acquisition module 601 is used to acquire the pre-stored historical chat records and text content of the file to be analyzed when receiving the query content and the corresponding file to be analyzed sent by the client;
[0111] A file background integration module 602, which is used to integrate query content, historical chat records and text content to obtain file background information of the file to be analyzed, wherein the query content includes text query and image query, and the text content is obtained by extracting the text of the file to be analyzed based on the first preset model;
[0112] A model selection module 603 is used to receive a model selection instruction from a client, and determine a second preset model selected by the client according to the model selection instruction;
[0113] The file analysis module 604 is used to input the file background information and the file to be analyzed into the second preset model to analyze the file to be analyzed based on the second preset model.
[0114] Furthermore, the device also includes:
[0115] The text content extraction module is used to receive a file to be analyzed, input the file to be analyzed into a first preset model, and extract text content in the file to be analyzed based on the first preset model.
[0116] Furthermore, the file background integration module 602 is specifically used for:
[0117] According to the preset keyword parts of speech, the query keywords in the query content, the record keywords in the historical chat records, and the text keywords in the text content are respectively identified;
[0118] Calculating a first similarity between the query keyword and the record keyword, and calculating a second similarity between the query keyword and the text keyword;
[0119] Screening the historical chat records and text content based on a preset similarity threshold, a first similarity, and a second similarity to obtain record background information and text background information;
[0120] The background information structure of the file to be analyzed is determined according to the preset prompt sentence construction rules, and the file background information of the file to be analyzed is obtained by integrating the query content, record background information and text background information according to the background information structure.
[0121] Furthermore, the model selection module 603 is also used for:
[0122] Identify the model identifiers of the answer sentences in the historical chat records, and count the occurrence probabilities of each model identifier, where the model identifiers are identifiers of at least two preset models;
[0123] Sorting the usage popularity of at least two preset models according to the occurrence probability, and determining the model display priority of the preset models according to the usage popularity sorting result;
[0124] At least two preset models are displayed to the client based on the model display priority, so that the client can select the model.
[0125] Furthermore, the device also includes:
[0126] An adjustment parameter determination module is used to receive satisfaction feedback information from the client on the analysis result of the to-be-analyzed file, and determine the to-be-adjusted parameters of the second preset model according to the satisfaction feedback information;
[0127] The model reselection module is used to identify the target preset model that meets the parameters to be adjusted, and update the model display priority based on the target preset model so that the client can reselect the model.
[0128] Furthermore, the file analysis module 604 is specifically used for:
[0129] Identify the image identifier in the file to be analyzed, and search for the image description information in the file background information based on the image identifier;
[0130] The image description information and the file to be analyzed are input into the second preset model, so that the second preset model analyzes the image in the file to be analyzed based on the image description information to obtain an image analysis result.
[0131] Furthermore, the device also includes:
[0132] A missing item determination module is used to receive the accuracy evaluation information of the image analysis result from the client, and determine the analysis missing items in the image analysis result according to the accuracy evaluation information;
[0133] The file background update module is used to reintegrate the query content, historical chat records and text content according to the analysis missing items to obtain the file background update information of the file to be analyzed;
[0134] The analysis result updating module is used to re-input the file background update information and the file to be analyzed into the second preset model, so that the second preset model re-analyzes the image in the file to be analyzed based on the file background update information to obtain the image analysis update result.
[0135] The technical solution provided in the embodiment of the present application includes a text content acquisition module, which is used to obtain the pre-stored historical chat records and text content of the file to be analyzed when receiving the query content sent by the client and the corresponding file to be analyzed; a file background integration module, which is used to integrate the query content, the historical chat records and the text content to obtain the file background information of the file to be analyzed, the query content includes text query and image query, and the text content is obtained by extracting the text of the file to be analyzed based on a first preset model; a model selection module, which is used to receive the model selection instruction of the client, and determine the second preset model selected by the client according to the model selection instruction; a file analysis module, which is used to input the file background information and the file to be analyzed into the second preset model, so as to analyze the file to be analyzed based on the second preset model. The above-mentioned multi-model-based file analysis device solves the problems of insufficient comprehensiveness, insufficient accuracy and inability to personalize analysis of analysis results when using existing technologies for file analysis. By extracting text from the file to be analyzed based on the first preset model, the query content, historical chat records and text content are integrated into file background information, and the file analysis is performed based on the second preset model selected by the client in combination with the file background information, the comprehensiveness, accuracy and personalization of the file analysis results can be improved.
[0136] A file analysis device based on multiple models in the embodiment of the present application can be configured in the device, or it can be configured in a component, integrated circuit, or chip in the terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a palmtop computer, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and the non-mobile electronic device can be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., and the embodiment of the present application is not specifically limited.
[0137] A multi-model-based file analysis device in the embodiment of the present application may be an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0138] The multi-model-based file analysis device provided in the embodiment of the present application can implement each process implemented in the above-mentioned method embodiments. To avoid repetition, it will not be described here.
[0139] like Figure 7 As shown, an embodiment of the present application also provides an electronic device 700, including a processor 701, a memory 702, and a program or instruction stored in the memory 702 and executable on the processor 701. When the program or instruction is executed by the processor 701, each process of the above-mentioned multi-model-based file analysis method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0140] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0141] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned multi-model-based file analysis method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0142] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0143] The present application embodiment further provides a program product, which includes a program code. When the program product is run on a computer device, the program code is used to enable the computer device to execute the steps of the method according to various exemplary embodiments of the present application described above in this specification. For example, the computer device can execute a file analysis method based on multiple models recorded in the embodiment of the present application. The program product can be implemented in any combination of one or more readable media.
[0144] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0145] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0146] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
[0147] The above are only preferred embodiments of the present application and the technical principles used. The present application is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions that can be made by those skilled in the art will not deviate from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the claims.
Claims
1. A file analysis method based on multiple models, characterized in that: The method comprises: Upon receiving the query content and the corresponding file to be analyzed sent by the client, obtaining the pre-stored historical chat records and text content of the file to be analyzed, integrating the query content, the historical chat records and the text content to obtain file background information of the file to be analyzed, wherein the query content includes text query content and image query content, and the text content is obtained by extracting the text of the file to be analyzed based on the first preset model; receiving a model selection instruction from the client, and determining a second preset model selected by the client according to the model selection instruction; The file background information and the file to be analyzed are input into the second preset model, so as to perform file analysis on the file to be analyzed based on the second preset model to obtain a file analysis result.
2. The multi-model based file analysis method according to claim 1, characterized in that: Before obtaining the pre-stored historical chat records and text content of the file to be analyzed, the method further includes: A file to be analyzed is received, and the file to be analyzed is input into a first preset model to extract text content in the file to be analyzed based on the first preset model.
3. The multi-model based file analysis method according to claim 1, characterized in that: The step of integrating the query content, the historical chat records and the text content to obtain the file background information of the file to be analyzed includes: According to preset keyword parts of speech, respectively identify the query keywords in the query content, the record keywords in the historical chat records, and the text keywords in the text content; Calculating a first similarity between the query keyword and the record keyword, and calculating a second similarity between the query keyword and the text keyword; Screening the historical chat records and the text content based on a preset similarity threshold, the first similarity, and the second similarity to obtain record background information and text background information; The background information structure of the file to be analyzed is determined according to preset prompt sentence construction rules, and the query content, the record background information and the text background information are integrated according to the background information structure to obtain the file background information of the file to be analyzed.
4. The multi-model based file analysis method according to claim 1, characterized in that: Before receiving the model selection instruction from the client, the method further includes: Identify the model identifiers of the answer sentences in the historical chat records, and count the occurrence probabilities of the model identifiers, wherein the model identifiers are identifiers of at least two preset models; Sorting the at least two preset models by usage popularity according to the occurrence probabilities, and determining the model display priority of the preset models according to the usage popularity sorting results; The at least two preset models are displayed to the client based on the model display priority, so that the client can perform model selection.
5. The multi-model based file analysis method according to claim 4, characterized in that: After inputting the file background information and the file to be analyzed into the second preset model to perform file analysis on the file to be analyzed based on the second preset model to obtain a file analysis result, the method further includes: receiving satisfaction feedback information from the client regarding the analysis result of the to-be-analyzed file, and determining the parameters to be adjusted of the second preset model according to the satisfaction feedback information; A target preset model that meets the parameters to be adjusted is identified, and the model display priority is updated based on the target preset model so that the client can reselect a model.
6. The multi-model based file analysis method according to claim 1, characterized in that: The step of inputting the file background information and the file to be analyzed into the second preset model, so as to perform file analysis on the file to be analyzed based on the second preset model to obtain a file analysis result, includes: Identify the image identifier in the file to be analyzed, and search for the image description information in the file background information based on the image identifier; The image description information and the file to be analyzed are input into the second preset model, so that the second preset model analyzes the image in the file to be analyzed based on the image description information to obtain an image analysis result.
7. The multi-model based file analysis method according to claim 6, characterized in that: After the picture description information and the file to be analyzed are input into the second preset model so that the second preset model analyzes the picture in the file to be analyzed based on the picture description information to obtain a picture analysis result, the method further includes: receiving accuracy evaluation information of the image analysis result from the client, and determining analysis missing items in the image analysis result according to the accuracy evaluation information; Reintegrate the query content, the historical chat records and the text content according to the analysis missing items to obtain file background update information of the file to be analyzed; The file background update information and the file to be analyzed are re-inputted into the second preset model, so that the second preset model re-analyzes the image in the file to be analyzed based on the file background update information to obtain an updated image analysis result.
8. A file analysis device based on multiple models, characterized in that: The device comprises: A text content acquisition module, for acquiring the pre-stored historical chat records and text content of the file to be analyzed upon receiving the query content and the corresponding file to be analyzed sent by the client; A file background integration module, used to integrate the query content, the historical chat records and the text content to obtain file background information of the file to be analyzed, the query content includes text query and image query, and the text content is obtained by extracting the text of the file to be analyzed based on the first preset model; A model selection module, configured to receive a model selection instruction from the client, and determine a second preset model selected by the client according to the model selection instruction; The file analysis module is used to input the file background information and the file to be analyzed into the second preset model, so as to analyze the file to be analyzed based on the second preset model.
9. An electronic device, characterized in that: It includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein when the program or instruction is executed by the processor, the steps of a multi-model-based file analysis method as described in any one of claims 1 to 7 are implemented.
10. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of a file analysis method based on multiple models as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Webpage searching method and device, electronic equipment and storage medium
CN110688558A
Data analysis method and device based on Chinese natural language
CN112732743A
Questionnaire data processing method and device, equipment and storage medium
CN114996437A
Business problem reply method and device, storage medium and electronic equipment
CN117688155A
Image searching method and device
CN118503473A