File generation method and device, electronic equipment, storage medium and program product
By determining the content outline, matching chapters and business documents in the file generation method, and generating content according to the chapter type, the problems of low efficiency and poor accuracy of case review report generation in the prior art are solved, and efficient and accurate file generation is achieved.
Patent Information
- Application Number
- CN202411681612.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-03-18
AI Technical Summary
The prior art is inefficient and poorly accurate when generating case review reports, especially when dealing with complex and diverse case materials, content filling is mainly based on simple report templates, resulting in low accuracy in generating reports.
By determining the content outline of the file to be generated, matching the chapters and business documents, positioning the location information of the chapters in the business documents, and using different content generation strategies according to the chapter type, generating target content, and finally generating high-quality business documents.
The accuracy and efficiency of file generation are improved. Through the classification of chapter types, appropriate content generation strategies are adopted to produce higher quality target files, which solves the problems of low efficiency and poor accuracy in the existing technology.
Smart Images

Figure CN119646220A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to a file generation method, device, electronic device, storage medium and program product. Background Art
[0002] The content of some judicial cases or cases in other fields is relatively complex, and usually requires analysis and organization to generate case review reports. The generation of case review reports is a tedious and time-consuming task, which requires manual writing based on case materials and relevant laws and regulations, and is inefficient. With the development of artificial intelligence technology, it has become possible to automatically generate case review reports, but related technologies mainly rely on simple report templates for content filling, while case materials are usually more complex and diverse, and the accuracy of generated reports is low. Summary of the invention
[0003] The present disclosure provides a file generation method, device, electronic device, storage medium and program product.
[0004] In a first aspect, the present disclosure provides a method for generating a file, the method comprising:
[0005] Determine a content outline of a document to be generated, wherein the content outline includes a plurality of chapters;
[0006] Matching the chapter with the business document to determine the location information corresponding to the chapter in the business document;
[0007] Classifying the chapters to obtain chapter types of the chapters, where different chapter types correspond to different content generation strategies;
[0008] Generate target content of the chapter according to the document content in the business document associated with the location information and the content generation strategy corresponding to the chapter type of the chapter;
[0009] Generate the target file of the business document according to the target content generated corresponding to the chapter in the content outline.
[0010] In a second aspect, the present disclosure provides a file generation device, the file generation device comprising:
[0011] A first determining module is used to determine the content outline of the file to be generated, wherein the content outline includes multiple chapters;
[0012] A second determination module is used to match the chapter with a business document and determine the location information corresponding to the chapter in the business document;
[0013] A classification module, used for classifying the chapters to obtain chapter types of the chapters, where different chapter types correspond to different content generation strategies;
[0014] A first generating module, configured to generate target content of the chapter according to the document content in the business document associated with the location information and in accordance with a content generating strategy corresponding to the chapter type of the chapter;
[0015] The second generating module is used to generate the target file of the business document according to the target content generated corresponding to the chapter in the content outline.
[0016] In a third aspect, the present disclosure provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores one or more computer programs executable by the at least one processor, and one or more of the computer programs are executed by the at least one processor so that the at least one processor can execute the above-mentioned file generation method.
[0017] In a fourth aspect, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the above-mentioned file generation method when executed by a processor.
[0018] In a fifth aspect, the present disclosure provides a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above-mentioned file generation method.
[0019] The file generation method provided by the embodiment of the present disclosure determines the content outline of the file to be generated, matches the chapters in the content outline with the business document, determines the location information corresponding to the chapter in the business document, can locate the source of the content to be filled in the chapter, and classifies the chapters, generates the target content of the chapter according to the document content in the business document associated with the location information and the content generation strategy corresponding to the chapter type of the chapter, and then generates the target file of the business document according to the target content of multiple chapters. In this way, through the classification of chapter types, different content generation strategies can be adopted for different types of chapters, which can improve the accuracy of content generation and improve the quality of the target file.
[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. The above and other features and advantages will become more apparent to those skilled in the art by describing detailed example embodiments with reference to the accompanying drawings. In the accompanying drawings:
[0022] Figure 1 An application scenario diagram of the file generation method and device provided in the embodiments of the present disclosure;
[0023] Figure 2 A flowchart of a file generation method provided by an embodiment of the present disclosure;
[0024] Figure 3 A flowchart of another file generation method provided by an embodiment of the present disclosure;
[0025] Figure 4 A block diagram of a file generating device provided by an embodiment of the present disclosure;
[0026] Figure 5 A block diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0028] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.
[0029] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0030] The terms used herein are only used to describe specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "a" and "the" are also intended to include plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "including" and / or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements and / or components is specified, but the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof is not excluded. "Connected" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect.
[0031] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined as such herein.
[0032] In the technical solution disclosed in this disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals. The use of user data in this technical solution complies with relevant national laws and regulations (for example, the "Information Security Technology Personal Information Security Specification", etc.). For example: corresponding prescribed measures are taken for personal information access control; prescribed restrictions are imposed on the display of personal information; the purpose of using personal information does not exceed the scope of direct or reasonable association; when using personal information, clear identity orientation is eliminated to avoid precise positioning of specific individuals.
[0033] In some business areas, business processing may involve a large number of documents. For example, judicial case documents are numerous and complex, and usually need to be analyzed and organized to generate review reports for easy understanding and reference. They need to be written manually based on case materials and relevant laws and regulations, which is inefficient. With the development of artificial intelligence technology, it has become possible to automatically generate review reports. However, related technologies mainly use simple report templates for content filling, while case materials are usually more complex and diverse, and the accuracy of generated reports is low.
[0034] The file generation method in the disclosed embodiment determines the content outline of the file to be generated, and determines the location information of the chapters in the content outline corresponding to the business document, so as to locate the source of the content to be filled in the chapter, and then classify the chapters. Different content generation strategies are adopted according to the chapter types of different chapters. The target content of the chapter is generated according to the located content source, that is, the document content in the business document associated with the location information. The target file of the business document is generated according to the target content generated corresponding to the chapter in the content outline. In this way, the target file of the business document can be automatically generated, which improves efficiency. Moreover, by classifying chapters of different chapter types, different content generation strategies are adopted to generate the target content, which is more flexible, improves the accuracy of generation, and improves the quality of the target file.
[0035] Figure 1 The application scenario diagram of the file generation method and device provided by the embodiment of the present disclosure is schematically shown.
[0036] like Figure 1 As shown, the application scenario of the embodiment of the present disclosure may include a terminal device 101, a network 103 and a server 102. The network 103 is used to provide a medium for a communication link between the terminal device 101 and the server 102. The network 103 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0037] The user can use the terminal device 101 to interact with the server 102 through the network 103 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0038] The terminal device 101 may be any electronic device having a display screen and supporting web browsing, including but not limited to a smart phone, a tablet computer, a laptop computer, a desktop computer, and the like.
[0039] The server 102 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the terminal device 101. The background management server may analyze and process received data such as user requests, and feed back processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0040] It should be noted that the file generation method and apparatus provided in the embodiment of the present disclosure can be executed by the server 102. Accordingly, the file generation method and apparatus provided in the embodiment of the present disclosure can be set in the server 102. The file generation method and apparatus provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 102 and can communicate with the terminal device 101 and / or the server 102. Accordingly, the file generation method and apparatus provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 102 and can communicate with the terminal device 101 and / or the server 102.
[0041] Alternatively, the file generation method and apparatus in the embodiments of the present disclosure may also be executed by the terminal device 101, which is not limited in the embodiments of the present disclosure.
[0042] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0043] Figure 2 A flowchart of a file generation method provided by an embodiment of the present disclosure. Figure 2 , the method comprising:
[0044] S201: Determine the content outline of the file to be generated, where the content outline includes multiple chapters.
[0045] The embodiments of the present disclosure can be applicable to document organization and analysis scenarios in any business field. The files to be generated can be, for example, analysis reports of business documents, etc., without limitation. For example, in the field of judicial cases, the case review process usually involves many documents. Based on the file generation method in the embodiments of the present disclosure, these documents can be analyzed to generate a review report for the case.
[0046] With respect to step S201, in a possible embodiment, the preset document template may be analyzed and parsed based on the model, and the structured information in the document template may be identified and extracted to obtain the content outline.
[0047] Among them, structured information includes information such as titles and chapter identifiers. For example, for a report in a certain business field, a report template can be provided in advance. The report template includes the required content, format, chapter identifiers, chapter description information of each chapter, etc. There is no restriction on this, so that the content outline of the final file to be generated can be extracted through model analysis and extraction based on the file template.
[0048] S202: Match the chapter with the business document to determine the corresponding position information of the chapter in the business document.
[0049] In the disclosed embodiment, there may be multiple business documents, and the business documents may be matched through chapters, so that the content source of the chapters can be located, which facilitates the subsequent generation of target content and improves efficiency and accuracy.
[0050] In a possible embodiment, based on the model, according to the first prompt and the chapter description information of the chapter, the chapter is matched with the business document by performing semantic analysis on the chapter description information and the business document, and the corresponding position information of the chapter in the business document is obtained; wherein the first prompt is used to indicate the matching requirements between the chapter and the business document.
[0051] For example, the business document is a financial-related material document, the file to be generated is a financial report, and a certain chapter in the content outline of the financial report is basic information on expenditures. The content in the business document may include text, pictures, etc. The text content of the business document can be obtained based on the OCR method, and the chapter can be matched with the text content of the business document based on the model through semantic analysis to determine the location information of the chapter in the business document, such as the location information being a page number, etc. Furthermore, in the disclosed embodiment, the business document can also be segmented according to the location information to obtain multiple document fragments, and the corresponding chapters can be used as labels for the document fragments, wherein the content sources of multiple chapters may overlap, so each document fragment can correspond to one or more chapters. In this way, when generating the target content of the chapter later, the document fragment corresponding to the chapter can be directly found according to the label, and the target content of the chapter can be generated according to the content of the document fragment corresponding to the chapter, thereby improving the generation efficiency.
[0052] In addition, in the embodiments of the present disclosure, for example, for other non-textual document contents such as pictures, there may be situations where there is no corresponding text description content. For example, in a business document, there are multiple pictures used to describe the same event, and usually only the last picture has a corresponding text description content. In this case, in the embodiments of the present disclosure, the first few pictures of the same event can be automatically marked with the text description content. In this way, it can be known how many pictures there are for the same event, providing richer information for generating the target content of the chapter.
[0053] S203: Classify the chapters to obtain chapter types of the chapters, where different chapter types correspond to different content generation strategies.
[0054] S204: Generate target content of the chapter according to the document content in the business document associated with the location information and the content generation strategy corresponding to the chapter type of the chapter.
[0055] S205: Generate a target file of the business document according to the target content generated corresponding to the chapter in the content outline.
[0056] In the embodiment of the present disclosure, the content outline includes the order and structured relationship information of multiple chapters. For example, the order is Chapter 1, Chapter 2, Chapter 3, etc. Each first-level chapter may also include multiple second-level or more chapters, without limitation. Then, for step S205, exemplarily, in the embodiment of the present disclosure, the target content generated corresponding to each chapter is summarized according to the order of the chapters in the content outline, and the format of the summarized target content of each chapter is adjusted according to a preset format to generate a target file of the business document.
[0057] In the disclosed embodiment, based on the content outline, the chapters in the content outline are matched with the business document, the location information corresponding to the chapter in the business document is determined to obtain the document content in the business document associated with the chapter, and the chapters are classified as the content source of the chapter, so that for different types of chapters, according to different content generation strategies, the target content of the chapter is generated according to the document content in the business document associated with the location information, and the target file of the business document is generated according to the target content generated corresponding to the chapter in the content outline. In this way, the business document can be automatically analyzed to generate the target file of the business document, thereby improving efficiency, and through chapter classification, more accurate content generation strategies can be adopted for different types of chapters, thereby improving the accuracy of target content generation, thereby improving the accuracy and quality of the final target file.
[0058] The following is a detailed description of the file generation method according to an embodiment of the present disclosure.
[0059] As mentioned above, a possible implementation method is provided for the above-mentioned step S203, in which chapters are classified to obtain chapter types, including: based on a model, obtaining the chapter type of the chapter according to a second prompt and chapter description information of the chapter; wherein the second prompt includes chapter type description information of a plurality of predefined chapter types, and classification requirements for the chapter based on the chapter type description information and the chapter description information.
[0060] For example, taking the example that the chapter types include rule generation type and model generation type, the second prompt can be: Please refer to the following two chapter types and classify the chapters according to the chapter description information, where the chapter types include rule generation type and model generation type. The rule generation type indicates that the document content can be extracted from the business document based on the extraction rules, and the source in the business document is clearly pointed out in the chapter description information. The model generation type indicates that summary and generalization need to be made based on the model.
[0061] In this way, in the embodiment of the present disclosure, chapters can be classified based on the model, and different content generation strategies can be adopted for different types of chapters, which can improve the accuracy of content generation corresponding to the chapters.
[0062] Furthermore, for different chapter types, the present disclosure also provides possible implementation methods for the above step S203:
[0063] In a possible embodiment, the chapter type includes a rule generation type, and the content generation strategy corresponding to the rule generation type is to directly extract the target content of the chapter from the business document based on the extraction rule.
[0064] Based on the document content in the business document associated with the location information and in accordance with the content generation strategy corresponding to the chapter type of the chapter, the target content of the chapter is generated, including: obtaining the document content in the business document associated with the location information; and extracting the document content associated with the location information as the target content of the chapter according to the extraction rules corresponding to the rule generation type.
[0065] In the embodiment of the present disclosure, for chapters of rule-generated type, extraction rules can be pre-written in combination with the source in the business document clearly indicated in the chapter description information. For example, the extraction rule can be a regular expression, and then the document content associated with the chapter in the business document is determined based on the location information. That is, the target content can be extracted from the associated document content based on the regular expression, and the extracted target content is filled into the chapter.
[0066] That is, the target content of the rule-generated chapter is usually the original text in the business document and is not modified. It can be understood that the rule-generated type focuses more on chapters such as factual data and legal provisions. Extraction is performed directly from the business document based on the extraction rules, which can ensure the accuracy of the target content generation of the chapter.
[0067] In a possible embodiment, the chapter type includes a model generation type, and the content generation strategy corresponding to the model generation type is to generate target content of the chapter based on the model.
[0068] According to the document content in the business document associated with the location information and in accordance with the content generation strategy corresponding to the chapter type of the chapter, the target content of the chapter is generated, including: obtaining the document content in the business document associated with the location information; based on the model, according to the third prompt, performing semantic analysis on the document content associated with the location information and the chapter description information of the chapter, to generate the target content of the chapter; wherein the third prompt is used to indicate the content generation requirements based on the document content and the chapter description information.
[0069] In the disclosed embodiment, a model-generated chapter needs to understand and summarize the business document based on the model to generate target content. For a model-generated chapter, a third prompt may be pre-written. For example, the third prompt is: "[Task description]: Please generate the content of {chapter} based on the provided context information, list it in paragraphs, and do not make up information. If there is no content, only the chapter description information will be returned without filling it in, ensuring that the returned content format is correct.
[0070] [File template]: {Chapter description information}
[0071] [Business Document]: The document content corresponding to the chapter in the business document. ”
[0072] The chapter description information may be obtained from a pre-provided file template. For example, the chapter description information of a certain chapter is based on witness testimony and can be proved. Based on the interrogation record, it analyzes what facts occurred on what date.
[0073] When generating content for each model type chapter, the chapter description information of the corresponding chapter and the document content corresponding to the chapter in the business document can be filled in the corresponding position of the third prompt. The model can generate target content that meets the requirements by understanding the third prompt and the corresponding document content, chapter description information, etc.
[0074] The following uses a specific application scenario to illustrate the file generation method in the embodiment of the present disclosure. Figure 3 As shown in FIG. 1 , it is a flowchart of another text generation method in an embodiment of the present disclosure, such as Figure 3 As shown, including:
[0075] S301: Extracting content outline based on the file template.
[0076] The file template is the template of the file to be generated. The file template may include the required chapter content, format, chapter identification, chapter description information of each chapter, etc. The user may write it in advance according to the needs.
[0077] For example, based on the model, the file template can be parsed to extract the content outline of the text to be generated, which includes multiple chapters.
[0078] S302: Match the chapters in the content outline with the business document to determine the corresponding position information of the chapters in the business document.
[0079] In the disclosed embodiment, the business document and the chapters may be aligned based on the model, and the document content associated with each chapter in the business document may be determined.
[0080] S303: Classify the chapters. Taking the chapter types including rule generation type and model generation type as an example, step S304 is executed for the rule generation type, and step S306 is executed for the model generation type.
[0081] S304: Obtain extraction rules.
[0082] S305: Extract target content from the document content associated with the location information according to the extraction rule.
[0083] In the disclosed embodiment, for a rule-generated chapter, the original text is extracted from the business document to serve as the target content to be filled in the chapter.
[0084] 306: Obtain the third prompt corresponding to the chapter.
[0085] The third prompt is used to indicate content generation requirements based on document content and chapter description information.
[0086] S307: Based on the model, generate target content of the chapter according to the third prompt.
[0087] S308: Summarize the target contents of each chapter in the content outline to generate a target file.
[0088] In the embodiment of the present disclosure, the process of the file generation method can be completed automatically. For example, the user inputs business documents and file templates, as well as the written extraction rules and prompts. Based on the file generation method in the embodiment of the present disclosure, the final generated target file can be output through analysis and processing. In this way, the efficiency and accuracy of file generation can be improved.
[0089] It can be understood that the above-mentioned various method embodiments mentioned in the present disclosure can be combined with each other to form a combined embodiment without violating the principle logic. Due to space limitations, the present disclosure will not repeat them. It can be understood by those skilled in the art that in the above-mentioned method of the specific implementation method, the specific execution order of each step should be determined according to its function and possible internal logic.
[0090] In addition, the present disclosure also provides a file generation device, an electronic device, a computer-readable storage medium, and a computer program product, all of which can be used to implement any file generation method provided by the present disclosure. The corresponding technical solutions and descriptions are referred to in the corresponding records of the method part and will not be repeated here.
[0091] Figure 4 A block diagram of a file generating device provided in an embodiment of the present disclosure.
[0092] Reference Figure 4 , the embodiment of the present disclosure provides a file generation device, the file generation device comprising:
[0093] A first determining module 41 is used to determine the content outline of the file to be generated, wherein the content outline includes multiple chapters;
[0094] A second determination module 42, configured to match the chapter with a business document and determine location information corresponding to the chapter in the business document;
[0095] A classification module 43, used to classify the chapters to obtain chapter types of the chapters, where different chapter types correspond to different content generation strategies;
[0096] A first generating module 44, configured to generate target content of the chapter according to the document content in the business document associated with the location information and in accordance with a content generating strategy corresponding to the chapter type of the chapter;
[0097] The second generating module 45 is used to generate the target file of the business document according to the target content generated corresponding to the chapters in the content outline.
[0098] In a possible embodiment, when matching the chapter with the business document and determining the location information corresponding to the chapter in the business document, the second determining module 42 is used to:
[0099] Based on the model, according to the first prompt and the chapter description information of the chapter, by performing semantic analysis on the chapter description information and the business document, the chapter is matched with the business document to obtain the location information corresponding to the chapter in the business document;
[0100] The first prompt is used to indicate the matching requirement between the chapter and the business document.
[0101] In a possible embodiment, when classifying the chapters to obtain the chapter type of the chapters, the classification module 43 is used to: obtain the chapter type of the chapter based on the model, according to the second prompt and the chapter description information of the chapter;
[0102] The second prompt includes chapter type description information of a plurality of predefined chapter types, and classification requirements for the chapters based on the chapter type description information and the chapter description information.
[0103] In a possible embodiment, the chapter type includes a rule generation type, and the content generation strategy corresponding to the rule generation type is to directly extract the target content of the chapter from the business document based on the extraction rule;
[0104] When generating the target content of the chapter according to the document content in the business document associated with the location information and the content generation strategy corresponding to the chapter type of the chapter, the first generation module 44 is used to:
[0105] Acquire the document content in the business document associated with the location information;
[0106] According to the extraction rule corresponding to the rule generation type, the document content associated with the position information is extracted as the target content of the chapter.
[0107] In a possible embodiment, the chapter type includes a model generation type, and the content generation strategy corresponding to the model generation type is to generate target content of the chapter based on the model;
[0108] When generating the target content of the chapter according to the document content in the business document associated with the location information and the content generation strategy corresponding to the chapter type of the chapter, the first generation module 44 is used to:
[0109] Acquire the document content in the business document associated with the location information;
[0110] Based on the model, according to the third prompt, semantic analysis is performed on the document content associated with the location information and the chapter description information of the chapter to generate the target content of the chapter;
[0111] The third prompt is used to indicate content generation requirements based on the document content and the chapter description information.
[0112] In a possible embodiment, when generating the target file of the business document according to the target content generated corresponding to the chapters in the content outline, the second generating module 45 is used to:
[0113] According to the order of the chapters in the content outline, the target contents generated corresponding to the chapters are summarized, and the format of the summarized target contents of the chapters is adjusted according to a preset format to generate the target file of the business document.
[0114] Each module in the above-mentioned file generation device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module above.
[0115] Figure 5 A block diagram of an electronic device provided in an embodiment of the present disclosure.
[0116] Reference Figure 5 An embodiment of the present disclosure provides an electronic device, which includes: at least one processor 501; at least one memory 502, and one or more I / O interfaces 503, connected between the processor 501 and the memory 502; wherein the memory 502 stores one or more computer programs that can be executed by the at least one processor 501, and the one or more computer programs are executed by the at least one processor 501 so that the at least one processor 501 can execute the above-mentioned file generation method.
[0117] Each module in the above electronic device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0118] The present disclosure also provides a computer-readable storage medium on which a computer program is stored, wherein the computer program implements the above-mentioned file generation method when executed by a processor. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium.
[0119] The embodiment of the present disclosure also provides a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above-mentioned file generation method.
[0120] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable storage medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium).
[0121] As is known to those of ordinary skill in the art, the term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable program instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technology, portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. In addition, it is known to those of ordinary skill in the art that communication media typically contain computer-readable program instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium.
[0122] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0123] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0124] The computer program product described herein may be implemented in hardware, software, or a combination thereof. In one optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK), etc.
[0125] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0126] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0127] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0128] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.
[0129] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly noted, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, those skilled in the art will appreciate that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.
Claims
1. A file generation method, characterized in that: include: Determine a content outline of a document to be generated, wherein the content outline includes a plurality of chapters; Matching the chapter with the business document to determine the location information corresponding to the chapter in the business document; Classifying the chapters to obtain chapter types of the chapters, where different chapter types correspond to different content generation strategies; Generate target content of the chapter according to the document content in the business document associated with the location information and the content generation strategy corresponding to the chapter type of the chapter; Generate the target file of the business document according to the target content generated corresponding to the chapter in the content outline.
2. The method according to claim 1, characterized in that The matching of the chapter with the business document to determine the location information corresponding to the chapter in the business document includes: Based on the model, according to the first prompt and the chapter description information of the chapter, by performing semantic analysis on the chapter description information and the business document, the chapter is matched with the business document to obtain the location information corresponding to the chapter in the business document; The first prompt is used to indicate the matching requirement between the chapter and the business document.
3. The method according to claim 1, characterized in that The step of classifying the chapters to obtain the chapter types of the chapters includes: Based on the model, according to the second prompt and the chapter description information of the chapter, obtaining the chapter type of the chapter; The second prompt includes chapter type description information of a plurality of predefined chapter types, and classification requirements for the chapters according to the chapter type description information and the chapter description information.
4. The method according to claim 3, characterized in that The chapter type includes a rule generation type, and the content generation strategy corresponding to the rule generation type is to directly extract the target content of the chapter from the business document based on the extraction rule; Generating target content of the chapter according to the document content in the business document associated with the location information and the content generation strategy corresponding to the chapter type of the chapter includes: Acquire the document content in the business document associated with the location information; According to the extraction rule corresponding to the rule generation type, the document content associated with the position information is extracted as the target content of the chapter.
5. The method according to claim 3, characterized in that: The chapter type includes a model generation type, and the content generation strategy corresponding to the model generation type is to generate target content of the chapter based on the model; Generating target content of the chapter according to the document content in the business document associated with the location information and the content generation strategy corresponding to the chapter type of the chapter includes: Acquire the document content in the business document associated with the location information; Based on the model, according to the third prompt, semantic analysis is performed on the document content associated with the location information and the chapter description information of the chapter to generate the target content of the chapter; The third prompt is used to indicate content generation requirements based on the document content and the chapter description information.
6. The method according to any one of claims 1 to 5, characterized in that: The step of generating a target file of the business document according to the target content generated corresponding to the chapter in the content outline includes: According to the order of the chapters in the content outline, the target contents generated corresponding to the respective chapters are summarized, and the format of the summarized target contents of the respective chapters is adjusted according to a preset format to generate the target file of the business document.
7. A file generating device, characterized in that: include: A first determining module is used to determine the content outline of the file to be generated, wherein the content outline includes multiple chapters; A second determination module is used to match the chapter with a business document and determine the location information corresponding to the chapter in the business document; A classification module, used for classifying the chapters to obtain chapter types of the chapters, where different chapter types correspond to different content generation strategies; A first generating module, configured to generate target content of the chapter according to the document content in the business document associated with the location information and in accordance with a content generating strategy corresponding to the chapter type of the chapter; The second generating module is used to generate the target file of the business document according to the target content generated corresponding to the chapter in the content outline.
8. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores one or more computer programs executable by the at least one processor, and the one or more computer programs are executed by the at least one processor so that the at least one processor can execute the file generation method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the computer program implements the file generation method according to any one of claims 1 to 6.
10. A computer program product, characterized in that The invention comprises a computer-readable code or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the file generation method according to any one of claims 1 to 6.