A method and device for collecting massive small files
In the process of aggregating massive small files in the financial field, we use the collaborative work of the small file aggregation client and the aggregation dispatch center to generate and manage small file metalists and image files, optimize the transmission path and network environment, and solve the problem. The problem of low transmission efficiency of massive small files and untimely data synchronization has been solved to achieve efficient file collection and business system security.
Patent Information
- Application Number
- CN202210920928.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-02
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2042-08-02
AI Technical Summary
In the process of collecting massive small files in the financial field, existing technologies have problems such as untimely data synchronization, application downtime, low file transmission efficiency, large amounts of resources occupied by compression and decompression, and inability to meet RTO/RPO requirements.
By installing small file aggregation clients on regional servers, scanning index nodes, generating small file metalists and image files, uploading them to the aggregation and scheduling center, and mounting and accessing them according to the regional aggregation and scheduling policy, the mirror mode is realized. Mount directly to avoid compression and decompression, and optimize the transmission path and network environment configuration.
It effectively solves the packaging, transmission, reference, access and other operations of massive small files, realizes efficient automation of business systems, ensures data security and transmission speed, and meets RTO/RPO requirements in the financial field.
Smart Images

Figure CN115277682B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and device for collecting massive small files. Background Art
[0002] With the update and iteration of technology, more and more technologies are applied in the financial field. The traditional financial industry is rapidly transforming to financial technology. The technical architecture of the previous generation of hierarchical management of financial information management systems is also gradually transforming to centralized deployment and cloud resources. In order to complete the intensive construction, the integration of the massive small files accumulated in the system for decades has become an urgent matter. Of course, with the continuous expansion of various business informatization, the number of files that need to be stored is also increasing. However, the increase in the number of small files (1K-1M) will cause great pressure on file management, file storage, and file transmission. For example, the number of files in a single folder cannot exceed 10,000. If the number of files exceeds 10,000 and the number of folders continues to increase, the service performance will decline rapidly. However, in order to complete the intensive construction, some institutions choose to only collect the latest data, and some start to calculate the collection time on a monthly basis due to the large number of files. The entire multi-regional implementation is short for a few months and long for an annual assessment. Some institutions use compression to physical storage and transport the physical storage to the intensive computer room through logistics and other means. There are many limitations such as untimely data synchronization and application downtime. What's worse, it causes partial damage and loss of data, which cannot meet the RTO / RPO requirements in the financial field.
[0003] Due to the implementation method of file nodes (iNode), the operating system is very slow and inefficient in copying and moving massive small files; massive small files need to be segmented and disassembled, and the transmission rate through the network cannot be increased. The number of files transmitted cannot be guaranteed in a short period of time. However, business traffic needs to run during office hours in the dedicated line of the financial system, so the only option is to collect files during non-business hours, and time becomes a pressing resource; compression and decompression of batches of small files requires a lot of computing resources and time, and the compression and transmission method will cause the service RTO to exceed the requirements during the file collection process. Summary of the invention
[0004] In order to solve the shortcomings of the prior art, the present invention proposes a method and device for collecting massive small files, which can effectively solve the current packaging, transmission, reference, and access of massive small files, and can effectively solve the verification, redirection, reading and other operations of massive small files, effectively ensuring the security of the business system.
[0005] To achieve the above objectives, the technical solutions adopted by the present invention include:
[0006] The first aspect of the present invention discloses a method for collecting a large number of small files, comprising the following steps:
[0007] Small file collection clients are installed on servers in each region to trigger small file collection events;
[0008] The small file collection client scans the index nodes of small files and accesses the corresponding file blocks through the index nodes of small files;
[0009] According to the configured regional collection scheduling strategy, obtain the index node and file block information of small files to generate a small file meta list, and report the small file meta list to the collection scheduling center;
[0010] Generate image files based on regional collection scheduling strategies and index nodes of small files, and upload them to the collection scheduling center.
[0011] Furthermore, the method further comprises:
[0012] The collection and scheduling center collects and receives the small file meta-list and the image file, and calls a mount command to mount the image file;
[0013] receiving a file access command, querying the small file meta list to obtain a corresponding index node and determining the small file;
[0014] If it is determined that the small file is a local file, the file in the image is directly accessed;
[0015] If it is determined that the small file type is a non-local file, the small file is obtained through the remote access address in the small file meta-list, the small files are collected locally, and the small file meta-list is updated.
[0016] Furthermore, the small file meta-list includes one or more of the small file's verification information, index node information, region information, and access information.
[0017] Furthermore, generating the image file according to the regional collection scheduling strategy and the index node of the small file includes archiving the file block as a directly mounted image supported by the operating system through a memory mapping method, and the image mode supports ISO and / or DMG.
[0018] Furthermore, the regional aggregation scheduling strategy is configured according to different network environments and business requirements in each region.
[0019] Furthermore, configuring the regional aggregation scheduling strategy according to different network environments and business requirements in each region includes: determining the transmission speed and aggregation time of each regional transmission path based on the bandwidth occupancy rate of each transmission link contained in each regional transmission path, the rated bandwidth of each transmission link, and the data volume information of each transmission link.
[0020] The second aspect of the present invention discloses a device for collecting a large number of small files, comprising:
[0021] Trigger module: small file collection clients are installed on servers in each region to trigger small file collection events;
[0022] A scanning module, wherein the small file collection client scans the index nodes of the small files through the scanning module, and accesses the corresponding file blocks through the index nodes of the small files;
[0023] The meta-list generation module, according to the configured regional collection scheduling strategy, calls the meta-list generation module to obtain the index node and file block information of the small files to generate a small file meta-list; and reports the small file meta-list to the collection scheduling center;
[0024] The image generation module calls the image generation module to generate image files according to the regional collection scheduling strategy and the index node of the small file, and uploads the image files to the collection scheduling center.
[0025] Furthermore, the device also includes:
[0026] The mounting module collects and receives the small file meta-list and the image file from the collection and dispatching center, and calls the mounting command to mount the image file;
[0027] A judgment module receives a file access command, queries the small file meta list to obtain a corresponding index node and judges the small file;
[0028] If it is determined that the small file is a local file, the file in the image is directly accessed;
[0029] If it is determined that the small file type is a non-local file, the small file is obtained through the remote access address in the small file meta-list, the small files are collected locally, and the small file meta-list is updated.
[0030] According to a third aspect of the present invention, a computer-readable storage medium is disclosed, wherein a computer program is stored on the storage medium, and the computer program implements the above method when executed by a processor.
[0031] A fourth aspect of the present invention discloses an electronic device, including a processor and a memory;
[0032] The memory is used to store operation instructions;
[0033] The processor is used to execute the above method by calling the operation instruction.
[0034] According to a fifth aspect of the present invention, a computer program product is disclosed, comprising a computer program and / or instructions, which implement the steps of the above method when executed by a processor.
[0035] The beneficial effects of the present invention are:
[0036] The method and device for collecting massive small files described in the present invention are mainly used in the optimization of financial office suites by financial information management service platforms. In this application, small files are archived in mirror mode to avoid losses caused by compression and decompression, and can be directly mounted in the file system; while generating the mirror mode, a small file meta-list is generated by accessing the small file index node, and the meta-list information is reported to the collection scheduling center; through the small file meta-list information reported by each region, the collection strategy is configured in combination with the unique network environment, business requirements and other factors of the region, the small file collection of each region is scheduled, and the operating system mounting is provided, and the client mode transparently accesses small files. This technical solution can effectively solve the current packaging, transmission, reference, and access of massive small files, and can effectively solve the verification, redirection, reading and other operations of massive small files, while achieving highly automated business operations and effectively ensuring the security of the business system. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A schematic flow chart of a method for collecting massive small files provided in an embodiment of the present invention.
[0038] Figure 2 A schematic diagram of the structure of a device for collecting massive small files provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0039] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0040] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0041] The first aspect of the present invention relates to a process of steps as follows Figure 1 The method for collecting a large number of small files shown includes the following steps:
[0042] Step S1: Each regional server installs a small file collection client to trigger a small file collection event;
[0043] In this embodiment, the small file is preferably a file with a size between 1K and 1M, but is not limited thereto.
[0044] Step S2: The small file collection client scans the index node (INode) of the small file, and accesses the corresponding file block (Block) through the index node of the small file;
[0045] Among them, by accessing the three-level index of the small file index node area, the corresponding file block can be quickly found.
[0046] Step S3: According to the configured regional collection scheduling strategy, the index node and file block information of the small file are obtained to generate a small file meta list (MetaList), and the small file meta list is reported to the collection scheduling center;
[0047] The regional aggregation scheduling strategy is configured according to different network environments and business requirements in each region.
[0048] Preferably, a regional aggregation scheduling strategy is configured according to flow control and / or time control.
[0049] Specifically, the regional scheduler determines the transmission speed and collection time of each regional transmission path according to the bandwidth occupancy rate of each transmission link included in each regional transmission path, the rated bandwidth of each transmission link, and the data volume information of each transmission link. The regional scheduler is preferably LSF / SGE / Slurm / PBS.
[0050] Preferably, the small file meta-list includes verification information, index node information, region information and access information of the small files.
[0051] Step S4: Generate a mirror file based on the regional collection scheduling strategy and the index node of the small file, and upload the mirror file to the collection scheduling center.
[0052] Preferably, the file blocks are archived as a directly mounted image supported by the operating system through memory mapping, and the image mode supports ISO and / or DMG.
[0053] In this embodiment, the method further comprises the following steps:
[0054] Step S5: The collection and dispatching center collects and receives the small file meta-list and the image file, and calls a mount command to mount the image file;
[0055] Step S6, receiving a file access command, querying the small file meta list to obtain a corresponding index node and determining the small file;
[0056] Step S7: If the small file is determined to be a local file (Local), the file in the image is directly accessed; if the small file type is determined to be a non-local file (Remote), the small file is obtained through the remote access address (IP address) in the small file meta-list, and the small file is collected locally and the small file meta-list is updated.
[0057] The method for collecting massive small files described in the present invention is mainly used for optimizing financial office suites by financial information management service platforms. In this application, small files are archived in mirror mode to avoid losses caused by compression and decompression, and can be directly mounted in the file system; while generating the mirror mode, a small file meta-list is generated by accessing the small file index node, and the meta-list information is reported to the collection scheduling center; through the small file meta-list information reported by each region, the collection strategy is configured in combination with the unique network environment, business requirements and other factors of the region, the small file collection of each region is scheduled, and the operating system mounting is provided, and the client mode transparently accesses the small files. This method can effectively solve the current packaging, transmission, reference, and access of massive small files, and can effectively solve the verification, redirection, and reading operations of massive small files, while achieving highly automated business operations and effectively ensuring the security of the business system.
[0058] Another aspect of the present invention also relates to a device for collecting a large number of small files, the structure of which is as follows: Figure 2 As shown, including:
[0059] Trigger module: small file collection clients are installed on servers in each region to trigger small file collection events;
[0060] A scanning module, wherein the small file collection client scans the index nodes of the small files through the scanning module, and accesses the corresponding file blocks through the index nodes of the small files;
[0061] The meta-list generation module, according to the configured regional collection scheduling strategy, calls the meta-list generation module to obtain the index node and file block information of the small files to generate a small file meta-list; and reports the small file meta-list to the collection scheduling center;
[0062] The image generation module calls the image generation module to generate image files according to the regional collection scheduling strategy and the index node of the small file, and uploads the image files to the collection scheduling center.
[0063] The device also includes:
[0064] The mounting module collects and receives the small file meta-list and the image file from the collection and dispatching center, and calls the mounting command to mount the image file;
[0065] A judgment module receives a file access command, queries the small file meta list to obtain a corresponding index node and judges the small file;
[0066] If it is determined that the small file is a local file, the file in the image is directly accessed;
[0067] If it is determined that the small file type is a non-local file, the small file is obtained through the remote access address in the small file meta-list, the small files are collected locally, and the small file meta-list is updated.
[0068] By using this device, the above-mentioned calculation processing method can be executed and the corresponding technical effects can be achieved.
[0069] An embodiment of the present invention also provides a computer-readable storage medium capable of implementing all the steps in the method in the above embodiment, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, all the steps in the method in the above embodiment are implemented.
[0070] An embodiment of the present invention also provides an electronic device for executing the above method. As an implementation device of the method, the electronic device has at least a processor and a memory, and in particular, the memory stores data and related computer programs required for executing the method, and the processor calls the data and programs in the memory to execute all steps of the implementation method and obtains the corresponding technical effect.
[0071] Preferably, the electronic device may include a bus architecture, the bus may include any number of interconnected buses and bridges, and the bus will include various circuits linked together by one or more processors and memories. The bus may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are all well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the receiver and transmitter. The receiver and transmitter may be the same component, i.e., a transceiver, providing a unit for communicating with various other systems over a transmission medium. The processor is responsible for managing the bus and general processing, while the memory may be used to store data used by the processor when performing operations.
[0072] In addition, the electronic device may further include components such as a communication module, an input unit, an audio processor, a display, and a power supply. The processor (or controller, operation control) used may include a microprocessor or other processor device and / or a logic device, which receives input and controls the operation of various components of the electronic device; the memory may be one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory, or other suitable devices, which may store the above-mentioned related data information, and may also store a program for executing related information, and the processor may execute the program stored in the memory to realize information storage or processing, etc.; the input unit is used to provide input to the processor, for example, it may be a key or a touch input device; the power supply is used to provide power to the electronic device; the display is used to display display objects such as images and text, for example, it may be an LCD display. The communication module is a transmitter / receiver that sends and receives signals via an antenna. The communication module (transmitter / receiver) is coupled to the processor to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal. Based on different communication technologies, multiple communication modules may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless local area network module, etc. The communication module (transmitter / receiver) is also coupled to a speaker and a microphone via an audio processor to provide an audio output via the speaker and receive an audio input from the microphone, thereby realizing a common telecommunication function. The audio processor may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor is also coupled to a central processor, so that recording can be performed on the machine through the microphone, and the sound stored on the machine can be played through the speaker.
[0073] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0074] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A system that specifies the functions of a box or multiple boxes.
[0075] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction system, which is implemented in the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0076] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps of the functions specified in a box or multiple boxes. Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they know the basic creative concept. Therefore, the attached claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0077] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for collecting massive small files, characterized in that: The following steps are involved: Small file collection clients are installed on servers in each region to trigger small file collection events; The small file collection client scans the index nodes of small files and accesses the corresponding file blocks through the index nodes of small files; According to the configured regional collection scheduling strategy, obtain the index node and file block information of small files to generate a small file meta list, and report the small file meta list to the collection scheduling center; Generate image files based on regional collection scheduling strategies and index nodes of small files, and upload them to the collection scheduling center; The method further comprises: The collection and scheduling center collects and receives the small file meta-list and the image file, and calls a mount command to mount the image file; receiving a file access command, querying the small file meta list to obtain a corresponding index node and determining the small file; If it is determined that the small file is a local file, the file in the image is directly accessed; If it is determined that the small file type is a non-local file, the small file is obtained through the remote access address in the small file meta-list, the small files are collected locally, and the small file meta-list is updated.
2. The method according to claim 1, characterized in that The small file meta-list includes one or more of the following: verification information, index node information, region information, and access information of the small files.
3. The method according to claim 1, characterized in that The generating of the image file according to the regional collection scheduling strategy and the index node of the small file includes archiving the file block as a directly mounted image supported by the operating system through a memory mapping method, and the image mode supports ISO and / or DMG.
4. The method according to claim 1, characterized in that The regional aggregation scheduling strategy is configured according to different network environments and business requirements in each region.
5. The method according to claim 4, characterized in that The configuration of the regional aggregation scheduling strategy according to different network environments and business requirements in each region includes: determining the transmission speed and aggregation time of each regional transmission path according to the bandwidth occupancy rate of each transmission link included in each regional transmission path, the rated bandwidth of each transmission link, and the data volume information of each transmission link.
6. A device for collecting massive small files, characterized in that: include: Trigger module: small file collection clients are installed on servers in each region to trigger small file collection events; A scanning module, wherein the small file collection client scans the index nodes of the small files through the scanning module, and accesses the corresponding file blocks through the index nodes of the small files; The meta-list generation module, according to the configured regional collection scheduling strategy, calls the meta-list generation module to obtain the index node and file block information of the small file to generate a small file meta-list; Report the small file meta-list to the collection and dispatch center; The image generation module calls the image generation module to generate image files according to the regional collection scheduling strategy and the index node of the small file, and uploads the image files to the collection scheduling center; The device also includes: The mounting module collects and receives the small file meta-list and the image file from the collection and dispatching center, and calls the mounting command to mount the image file; A judgment module receives a file access command, queries the small file meta list to obtain a corresponding index node and judges the small file; If it is determined that the small file is a local file, the file in the image is directly accessed; If it is determined that the small file type is a non-local file, the small file is obtained through the remote access address in the small file meta-list, the small files are collected locally, and the small file meta-list is updated.
7. A computer-readable storage medium, characterized in that: The 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 5 is implemented.
8. An electronic device, characterized in that: including a processor and a memory; The memory is used to store operation instructions; The processor is used to execute the method according to any one of claims 1 to 5 by calling the operation instruction.
9. A computer program product comprising a computer program and / or instructions, characterized in that: When the computer program and / or the instructions are executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
High-efficient HDFS uploading method based on massive small files and system thereof
CN106709010A
Processing method and system for mass streaming data
CN109086410A
Document distribution method, system and storage medium
CN109240982A
Small file storage optimization system based on virtual file system in KUBERNETES user mode application
CN111475469A
Distributed small file storage system
CN113076298A
