File processing method, electronic equipment and readable storage medium

By extracting key information of the pending files and generating target outlines, combined with large language model processing, the problem that large language models are difficult to adapt to different changes is solved, and the accuracy and quality of generated files are improved.

CN119089886APending Publication Date: 2024-12-06中国移动通信集团云南有限公司 +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411285611.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The existing large language models are difficult to adapt to different changes in the original files, resulting in low accuracy and quality of the generated files.

Method used

By obtaining pending files and target requirements files, extracting key information, generating enhancement files and target outlines, and inputting them into a large language model for processing, generating target files that meet the target requirements.

Benefits of technology

Enhanced the adaptability of the large language model to be processed and improves the accuracy and quality of generated files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119089886A_ABST
    Figure CN119089886A_ABST
Patent Text Reader

Abstract

The invention discloses a file processing method, electronic equipment and a readable storage medium. The method comprises the steps of obtaining a to-be-processed file and a target requirement file; key information of the to-be-processed file is extracted, an enhanced file of the to-be-processed file is generated, and a target outline of the target requirement file is generated; inputting the to-be-processed file, the key information, the enhanced file and the target outline into a large language model for processing to obtain a target file; wherein the target file meets the requirements of the target requirement file.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of artificial intelligence technology, and specifically relates to a file processing method, an electronic device, and a readable storage medium. Background Art

[0002] Artificial intelligence is an important tool to promote global digitalization and intelligent development. Among related technologies, artificial intelligence is applied to intelligent analysis of files and automatic generation of documents, mainly through natural language processing (NLP) technology. For example, in the field of bidding, traditional bid evaluation methods usually rely on manual analysis of bids, which is time-consuming and labor-intensive, and is easily affected by human bias. Based on the large amount of historical bidding documents and related data accumulated by enterprises in the course of many years of operation, these data can be used as training data for large language models, enabling them to learn and imitate best bidding practices, and make accurate predictions and suggestions for new bidding projects, helping enterprises improve their bidding success rates. Therefore, applying large language models to bidding tasks can promote the bidding industry from digitalization to intelligence, achieve high-speed and high-quality development of the industry, and continuously enhance the core competitiveness of enterprises.

[0003] However, due to the diversity, incompleteness, errors, and inconsistent formats of the original file content, the existing large language model is difficult to adapt to the different changes in the original file, which reduces the performance of the large language model and leads to lower accuracy and quality of the generated files. Summary of the invention

[0004] The embodiments of the present application provide a file processing method, an electronic device, and a readable storage medium, which can solve the problem that the existing large language model is difficult to adapt to different changes in the original file, which reduces the performance of the large language model and leads to low accuracy and quality of the generated file.

[0005] In a first aspect, an embodiment of the present application provides a file processing method, the method comprising: obtaining a file to be processed and a target requirement file; extracting key information of the file to be processed, generating an enhanced file of the file to be processed, and generating a target outline of the target requirement file; inputting the file to be processed, the key information, the enhanced file, and the target outline into a large language model for processing to obtain a target file; wherein the target file meets the requirements of the target requirement file.

[0006] In a second aspect, an embodiment of the present application provides a file processing device, which includes: an acquisition module, used to acquire a file to be processed and a target requirement file; a generation module, used to extract key information of the file to be processed, generate an enhanced file of the file to be processed, and generate a target outline of the target requirement file; a processing module, used to input the file to be processed, the key information, the enhanced file and the target outline into a large language model for processing to obtain a target file; wherein, the target file meets the requirements of the target requirement file.

[0007] 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.

[0008] 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.

[0009] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the steps of the method described in the first aspect.

[0010] In a sixth aspect, an embodiment of the present application provides a computer program product, comprising a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program comprises a program or instructions, and when the program or instructions are executed, the steps of the method described in the first aspect are implemented.

[0011] In an embodiment of the present application, a file to be processed and a target requirement file are obtained; key information of the file to be processed is extracted, an enhanced file of the file to be processed is generated, and a target outline of the target requirement file is generated; the file to be processed, the key information, the enhanced file, and the target outline are input into a large language model for processing to obtain a target file; wherein the target file meets the requirements of the target requirement file. Based on the large language model, the techniques of extracting key information, enhancing data, and extracting the requirements to be met are combined, which enhances the adaptability of the large language model to different changes in the file to be processed, and improves the performance of the large language model in processing the file to be processed, so that accurate and high-quality files can be generated. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 It is a flowchart of a file processing method provided by an embodiment of the present application;

[0013] Figure 2 It is a flowchart of a method for preprocessing a file to be processed provided in an embodiment of the present application;

[0014] Figure 3 It is a flowchart of another file processing method provided in an embodiment of the present application;

[0015] Figure 4 is a structural schematic diagram of a file processing device provided in an embodiment of the present application;

[0016] Figure 5 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0017] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0018] 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.

[0019] The following, in conjunction with the accompanying drawings, describes in detail the file processing method, electronic device, and readable storage medium provided by the embodiments of the present application through specific embodiments and their application scenarios.

[0020] Figure 1 The flowchart of the file processing method provided by the embodiment of the present application is shown, and the method can be executed by an electronic device. Figure 1 , the method may include the following steps.

[0021] Step 102, obtaining the file to be processed and the target required file.

[0022] The embodiments of the present application include files to be processed, target requirement files and target files, wherein the files to be processed are files written by the supplier manually or by other means that need to meet the requirements of the demander, such as bidding documents. The files have various quality problems. For example, due to the different levels of manual or other writing methods, the files may have problems such as inconsistent formats, incorrect or missing information, and due to different personal experiences, the files may have information that does not comply with regulations or cannot meet requirements. Such files are treated as files to be processed and processed by the file processing method provided in the embodiments of the present application to improve the quality of the files so that they meet the requirements of the target requirement files.

[0023] The target requirement document is a document provided by the demander that sets out the requirements that the supplier needs to meet for different types of business events, such as a bidding document, which can be used to review the documents provided by the supplier.

[0024] The target file is a file that meets the requirements of the target requirement file obtained by processing the above-mentioned file to be processed through the file processing method provided in the embodiment of the present application. The target file has higher quality than the file to be processed, better meets the requirements of the target requirement file, and is more compliant with regulations.

[0025] Step 104: extract key information of the file to be processed, generate an enhanced file of the file to be processed, and generate a target outline of the target requirement file.

[0026] Among them, key information of the file to be processed is extracted, such as the supplier name, date and location in the bidding document, and the key information corresponding to the required content in the target requirement document is extracted, so as to use the key information as the necessary content of the target file to be generated subsequently. An enhanced file of the file to be processed is generated, which has the same semantics as the file to be processed but a different form of expression, so as to help the large language model understand the file to be processed and can also process files to be processed that vary to a certain extent, thereby enhancing the generalization ability of the large language model. The target requirement document is processed to generate a target outline of the target requirement document. The large language model can efficiently obtain and understand the requirements of the target requirement document through the target outline.

[0027] Step 106, input the to-be-processed file, the key information, the enhanced file and the target outline into a large language model for processing to obtain a target file; wherein the target file meets the requirements of the target requirement file.

[0028] In an embodiment of the present application, by obtaining a file to be processed and a target requirement file, processing the file to be processed includes extracting key information of the file to be processed and generating an enhanced file of the file to be processed, processing the target requirement file includes generating a target outline of the target requirement file, and then inputting the file to be processed, the key information, the enhanced file, and the target outline into a large language model for processing to obtain a target file, which meets the requirements of the target requirement file. Based on the large language model, the techniques of extracting key information, enhancing data, and extracting the requirements to be met are combined, which enhances the adaptability of the large language model to different changes in the file to be processed, and improves the performance of the large language model in processing the file to be processed, so that accurate and high-quality files can be generated.

[0029] In one implementation, the above step 106 inputs the to-be-processed file, the key information, the enhanced file and the target outline into a large language model for processing to obtain a target file, which may include the following steps.

[0030] Step 1061: Determine the target type corresponding to the target requirement file according to the target requirement file.

[0031] Different types of target requirement documents require different prompt templates, and the target document needs to use the prompt template corresponding to the target type of the target requirement document to meet the requirements of the target requirement document in terms of form. The target type is, for example, a technical response and a business proposal.

[0032] Step 1062: Determine a prompt template corresponding to the target type according to the target type.

[0033] Optionally, the prompt template is designed based on the needs of the business event and the characteristics of the large language model, and can limit the format, style, content, etc. of the target file. The designed prompt template includes the following parts: (1) "Task definition" part: describes the task and goals of the business event. (2) "Prompt content generation" part: describes the specific requirements and restrictions when generating files, such as not modifying the information of the file to be processed, avoiding adding, deleting or modifying entities in the file to be processed, prohibiting the output of redundant information, etc. (3) "Note" part: describes reminders, such as ensuring that the structure of the generated target file is clear, the information is highlighted, and the language used is appropriate. (4) "Demonstration guidance" part: shows an example of the correct output format of the target file as a learning reference.

[0034] Step 1063: Combine the to-be-processed file, the key information, the enhanced file, the target outline and the prompt template through a large language model to obtain the target file.

[0035] In an embodiment of the present application, according to the target requirement file, the target type corresponding to the target requirement file is determined, and then according to the target type, a prompt template corresponding to the target type is determined, and the prompt template can guide the generation of the target file. The to-be-processed file, the key information, the enhanced file, and the target outline are combined with the prompt template through a large language model, so that a target file that meets the preset format, content, relevant regulations, and the requirements of the target requirement file can be obtained.

[0036] In one implementation, the above-mentioned file processing method may further include the following steps.

[0037] Step 108, obtaining the test file to be processed;

[0038] Step 110, extracting the key test information of the test file to be processed and generating a test enhancement file for the test file to be processed;

[0039] Step 112, inputting the test to-be-processed file, the test key information, the test enhancement file and the target outline into a large language model for processing to obtain a test target file;

[0040] Among them, step 108 to step 112 is to process the test file to be processed, so as to update the prompt template through the obtained test target file.

[0041] Step 114, evaluating the test target file according to the target requirement file to determine an evaluation result; wherein the evaluation result includes the degree to which the test target file satisfies the target requirement file;

[0042] Step 116: Update the prompt template according to the evaluation result.

[0043] In an embodiment of the present application, by processing a test file to be processed, extracting test key information of the test file to be processed and generating a test enhancement file for the test file to be processed, and then inputting the target outline and the test file to be processed, the test key information and the test enhancement file corresponding to the target requirement file into a large language model for processing, a test target file corresponding to the test file to be processed can be obtained, and the quality of the test target file can be evaluated through the target requirement file, so as to update the prompt template for indicating the generation of the target file according to the evaluation result, so as to find a better prompt template to generate a target file that better meets the target requirement file.

[0044] In one implementation, the above step 104 of extracting key information of the file to be processed may include the following steps.

[0045] Step 1041, determining each keyword object in the to-be-processed file based on the deep learning model;

[0046] The to-be-processed file includes multiple keyword objects, such as the names of the parties involved, the persons involved, the places, the dates, etc. These keyword objects are associated with each other to reveal the structures of the keyword objects in the to-be-processed file and the interactions between them. The deep learning model can be a natural language processing model based on deep learning (Bidirectional Encoder Representations from Transformers, BERT), which is used to understand and generate natural language text.

[0047] Step 1042, constructing the relationship between the keyword objects based on the graph neural network model according to the content of the file to be processed;

[0048] Among them, using a graph neural network model (GNN) to dynamically build and update the relationship between entities can include: using a graph data structure to store each keyword object and the relationship between them. When a new keyword object or relationship is recognized in the text, the graph structure is updated to ensure the timeliness and accuracy of the data. When a new keyword object or relationship changes in the text, named entity recognition (NER) and relationship extraction in NLP can be used. NER extracts specific keyword objects from the text, such as names of people, places, and organizations, while relationship extraction finds the association between entities, such as the "cooperation" relationship in "A and B cooperated on project X", so that the changes in the text are detected in real time through NER, and the graph structure is updated immediately to maintain the timeliness and accuracy of the data. And continuously track the changes in the text content, and adjust the graph data structure according to the changes in the text content. The above-mentioned keyword objects can be specific objects or abstract concepts. Each keyword object is represented by a vector to represent the semantic information of each keyword object. In the graph data structure, each node represents a keyword object, and each edge represents the relationship between the extracted keyword objects. Through the capabilities of the graph neural network model, complex keyword objects and the relationships between them can be efficiently learned and represented, so that they can be used for prediction, reasoning and other advanced analysis tasks.

[0049] Step 1043: Determine the relationship between the keyword objects and the keywords as the key information.

[0050] In an embodiment of the present application, each keyword object in the to-be-processed file is determined based on a deep learning model, and the relationship between the keyword objects is constructed based on a graph neural network model according to the content of the to-be-processed file to extract key information of the to-be-processed file. The analysis of each keyword object in the to-be-processed file and the relationship between them, combined with the consideration of the context or application scenario of each keyword object in the to-be-processed file, can improve the accuracy and relevance of key information.

[0051] Optionally, a text that is more in line with the situation or application scenario is generated through the extracted key information. For example, when generating the content of the bidding document, the corresponding seasonal climate response measures can be generated according to the date; the text that is more in line with the characteristics of the location can be generated according to the location. The bidding document needs to include a construction plan for different seasonal climates. For the date keyword object, if the date of the text to be processed is extracted in summer, the following content is generated: "Since the construction will be carried out in summer, we plan to take necessary heatstroke prevention measures during high temperatures, such as providing sufficient drinking water and regular rest. In addition, we will arrange the construction work in the early morning and evening to avoid high-temperature operations during hot periods." For the location keyword object, if the location of the text to be processed is extracted at the seaside, the following content is generated: "Since the project is located at the seaside, we will take special consideration of the impact of waves and tides on construction. We will take necessary measures, such as strengthening the stability of the infrastructure to cope with possible wave impacts and tidal changes. In addition, we will use materials suitable for the seaside environment to ensure the long-term stability and safety of the project." By extracting the keyword object, the generated target file has more specific and practical content, so that the target file is more in line with the actual situation and project requirements.

[0052] In one implementation, the above step 104 of generating the target outline of the target requirement document may include the following steps.

[0053] Step 1044, generating a preliminary target outline according to the target requirement document;

[0054] Among them, the preliminary target outline can represent the core content and structure of the target requirement document, which can help the large language model understand the target requirement document.

[0055] Step 1045, updating the preliminary target outline according to the historical success file or the real-time supplementary file to obtain the target outline;

[0056] Among them, the historical success file is a historical file whose degree of satisfaction with the target requirement file is greater than a first preset threshold; the real-time supplementary file includes industry dynamic information and supplementary information corresponding to the target requirement file.

[0057] In an embodiment of the present application, a preliminary target outline is generated based on the analysis and identification of the target requirement document, and then the structure and content of the preliminary target outline are adjusted, which can include adjusting the preliminary target outline based on the characteristics and key elements of the historical successful documents, by obtaining multiple historical successful documents, extracting the outline of the historical successful documents, the characteristics and key elements related to the target requirement documents, such as project scope, technical requirements, cost budget and other information, and then using classification algorithms (such as decision trees, random forests) or clustering algorithms (such as K-means clustering) to analyze this information, identify and analyze the commonalities and associations in multiple historical successful documents, generate optimization suggestions based on the analysis results, and adjust the structure and content of the preliminary target outline. It can also include adjusting the preliminary target outline based on real-time supplementary documents, by real-time monitoring of industry dynamic information and the supplementary information corresponding to the target requirement documents supplemented by the demand side in real time, for example, by establishing a timed task or event-driven architecture to obtain real-time information regularly or in real time. Thus, through the above-mentioned adjustment method of the preliminary target outline, the relevant content of the to-be-processed document, the prompt template and the target outline can be combined to improve the satisfaction of the target document obtained with the target requirement document.

[0058] In one implementation, before the above-mentioned step of inputting the to-be-processed file, the key information, the enhanced file and the target outline into the large language model for processing to obtain the target file, the method may further include the following steps.

[0059] Step 118, determining the matching degree between each qualification information in the qualification database and the target requirement document;

[0060] The qualification database may include the personnel qualification database and the qualification database of the supplier to which the personnel belongs, such as the company qualification database and the personnel qualification database in the company. The qualification database includes various certificates, awards, project experience, and personnel's professional qualifications, skills and experience. The qualification database is continuously updated and verified to ensure the accuracy and timeliness of the information in the qualification database.

[0061] Step 120, adding the qualification information with the highest matching degree to the target outline.

[0062] In the embodiment of the present application, after analyzing the target requirement document to generate a preliminary target outline, the qualifications required in the target requirement document are determined, and then the qualification information in the qualification library is compared with the target requirement document to determine the matching degree between the qualification information in the qualification library and the target requirement document, so that the qualification information that meets the target requirement document can be quickly screened out. The matching of qualification information can be performed by text similarity calculation and recommendation algorithm to accurately and efficiently obtain the qualification information that meets the target requirement document from the qualification library.

[0063] For example, the qualification information and the target requirement document are converted into vectors by the term frequency-inverse document frequency (TF-IDF) algorithm, and the cosine similarity between the two is calculated. The TF-IDF algorithm includes: first, calculating the term frequency (TF) of each word, that is, the frequency of the word in the document; second, calculating the inverse document frequency (IDF), that is, the total number of documents divided by the number of documents containing the word, and then taking the natural logarithm of the ratio to obtain the IDF; finally, multiplying the TF of each word by the IDF to obtain the TF-IDF weight. The TF-IDF weights of each word in the qualification information or the target requirement document are obtained in turn by the algorithm. The TF-IDF weights corresponding to each word in the qualification information constitute the vector corresponding to the qualification information, and the TF-IDF weights corresponding to each word in the target requirement document constitute the vector corresponding to the target requirement document. Based on the two vectors obtained, the cosine similarity or Euclidean distance between the two is calculated. The cosine similarity measures the angle between the two vectors, that is, the degree of directional similarity between the two vectors. The closer the cosine similarity is to 1, the higher the similarity. Euclidean distance measures the spatial distance between two vectors, that is, their straight-line distance in multidimensional space. Thus, by analyzing cosine similarity or Euclidean distance alone or in combination, the qualification information with the highest matching degree between each qualification information and the target requirement document is selected. Through the two methods of measuring the similarity between vectors, the qualification information that is semantically closest to the requirements of the target requirement document can be accurately matched, and the qualification information is added to the target outline to ensure that the generated target outline can accurately and fit the requirements of the target requirement document.

[0064] In one implementation, after obtaining the to-be-processed file, the method may further include: preprocessing the to-be-processed file; wherein the preprocessing includes:

[0065] (1) removing irrelevant characters in the file to be processed;

[0066] Among them, regular expressions can be used for precise pattern matching to identify and delete irrelevant characters in the files to be processed, such as extra spaces, special symbols, and headers and footers. One implementation method is to use Python's re module, which provides powerful support for performing complex string operations by writing specific regular expressions such as, for example, the following is an example of a regular expression for removing extra spaces: cleaned_text = re.sub(r'\s+', ", text), by writing a specific regular expression such as re.sub(r'\s+',", text) to remove extra spaces. In Python, processing headers and footers can also be achieved through regular expressions and text processing techniques.

[0067] (2) standardizing the date and time in the file to be processed;

[0068] One implementation method is to use Python's dateutil.parser module, which can intelligently identify and parse various date and time formats and convert them into the ISO 8601 standard format. For example, dateutil.parser.parse('March 5, 2024') can be correctly parsed and standardized.

[0069] (3) formatting the numerical values ​​in the file to be processed;

[0070] One way to achieve this is to develop a custom script based on Python, using regular expressions and conditional logic to identify and convert currency units and numerical expressions in the files to be processed, ensuring that the numerical information is displayed in a unified currency unit and numerical format. For example, use the function convert_currency_and_format to receive the files to be processed and match the amount and currency symbol according to the regular expression pattern pattern, and then use the re.sub function and an internal function replace_currency to replace the currency unit and format the value.

[0071] (4) Correct text errors in the file to be processed.

[0072] One way to achieve this is to integrate the Grammarly Application Program Interface (API), which provides a wide range of language support and can detect grammatical and spelling errors in text in real time. The Grammarly API provides a RESTful interface that allows you to send text and get correction suggestions through HTTP POST requests. The Grammarly API uses advanced natural language processing technology to analyze the context of the text, identify common and complex errors in English and other languages, and provide the most appropriate correction suggestions. The integration process includes processing the correction suggestions returned by the API, which can be applied automatically or manually as needed to improve the grammatical and spelling accuracy of the text.

[0073] Another implementation method is to use a pre-trained BERT model based on the Transformers architecture. The pre-trained BERT model is trained with a specific data set. In the embodiment of the present application, the specific data set is a file of the same or similar type as the file to be processed to improve the recognition accuracy of industry-specific terms.

[0074] Figure 2 A schematic diagram showing a flow chart of a method for preprocessing a file to be processed provided in an embodiment of the present application is shown in FIG. Figure 2 , the preprocessing method of the file to be processed may include the following steps.

[0075] Step 201, read the content of the file to be processed.

[0076] Step 202, define the regular expression pattern of the header and footer.

[0077] Step 203: Initialize an empty string or list of files to be processed to store the processed content.

[0078] Step 204, loop through the contents of the file to be processed, match each line of the contents with the regular expression of the header, and check whether the contents match the regular expression of the header. If yes, execute step 205. If no, execute step 206.

[0079] Step 205, extracting and processing the header content, and adding the processed content to the variable storing the text. Wherein, step 204 is executed for each line of the content. Processing the header content includes removing the header logo.

[0080] Step 206, match the content of the current row with the regular expression of the footer to check whether the content matches the regular expression of the footer. If yes, execute step 207. If not, execute step 208.

[0081] Step 207, extract and process the footer content, and add the processed content to the variable storing the text. The processing of the footer content includes removing the footer logo.

[0082] Step 208, adding the content of the current line to the variable storing the text.

[0083] Step 209, after all contents of the file to be processed are processed, the processed saved text is output or saved.

[0084] In the embodiment of the present application, by preprocessing the file to be processed, the format and content of the file to be processed are initially corrected to preliminarily improve the quality of the file to be processed and reduce the complexity of subsequent processing.

[0085] Figure 3 A flowchart of another file processing method provided by an embodiment of the present application is shown. Figure 3 , the method may include the following steps.

[0086] Step 301: perform data preprocessing on the original content of the file to be processed to obtain the first content.

[0087] Step 302: perform data enhancement on the first content to obtain enhanced content.

[0088] Step 303: extract key information from the first content to obtain second content.

[0089] Step 304, generating a target outline and prompt template according to the target requirement document.

[0090] Step 305: Input the first content, enhanced content, second content, target outline and prompt template into the large language model for processing to obtain a target file.

[0091] Step 306, obtaining historical successful files or real-time supplementary files to generate optimization prompts, updating the target outline, and updating the prompt template according to the evaluation results of the target file.

[0092] Through the embodiments of the present application, multiple technologies such as data preprocessing, data enhancement, key information extraction, target outline and advance template generation are combined, and the files to be processed and the template requirement files are processed accordingly to obtain multiple information for generating the target files, so that the large language model obtains the target file that meets the target requirement files through comprehensive processing of multiple information, thereby enhancing the adaptability of the large language model to different changes in the files to be processed and improving the performance of the large language model in processing the files to be processed, thereby being able to generate accurate and high-quality files.

[0093] It should be noted that the file processing method provided in the embodiment of the present application can be applied across fields, for example, it can be used for the generation of bidding documents for engineering projects, the review of legal documents, the analysis of financial reports, etc.

[0094] The file processing method provided in the embodiment of the present application can be executed by a file processing device or a control module in the file processing device for executing the file processing method. The file processing device provided in the embodiment of the present application is described by taking the file processing device executing the file processing method as an example.

[0095] Figure 4 Schematic diagram of a file processing device according to an embodiment of the present application. Figure 4 As shown, the device 400 includes: an acquisition module 41, a generation module 32 and a processing module 43.

[0096] Among them, the acquisition module 41 is used to obtain the file to be processed and the target requirement file; the generation module 42 is used to extract the key information of the file to be processed, generate the enhanced file of the file to be processed, and generate the target outline of the target requirement file; the processing module 43 is used to input the file to be processed, the key information, the enhanced file and the target outline into the large language model for processing to obtain the target file; wherein, the target file meets the requirements of the target requirement file.

[0097] In one implementation, the processing module 43 can be used to determine the target type corresponding to the target requirement file based on the target requirement file; determine the prompt template corresponding to the target type based on the target type; and combine the file to be processed, the key information, the enhanced file, and the target outline with the prompt template through a large language model to obtain the target file.

[0098] In one implementation, the above-mentioned qualification 400 may also include an update module, which is used to obtain a test file to be processed; extract the test key information of the test file to be processed and generate a test enhancement file for the test file to be processed; input the test file to be processed, the test key information, the test enhancement file and the target outline into a large language model for processing to obtain a test target file; evaluate the test target file according to the target requirement file to determine an evaluation result; wherein the evaluation result includes the degree to which the test target file satisfies the target requirement file; and update the prompt template according to the evaluation result.

[0099] In one implementation, the generation module 32 can be used to determine each keyword object in the file to be processed based on a deep learning model; construct the relationship between the keyword objects based on a graph neural network model according to the content of the file to be processed; and determine the relationship between the keyword objects and the keywords as the key information.

[0100] In one implementation, the generation module 42 can be used to generate a preliminary target outline based on the target requirement file; update the preliminary target outline based on a historical success file or a real-time supplementary file to obtain the target outline; wherein the historical success file is a historical file whose degree of satisfaction with the target requirement file is greater than a first preset threshold; the real-time supplementary file includes industry dynamic information and supplementary information corresponding to the target requirement file.

[0101] In one implementation, the apparatus 400 may further include a matching module for determining the degree of matching between each qualification information in the qualification library and the target requirement document; and adding the qualification information with the highest matching degree to the target outline.

[0102] In one implementation, the above-mentioned device 400 may also include a preprocessing module for preprocessing the file to be processed; wherein the preprocessing includes: removing irrelevant characters in the file to be processed; standardizing the date and time in the file to be processed; formatting the numerical values ​​in the file to be processed; and correcting text errors in the file to be processed.

[0103] The file processing device in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device, and for example, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, etc., and the embodiment of the present application does not specifically limit it.

[0104] The file processing device in the embodiment of the present application may be a device having 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.

[0105] The file processing device provided in the embodiment of the present application can achieve Figures 1 to 3 To avoid repetition, the various processes implemented in the method embodiment are not described here.

[0106] Based on the same technical concept, an embodiment of the present application further provides an electronic device, which is used to execute the above-mentioned file processing method. Figure 5 A schematic diagram of the structure of an electronic device for implementing various embodiments of the present application. The electronic device may have relatively large differences due to different configurations or performances, and may include a processor 501, a communications interface 502, a memory 503, and a communication bus 504, wherein the processor 501, the communications interface 502, and the memory 503 communicate with each other through the communication bus 504. The processor 501 can call a computer program stored in the memory 503 and can be run on the processor 501 to execute the various steps of the above-mentioned file processing method embodiment, and can achieve the same technical effect, so it will not be repeated here to avoid repetition.

[0107] The above electronic device structure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, the input unit may include a graphics processing unit (GPU) and a microphone, and the display unit may be configured with a display panel in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit includes a touch panel and at least one of other input devices. The touch panel is also called a touch screen. Other input devices may include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0108] The memory can be used to store software programs and various data. The memory may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory may include a volatile memory or a non-volatile memory, or the memory may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (DRRAM).

[0109] The processor may include one or more processing units; optionally, the processor integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to the operating system, user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor.

[0110] 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 file processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0111] 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.

[0112] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned file processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0113] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0114] An embodiment of the present application also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes a program or instructions. When the program or instructions are executed, the various processes of the above-mentioned file processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not repeated here.

[0115] 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.

[0116] 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 software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0117] 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.

Claims

1. A file processing method, characterized in that: include: Get the files to be processed and the target required files; Extracting key information of the file to be processed, generating an enhanced file of the file to be processed, and generating a target outline of the target requirement file; Inputting the to-be-processed file, the key information, the enhanced file, and the target outline into a large language model for processing to obtain a target file; Wherein, the target file meets the requirements of the target requirement file.

2. The method according to claim 1, characterized in that The step of inputting the to-be-processed file, the key information, the enhanced file, and the target outline into a large language model for processing to obtain a target file includes: According to the target requirement document, determining the target type corresponding to the target requirement document; According to the target type, determining a prompt template corresponding to the target type; The file to be processed, the key information, the enhanced file, the target outline and the prompt template are combined through a large language model to obtain the target file.

3. The method according to claim 2, characterized in that The method further comprises: Get the test files to be processed; Extracting key test information of the test file to be processed and generating a test enhancement file for the test file to be processed; Input the test to-be-processed file, the test key information, the test enhancement file and the target outline into a large language model for processing to obtain a test target file; Evaluate the test target file according to the target requirement file to determine an evaluation result; wherein the evaluation result includes the degree to which the test target file satisfies the target requirement file; The prompt template is updated according to the evaluation result.

4. The method according to claim 1, characterized in that: The step of extracting key information of the file to be processed includes: Determine each keyword object in the to-be-processed file based on a deep learning model; According to the content of the file to be processed, the relationship between the keyword objects is constructed based on the graph neural network model; The relationships between the keyword objects and the keywords are determined as the key information.

5. The method according to claim 1, characterized in that The target outline for generating the target requirement document includes: Generate a preliminary target outline based on the target requirements document; According to the historical success file or the real-time supplementary file, the preliminary target outline is updated to obtain the target outline; Among them, the historical success file is a historical file whose degree of satisfaction with the target requirement file is greater than a first preset threshold; the real-time supplementary file includes industry dynamic information and supplementary information corresponding to the target requirement file.

6. The method according to claim 1, characterized in that Before inputting the to-be-processed file, the key information, the enhanced file, and the target outline into a large language model for processing to obtain a target file, the method further includes: Determine the matching degree between each qualification information in the qualification database and the target requirement document; The qualification information with the highest matching degree is added to the target outline.

7. The method according to claim 1, characterized in that After obtaining the file to be processed, the method further includes: Preprocessing the file to be processed; wherein the preprocessing includes: Removing irrelevant characters from the file to be processed; Standardizing the date and time in the file to be processed; Formatting the numerical values ​​in the file to be processed; Correct text errors in the files to be processed.

8. An electronic device, characterized in that: The method comprises 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 file processing method according to any one of claims 1 to 7.

9. 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 the file processing method according to any one of claims 1 to 7 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program comprises a program or instructions, and when the program or instructions are executed, the steps of the file processing method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Bidding file generation method and device, equipment and storage medium

    CN120068838A