CN-121996616-A - Cloud document processing method and device, electronic equipment and storage medium
Abstract
The application relates to a cloud document processing method, a cloud document processing device, electronic equipment and a storage medium, wherein the cloud document processing method comprises the steps of generating a request object for calling a cloud document based on a preset application account number, password information and a cloud document identifier to be processed, acquiring metadata of the cloud document according to the request object, judging whether the metadata meets preset cloud document processing conditions, processing the metadata by using a preset script file if the metadata meets the preset cloud document processing conditions so as to extract field information and record data of the metadata, creating a corresponding data table in a preset database according to the field information, and writing the record data into the data table to obtain a final processing result of the cloud document. Therefore, the problems that detailed data processing is difficult to be carried out on the cloud document, the data is difficult to store at a database end after being acquired, automatic acquisition or processing of relevant metadata content of the cloud document is lacking, specific processing is difficult to be carried out on the data in the database, and the data are difficult to be displayed in a corresponding chart and the like are solved.
Inventors
- Meng Shaochen
- Yi Zhilei
- TAI XIANG
- CHEN FEI
- LI JIANCAI
Assignees
- 奇瑞汽车股份有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20260109
Claims (10)
- 1. The cloud document processing method is characterized by comprising the following steps of: Generating a request object for calling the cloud document based on a preset application account number, password information and a cloud document identifier to be processed; acquiring metadata of the cloud document according to the request object, and judging whether the metadata meets preset cloud document processing conditions or not; And if the metadata meets the preset cloud document processing conditions, processing the metadata by using a preset script file to extract field information and record data of the metadata, creating a corresponding data table in a preset database according to the field information, and writing the record data into the data table to obtain a final processing result of the cloud document.
- 2. The method of claim 1, wherein the obtaining metadata of the cloud document from the request object comprises: Calling an Application Programming Interface (API) provided by a cloud document platform by using the request object; and acquiring metadata of the cloud document according to the application programming interface API.
- 3. The method of claim 1, wherein the processing the metadata using a preset script to extract field information and record data of the metadata comprises: Analyzing the fields in the metadata to extract the field names and the field types of the fields in the metadata to obtain the field information; And analyzing the record condition in the metadata to extract the value of each record in the metadata under each field so as to obtain the record data.
- 4. The method according to claim 1, further comprising, after writing the record data into the data table to obtain a final processing result of the cloud document: based on the final processing result of the cloud document, invoking a Structured Query Language (SQL) to query and aggregate the data in the database so as to obtain the processed data; and connecting the database through a visualization platform so as to carry out visual display on the processed data.
- 5. The method as recited in claim 1, further comprising: Creating a pipeline by using a preset integration tool; Integrating the preset script file into the pipeline, and executing the preset script file through the pipeline according to a preset time interval to update the data of the cloud document.
- 6. A cloud document processing apparatus, comprising: The generation module is used for generating a request object for calling the cloud document based on a preset application account number, password information and a cloud document identifier to be processed; The judging module is used for acquiring metadata of the cloud document according to the request object and judging whether the metadata meets the preset cloud document processing condition or not; And the processing module is used for processing the metadata by using a preset script file under the condition that the metadata meets the preset cloud document processing conditions so as to extract field information and record data of the metadata, creating a corresponding data table in a preset database according to the field information, and writing the record data into the data table to obtain a final processing result of the cloud document.
- 7. The apparatus of claim 6, wherein the determining module comprises: The calling unit is used for calling an application programming interface API provided by the cloud document platform by using the request object; And the acquisition unit is used for acquiring the metadata of the cloud document according to the application programming interface API.
- 8. The apparatus of claim 6, wherein the processing module comprises: The analyzing unit is used for analyzing the fields in the metadata to extract the field names and the field types of the fields in the metadata so as to obtain the field information; And the extraction unit is used for analyzing the record condition in the metadata so as to extract the value of each record in the metadata under each field and obtain the record data.
- 9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor executing the program to implement the method of processing a cloud document according to any of claims 1-5.
- 10. A computer-readable storage medium, on which a computer program is stored, characterized in that the program is executed by a processor for realizing the method of processing a cloud document according to any of claims 1-5.
Description
Cloud document processing method and device, electronic equipment and storage medium Technical Field The present application relates to the field of cloud document processing technologies, and in particular, to a method and an apparatus for processing a cloud document, an electronic device, and a storage medium. Background With the increasing level of offices, the processing of documents is becoming one of the important tasks of offices. Cloud documents are an effective form of currently shared files, and are important tools for realizing convenient management of file library contents. The fly book is used as office software commonly used by enterprise companies, and a platform cloud document system is provided, so that the practical effect is convenient. Many corporate employees use the cloud documents for data storage management. In the related art, when data in a corresponding cloud document is to be extracted to save a local address or uploaded to a database, manual operation is mostly adopted according to a flybook platform. However, the related technology is difficult to perform detailed data processing on the cloud document, is difficult to realize verification of account number and password information of application adopted by a specific enterprise application APP, is difficult to store in a database end after the related technology acquires data, lacks automatic acquisition or processing of related metadata content of the cloud document, is difficult to perform specific processing on the data in the database and display the data in a corresponding chart, and needs to be improved. Disclosure of Invention The application provides a cloud document processing method, a cloud document processing device, electronic equipment and a storage medium, which are used for solving the problems that the cloud document is difficult to process detailed data in the related technology, the verification of account and password information of application adopted by a specific enterprise application APP is difficult to realize, the data is difficult to store in a database end after the related technology acquires the data, the automatic acquisition or processing of related metadata content of the cloud document is lacking, the data in the database is difficult to process specifically and display in a corresponding chart and the like. The embodiment of the first aspect of the application provides a cloud document processing method, which comprises the following steps of generating a request object for calling a cloud document based on a preset application account number, password information and a cloud document identifier to be processed, acquiring metadata of the cloud document according to the request object, judging whether the metadata meets preset cloud document processing conditions, if so, processing the metadata by using a preset script file to extract field information and record data of the metadata, creating a corresponding data table in a preset database according to the field information, and writing the record data into the data table to obtain a final processing result of the cloud document. Optionally, in one embodiment of the present application, the obtaining metadata of the cloud document according to the request object includes calling an application programming interface API provided by a cloud document platform by using the request object, and obtaining metadata of the cloud document according to the application programming interface API. Optionally, in one embodiment of the present application, the processing the metadata by using a preset script to extract field information and record data of the metadata includes parsing fields in the metadata to extract field names and field types of each field in the metadata to obtain the field information, and parsing record conditions in the metadata to extract values of each record in the metadata under each field to obtain the record data. Optionally, in one embodiment of the present application, after writing the record data into the data table to obtain a final processing result of the cloud document, the method further includes calling a structured query language SQL to query and aggregate the data in the database based on the final processing result of the cloud document to obtain processed data, and connecting the database through a visualization platform to visually display the processed data. Optionally, in one embodiment of the present application, the method further comprises creating a pipeline by using a preset integration tool, and integrating the preset script file into the pipeline to execute the preset script file through the pipeline according to a preset time interval so as to update the data of the cloud document. The embodiment of the second aspect of the application provides a cloud document processing device, which comprises a generation module, a judgment module and a processing module, wherein the generation module is used for gene