Document data sending method and device, storage medium and electronic device
By monitoring the document directory of the application server, the target data conversion plug -in and sending plug -in converting the document data to a standardized format and sending it to the receiving end, solving the problem of low efficiency of data sending in the existing system, realized efficient and accurate data Collect and report.
Patent Information
- Application Number
- CN202411387204.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-01-24
AI Technical Summary
Existing systems have shortcomings in the efficiency of document data transmission, especially when data transmission between different systems, requiring the data provider and receiver to be deployed on the same server, limiting the interchangeable document data types and system modules. functional decoupling.
The document data obtained by obtaining the document directory of the application server is used to determine the target data conversion plug -in and data sending plug -in, convert the document data format to a standardized format, and use the target data to send the plug -in to send the standardized document data to the specified receiving end.
It realizes efficient and accurate collection and sending of documents from different sources and formats. It has the characteristics of diversified data collection, standardized conversion, and efficient reporting. It significantly improves the efficiency and accuracy of data collection and reporting, and solves the problem of document data. Sending inefficiencies.
Smart Images

Figure CN119357126A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of document data transmission, and in particular, to a document data sending method and device, a storage medium and an electronic device. Background Art
[0002] As the complexity of software system architecture continues to increase, there is a growing demand for modularization and componentization of system architecture. In this context, file exchange has become a popular data exchange mechanism that allows different modules or systems to transfer data without directly understanding each other's internal implementation. Document data such as comma-separated values (CSV) or extensible markup language (XML) can be read and written by different systems in a universal way.
[0003] However, existing systems often only support document collection and cannot achieve diversified data processing. In addition, these systems also face challenges in data transmission between different systems. For example, some systems require that data providers and data users must be deployed on the same server, which limits the types of document data that can be exchanged and cannot achieve functional decoupling of system modules, greatly affecting the efficiency of document data transmission.
[0004] With regard to the technical problem of low efficiency in sending document data in related technologies, no effective solution has been proposed yet.
[0005] Therefore, it is necessary to improve the related technology to overcome the above-mentioned defects in the related technology. Summary of the invention
[0006] The embodiments of the present application provide a method and device for sending document data, a storage medium, and an electronic device, so as to at least solve the technical problem of low efficiency in sending document data.
[0007] According to one aspect of an embodiment of the present application, a method for sending document data is provided, including: acquiring document data obtained by monitoring a document directory of an application server; determining a target data conversion plug-in corresponding to a document type of the document data from a preset data conversion plug-in, and using the target data conversion plug-in to convert a format of the document data into a standardized format to obtain standardized document data; determining a target data sending plug-in configured for the document data from a preset data sending plug-in, and using the target data sending plug-in to send the standardized document data to a receiving end configured for the document data.
[0008] In an exemplary embodiment, obtaining document data obtained by monitoring a document directory of an application server includes: obtaining a configuration file for performing document monitoring on the application server, wherein the configuration file includes at least one of the following: a directory address, a document type, a data sending protocol, and a data receiving address; for a target document directory belonging to the target address in all document directories of the application server, determining the directory address of the target document directory, the target document type of documents in the target document directory, the data sending protocol of documents in the target document directory, and the data receiving address of documents in the target document directory; generating the document data according to the directory address of the target document directory, the target document type of documents in the target document directory, the data sending protocol of documents in the target document directory, and the data receiving address of documents in the target document directory.
[0009] In an exemplary embodiment, the target data conversion plug-in is used to convert the format of the document data into a standardized format, and before obtaining the standardized document data, it includes: determining whether there is changed data in the document data; if it is determined that there is changed data in the document data, generating an exclusive access request for the changed data, and adding an exclusive lock to the changed data based on the access request; if it is determined that the format of the changed data is the standardized format, determining that the changed data has completed the format conversion, and sending the changed data to the receiving end.
[0010] In an exemplary embodiment, the presence of change data in the document data is determined in the following manner, including: determining document log data corresponding to the document data; determining the document signature and document change time corresponding to the document name of the document data from the document log data; and determining the presence of the change data when it is determined that both the document signature and the document change time have changed.
[0011] In an exemplary embodiment, the method further includes: determining a backup directory for backing up the document directory; determining the proportion of the backup disk space occupied by the backed-up document data in the backup directory; when it is determined that the occupancy proportion is greater than a preset proportion, determining the time period between the backup time of the backed-up document data and the current time; and deleting the backed-up data whose time period is greater than the preset time period from the backup disk space.
[0012] In an exemplary embodiment, the method further includes: when it is determined that the occupancy ratio is greater than a preset ratio, sorting the storage time of the backed-up document data in chronological order to obtain sorted backed-up document data; determining the saved data whose storage time is greater than the preset storage time from the sorted backed-up document data, and deleting the saved data from the backup disk space.
[0013] According to another aspect of an embodiment of the present application, a device for sending document data is also provided, including: an obtaining module, used to obtain document data obtained by monitoring a document directory of an application server; a determining module, used to determine a target data conversion plug-in corresponding to a document type of the document data from a preset data conversion plug-in, and use the target data conversion plug-in to convert the format of the document data into a standardized format to obtain standardized document data; a sending module, used to determine a target data sending plug-in configured for the document data from a preset data sending plug-in, and use the target data sending plug-in to send the standardized document data to a receiving end configured for the document data.
[0014] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned document data sending method when running.
[0015] According to another aspect of an embodiment of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the document data sending method through the computer program.
[0016] According to another aspect of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0017] Through this application, the document data obtained by monitoring the document directory of the application server is obtained; the target data conversion plug-in corresponding to the document type of the document data is determined from the preset data conversion plug-in, and the target data conversion plug-in is used to convert the format of the document data into a standardized format to obtain standardized document data; the target data sending plug-in configured for the document data is determined from the preset data sending plug-in, and the standardized document data is sent to the receiving end configured for the document data using the target data sending plug-in. That is, by converting the format of the document data obtained by monitoring and sending it to the corresponding receiving end, the documents of different sources and formats can be collected efficiently and accurately, which has the characteristics of diversified data collection, standardized conversion, and efficient reporting, and significantly improves the efficiency and accuracy of data collection and reporting, and is suitable for data collection needs in various complex environments. At the same time, it solves the coupling problem between the provider and the receiver of the document data in deployment, thereby solving the technical problem of low efficiency in sending document data, thereby improving the efficiency of sending document data. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0020] Figure 1 It is a hardware structure block diagram of a mobile terminal of a method for sending document data in an embodiment of the present application;
[0021] Figure 2 is a flowchart of a method for sending document data according to an embodiment of the present application;
[0022] Figure 3 is a flowchart of a method for sending document data according to an embodiment of the present application;
[0023] Figure 4 is a schematic diagram of a process of format conversion of document data according to an embodiment of the present application;
[0024] Figure 5 is a schematic diagram of a document data sending process according to an embodiment of the present application;
[0025] Figure 6is a schematic diagram of a document data collection and reporting architecture according to an embodiment of the present application;
[0026] Figure 7 It is a structural block diagram of a device for sending document data according to an embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only 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 should fall within the scope of protection of the present application.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 1 is a hardware structure block diagram of a mobile terminal of a method for sending document data in an embodiment of the present application. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor (Central Processing Unit, MCU) or a programmable logic device (Field Programmable Gate Array, FPGA)) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1More or fewer components as shown, or with Figure 1 Different configurations shown.
[0030] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for sending document data in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0031] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0032] In this embodiment, a method for sending document data is provided. Figure 2 is a flowchart of a method for sending document data according to an embodiment of the present application. Figure 2 As shown, the process includes the following steps:
[0033] Step S202: Acquire document data obtained by monitoring the document directory of the application server;
[0034] Exemplarily, the above-mentioned document data includes, for example, a document directory, a document type, a data transmission protocol, a data transmission path, a data receiving address, etc.
[0035] Step S204: determining a target data conversion plug-in corresponding to the document type of the document data from the preset data conversion plug-ins, and using the target data conversion plug-in to convert the format of the document data into a standardized format to obtain standardized document data;
[0036] Step S206: determining a target data sending plug-in configured for the document data from the preset data sending plug-ins, and using the target data sending plug-in to send the standardized document data to a receiving end configured for the document data.
[0037] Through the above steps, the document data obtained by monitoring the document directory of the application server is obtained; the target data conversion plug-in corresponding to the document type of the document data is determined from the preset data conversion plug-in, and the target data conversion plug-in is used to convert the format of the document data into a standardized format to obtain standardized document data; the target data sending plug-in configured for the document data is determined from the preset data sending plug-in, and the standardized document data is sent to the receiving end configured for the document data using the target data sending plug-in. That is, by converting the format of the document data obtained by monitoring and sending it to the corresponding receiving end, the documents of different sources and formats can be collected efficiently and accurately, which has the characteristics of diversified data collection, standardized conversion, and efficient reporting, and significantly improves the efficiency and accuracy of data collection and reporting, and is suitable for data collection needs in various complex environments. At the same time, the coupling problem between the provider and the receiver of the document data in deployment is solved, thereby solving the technical problem of low efficiency in sending document data, thereby improving the efficiency of sending document data.
[0038] In an exemplary embodiment, the process of obtaining document data obtained by monitoring a document directory of an application server specifically includes: obtaining a configuration file for performing document monitoring on the application server, wherein the configuration file includes at least one of the following: a directory address, a document type, a data sending protocol, and a data receiving address; for a target document directory belonging to the target address in all document directories of the application server, determining the directory address of the target document directory, the target document type of the documents in the target document directory, the data sending protocol of the documents in the target document directory, and the data receiving address of the documents in the target document directory; generating the document data according to the directory address of the target document directory, the target document type of the documents in the target document directory, the data sending protocol of the documents in the target document directory, and the data receiving address of the documents in the target document directory.
[0039] Among them, by configuring data sending protocols for different target data sending plug-ins, it is convenient for the target data sending plug-in to send document data according to the corresponding data sending protocol, thereby realizing the data transmission process of document data of various document types.
[0040] The data receiving address corresponds to the receiving end, that is, the data sending plug-in can send document data to the receiving end according to the data receiving address.
[0041] Furthermore, for multiple target document directories, document data may be independently generated for each target document directory.
[0042] In an exemplary embodiment, before using the target data conversion plug-in to convert the format of the document data into a standardized format to obtain the standardized document data, it is further possible to determine whether there is changed data in the document data; if it is determined that there is changed data in the document data, an exclusive access request for the changed data is generated, and an exclusive lock is added to the changed data based on the access request; if it is determined that the format of the changed data is the standardized format, it is determined that the changed data has completed the format conversion, and the changed data is sent to the receiving end.
[0043] It should be noted that the above-mentioned change data may be, for example, data generated when a document adding operation or a document modifying operation occurs.
[0044] In an exemplary embodiment, the presence of change data in the document data can also be determined in the following manner, including: determining document log data corresponding to the document data; determining the document signature and document change time corresponding to the document name of the document data from the document log data; and determining the presence of the change data when it is determined that both the document signature and the document change time have changed.
[0045] Optionally, when it is determined that the document signature and the document change time have not changed, it is determined that the change data does not exist in the document data.
[0046] In an exemplary embodiment, further, the following technical solution is proposed: determining a backup directory for backing up the document directory; determining the proportion of the backed-up document data in the backup disk space of the backup directory; when it is determined that the occupancy proportion is greater than a preset proportion, determining the time period between the backup time of the backed-up document data and the current time; deleting the backed-up data whose time period is greater than the preset time period from the backup disk space.
[0047] It is understandable that the backed-up document data may be sorted in order of backup time, and the backed-up document data that was backed up earlier may be deleted first.
[0048] In an exemplary embodiment, when it is determined that the occupancy ratio is greater than a preset ratio, the storage time of the backed-up document data can be sorted in order to obtain sorted backed-up document data; the saved data whose storage time is greater than the preset storage time can be determined from the sorted backed-up document data, and the saved data can be deleted from the backup disk space.
[0049] Obviously, the embodiments described above are only some embodiments of the present application, not all embodiments. In order to better understand the above method, the above process is described below in conjunction with the embodiments, but it is not intended to limit the technical solutions of the embodiments of the present application, specifically:
[0050] In an optional embodiment, the present application is combined with Figure 3 The process shown in the figure explains the process of data collection, data processing, and data reporting. The specific steps are as follows:
[0051] Step 1: Parse the configuration file.
[0052] Before executing step 1, the following process may also be included:
[0053] Determine the configuration file, wherein the directory where the document to be monitored is located (corresponding to the document directory), the document type, the reporting protocol (corresponding to the data sending protocol), the reporting path, etc. (corresponding to the data receiving address) are configured in the configuration file. The configuration items of the configuration file are shown in Table 1.
[0054] Table 1 Configuration items of the configuration file
[0055]
[0056] Step 2: Check if there are any document changes in the directory. You can monitor in real time whether there are any new or modified files in the directory. If so, proceed to step 3. Otherwise, repeat step 2.
[0057] Step 3: Try to lock the document, that is, apply for exclusive lock access to the file. If the lock is successful, continue to step 4, otherwise repeat step 3.
[0058] Step 4: Generate a document signature. When the file is successfully locked, a signature is generated based on the file content.
[0059] Step 5: Check whether the document has been processed. You can determine whether the document has been processed based on the signature generated by the document content (as well as the document name and document modification time). If it has been processed, proceed to step 8, otherwise proceed to step 6.
[0060] Step 6: Data conversion: If not processed, read the file content and call the data conversion module to standardize the format of the document data.
[0061] Step 7: Data reporting: Call the data reporting module to report the standardized data to the specified system according to the reporting path of the configuration file.
[0062] Furthermore, the file name, file signature, and file modification time of the processed document data may be recorded in a designated log file for use in the judgment in step 3.
[0063] Step 8: Check whether the backup directory exceeds the limit. You can determine whether the monitoring directory has reached the limit based on the backup directory disk size limit in the configuration file.
[0064] Step 9: Process the source document.
[0065] When the backup directory disk reaches the limit, files are deleted in ascending order of modification time until the limit is met.
[0066] Alternatively, based on the document retention limit in the configuration file, delete the documents that meet the following conditions in ascending order of file modification time t.
[0067] t<t now -t backupMaxHistory Among them, t now represents the current time, t backupMaxHistory Indicates the history saving time.
[0068] In an optional embodiment, the present application is combined with Figure 4 The process shown in the figure explains the format conversion process of document data. The specific steps are as follows:
[0069] Step 1: Parse the configuration file. Specifically, read the document type configured in the configuration file to facilitate the use of the corresponding data conversion plug-in to process data according to the document type.
[0070] Step 2: Determine whether there is a data conversion plug-in corresponding to the document type. If yes, execute step 3, otherwise terminate the conversion.
[0071] Step 3: Extract document data according to the protocol. The data conversion plug-in can parse the corresponding document according to the reporting protocol shown in Table 2 and extract data.
[0072] Table 2 Data reporting protocol
[0073] Fields type default value Remark protocol string https Reporting Agreement address string Not empty Reporting address
[0074] In an optional embodiment, the present application is combined with Figure 5 The process shown in the figure explains the format conversion process of document data. The specific steps are as follows:
[0075] Step 1: Parse the configuration file. Read the reporting address and reporting protocol configured in the configuration file.
[0076] Step 2: Determine whether there is a data conversion plug-in corresponding to the document type. If yes, execute step 3, otherwise terminate the conversion.
[0077] Step 3: Report data. Use the corresponding reporting plug-in (corresponding to the data transmission protocol) according to the protocol type to report the data obtained in step 2 to the receiving end specified by the reporting address.
[0078] Step 4: Record the reported information.
[0079] For a better understanding, the following combination Figure 6 The architecture of the data collection and transmission process is described in detail: Figure 6 As shown, the application server (i.e. Figure 6 The collect-agent-server includes an independent data collection module (corresponding to the process of monitoring the document directory of the application server), a data conversion module (corresponding to the process of using the target data conversion plug-in to convert the format of the document data into a standardized format to obtain standardized document data), a data reporting module (corresponding to the process of using the target data sending plug-in to send the standardized document data to the receiving end configured for the document data) and a client ( Figure 6 The collect-agent-client in the above module is the receiving end. Each module supports adding and updating modules in the form of plug-ins. Specifically, the collect-agent-server first faces different documents (such as Figure 6 The document 1-3) in the configuration analysis, data collection, and data conversion process are then performed, and the converted document data is then reported to the client.
[0080] Furthermore, the data collection module supports the collection of multiple types of document data, and provides an extended interface to support personalized document data collection processing, while supporting simultaneous monitoring of multiple document directories of the application server, parallel data collection, and also supports backup after document data collection.
[0081] The data conversion module can convert the collected documents in different formats into a standard format for easy subsequent processing, and can also support hot data updates in the form of plug-ins.
[0082] The data reporting module can use the preset network protocols (such as HTTP, HTTPS, MQTT, etc.) to report data to multiple target systems in real time to ensure the efficiency and reliability of data transmission. At the same time, hot updates can be supported by using plug-ins.
[0083] Through the above embodiments, the present application utilizes the data acquisition module, the data conversion module and the data reporting module to achieve the advantages of diversified data acquisition, standardized conversion, efficient reporting, etc. By integrating the data acquisition module, the data conversion module and the data reporting module, documents from different sources and formats can be efficiently and accurately collected, and the data can be reported to multiple target systems in real time through a preset network protocol, which simplifies the system integration process, can significantly improve the efficiency and accuracy of data acquisition and reporting, and thereby improve the efficiency of data transmission.
[0084] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment 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, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0085] In the present embodiment, a device for sending document data is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0086] Figure 7 : is a structural block diagram of a device for sending document data according to an embodiment of the present application, the device comprising:
[0087] An obtaining module 72 is used to obtain document data obtained by monitoring the document directory of the application server;
[0088] A determination module 74, configured to determine a target data conversion plug-in corresponding to the document type of the document data from the preset data conversion plug-ins, and use the target data conversion plug-in to convert the format of the document data into a standardized format to obtain standardized document data;
[0089] The sending module 76 is used to determine a target data sending plug-in configured for the document data from the preset data sending plug-ins, and use the target data sending plug-in to send the standardized document data to a receiving end configured for the document data.
[0090] Through the above device, the document data obtained by monitoring the document directory of the application server is obtained; the target data conversion plug-in corresponding to the document type of the document data is determined from the preset data conversion plug-in, and the target data conversion plug-in is used to convert the format of the document data into a standardized format to obtain standardized document data; the target data sending plug-in configured for the document data is determined from the preset data sending plug-in, and the standardized document data is sent to the receiving end configured for the document data using the target data sending plug-in. That is, by converting the format of the document data obtained by monitoring and sending it to the corresponding receiving end, the documents of different sources and formats can be collected efficiently and accurately, which has the characteristics of diversified data collection, standardized conversion, and efficient reporting, and significantly improves the efficiency and accuracy of data collection and reporting, and is suitable for data collection needs in various complex environments. At the same time, the coupling problem between the provider and the receiver of the document data in deployment is solved, thereby solving the technical problem of low efficiency in sending document data, thereby improving the efficiency of sending document data.
[0091] In an exemplary embodiment, module 72 is obtained and is also used to: obtain a configuration file for document monitoring of the application server, wherein the configuration file includes at least one of the following: a directory address, a document type, a data sending protocol, and a data receiving address; for a target document directory belonging to the target address in all document directories of the application server, determine the directory address of the target document directory, the target document type of the documents in the target document directory, the data sending protocol of the documents in the target document directory, and the data receiving address of the documents in the target document directory; generate the document data according to the directory address of the target document directory, the target document type of the documents in the target document directory, the data sending protocol of the documents in the target document directory, and the data receiving address of the documents in the target document directory.
[0092] In an exemplary embodiment, the determination module 74 is also used to use the target data conversion plug-in to convert the format of the document data into a standardized format, before obtaining the standardized document data: determine whether there is change data in the document data; if it is determined that there is change data in the document data, generate an exclusive access request for the change data, and add an exclusive lock to the change data based on the access request; if it is determined that the format of the change data is the standardized format, determine that the change data has completed the format conversion, and send the change data to the receiving end.
[0093] In an exemplary embodiment, the determination module 74 is also used to determine whether there is change data in the document data in the following manner, including: determining document log data corresponding to the document data; determining the document signature and document change time corresponding to the document name of the document data from the document log data; and determining that the change data exists when it is determined that both the document signature and the document change time have changed.
[0094] In an exemplary embodiment, the determination module 74 is also used to: determine a backup directory for backing up the document directory; determine the proportion of the backed-up document data in the backup disk space of the backup directory; when it is determined that the occupancy proportion is greater than a preset proportion, determine the time period between the backup time of the backed-up document data and the current time; and delete the backed-up data whose time period is greater than the preset time period from the backup disk space.
[0095] In an exemplary embodiment, the determination module 74 is also used to: when it is determined that the occupancy ratio is greater than a preset ratio, sort the storage time of the backed up document data in order to obtain sorted backed up document data; determine the saved data whose storage time is greater than the preset storage time from the sorted backed up document data, and delete the saved data from the backup disk space.
[0096] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0097] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:
[0098] S1, obtaining document data obtained by monitoring the document directory of the application server;
[0099] S2, determining a target data conversion plug-in corresponding to the document type of the document data from the preset data conversion plug-ins, and using the target data conversion plug-in to convert the format of the document data into a standardized format to obtain standardized document data;
[0100] S3, determining a target data sending plug-in configured for the document data from preset data sending plug-ins, and using the target data sending plug-in to send the standardized document data to a receiving end configured for the document data.
[0101] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0102] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0103] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0104] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0105] S1, obtaining document data obtained by monitoring the document directory of the application server;
[0106] S2, determining a target data conversion plug-in corresponding to the document type of the document data from the preset data conversion plug-ins, and using the target data conversion plug-in to convert the format of the document data into a standardized format to obtain standardized document data;
[0107] S3, determining a target data sending plug-in configured for the document data from preset data sending plug-ins, and using the target data sending plug-in to send the standardized document data to a receiving end configured for the document data.
[0108] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0109] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0110] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0111] An embodiment of the present application also provides a computer program, which includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in any one of the above method embodiments.
[0112] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0113] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0114] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for sending document data, characterized in that: include: Obtain document data obtained by monitoring the document directory of the application server; Determine a target data conversion plug-in corresponding to the document type of the document data from the preset data conversion plug-ins, and use the target data conversion plug-in to convert the format of the document data into a standardized format to obtain standardized document data; A target data sending plug-in configured for the document data is determined from preset data sending plug-ins, and the standardized document data is sent to a receiving end configured for the document data using the target data sending plug-in.
2. The method according to claim 1, characterized in that Obtain document data obtained by monitoring the document directory of the application server, including: Obtaining a configuration file for performing document monitoring on the application server, wherein the configuration file includes at least one of the following: a directory address, a document type, a data transmission protocol, and a data receiving address; for a target document directory belonging to the target address in all document directories of the application server, determining the directory address of the target document directory, the target document type of the document in the target document directory, the data transmission protocol of the document in the target document directory, and the data receiving address of the document in the target document directory; The document data is generated according to the directory address of the target document directory, the target document type of the documents in the target document directory, the data sending protocol of the documents in the target document directory, and the data receiving address of the documents in the target document directory.
3. The method according to claim 1, characterized in that The target data conversion plug-in is used to convert the format of the document data into a standardized format, and before obtaining the standardized document data, the method includes: Determining whether there is changed data in the document data; If it is determined that the document data contains changed data, generating an access request for exclusive use of the changed data, and adding an exclusive lock to the changed data based on the access request; In the case where it is determined that the format of the changed data is the standardized format, it is determined that the format conversion of the changed data has been completed, and the changed data is sent to the receiving end.
4. The method according to claim 3, characterized in that Determining whether the document data contains changed data by: Determining document log data corresponding to the document data; Determining a document signature and a document change time corresponding to a document name of the document data from the document log data; When it is determined that both the document signature and the document change time have changed, it is determined that the change data exists.
5. The method according to claim 4, characterized in that The method further comprises: Determining a backup directory for backing up the document directory; Determining the proportion of the backed-up document data in the backup disk space of the backup directory; If it is determined that the occupancy ratio is greater than a preset ratio, determining a time period between the backup time and the current time of the backed-up document data; The backed up data whose time period is greater than the preset time period is deleted from the backup disk space.
6. The method according to claim 5, characterized in that The method further comprises: When it is determined that the occupancy ratio is greater than a preset ratio, the storage time of the backed-up document data is sorted in order to obtain sorted backed-up document data; The saved data whose saving time is greater than the preset saving time is determined from the sorted backed-up document data, and the saved data is deleted from the backup disk space.
7. A device for sending document data, characterized in that: include: The obtaining module is used to obtain the document data obtained by monitoring the document directory of the application server; a determination module, configured to determine a target data conversion plug-in corresponding to the document type of the document data from preset data conversion plug-ins, and use the target data conversion plug-in to convert the format of the document data into a standardized format to obtain standardized document data; The sending module is used to determine a target data sending plug-in configured for the document data from a preset data sending plug-in, and use the target data sending plug-in to send the standardized document data to a receiving end configured for the document data.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method according to any one of claims 1 to 6 when executed.
9. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 6 through the computer program.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Data format conversion method and device based on dynamic lazy loading, equipment and medium
CN119996510A