A method and device for processing file data
Through the collaborative work of the configuration center and the file transfer server, SFTP file data is automatically processed and stored, which solves the problem of complexity and low efficiency when the business system connects multiple data files, and achieves efficient file data storage and analysis.
Patent Information
- Application Number
- CN202210105685.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-28
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2042-01-28
AI Technical Summary
When the business system connects multiple data files, the existing technology requires repeated downloading and parsing of SFTP files, resulting in complex operations, high labor costs, and low storage efficiency.
The basic information of the file transfer server is stored through the configuration center. The client initiates a call request. The server sends the target file identification information to the configuration center. The configuration center determines the download information and sends it to the server. The server generates a download request and obtains the target file from the file transfer server. , and finally transfer the file to the user end to realize automated storage and parsing.
Abstract the unchanged code and store the changed configuration in the database to automatically store and parse SFTP file data, reduce labor costs, and improve system availability.
Smart Images

Figure CN114449047B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data processing, and in particular to a method and device for processing file data. Background Art
[0002] SFTP is a secure method for transferring files over the network based on the file transfer protocol. It ensures the use of private and secure data streams to transfer data securely. In order to facilitate data management, the data in the server needs to be stored in the database and managed through the database management system.
[0003] When the business system is connected to third-party data, most of the system data exchanges will use SFTP. The business system and the third-party system agree on the content format of the data, the format of the data file, and the encryption and decryption method. For example, for the merchant's registration file, both parties will agree on the merchant number, merchant name, merchant mobile phone number, terminal body number, registration date, merchant name, agent number, agent name and other basic information. When the business system is connected to the data, it is necessary to connect to SFTP, download the data file in the corresponding directory of SFTP, parse it according to the data format agreed by both parties, and finally store the data in the database.
[0004] If a business system is connected to dozens of data files, it is necessary to repeatedly download the data files in the SFTP corresponding directory and parse and store the SFTP file data. The operation is complicated, the labor cost is high, and the equipment runs slowly, resulting in low efficiency in storing file data. Summary of the invention
[0005] In view of the above problems, the present application is proposed to provide a method and device for processing file data that overcomes the above problems or at least partially solves the above problems, including:
[0006] A method for processing file data, the method is used to call a target file in a file transfer server according to a call request, the method involves a user terminal, a server, a configuration center and a file transfer server; specifically, the configuration center stores basic information of the file transfer server; the user terminal is used to initiate a call request for the target file; wherein the call request includes target file identification information and received file path information;
[0007] The method comprises:
[0008] When receiving the call request initiated by the user terminal, the server sends the target file identification information to the configuration center; the configuration center is used to determine the target file download information according to the target file identification information, and send the target file download information to the server; wherein the target file download information includes storage location information;
[0009] The server generates a download request according to the target file identification information and the storage location information, and sends it to the file transfer server; the file transfer server is used to determine the target file according to the target file identification information and the storage location information, and send the target file to the server;
[0010] The server sends the target file to the client according to the received file path information.
[0011] Preferably, before the step of sending the target file to the user terminal according to the received file path information, the server further includes:
[0012] The server parses the target file according to a preset format and checks the target file according to preset rules.
[0013] Preferably, before the step of receiving the call request initiated by the user terminal, the step further includes:
[0014] The server obtains the target file name and the target file directory according to the demand for the target file initiated by the user terminal, and sends the target file name and the target file directory to the user terminal; specifically, the user terminal is used to generate the call request according to the target file name and the target file directory.
[0015] Preferably, the server establishes a connection with the file transfer server, and when the connection is abnormal, the server retries according to preset requirements.
[0016] To implement the present application, a method for processing file data is also provided, the method being used to call a target file in a file transfer server according to a call request, the method involving a user terminal, a server, a configuration center and a file transfer server; specifically, the configuration center stores basic information of the file transfer server; the user terminal is used to initiate a call request for a target file; wherein the call request includes target file identification information and received file path information; when receiving the call request initiated by the user terminal, the server is used to send the target file identification information to the configuration center;
[0017] The method comprises:
[0018] The configuration center determines the target file download information based on the target file identification information; and sends the target file download information to the server; wherein the target file download information includes storage location information, and the server is used to generate a download request based on the target file identification information and the storage location information, and send it to the file transfer server; the file transfer server is used to determine the target file based on the target file identification information and the storage location information, and send the target file to the server; the server is also used to send the target file to the user terminal based on the received file path information.
[0019] To implement the present application, a file data processing device is also provided, the device is used to call a target file in a file transfer server according to a call request, the device involves a user terminal, a server, a configuration center and a file transfer server; specifically, the configuration center stores basic information of the file transfer server; the user terminal is used to initiate a call request for a target file; wherein the call request includes target file identification information and received file path information;
[0020] The device comprises:
[0021] a sending module, configured to cause the server to send the target file identification information to the configuration center when receiving a call request initiated by the user terminal; the configuration center is configured to determine the target file download information according to the target file identification information, and send the target file download information to the server; wherein the target file download information includes storage location information;
[0022] A generating module, used for the server to generate a download request according to the target file identification information and the storage location information, and send it to the file transfer server; the file transfer server is used to determine the target file according to the target file identification information and the storage location information, and send the target file to the server;
[0023] The receiving module is used for the server to send the target file to the user end according to the received file path information.
[0024] To implement the present application, a file data processing device is also included, the device is used to call the target file in the file transfer server according to the call request, the device involves a user terminal, a server, a configuration center and a file transfer server; specifically, the configuration center stores basic information of the file transfer server; the user terminal is used to initiate a call request for the target file; wherein the call request includes target file identification information and receiving file path information; when receiving the call request initiated by the user terminal, the server is used to send the target file identification information to the configuration center;
[0025] The device comprises:
[0026] A configuration module, used for the configuration center to determine the target file download information based on the target file identification information; and send the target file download information to the server; wherein the target file download information includes storage location information, and the server is used to generate a download request based on the target file identification information and the storage location information, and send it to the file transfer server; the file transfer server is used to determine the target file based on the target file identification information and the storage location information, and send the target file to the server; the server is also used to send the target file to the user end based on the received file path information.
[0027] To implement the present application, a file data processing system is also provided, wherein the system is used to call a target file in a file transfer server according to a call request, and the system involves a user terminal, a server, a configuration center and a file transfer server; specifically, the configuration center stores basic information of the file transfer server; the user terminal is used to initiate a call request for a target file; wherein the call request includes target file identification information and received file path information;
[0028] The system comprises:
[0029] The client is used to initiate a call request for a target file and send the call request to the server;
[0030] The server is used to receive the call request and send it to the configuration center;
[0031] The configuration center is used to determine the target file download information according to the target file identification information, and send the target file download information to the server; wherein the target file download information includes storage location information;
[0032] The server is also used to generate a download request according to the target file identification information and the storage location information, and send the request to the file transfer server;
[0033] The file transfer server is used to determine the target file according to the target file identification information and the storage location information, and send the target file to the server;
[0034] The server is further configured to send the target file data to the user terminal according to the received file path information.
[0035] To implement the present application, a computer device is also provided, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements any of the above methods when executed by the processor.
[0036] To implement the present application, a computer-readable storage medium is also included. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, any of the above methods is implemented.
[0037] This application has the following advantages:
[0038] In an embodiment of the present application, when receiving a call request initiated by the user terminal, the server sends the target file identification information to the configuration center; the configuration center is used to determine the target file download information based on the target file identification information, and send the target file download information to the server; wherein the target file download information includes storage location information; the server generates a download request based on the target file identification information and the storage location information, and sends it to the file transfer server; the file transfer server is used to determine the target file based on the target file identification information and the storage location information, and send the target file to the server; the server sends the target file to the user terminal based on the received file path information. By storing the differences in the steps of downloading files, parsing files, and storing files in the database, the unchanged code is highly abstracted and refined, and the changed things are configured in the database. When other SFTP data files need to be parsed and stored, it is only necessary to configure the SFTP connection information, the directory for downloading files, the directory for parsing files, and the format of data files in the database. The system can automatically store the data in the database, and the whole process is fully automated. If a business system is connected to more than a dozen or dozens of data files, the method of automatically storing SFTP file data can be realized by simply adding some configurations, reducing labor costs and improving system availability. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the description of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0040] Figure 1 It is a flowchart of a method for processing file data provided by an embodiment of the present application;
[0041] Figure 2 It is a flowchart of a method for processing file data provided by an embodiment of the present application;
[0042] Figure 3 is another step flow chart of a method for processing file data provided by an embodiment of the present application;
[0043] Figure 4 It is a structural block diagram of a file data processing device provided by an embodiment of the present application;
[0044] Figure 5 It is a structural schematic diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0045] In order to make the objects, features and advantages of the present application more obvious and understandable, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0046] It should be noted that the method is used to call the target file in the file transfer server according to the call request, and the method involves a user terminal, a server, a configuration center and a file transfer server; specifically, the configuration center stores the basic information of the file transfer server; the user terminal is used to initiate a call request for the target file; wherein the call request includes the target file identification information and the received file path information.
[0047] Reference Figure 1-2 , shows a flowchart of a method for processing file data provided by an embodiment of the present application, the method comprising:
[0048] S110, when receiving the call request initiated by the user terminal, the server sends the target file identification information to the configuration center; the configuration center is used to determine the target file download information according to the target file identification information, and send the target file download information to the server; wherein the target file download information includes storage location information;
[0049] S120, the server generates a download request according to the target file identification information and the storage location information, and sends the request to the file transfer server; the file transfer server is used to determine the target file according to the target file identification information and the storage location information, and send the target file to the server;
[0050] S130: The server sends the target file to the client according to the received file path information.
[0051] In an embodiment of the present application, when receiving a call request initiated by the user terminal, the server sends the target file identification information to the configuration center; specifically, the configuration center is used to determine the target file download information based on the target file identification information, and send the target file download information to the server; wherein the target file download information includes storage location information; the server generates a download request based on the target file identification information and the storage location information, and sends it to the file transfer server; the file transfer server is used to determine the target file based on the target file identification information and the storage location information, and send the target file to the server; the server sends the target file to the user terminal based on the received file path information. By storing the differences in the steps of downloading files, parsing files, and storing files in the database, the unchanged code is highly abstracted and refined, and the changed things are configured in the database. When other SFTP data files need to be parsed and stored, it is only necessary to configure the SFTP connection information, the directory for downloading files, the directory for parsing files, and the format of data files in the database. The system can automatically store the data in the database, and the whole process is fully automated. If a business system is connected to more than a dozen or dozens of data files, the method of automatically storing SFTP file data can be realized by simply adding some configurations, reducing labor costs and improving system availability.
[0052] Next, a method for processing file data in this exemplary embodiment will be further described.
[0053] As described in step S110, when receiving the call request initiated by the user terminal, the server sends the target file identification information to the configuration center; the configuration center is used to determine the target file download information according to the target file identification information, and send the target file download information to the server; wherein the target file download information includes storage location information;
[0054] As described in the following steps, the server obtains the target file name and the target file directory based on the demand for the target file initiated by the user terminal, and the server sends the target file name and the target file directory to the user terminal; specifically, the user terminal is used to generate the call request based on the target file name and the target file directory.
[0055] As described in the following steps, the server receives the call request initiated by the user terminal and sends it to the configuration center; the configuration center is used to determine the target file download information based on the target file identification information and send the target file download information to the server.
[0056] In a specific embodiment, the server obtains the target file name and the target file directory based on the demand for the target file initiated by the user end, and initializes the server loading information; the server sends the target file name and the target file directory to the user end; the user end generates the call request based on the target file name and the target file directory; wherein, the call request includes target file identification information and received file path information; when receiving the call request initiated by the user end, the server sends the target file identification information to the configuration center; the configuration center remotely reads the target file identification information sent by the server to determine the target file download information, and sends the target file download information to the server; wherein, the target file download information includes storage location information, file name, file directory, local directory, and local file name.
[0057] It should be noted that the configuration center includes a database, file or any storage medium, and the basic information of the file transfer server (SFTP server) to which the system is connected, such as port, user name, password and other information, is uniformly configured in the configuration center. All configuration information is loaded when the server is initialized; the user name, password, port and other basic connection information of the target file transfer server that the system needs to connect to is configured in the configuration center, and when the server is started, the complete connection information is automatically loaded from the storage medium according to certain rules and loaded into the memory. For example, the complete information can be in the form of key-value, key: can be the number of the business party, value: can be the text information of the connection + file type (user-password-1522 registration) and similar information is stored.
[0058] As described in step S120, the server generates a download request according to the target file identification information and the storage location information, and sends it to the file transfer server; the file transfer server is used to determine the target file according to the target file identification information and the storage location information, and send the target file to the server;
[0059] In an embodiment of the present application, when the server receives the target file download information sent by the configuration center, it generates a download request based on the storage location information in the target file download information and the target file identification information, and sends it to the file transfer server; when the file transfer server receives the download request, the server establishes a connection with the file transfer server through the basic information of the file transfer server, and the file transfer server determines the target file based on the target file identification information and the storage location information matching the corresponding directory information, and downloads the target file to the server locally.
[0060] It should be noted that the server establishes a connection with the file transfer server. When the connection is abnormal, such as timeout, network abnormality, the server first retries according to the preset requirements. If an abnormal situation occurs, it automatically enters the retry mode and retries 5 times. If there is still no expected situation after the retry, an alarm will be issued through email, DingTalk and other channels to allow manual intervention.
[0061] In a specific implementation, when the server receives the target file download information sent by the configuration center, it generates a download request based on the storage location information and the target file identification information in the target file download information, and sends it to the file transfer server; when the file transfer server receives the download request, the server establishes a connection with the file transfer server through the basic information of the file transfer server, and the file transfer server determines the target file based on the target file identification information and the storage location information matching the corresponding directory information, and downloads the target file to the server locally. If a fault occurs during the download of the target data file, such as: the file does not exist, the file encoding is incorrect, the file name does not match, etc., the file transfer server automatically retries to solve the network jitter problem, and records the log operation of the download file, which can be processed by detection software or manually later; the log can be a data text describing the operation, which can be stored in a database, file or other storage medium.
[0062] As described in step S130, the server sends the target file to the client according to the received file path information.
[0063] As described in the following steps, the server parses the target file according to a preset format and checks the target file according to a preset rule.
[0064] As described in the following steps, the server sends the target file to the client according to the received file path information.
[0065] In an embodiment of the present application, the server parses the content of the target file downloaded locally through a file parsing method defined by a file analyzer or customized by a user, and verifies the file format and the correctness of the target file data content; the server verifies and checks the parsed target file through a data verifier.
[0066] In a specific implementation, check whether the parsed file name, file content, and file content format are all generated or downloaded according to the agreement between the communicating parties, ensure that the file content is parsed completely correctly, and verify whether the file content format and the value of each column of the content are consistent with the agreed rules; at the same time, record the log when the parsing fails, such as: the specific value of the specific row and specific column of the parsed file, to facilitate verification and alarm.
[0067] In a specific implementation, the data validator verifies the total number of records of the parsed target file, the actual number, the directory of the remote SFTP file, the directory of the local server, the MD5 value of the file, and other information, so that the business system can timely verify the storage information of the data file when using the data, and verify whether the target file and the actual downloaded and parsed file content are consistent with expectations, so as to avoid data omissions. For example, verify the total number of lines in the file, whether the required fields of the file have values, whether the file data format is correct, and other information.
[0068] It should be noted that because the remote target file may be in a basic data format, the downloader may need to process the local data based on the basic data to meet the requirements, and the basic data needs to be processed. For example, the acquired file has only 5 columns, while the local business requires 10 columns. The other 5 columns are in other related storage media of the business party, and they are automatically matched and stored in the database according to the preset rules and identification information.
[0069] In an embodiment of the present application, the server processes the data after file parsing and verification, saves it to a database or other third-party storage medium, and sends the target file data to the user end according to the received file path information, thereby completing the entire automated file data processing.
[0070] Reference Figure 3 , shows a flowchart of a method for processing file data provided by another embodiment of the present application, the method comprising:
[0071] S310, the configuration center determines the target file download information based on the target file identification information; and sends the target file download information to the server; wherein the target file download information includes storage location information, and the server is used to generate a download request based on the target file identification information and the storage location information, and send it to the file transfer server; the file transfer server is used to determine the target file based on the target file identification information and the storage location information, and send the target file to the server; the server is also used to send the target file to the user terminal based on the received file path information.
[0072] Next, a method for processing file data in this exemplary embodiment will be further described.
[0073] As described in step S310, the configuration center determines the target file download information based on the target file identification information; and sends the target file download information to the server; wherein the target file download information includes storage location information, and the server is used to generate a download request based on the target file identification information and the storage location information, and send it to the file transfer server; the file transfer server is used to determine the target file based on the target file identification information and the storage location information, and send the target file to the server; the server is also used to send the target file to the user terminal based on the received file path information.
[0074] In an embodiment of the present application, when receiving a call request initiated by the client through the server for the target file demand, the configuration center remotely reads the target file identification information sent by the server to determine the target file download information; the configuration center sends the target file download information to the server; the server generates a download request based on the target file identification information and the storage location information, and sends it to the file transfer server; when the file transfer server receives the download request, the server establishes a connection with the file transfer server through the basic information of the file transfer server, the file transfer server determines the target file based on the target file identification information and the storage location information matching the corresponding directory information, and downloads the target file to the server locally; the server parses the target file content downloaded to the local through the file analyzer's internal or user-defined file parsing method, and verifies the file format and the correctness of the target file data content; the server verifies and checks the parsed target file through a data verifier; the server processes the target file data content after file parsing and verification, saves it to a database or other third-party storage medium, and sends the target file to the client according to the received file path information.
[0075] It should be noted that the target file download information includes storage location information, file name, file directory, local directory, and local file name.
[0076] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0077] Reference Figure 4 , showing a structural block diagram of a file data processing device provided by an embodiment of the present application;
[0078] Specifically include:
[0079] The sending module 410 is used for the server to send the target file identification information to the configuration center when receiving the call request initiated by the user terminal; the configuration center is used to determine the target file download information according to the target file identification information, and send the target file download information to the server; wherein the target file download information includes storage location information;
[0080] A generating module 420, configured for the server to generate a download request according to the target file identification information and the storage location information, and send the request to the file transfer server; the file transfer server is configured to determine the target file according to the target file identification information and the storage location information, and send the target file to the server;
[0081] The receiving module 430 is used for the server to send the target file to the user terminal according to the received file path information.
[0082] In one embodiment of the present invention, before the receiving module 430, the following is further included:
[0083] The parsing and checking submodule is used for the server to parse the target file according to a preset format and to check the target file according to preset rules.
[0084] In an embodiment of the present invention, before the sending module 410, the following is further included:
[0085] A request generation submodule is used for the server to obtain a target file name and a target file directory according to a demand for a target file initiated by the user terminal, and the server sends the target file name and the target file directory to the user terminal; specifically, the user terminal is used to generate the call request according to the target file name and the target file directory.
[0086] In one embodiment of the present invention, it further includes:
[0087] The connection establishment submodule is used for the server to establish a connection with the file transfer server. When the connection is abnormal, the server retries according to preset requirements.
[0088] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0089] An embodiment of the present application provides a device for processing file data;
[0090] Specifically include:
[0091] A configuration module, used for the configuration center to determine the target file download information based on the target file identification information; and send the target file download information to the server; wherein the target file download information includes storage location information, and the server is used to generate a download request based on the target file identification information and the storage location information, and send it to the file transfer server; the file transfer server is used to determine the target file based on the target file identification information and the storage location information, and send the target file to the server; the server is also used to send the target file to the user end based on the received file path information.
[0092] To implement the present application, an online file data processing system is also included, the system is used to call the target file in the file transfer server according to the call request, the system involves a user terminal, a server, a configuration center and a file transfer server; specifically, the configuration center stores the basic information of the file transfer server; the user terminal is used to initiate a call request for the target file; wherein the call request includes the target file identification information and the receiving file path information, specifically:
[0093] The client is used to initiate a call request for a target file and send the call request to the server;
[0094] The server is used to receive the call request and send it to the configuration center;
[0095] The configuration center is used to determine the target file download information according to the target file identification information, and send the target file download information to the server; wherein the target file download information includes storage location information;
[0096] The server is also used to generate a download request according to the target file identification information and the storage location information, and send the request to the file transfer server;
[0097] The file transfer server is used to determine the target file according to the target file identification information and the storage location information, and send the target file to the server;
[0098] The server is further configured to send the target file to the user terminal according to the received file path information.
[0099] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0100] There are repeated operation steps in this specific embodiment and the above specific embodiment, and this specific embodiment is only briefly described. For other solutions, refer to the description of the above specific embodiment.
[0101] As for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0102] Reference Figure 5 , showing a computer device of a file data processing method of the present application, which may specifically include the following:
[0103] The computer device 12 is in the form of a general-purpose computing device, and the components of the computer device 12 may include but are not limited to: one or more processors or processing units 16, a memory 28, and a bus 18 connecting different system components (including the memory 28 and the processing unit 16).
[0104] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, an Audio Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0105] The computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.
[0106] Memory 28 may include computer system readable media in the form of volatile memory, such as random access memory 30 and / or cache memory 32. Computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write to non-removable, non-volatile magnetic media (commonly referred to as a "hard drive"). Although Figure 5 Not shown, a disk drive for reading and writing to a removable non-volatile disk (such as a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (such as a CD-ROM, DVD-ROM or other optical medium) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory may include at least one program product having a set (e.g., at least one) of program modules 42, which are configured to perform the functions of the various embodiments of the present application.
[0107] A program / utility 40 having a set (at least one) of program modules 42 may be stored in, for example, a memory, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules 42, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0108] The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, cameras, etc.), one or more devices that enable an operator to interact with the computer device 12, and / or any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed through the I / O interface 22. Furthermore, the computer device 12 may also communicate with one or more networks (e.g., local area networks (LANs)), wide area networks (WANs), and / or public networks (e.g., the Internet) through a network adapter 20. Figure 5 As shown, the network adapter 20 communicates with other modules of the computer device 12 via the bus 18. It should be understood that although Figure 5 Not shown, other hardware and / or software modules may be used in conjunction with the computer device 12, including but not limited to: microcode, device drivers, redundant processing units 16, external disk drive arrays, RAID systems, tape drives, and data backup storage systems 34, etc.
[0109] The processing unit 16 executes various functional applications and data processing by running the programs stored in the memory 28, such as implementing the file data processing method provided in the embodiment of the present application.
[0110] That is, when the processing unit 16 executes the program, a method for processing file data is implemented.
[0111] In an embodiment of the present application, the present application further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, a method for processing file data as provided in all embodiments of the present application is implemented.
[0112] That is, when the program is executed by the processor, it implements: a method for processing file data; comprising the following steps: when receiving a call request initiated by the user terminal, the server sends the target file identification information to the configuration center; the configuration center is used to determine the target file download information based on the target file identification information, and send the target file download information to the server; wherein the target file download information includes storage location information; the server generates a download request based on the target file identification information and the storage location information, and sends it to the file transfer server; the file transfer server is used to determine the target file based on the target file identification information and the storage location information, and send the target file to the server; the server sends the target file to the user terminal based on the received file path information.
[0113] Any combination of one or more computer-readable media may be used. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, device, or device.
[0114] Computer-readable signal media may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0115] The computer program code for performing the operation of the present application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the operator's computer, partially on the operator's computer, as an independent software package, partially on the operator's computer, partially on the remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the operator's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet). The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other.
[0116] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
[0117] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the sentence "comprises a ..." defines an element, and does not exclude the existence of other identical elements in the process, method, article or terminal device including the element.
[0118] The above is a detailed introduction to a method and device for processing file data provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for a person skilled in the art, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for processing file data, characterized in that: The method is used to call a target file in a file transfer server according to a call request, and the method involves a user terminal, a server, a configuration center and a file transfer server; specifically, the configuration center stores basic information of the file transfer server; The user terminal is used to initiate a call request for a target file; wherein the call request includes target file identification information and received file path information; The method comprises: When receiving the call request initiated by the user terminal, the server sends the target file identification information to the configuration center; the configuration center is used to determine the target file download information according to the target file identification information, and send the target file download information to the server; wherein the target file download information includes storage location information; The server generates a download request according to the target file identification information and the storage location information, and sends it to the file transfer server; the file transfer server is used to determine the target file according to the target file identification information and the storage location information, and send the target file to the server; The server sends the target file to the user terminal according to the received file path information; before receiving the call request initiated by the user terminal, it also includes: the server obtains the target file name and the target file directory according to the demand for the target file initiated by the user terminal, and the server sends the target file name and the target file directory to the user terminal; specifically, the user terminal is used to generate the call request according to the target file name and the target file directory; the basic information of the target file transfer server that the system needs to connect to is configured in the configuration center, the basic information includes the user name, password, and port, and all configuration information is automatically loaded from the configuration center into the memory when the server is started.
2. The method for processing file data according to claim 1, characterized in that: Before the step of sending the target file to the user terminal according to the received file path information, the server further includes: The server parses the target file according to a preset format and checks the target file according to preset rules.
3. The method for processing file data according to claim 1, characterized in that: The server establishes a connection with the file transfer server, and when the connection is abnormal, the server retries according to preset requirements.
4. A file data processing device, characterized in that: The device is used to call the target file in the file transfer server according to the call request, involving the user end, the server, the configuration center and the file transfer server; specifically, the configuration center stores the basic information of the file transfer server; The user terminal is used to initiate a call request for a target file; wherein the call request includes target file identification information and received file path information; The device comprises: a sending module, configured to cause the server to send the target file identification information to the configuration center when receiving a call request initiated by the user terminal; the configuration center is configured to determine the target file download information according to the target file identification information, and send the target file download information to the server; wherein the target file download information includes storage location information; A generating module, used for the server to generate a download request according to the target file identification information and the storage location information, and send it to the file transfer server; the file transfer server is used to determine the target file according to the target file identification information and the storage location information, and send the target file to the server; A receiving module is used for the server to send the target file to the user end according to the received file path information; before the step of receiving the call request initiated by the user end, it also includes: the server obtains the target file name and the target file directory according to the demand for the target file initiated by the user end, and the server sends the target file name and the target file directory to the user end; specifically, the user end is used to generate the call request according to the target file name and the target file directory; the basic information of the target file transfer server that the system needs to connect to is configured in the configuration center, the basic information includes the user name, password, and port, and all configuration information is automatically loaded from the configuration center into the memory when the server is started.
5. A file data processing system, characterized in that: The system is used to call a target file in a file transfer server according to a call request, and the system involves a user terminal, a server, a configuration center and a file transfer server; specifically, the configuration center stores basic information of the file transfer server; The user terminal is used to initiate a call request for a target file; wherein the call request includes target file identification information and received file path information; The system comprises: The client is used to initiate a call request for a target file and send the call request to the server; The server is used to receive the call request and send it to the configuration center; The configuration center is used to determine the target file download information according to the target file identification information, and send the target file download information to the server; wherein the target file download information includes storage location information; The server is also used to generate a download request according to the target file identification information and the storage location information, and send the request to the file transfer server; The file transfer server is used to determine the target file according to the target file identification information and the storage location information, and send the target file to the server; The server is also used to send the target file to the user end according to the received file path information; before the step of receiving the call request initiated by the user end, it also includes: the server obtains the target file name and the target file directory according to the demand for the target file initiated by the user end, and the server sends the target file name and the target file directory to the user end; specifically, the user end is used to generate the call request according to the target file name and the target file directory; the basic information of the target file transfer server that the system needs to connect to is configured in the configuration center, and the basic information includes the user name, password, and port. When the server is started, all configuration information is automatically loaded from the configuration center into the memory.
6. A computer device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the method according to any one of claims 1 to 3 when executed by the processor.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.
