CN109871354B - File processing method and device - Google Patents
File processing method and device Download PDFInfo
- Publication number
- CN109871354B CN109871354B CN201910039246.2A CN201910039246A CN109871354B CN 109871354 B CN109871354 B CN 109871354B CN 201910039246 A CN201910039246 A CN 201910039246A CN 109871354 B CN109871354 B CN 109871354B
- Authority
- CN
- China
- Prior art keywords
- file
- sent
- algorithm
- algorithms
- transmitted
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention relates to the field of data processing, and provides a method and a device for processing files. A method of file processing comprising: when the type of file processing is determined to be a transmission file, generating a file identifier to be transmitted, wherein the file identifier to be transmitted is used for indicating the type and the format of the file to be transmitted; inquiring a first file generation algorithm corresponding to the type of the file to be transmitted and the format of the file to be transmitted, which are indicated by the file identification to be transmitted, in an algorithm library of a file unified interface, wherein N file generation algorithms are arranged in the algorithm library of the file unified interface, and N is a positive integer; invoking the first generated file algorithm to process the client data to obtain a file to be sent, wherein the client data is acquired from a database by a terminal; uploading the file to be sent to a first server corresponding to the terminal; and sending the file to be sent to a second server corresponding to the bank end through the first server corresponding to the terminal. The technical scheme of the embodiment of the invention ensures that the file processing process is simple and resources are saved.
Description
Technical Field
The invention relates to the field of data processing, in particular to a method and a device for processing files.
Background
At present, along with the gradual and close cooperation between a loan company and a bank, document processing also becomes an important link, in a joint loan mode, the loan company and the bank provide loans for individuals or enterprises together, and documents of interaction between the loan company and the bank are of various types, such as application documents when a client loans, and repayment documents when the client repays.
When a loan company sends a file to a bank, the file generating interface needs to be called, and different file generating interfaces need to be called according to different file types and formats.
Disclosure of Invention
The embodiment of the invention provides a method and a device for processing files, which are used for simplifying the file processing process and saving resources.
The first aspect of the present invention provides a method for processing a file, including:
when the type of file processing is determined to be a transmission file, generating a file identifier to be transmitted, wherein the file identifier to be transmitted is used for indicating the type and the format of the file to be transmitted;
inquiring a first file generation algorithm corresponding to the type of the file to be transmitted and the format of the file to be transmitted, which are indicated by the file identification to be transmitted, in an algorithm library of a file unified interface, wherein N file generation algorithms are arranged in the algorithm library of the file unified interface, and N is a positive integer;
invoking the first generated file algorithm to process the client data to obtain a file to be sent, wherein the client data is acquired from a database by a terminal;
uploading the file to be sent to a first server corresponding to the terminal;
and sending the file to be sent to a second server corresponding to the bank end through the first server corresponding to the terminal.
The second aspect of the present invention provides a terminal for file processing, including:
the generating module is used for generating a file identifier to be transmitted when the type of file processing is determined to be a transmitted file, wherein the file identifier to be transmitted is used for indicating the type and the format of the file to be transmitted;
the query module is used for querying a first file generation algorithm corresponding to the file type to be transmitted and the file format to be transmitted, which are indicated by the file identification to be transmitted, in an algorithm library of a file unified interface, wherein N file generation algorithms are arranged in the algorithm library of the file unified interface, and N is a positive integer;
the processing module is used for calling the first file generation algorithm to process the client data to obtain a file to be sent, wherein the client data is acquired from a database by the terminal;
the uploading module is used for uploading the file to be sent to a first server corresponding to the terminal;
and the sending module is used for sending the file to be sent to a second server corresponding to the bank end through a first server corresponding to the terminal.
A third aspect of the present invention provides a terminal for file processing, the terminal comprising a processor, a memory, a communication interface and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing any of the embodiments described above.
A fourth aspect of the present invention provides a computer readable storage medium storing a computer program for execution by the processor to implement any one of the embodiments described above.
It can be seen that the present invention provides a method and an apparatus for processing a file, by the above technical solution, when a file needs to be sent, an algorithm library of a file unified interface is accessed, a first file generation algorithm is queried among multiple file generation algorithms in the algorithm library of the file unified interface, the first file generation algorithm is invoked to process client data to obtain a file to be sent, when a file needs to be received, the algorithm library of the file unified interface is also accessed, a first downloading file algorithm is queried among multiple downloading file algorithms in the algorithm library of the file unified interface, and the first downloading file algorithm is invoked to download the file to be received from a server corresponding to a terminal. When the files are sent and received, only the algorithm library of the unified interface of the files is required to be accessed, and for the files with different types and formats, the algorithm library of the unified interface of the files is provided with algorithms corresponding to the files with different types and formats, so that the file processing process is simple and resources are saved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are required to be used in the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a file processing method according to a first embodiment of the present invention;
FIG. 2 is a detailed schematic diagram of a step of querying a first generated file algorithm in a file processing method according to a second embodiment of the present invention;
FIG. 3 is a detailed schematic diagram illustrating steps of acquiring a first generated file algorithm in a file processing method according to a third embodiment of the present invention;
FIG. 4 is a schematic diagram of a file processing method according to a fourth embodiment of the present invention;
FIG. 5 is a schematic diagram of a file processing method according to a fifth embodiment of the present invention;
FIG. 6 is a schematic diagram of a file processing method according to a sixth embodiment of the present invention;
FIG. 7 is a detailed schematic diagram of a step of querying a first download file algorithm in a file processing method according to a seventh embodiment of the present invention;
fig. 8 is a schematic diagram of a file processing terminal according to an embodiment of the present invention;
fig. 9 is a schematic diagram of a terminal structure of a hardware running environment according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a method and a device for processing files, which aim to simplify the file interaction process and save resources.
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
The following will describe in detail.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims and drawings are used for distinguishing between different objects and not necessarily for describing a particular sequential or chronological order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
Referring first to fig. 1, fig. 1 is a schematic diagram of a file processing method according to a first embodiment of the present invention. As shown in fig. 1, the file processing method provided in the first embodiment of the present invention may include:
10. when the type of file processing is determined to be a file to be sent, the terminal generates a file identifier to be sent, wherein the file identifier to be sent is used for indicating the type and the format of the file to be sent.
The terminal may be, for example, a mobile phone, a tablet computer, a notebook computer, a palm computer, a mobile internet device, a wearable device, or other types of terminals.
Wherein the type of file processing includes sending a file or receiving a file.
For example, when the type of the file processing is a transmission file, the terminal generates a file identifier to be transmitted according to the type of the file to be transmitted and the format of the file to be transmitted. The file types to be sent can be client files, application files, repayment plan files, repayment confirmation files and the like, wherein the client files comprise information such as client names, sexes, contact ways, identification card numbers, working units, working addresses and the like, the application files comprise information submitted when the clients apply for loans, the repayment plan files comprise information such as repayment deadlines and money, the repayment confirmation files comprise confirmation information after repayment of the clients, the file formats to be sent can be file bodies only, file heads and file bodies, file tails and file bodies, and file heads, file tails and file bodies.
20. The terminal inquires a first file generation algorithm corresponding to the type of the file to be transmitted and the file format to be transmitted indicated by the file identification to be transmitted in an algorithm library of a file unified interface, wherein N file generation algorithms exist in the algorithm library of the file unified interface, and N is a positive integer.
For example, the terminal queries a first generated file algorithm corresponding to the type of the file to be sent and the file format to be sent indicated by the file to be sent in an algorithm library of the file unified interface, and the first generated file algorithm is used for processing the client data to obtain the file meeting the type of the file to be sent and the file format to be sent. The first file generation algorithm belongs to the N file generation algorithms, different file generation algorithms can correspond to different file types to be transmitted and file formats to be transmitted, or part of file generation algorithms correspond to the same file types to be transmitted and file formats to be transmitted, but different file generation algorithms have different time complexity or space complexity.
30. And the terminal invokes the first file generation algorithm to process the client data to obtain a file to be sent, wherein the client data is acquired from a database by the terminal.
For example, when the terminal is to send a client file, the terminal obtains client data from a database, the client data comprises a client name, a gender, a contact way, an identity card number, a work unit, a work address and the like, and the terminal invokes a first generation file algorithm corresponding to the identification of the file to be sent to process the client data so as to obtain the client file to be sent.
40. And the terminal uploads the file to be sent to a first server corresponding to the terminal.
50. And the terminal sends the file to be sent to a second server corresponding to the bank end through a first server corresponding to the terminal.
Further, referring to fig. 2, a second embodiment of the present invention is proposed based on the first embodiment of the present invention.
In this embodiment, the step 20 includes:
21. and the terminal accesses the N file generation algorithms in the algorithm library of the file unified interface.
The algorithm library of the file unified interface has N generated file algorithms, wherein different generated file algorithms can correspond to different types of files to be transmitted and file formats to be transmitted, or partial generated file algorithms can correspond to the same types of files to be transmitted and file formats to be transmitted, but the time complexity or the space complexity of different generated file algorithms are different.
22. And the terminal extracts keywords used for indicating the type of the file to be sent from the file identifier to be sent.
The file types to be sent can be client files, application files, repayment plan files, repayment confirmation files and the like, wherein the client files comprise information such as client names, sexes, contact ways, identification card numbers, working units and working addresses, the application files comprise information submitted when the clients apply for loans, the repayment plan files comprise information such as repayment deadlines and money, and the repayment confirmation files comprise confirmation information after repayment of the clients.
23. And the terminal acquires M types of file generation algorithms matched with the keywords for indicating the file types to be sent from the N types of file generation algorithms, wherein M is a positive integer smaller than N.
The types of the files to be sent corresponding to the M types of the generated file algorithms meet the types of the files to be sent indicated by the files to be sent identification, the formats of the files to be sent corresponding to the M types of the generated file algorithms can be different, the formats of the files to be sent corresponding to part of the generated file algorithms can be the same, but the time complexity or the space complexity of different generated file algorithms is different.
24. And the terminal extracts keywords used for indicating the format of the file to be sent from the file to be sent identifier.
The file format to be sent may be only a file body, or may be a file head and a file body, or may be a file tail and a file body, or may be a file head, a file tail and a file body.
25. And the terminal acquires the first file generation algorithm matched with the keyword for indicating the file format to be transmitted from the M file generation algorithms.
The file type to be sent and the file format to be sent, which correspond to the first file generation algorithm, meet the file type to be sent and the file format to be sent, which are indicated by the file identification to be sent.
Further, referring to fig. 3, a third embodiment of the present invention is proposed based on the second embodiment of the present invention.
In this embodiment, the step 25 includes:
251. and the terminal acquires I types of generated file algorithms matched with the keywords used for indicating the file formats to be sent from the M types of generated file algorithms, wherein I is a positive integer smaller than M.
The type of the file to be transmitted and the format of the file to be transmitted, which correspond to the I type of the file to be generated algorithm, meet the type of the file to be transmitted and the format of the file to be transmitted, which are indicated by the identification of the file to be transmitted, but the time complexity or the space complexity of the I type of the file to be generated algorithm are different.
252. And the terminal inquires the time complexity or the space complexity respectively corresponding to the I generation file algorithms.
The evaluation of the algorithm is mainly considered from the time complexity and the space complexity, wherein the time complexity refers to the calculation workload required by executing the algorithm, and the space complexity refers to the memory space required by the algorithm.
253. And the terminal selects an algorithm with the minimum time complexity or the minimum space complexity in the I file generation algorithms as the first file generation algorithm.
Further, referring to fig. 4, a fourth embodiment of the present invention is proposed based on the third embodiment of the present invention.
In this embodiment, the step 20 includes:
201. and the terminal stores the keyword used for indicating the type of the file to be sent in the file to be sent identifier and the keyword used for indicating the format of the file to be sent in the file to be sent identifier in a cache queue of the terminal.
The file types to be sent can be client files, application files, repayment plan files, repayment confirmation files and the like, wherein the client files comprise information such as client names, sexes, contact ways, identification card numbers, working units, working addresses and the like, the application files comprise information submitted when the clients apply for loans, the repayment plan files comprise information such as repayment deadlines and money, the repayment confirmation files comprise confirmation information after repayment of the clients, the file formats to be sent can be file bodies only, file heads and file bodies, file tails and file bodies, and file heads, file tails and file bodies.
202. And the terminal stores the first generated file algorithm in a cache queue of the terminal.
The file type to be sent and the file format to be sent, which correspond to the first file generation algorithm, meet the file type to be sent and the file format to be sent, which are indicated by the file identification to be sent.
203. The terminal sets the keyword for indicating the type of the file to be sent and the keyword for indicating the format of the file to be sent as index conditions of the first file generation algorithm.
For example, after the terminal generates the file identifier to be transmitted, extracting a keyword for indicating the type of the file to be transmitted and a keyword for indicating the format of the file to be transmitted from the file identifier to be transmitted, and searching whether data matched with the keyword for indicating the type of the file to be transmitted and the keyword for indicating the format of the file to be transmitted exist in the buffer queue by the terminal, if so, acquiring a first generated file algorithm from the buffer queue by the terminal according to the index relation.
Optionally, the terminal sets a time parameter T, and records a time length ta stored in the buffer queue by the first generated file algorithm, and when ta > T, deletes the first generated file algorithm stored in the buffer queue, the keyword used for indicating the type of the file to be sent in the file to be sent identifier, and the keyword used for indicating the format of the file to be sent in the file to be sent identifier.
Further, referring to fig. 5, a fifth embodiment of the present invention is proposed based on any one of the first to fourth embodiments of the present invention.
In this embodiment, the step 30 includes:
31. the terminal inquires a file encryption algorithm for encrypting the file to be sent in an algorithm library of the file unified interface, wherein the file encryption algorithm comprises any one of a symmetric encryption algorithm, an asymmetric encryption algorithm, a message digest algorithm and a hash algorithm.
32. And the terminal calls the file encryption algorithm to encrypt the file to be sent.
When determining that the type of file processing is to receive a file, referring to fig. 6, fig. 6 is a schematic diagram of a file processing method according to a sixth embodiment of the present invention.
As shown in fig. 6, the file processing method provided in the sixth embodiment of the present invention may include:
60. when the type of the file processing is determined to be a received file, the terminal identifies a file identifier to be received, wherein the file identifier to be received is used for indicating the type and the format of the file to be received.
The terminal may be, for example, a mobile phone, a tablet computer, a notebook computer, a palm computer, a mobile internet device, a wearable device, or other types of terminals.
The file types to be sent can be client files, application files, repayment plan files, repayment confirmation files and the like, wherein the client files comprise information such as client names, sexes, contact ways, identification card numbers, working units, working addresses and the like, the application files comprise information submitted when the clients apply for loans, the repayment plan files comprise information such as repayment deadlines and money, the repayment confirmation files comprise confirmation information after repayment of the clients, the file formats to be sent can be file bodies only, file heads and file bodies, file tails and file bodies, and file heads, file tails and file bodies.
70. The terminal inquires a first downloading file algorithm corresponding to the type of the file to be sent and the format of the file to be sent, indicated by the file identification to be received, in an algorithm library of the file unified interface, wherein X downloading file algorithms exist in the algorithm library of the file unified interface, and X is a positive integer.
For example, the terminal queries a first downloading file algorithm corresponding to the type of the file to be sent and the format of the file to be sent indicated by the file to be received in an algorithm library of the file unified interface, where the first downloading file algorithm is used for downloading the file to be received from the first server. The first downloading file algorithm belongs to the X downloading file algorithms, different downloading file algorithms can correspond to different file types to be received and file formats to be received, or partial downloading file algorithms can correspond to the same file types to be received and file formats to be received, but different downloading file algorithms have different time complexity or space complexity.
80. And the terminal invokes the first downloading file algorithm to download the file to be received from a first server corresponding to the terminal.
Further, referring to fig. 7, a seventh embodiment of the present invention is proposed based on a sixth embodiment of the present invention.
In this embodiment, the step 70 includes:
71. and the terminal accesses the X download file algorithms in the algorithm library of the file unified interface.
The algorithm library of the file unified interface has X download file algorithms, wherein different download file algorithms can correspond to different file types to be received and file formats to be received, and partial download file algorithms can correspond to the same file types to be received and file formats to be received, but the time complexity or the space complexity of different download file algorithms are different.
72. And the terminal extracts keywords used for indicating the type of the file to be received from the file to be received identifier.
The file types to be sent can be client files, application files, repayment plan files, repayment confirmation files and the like, wherein the client files comprise information such as client names, sexes, contact ways, identification card numbers, working units and working addresses, the application files comprise information submitted when the clients apply for loans, the repayment plan files comprise information such as repayment deadlines and money, and the repayment confirmation files comprise confirmation information after repayment of the clients.
73. And the terminal acquires Y download file algorithms matched with the keywords used for indicating the file types to be received from the X download file algorithms, wherein Y is a positive integer smaller than X.
The types of files to be received corresponding to the Y download file algorithms satisfy the types of files to be received indicated by the file to be received identifiers, the formats of files to be received corresponding to the Y download file algorithms may all be different, or some of the Y download file algorithms may have the same format of files to be received corresponding to some algorithms, but different download file algorithms have different time complexity or space complexity.
74. And the terminal extracts keywords used for indicating the file format to be received from the file identifier to be received.
The file format to be sent may be only a file body, or may be a file head and a file body, or may be a file tail and a file body, or may be a file head, a file tail and a file body.
75. And the terminal acquires the first downloading file algorithm matched with the keyword for indicating the file format to be received from the Y downloading file algorithms.
The file type to be received and the file format to be received corresponding to the first downloading file algorithm meet the file type to be received and the file format to be received indicated by the file identification to be received.
Optionally, the terminal stores the keyword used for indicating the type of the file to be received in the file to be received identifier and the keyword used for indicating the format of the file to be received in the file to be received identifier in a buffer queue of the terminal, the terminal stores the first downloading file algorithm in the buffer queue, and the terminal sets the keyword used for indicating the type of the file to be received and the keyword used for indicating the format of the file to be received as index conditions of the first downloading file algorithm.
For example, after the terminal identifies the file identifier to be received, extracting a keyword for indicating the type of the file to be received and a keyword for indicating the format of the file to be received from the file identifier to be received, and searching whether data matched with the keyword for indicating the type of the file to be received and the keyword for indicating the format of the file to be received exist in the buffer queue by the terminal, if so, the terminal can acquire a first downloading file algorithm from the buffer queue according to the index relation.
Further optionally, the terminal sets a time parameter T, and records a time tb of the first download file algorithm stored in the buffer queue, and when tb > T, the terminal deletes the first download file algorithm stored in the buffer queue, the keyword in the file identifier to be received for indicating the type of the file to be received, and the keyword in the file identifier to be received for indicating the format of the file to be received.
Referring to fig. 8, fig. 8 is a schematic diagram of a file processing terminal according to an embodiment of the present invention. As shown in fig. 8, the file processing terminal provided in the embodiment of the present invention may include:
a generating module 801, configured to generate a file identifier to be sent when determining that the type of the file processing is a sending file, where the file identifier to be sent is used to indicate the type of the file to be sent and the format of the file to be sent.
The query module 802 is configured to query, in an algorithm library of a file unified interface, a first generated file algorithm corresponding to the type of the file to be sent and the format of the file to be sent indicated by the file to be sent identifier, where N generated file algorithms are in the algorithm library of the file unified interface, and N is a positive integer.
The query module is specifically configured to:
and accessing the N file generation algorithms in the algorithm library of the file unified interface.
And extracting keywords used for indicating the type of the file to be sent from the file identifier to be sent.
And obtaining M types of file generation algorithms matched with the keywords used for indicating the file types to be sent from the N types of file generation algorithms, wherein M is a positive integer smaller than N.
And extracting keywords used for indicating the format of the file to be sent from the file to be sent identifier.
And acquiring the first generated file algorithm matched with the keyword for indicating the file format to be transmitted from the M generated file algorithms.
The query module obtains the first generated file algorithm matched with the keyword for indicating the file format to be sent from the M generated file algorithms, which specifically includes:
and acquiring I types of generated file algorithms matched with the keywords used for indicating the file formats to be sent from the M types of generated file algorithms, wherein I is a positive integer smaller than M.
And inquiring the time complexity or the space complexity respectively corresponding to the I generation file algorithms.
And selecting an algorithm with the minimum time complexity or the minimum space complexity from the I file generation algorithms as the first file generation algorithm.
And the processing module 803 is configured to invoke the first file generation algorithm to process the client data to obtain a file to be sent, where the client data is obtained from a database by the terminal.
Wherein the processing module is further configured to:
querying a file encryption algorithm used for encrypting the file to be sent in an algorithm library of the file unified interface, wherein the file encryption algorithm comprises any one of a symmetric encryption algorithm, an asymmetric encryption algorithm, a message digest algorithm and a hash algorithm.
And calling the file encryption algorithm to encrypt the file to be sent.
And the uploading module 804 is configured to upload the file to be sent to a first server corresponding to the terminal.
And the sending module 805 is configured to send, through the first server corresponding to the terminal, the file to be sent to the second server corresponding to the bank end.
The specific embodiment of the file processing terminal of the present invention is substantially the same as the embodiments of the file processing method described above, and will not be described herein.
Referring to fig. 9, fig. 9 is a schematic diagram of a terminal structure of a hardware running environment according to an embodiment of the present invention.
The terminal for file processing in the embodiment of the invention can be a mobile phone, a tablet computer, a notebook computer, a palm computer, mobile internet equipment, wearable equipment or other types of terminals.
As shown in fig. 9, the terminal of the hardware running environment according to the embodiment of the present invention may include:
a processor 901, such as a CPU.
The memory 902 may alternatively be a high-speed RAM memory or a stable memory, such as a disk memory.
A communication interface 903 for implementing a connection communication between the processor 501 and the memory 502.
Optionally, the terminal for file processing according to the embodiment of the present invention may further include a user interface, a network interface, a camera, a sensor, a WiFi module, and so on. The user interface may comprise a display screen, an input unit such as a keyboard, and the optional user interface may also comprise standard wired and wireless interfaces. The network interface may optionally include standard wired and wireless interfaces (e.g., wiFi interfaces).
It will be appreciated by those skilled in the art that the structure of the document processing terminal shown in fig. 9 does not constitute a limitation of the document processing terminal, and may include more or less components than those illustrated, or may combine certain components, or may have a different arrangement of components.
As shown in fig. 9, the memory 902 may include an operating system, a network communication module, and a program for file processing. An operating system is a program that manages and controls the terminal hardware and software resources for file processing, programs that support file processing, and other software or program runs. The network communication module is used to implement communication between components within the memory 902 and between other hardware and software in the terminal for file processing.
In the terminal of file processing shown in fig. 9, a processor 901 is for executing a program of file processing stored in a memory 902, implementing the steps of:
and when the type of the file processing is determined to be the transmitted file, generating a file identifier to be transmitted, wherein the file identifier to be transmitted is used for indicating the type and the format of the file to be transmitted.
Inquiring a first generated file algorithm corresponding to the type of the file to be sent and the format of the file to be sent indicated by the file identification to be sent in an algorithm library of a file unified interface, wherein N generated file algorithms exist in the algorithm library of the file unified interface, and N is a positive integer.
And calling the first file generation algorithm to process the client data to obtain a file to be sent, wherein the client data is acquired from a database by the terminal.
And uploading the file to be sent to a first server corresponding to the terminal.
And sending the file to be sent to a second server corresponding to the bank end through the first server corresponding to the terminal.
Further, the step of querying a first generated file algorithm corresponding to the type of the file to be sent and the format of the file to be sent indicated by the file to be sent in an algorithm library of a file unified interface includes:
and accessing the N file generation algorithms in the algorithm library of the file unified interface.
And extracting keywords used for indicating the type of the file to be sent from the file identifier to be sent.
And obtaining M types of file generation algorithms matched with the keywords used for indicating the file types to be sent from the N types of file generation algorithms, wherein M is a positive integer smaller than N.
And extracting keywords used for indicating the format of the file to be sent from the file to be sent identifier.
And acquiring the first generated file algorithm matched with the keyword for indicating the file format to be transmitted from the M generated file algorithms.
Further, the step of acquiring the first generated file algorithm matched with the keyword for indicating the file format to be transmitted from the M generated file algorithms includes:
and acquiring I types of generated file algorithms matched with the keywords used for indicating the file formats to be sent from the M types of generated file algorithms, wherein I is a positive integer smaller than M.
And inquiring the time complexity or the space complexity respectively corresponding to the I generation file algorithms.
And selecting an algorithm with the minimum time complexity or the minimum space complexity from the I file generation algorithms as the first file generation algorithm.
Further, after the step of querying the algorithm library of the file unified interface for the first generated file algorithm corresponding to the type of the file to be sent and the format of the file to be sent indicated by the file to be sent identifier, the processor 901 is configured to execute a program for processing a file stored in the memory 902, so as to implement the following steps:
and storing the keywords used for indicating the type of the file to be sent in the file to be sent identifier and the keywords used for indicating the format of the file to be sent in a cache queue of the terminal.
And storing the first generated file algorithm in a cache queue of the terminal.
Setting the keyword for indicating the type of the file to be sent and the keyword for indicating the format of the file to be sent as index conditions of the first generation file algorithm.
Further, after calling the first file generation algorithm to process the client data to obtain the file to be sent, the processor 901 is configured to execute a program for processing the file stored in the memory 902, so as to implement the following steps:
querying a file encryption algorithm used for encrypting the file to be sent in an algorithm library of the file unified interface, wherein the file encryption algorithm comprises any one of a symmetric encryption algorithm, an asymmetric encryption algorithm, a message digest algorithm and a hash algorithm.
And calling the file encryption algorithm to encrypt the file to be sent.
Optionally, when receiving a file, the processor 901 is configured to execute a program for processing the file stored in the memory 902, and implement the following steps:
and when the type of the file processing is determined to be a received file, identifying a file identifier to be received, wherein the file identifier to be received is used for indicating the type and the format of the file to be received.
Inquiring a first downloading file algorithm corresponding to the type of the file to be sent and the format of the file to be sent, which are indicated by the file identification to be received, in an algorithm library of the file unified interface, wherein X downloading file algorithms exist in the algorithm library of the file unified interface, and X is a positive integer.
And calling the first downloading file algorithm to download the file to be received from a first server corresponding to the terminal.
Further, the step of querying a first downloading file algorithm corresponding to the file type to be sent and the file format to be sent indicated by the file identification to be received in an algorithm library of the file unified interface includes:
and accessing the X download file algorithms in the algorithm library of the file unified interface.
And extracting keywords used for indicating the type of the file to be received from the file to be received identifier.
And obtaining Y download file algorithms matched with the keywords used for indicating the file types to be received from the X download file algorithms, wherein Y is a positive integer smaller than X.
And extracting keywords used for indicating the file format to be received from the file identifier to be received.
And acquiring the first downloading file algorithm matched with the keyword used for indicating the file format to be received from the Y downloading file algorithms.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present invention is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present invention. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present invention. In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.
Claims (7)
1. A method of document processing, comprising:
when the type of file processing is determined to be a transmission file, generating a file identifier to be transmitted, wherein the file identifier to be transmitted is used for indicating the type and the format of the file to be transmitted;
inquiring a first file generation algorithm corresponding to the type of the file to be transmitted and the format of the file to be transmitted, which are indicated by the file identification to be transmitted, in an algorithm library of a file unified interface, wherein N file generation algorithms are arranged in the algorithm library of the file unified interface, and N is a positive integer; comprising the following steps: accessing the N file generation algorithms in the algorithm library of the file unified interface; extracting keywords used for indicating the type of the file to be sent from the file identifier to be sent; obtaining M generation file algorithms matched with the keywords used for indicating the types of the files to be sent from the N generation file algorithms, wherein M is a positive integer smaller than N; extracting keywords used for indicating the format of the file to be sent from the file to be sent identifier; acquiring I types of generated file algorithms matched with the keywords used for indicating the file formats to be sent from the M types of generated file algorithms, wherein I is a positive integer smaller than M; inquiring the time complexity or the space complexity respectively corresponding to the I generation file algorithms; selecting an algorithm with the minimum time complexity or the minimum space complexity in the I file generation algorithms as the first file generation algorithm;
invoking the first generated file algorithm to process the client data to obtain a file to be sent, wherein the client data is acquired from a database by a terminal;
uploading the file to be sent to a first server corresponding to the terminal;
the file to be sent is sent to a second server corresponding to a bank end through a first server corresponding to the terminal;
when the type of file processing is determined to be a received file, identifying a file identifier to be received, wherein the file identifier to be received is used for indicating the type and the format of the file to be received;
inquiring a first downloading file algorithm corresponding to the type of the file to be sent and the format of the file to be sent indicated by the file identification to be received in an algorithm library of the file unified interface, wherein X downloading file algorithms exist in the algorithm library of the file unified interface, and X is a positive integer; and calling the first downloading file algorithm to download the file to be received from a first server corresponding to the terminal.
2. The method according to claim 1, wherein after querying an algorithm library of a file unifying interface for a first generated file algorithm corresponding to the type of the file to be transmitted and the format of the file to be transmitted indicated by the file to be transmitted, the method comprises:
storing keywords used for indicating the type of the file to be sent in the file to be sent identifier and keywords used for indicating the format of the file to be sent in a cache queue of the terminal;
storing the first generated file algorithm in a cache queue of the terminal;
setting the keyword for indicating the type of the file to be sent and the keyword for indicating the format of the file to be sent as index conditions of the first generation file algorithm.
3. The method according to claim 1 or 2, wherein invoking the first generated file algorithm to process the client data to obtain the file to be sent comprises:
querying a file encryption algorithm used for encrypting the file to be sent in an algorithm library of the file unified interface, wherein the file encryption algorithm comprises any one of a symmetric encryption algorithm, an asymmetric encryption algorithm, a message digest algorithm and a hash algorithm;
and calling the file encryption algorithm to encrypt the file to be sent.
4. The method of claim 1, wherein querying an algorithm library of the file unifying interface for a first downloaded file algorithm corresponding to the file type to be transmitted and the file format to be transmitted indicated by the file identification to be received comprises:
accessing the X download file algorithms in the algorithm library of the file unified interface;
extracting keywords used for indicating the type of the file to be received from the file identifier to be received;
acquiring Y download file algorithms matched with the keywords used for indicating the types of the files to be received from the X download file algorithms, wherein Y is a positive integer smaller than X;
extracting keywords used for indicating the file format to be received from the file identifier to be received;
and acquiring the first downloading file algorithm matched with the keyword used for indicating the file format to be received from the Y downloading file algorithms.
5. A terminal for file processing, the terminal comprising:
the generating module is used for generating a file identifier to be transmitted when the type of file processing is determined to be a transmitted file, wherein the file identifier to be transmitted is used for indicating the type and the format of the file to be transmitted;
the query module is used for querying a first file generation algorithm corresponding to the file type to be transmitted and the file format to be transmitted, which are indicated by the file identification to be transmitted, in an algorithm library of a file unified interface, wherein N file generation algorithms are arranged in the algorithm library of the file unified interface, and N is a positive integer; comprising the following steps: accessing the N file generation algorithms in the algorithm library of the file unified interface; extracting keywords used for indicating the type of the file to be sent from the file identifier to be sent; obtaining M generation file algorithms matched with the keywords used for indicating the types of the files to be sent from the N generation file algorithms, wherein M is a positive integer smaller than N; extracting keywords used for indicating the format of the file to be sent from the file to be sent identifier; acquiring I types of generated file algorithms matched with the keywords used for indicating the file formats to be sent from the M types of generated file algorithms, wherein I is a positive integer smaller than M; inquiring the time complexity or the space complexity respectively corresponding to the I generation file algorithms; selecting an algorithm with the minimum time complexity or the minimum space complexity in the I file generation algorithms as the first file generation algorithm;
the processing module is used for calling the first file generation algorithm to process the client data to obtain a file to be sent, wherein the client data is acquired from a database by the terminal;
the uploading module is used for uploading the file to be sent to a first server corresponding to the terminal;
the sending module is used for sending the file to be sent to a second server corresponding to a bank end through a first server corresponding to the terminal;
when the type of file processing is determined to be a received file, identifying a file identifier to be received, wherein the file identifier to be received is used for indicating the type and the format of the file to be received;
inquiring a first downloading file algorithm corresponding to the type of the file to be sent and the format of the file to be sent indicated by the file identification to be received in an algorithm library of the file unified interface, wherein X downloading file algorithms exist in the algorithm library of the file unified interface, and X is a positive integer; and calling the first downloading file algorithm to download the file to be received from a first server corresponding to the terminal.
6. A terminal for file processing, characterized in that the terminal comprises a processor, a memory, a communication interface and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps of the method of any of claims 1 to 4.
7. A computer readable storage medium for storing a computer program for execution by a processor to implement the method of any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910039246.2A CN109871354B (en) | 2019-01-16 | 2019-01-16 | File processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910039246.2A CN109871354B (en) | 2019-01-16 | 2019-01-16 | File processing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109871354A CN109871354A (en) | 2019-06-11 |
CN109871354B true CN109871354B (en) | 2023-08-22 |
Family
ID=66917699
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910039246.2A Active CN109871354B (en) | 2019-01-16 | 2019-01-16 | File processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109871354B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110753106A (en) * | 2019-10-17 | 2020-02-04 | 杭州涂鸦信息技术有限公司 | File uploading method and device and electronic equipment |
CN112818195B (en) * | 2019-11-15 | 2023-12-26 | 腾讯科技(深圳)有限公司 | Data acquisition method, device and system and computer storage medium |
CN111858467B (en) * | 2020-07-22 | 2024-05-03 | 平安证券股份有限公司 | File data processing method, device, equipment and medium based on artificial intelligence |
CN115150388B (en) * | 2022-06-24 | 2024-04-26 | 中国建设银行股份有限公司 | File uploading and file uploading state query method and equipment and storage medium thereof |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102082812A (en) * | 2009-12-01 | 2011-06-01 | 华为技术有限公司 | Method, device and system for supporting file transfer between domain systems |
CN107943969A (en) * | 2017-11-28 | 2018-04-20 | 平安养老保险股份有限公司 | Annuity data file sending method, device, computer equipment and storage medium |
CN108062714A (en) * | 2017-11-28 | 2018-05-22 | 平安养老保险股份有限公司 | Annuity data transmission method for uplink, device, computer equipment and storage medium |
CA2992195A1 (en) * | 2017-01-17 | 2018-07-17 | Ingenico Group | Data transmission process and corresponding device and program |
CN108809960A (en) * | 2018-05-23 | 2018-11-13 | 北京五八信息技术有限公司 | A kind of file uploads and method for down loading, device, equipment, system and storage medium |
CN109086433A (en) * | 2018-08-13 | 2018-12-25 | 深圳壹账通智能科技有限公司 | A kind of file management method and server based on big data analysis |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110178821A1 (en) * | 2010-08-09 | 2011-07-21 | Douglas Smith | Medical data and image sharing |
-
2019
- 2019-01-16 CN CN201910039246.2A patent/CN109871354B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102082812A (en) * | 2009-12-01 | 2011-06-01 | 华为技术有限公司 | Method, device and system for supporting file transfer between domain systems |
CA2992195A1 (en) * | 2017-01-17 | 2018-07-17 | Ingenico Group | Data transmission process and corresponding device and program |
CN107943969A (en) * | 2017-11-28 | 2018-04-20 | 平安养老保险股份有限公司 | Annuity data file sending method, device, computer equipment and storage medium |
CN108062714A (en) * | 2017-11-28 | 2018-05-22 | 平安养老保险股份有限公司 | Annuity data transmission method for uplink, device, computer equipment and storage medium |
CN108809960A (en) * | 2018-05-23 | 2018-11-13 | 北京五八信息技术有限公司 | A kind of file uploads and method for down loading, device, equipment, system and storage medium |
CN109086433A (en) * | 2018-08-13 | 2018-12-25 | 深圳壹账通智能科技有限公司 | A kind of file management method and server based on big data analysis |
Also Published As
Publication number | Publication date |
---|---|
CN109871354A (en) | 2019-06-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109871354B (en) | File processing method and device | |
CN107622135B (en) | Method and apparatus for displaying information | |
CN112148674B (en) | Log data processing method, device, computer equipment and storage medium | |
WO2017114206A1 (en) | Method and device for processing short link, and short link server | |
CN108846753B (en) | Method and apparatus for processing data | |
US20130238574A1 (en) | Cloud system and file compression and transmission method in a cloud system | |
US20140181262A1 (en) | Use of internet information services logging to collect user information in an asynchronous manner | |
CN112162965B (en) | Log data processing method, device, computer equipment and storage medium | |
CN107181779B (en) | Method, device and system for processing access request | |
CN109388657B (en) | Data processing method, device, computer equipment and storage medium | |
CN111756847B (en) | Method and device for supporting https protocol by website | |
CN112256772A (en) | Data service method, device and readable storage medium | |
TW437205B (en) | An internet caching system and a method and an arrangement in such a system | |
CN107844488B (en) | Data query method and device | |
CN101421719B (en) | Managing network response buffering behavior | |
CN113010542A (en) | Service data processing method and device, computer equipment and storage medium | |
US10469575B2 (en) | Techniques for contact exporting | |
CN114218156A (en) | Data export method, data export device, computer equipment and storage medium | |
EP3387556A1 (en) | Providing automated hashtag suggestions to categorize communication | |
US11409831B1 (en) | System for determining cached log data associated with cached response data | |
US20140189044A1 (en) | Preemptive caching of data | |
CN113641706A (en) | Data query method and device | |
CN114124883B (en) | Data access method and device based on cloud storage address, computer equipment and medium | |
EP3455805A1 (en) | Enhancing contact card based on knowledge graph | |
CN109857719B (en) | Distributed file processing method, device, computer equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |