National defense mobilization potential survey Excel document identification method based on large model
Through the workflow configuration method based on the large model, Excel document features and data are automatically identified and extracted, which solves the adaptability and flexibility problems of Excel document recognition methods in national defense mobilization potential surveys, reduces development costs, and achieves cross-format adaptability and efficient data extraction.
Patent Information
- Application Number
- CN202510887876.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-10-17
AI Technical Summary
In the existing technology of national defense mobilization potential investigation, the Excel document recognition method has poor adaptability and flexibility, high development cost, and is unable to effectively identify and extract data when faced with documents in unknown formats.
Using a large model-based approach, through workflow configuration, large language models (such as deepseek-R1 or deepseek-V3) are used to automatically identify Excel document features and data, including headers and data extraction, to achieve cross-format adaptability and flexibility and reduce development costs.
It realizes adaptive recognition of different types and new Excel documents, reduces development and debugging time, improves the adaptability and flexibility of the system, and reduces software development costs.
Smart Images

Figure CN120803440A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of data processing, and particularly relates to an Excel document recognition method for national defense mobilization potential investigation based on a large model. BACKGROUND
[0002] National defense mobilization potential refers to the potential power of manpower, material resources, financial resources and scientific and technological power in economic and social development, which can be transformed into national defense power through mobilization. National defense mobilization potential investigation is an activity of collecting, analyzing and managing data and information on the resources such as manpower, material resources and financial resources in the fields of politics, economy, science and technology and society, which can be transformed into national defense power through mobilization. The executor of the national defense mobilization potential investigation is the national defense mobilization system, and the investigation object is the local government departments, enterprises and social groups. The national defense mobilization potential investigation is a strategic project to promote the transformation of national mobilization potential into war power, and is also a basic work to comprehensively promote the modernization of national defense and the army and build a world-class army.
[0003] At present, in the process of national defense mobilization potential investigation, the national defense mobilization system generates Excel documents with different formats according to different investigation objects according to the requirements of the National Defense Mobilization Potential Statistical Investigation Index System; secondly, customized programs are developed for different formats of Excel documents to identify the document features of different formats of Excel documents, such as table header information; then, according to the identified document features, the data in the Excel document is extracted; finally, the document features-table header and the extracted data are combined into a logical relationship and stored in the database.
[0004] Among them, the document features such as table header and document title are used as key elements to anchor the uniqueness of the document when the user repeatedly executes the same type of Excel document import, supporting the system to accurately store data. According to the feature recognition, the system can not only avoid repeated data entry, but also accurately associate and manage the corresponding business data, ensuring the accuracy and efficiency of data storage and business application, and laying a solid foundation for subsequent statistical analysis and business decision-making based on these standard data.
[0005] However, since different customized recognition programs need to be developed for different formats of Excel documents to identify their document features, the recognition programs need to be frequently upgraded according to the changes in document features; more seriously, when unknown Excel documents appear, the document format cannot be identified, and the data in the document cannot be extracted;
[0006] Multiple Excel standard documents have multiple program processing and analysis logic, which has a long development cycle, multiple testing links and high maintenance difficulty in terms of system development cost.
[0007] In summary, the prior art has the problem of poor adaptability, poor flexibility and high development cost of the national defense mobilization potential investigation Excel document recognition method. SUMMARY
[0008] The purpose of the present application is to provide a large model-based national defense mobilization potential investigation Excel document recognition method that can automatically identify the characteristics of different types and new Excel documents, has good adaptability, strong flexibility and low development cost.
[0009] The technical solution for achieving the purpose of the present application is:
[0010] A large model-based national defense mobilization potential investigation Excel document recognition method, comprising the following steps:
[0011] Excel document acquisition: acquire the Excel document to be identified;
[0012] Extracting table headers based on workflow: submit the file information and instruction description of the Excel document to be identified to the called extraction table header workflow API, set and run the language large model according to the table header extraction instruction, and obtain the Excel document table header;
[0013] Extracting data based on workflow: submit the file information and instruction description of the Excel document to be identified to the called extraction data workflow API, set and run the language large model according to the data extraction instruction, and obtain the Excel document data;
[0014] Data business operation: according to the Excel document characteristics and data, execute data business.
[0015] Compared with the prior art, the present application has the following advantages:
[0016] 1. Good adaptability: the large model intelligent recognition technology is adopted in the present application, and when the user adds and modifies the Excel document format, the document characteristics and data can still be adaptively extracted, and the business closed loop operation can be performed, so that the document format adaptability is good;
[0017] 2. Flexible development method: the workflow configuration method is adopted in the present application, which provides convenience for subsequent system optimization.
[0018] 3. Low software development cost: the present application can complete the adaptation of the processing flow of all formats of Excel documents through a set of processes, greatly reducing the program development and debugging time and reducing the software cost.
[0019] The present application will be described in further detail below in combination with the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0020] Figure 1This is the main flow chart of the Excel document recognition method for national defense mobilization potential investigation based on a large model of the present invention.
[0021] Figure 2 This is an example of an Excel document submitted to the workflow API.
[0022] Figure 3 yes Figure 1 Flowchart of the steps for extracting table headers based on the workflow.
[0023] Figure 4 This is an example of Excel document features obtained by extracting the header of a large model, in JSON format.
[0024] Figure 5 yes Figure 1 A flowchart of the steps in the workflow to extract data.
[0025] Figure 6 This is an example of Excel document data obtained by extracting large model data, in JSON format. DETAILED DESCRIPTION
[0026] like Figure 1 As shown, the present invention's Excel document recognition method for national defense mobilization potential survey based on a large model includes the following steps:
[0027] S10, Excel document acquisition: acquiring an Excel document to be identified;
[0028] When a user interacts with a business, he needs to select an object file, which is an Excel document. The format of the Excel document may be known to the system or unknown. Figure 2 Example shown.
[0029] S20, extracting the header based on the workflow: submitting the file information and instruction description of the Excel document to be identified to the called "extract header" workflow API, setting and running the language model according to the header extraction instruction, and obtaining the Excel document header;
[0030] In this process, the program calls the configured workflow for extracting headers to obtain the Excel document features, namely the headers, from the Excel document to be identified.
[0031] The workflow configuration method makes the program flow more flexible and facilitates the subsequent system optimization.
[0032] like Figure 3 As shown, the step of extracting the header based on the workflow in S20 includes:
[0033] S21, extract table header workflow API call: call the extract table header workflow API, submit Excel document file information, instruction description to the extract table header workflow API.
[0034] The file information is the file information of the Excel document to be recognized obtained in step S10;
[0035] The instruction description is an extraction instruction described in natural language, which includes the keywords "extract" and "table header";
[0036] API (Application Programming Interface) is a tool for interaction between different software systems, which defines the interaction specification between different software. API allows different applications, services or systems to share information and functions, and realizes interconnection through agreed API interface.
[0037] S22, extract instruction acquisition: according to the instruction description, comprehensive judgment, if the table header extraction instruction is obtained, jump to step S23, if the table header extraction instruction is not obtained, jump to step S26;
[0038] When the extraction instruction in the instruction description does not contain the "extract" and "table header" information keywords described in natural language, it means that the table header extraction instruction is not obtained, and jump to step S26; otherwise, it means that the table header extraction instruction is obtained, and the next step is executed, that is, step S23;
[0039] S23, large model configuration and execution: according to the table header extraction instruction, set the language large model parameters, run the language large model, and obtain the Excel document features;
[0040] After the above configuration of the large model is completed, the workflow will call the large model interface to execute the large model according to the above configuration to obtain the output result, which will return a markdown format string. The Excel document features obtained by executing the large model table header extraction are shown in the following table. Figure 4
[0041] Preferably, the language large model is deepseek-R1 large model or deepseek-V3 large model.
[0042] Preferably, the setting of language large model parameters according to the table header extraction instruction is as follows:
[0043] Please analyze the context and user input file, extract the table header under the premise of considering row and column merging, and follow the following conditions
[0044] Condition one: when a one-level table header appears during analysis, recursive analysis is performed to determine whether there is a multi-level table header;
[0045] Condition two: output in json format, format reference {"header" []};
[0046] Condition three: do not output information of non-table headers;
[0047] Condition four: do not output data in the table;
[0048] Condition five: when a multi-level table header appears, remember to place the lower-level table header under the corresponding upper-level table header node when outputting in json format;
[0049] Condition six: header represents table header field definition, name represents table header name, header2 represents two-level table header, header3 represents three-level table header, and so on.
[0050] S24, document feature format correction: check whether the Excel document feature is in JSON format. If not, convert it to JSON format; if yes, go to the next step directly;
[0051] This step is to detect whether the Excel document feature output by step S23 is in JSON format. If not, format correction is needed to convert the string to JSON format.
[0052] S25, document header output: output the document header in JSON format;
[0053] S26, end of table header extraction: end the "extract table header" workflow API call.
[0054] Set the flow end symbol in the workflow to tell the workflow that the current process has ended and needs to return to the call of S20.
[0055] S30, extract data based on workflow: submit the file information and instruction description of the Excel document to be recognized to the called data extraction workflow API, set and run the language large model according to the data extraction instruction, and obtain the Excel document data;
[0056] This process is called by the program to configure the extraction data workflow.
[0057] As shown in Figure 5 , the S30, extract data based on workflow step includes:
[0058] S31, call data extraction workflow API: call the data extraction workflow API and submit the Excel document file information and instruction description to the data extraction workflow API.
[0059] The file information is the file information of the Excel document to be identified obtained in step S10.
[0060] The instruction description is an extraction instruction described in natural language, which includes the keywords "extract" and "data".
[0061] S32, extraction instruction acquisition: according to the instruction description, comprehensive judgment, if the data extraction instruction is obtained, jump to step S33, if the data extraction instruction is not obtained, jump to step S36.
[0062] When the extraction instruction in the instruction description does not contain the "extract" and "data" information keywords described in natural language, it indicates that the data extraction instruction is not obtained, and jumps to step S36; otherwise, it indicates that the data extraction instruction is obtained, and the next step is executed, i.e., step S33.
[0063] S33, large model configuration and execution: according to the data extraction instruction, set the language large model parameters, run the language large model, and obtain the Excel document data.
[0064] After the above configuration of the large model is completed, the workflow will call the large model interface to execute the large model according to the above configuration, obtain the output result, and return a markdown-formatted string. An example of the Excel document data obtained by executing the large model header extraction is shown in the following table. Figure 6
[0065] Preferably, the language large model is a deepseek-R1 large model or a deepseek-V3 large model.
[0066] Preferably, the setting of the language large model parameters is specifically:
[0067] Please analyze the context and user input file, extract the data in the table, and follow the following conditions,
[0068] Condition one: output in json format, format reference {"data"[""]}, the length of data is the maximum length of data, do not use table header values as keys.
[0069] Condition two: the data does not include the table header and title in the document.
[0070] S34, document data format correction: check whether the Excel document data is in JSON format, if not, convert it to JSON format; if yes, directly go to the next step.
[0071] This step is to detect whether the output of the previous step S33 is in JSON format. If not, format correction is needed to convert the string into JSON format.
[0072] S35, Document data output: output the document data in JSON format;
[0073] S36, Data extraction end: end the data extraction workflow API call.
[0074] In the workflow, set the flow end symbol to tell the workflow that the current process has ended, and return to the call of S30.
[0075] S40, Data service operation: perform data services according to the Excel document features and data.
[0076] According to the Excel document features obtained in step S20, i.e., the table header as shown in Figure 4 and the data obtained in step S30 as shown in Figure 6 , perform subsequent various data service processes.
[0077] The subsequent data service processes can include one or more of the following services, such as:
[0078] 1. Standard document data collection. When the user imports a known standard document, and the database does not include the data of the current standard document, the service is called standard document data collection operation;
[0079] 2. Standard document data update. When the user imports a document, and the database already includes the data of the current standard document, the service is called standard document data update operation;
[0080] 3. Standard document data deletion. When the user imports a document, and the database already includes the data of the current standard document, and the service operation is deletion, then clear the table header and data information in the database;
[0081] 4. Unknown document reminder. When the user imports a document, and the database does not have the standard library document features, the user is reminded to identify the new document format, and a standard document format process needs to be created, and then the specific service operation is performed.
[0082] 5. Standard document data export. When the user imports a document, and the database already includes the data of the current standard document, and the service operation is export, then the system will complete the data in the database to the document, and output to the user.
Claims
1. A large-scale model-based method for recognizing Excel documents for national defense mobilization potential surveys, characterized in that: The steps include: S10, Excel document acquisition: acquiring the Excel document to be identified; S20, extracting the header based on the workflow: submitting the file information and instruction description of the Excel document to be identified to the called header extraction workflow API, setting and running the language model according to the header extraction instruction, and obtaining the Excel document header; S30, extracting data based on workflow: submitting the file information and instruction description of the Excel document to be identified to the called data extraction workflow API, setting and running the language model according to the data extraction instruction, and obtaining the Excel document data; S40, data service operation: executing data service according to the Excel document characteristics and data.
2. The Excel document recognition method according to claim 1, characterized in that: The step of extracting the header based on the workflow in S20 includes: S21, calling the table header extraction workflow API: calling the table header extraction workflow API, and submitting the Excel document file information and instruction description to the table header extraction workflow API; The file information is the file information of the Excel document to be identified; The instruction description is an extraction instruction described in natural language, and the extraction instruction includes the keywords "extraction" and "header"; S22, extract instruction acquisition: Based on the instruction description, comprehensively judge, if the header extraction instruction is obtained, jump to step S23; if the header extraction instruction is not obtained, jump to step S26; S23, large model configuration and execution: according to the header extraction instruction, set the language large model parameters, run the language large model, and obtain Excel document features; S24, document feature format correction: check whether the Excel document feature is in JSON format, if not, convert it into JSON format; if yes, go directly to the next step; S25, document header output: output document header in JSON format; S26, header extraction ends: ends the "extract header" workflow API call.
3. The Excel document recognition method according to claim 2, wherein: In the step of configuring and executing the large model in S23, the language large model is a deepseek-R1 large model or a deepseek-V3 large model.
4. The Excel document recognition method according to claim 2, characterized in that: In the step S23, configuring and executing the large model, the language large model parameters are set according to the header extraction instruction as follows: Please parse the context and user input file, extract the header while considering the merging of rows and columns, and follow the following conditions. Condition 1: When analyzing, if a first-level header appears, recursive analysis is performed to see if there are multiple levels of headers. Condition 2: Output in json format, refer to the format {"header"[]}; Condition 3: Do not output non-table header information; Condition 4: Do not output the data in the table; Condition 5: When there are multiple levels of table headers, remember to put the lower-level table headers under the corresponding upper-level table header nodes when outputting in JSON format; Condition six: header indicates the header field definition, name indicates the header name, header2 indicates the second-level header, header3 indicates the third-level header, and so on.
5. The Excel document recognition method according to claim 1, characterized in that: The step of extracting data based on the workflow in S30 includes: S31, extract data workflow API call: call the extract data workflow API, and submit Excel document file information and instruction description to the extract data workflow API; The file information is the file information of the Excel document to be identified obtained in step S10; The instruction description is an extraction instruction described in natural language, and the extraction instruction includes the keywords "extraction" and "data"; S32, extract instruction acquisition: Based on the instruction description, comprehensively judge, if the data extraction instruction is obtained, jump to step S33; if the data extraction instruction is not obtained, jump to step S36; S33, large model configuration and execution: according to the data extraction instruction, set the language large model parameters, run the language large model, and obtain Excel document data; S34, document data format correction: check whether the Excel document data is in JSON format. If not, convert it into JSON format; if yes, go directly to the next step; S35, document data output: output document data in JSON format; S36, data extraction ends: the data extraction workflow API call ends.
6. The Excel document recognition method according to claim 5, wherein: In the step of configuring and executing the large model in S33, the language large model is a deepseek-R1 large model or a deepseek-V3 large model.
7. The Excel document recognition method according to claim 5, characterized in that: The language model parameters are specifically set as follows: Please parse the context and user input file, extract the data in the table, and follow the following conditions: Condition 1: Use JSON format for output. The format is {"data"[""]}. The length of data is the maximum length of the data. Do not use the header value as the key. Condition 2: The data does not include the table headers and titles in the document.