Aggregate transmission method, device, equipment and storage medium for small files

By traversing small files by presetting time intervals in the client's local memory and aggregating them into compressed files when specific conditions are met, the problem of slow uploading speed and time-consuming of small files is solved, and the upload efficiency and client user experience is improved.

CN119788666APending Publication Date: 2025-04-08MACROWING SOFTWARE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411991516.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

The aggregation and uploading of small files in the prior art is slow and time-consuming, and it is impossible to effectively determine the timing of aggregating small files, resulting in small files not uploading for a long time, affecting business performance.

Method used

Iterate through local memory through preset time intervals to obtain small file information. If the preset upload conditions are met, the small file will be aggregated into small file compressed files and uploaded to the target server.

Benefits of technology

It effectively reduces the number of times the client uploads, improves file upload efficiency, avoids the situation where small files are not uploaded for a long time, speeds up the overall progress of transmission, and improves the client's user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119788666A_ABST
    Figure CN119788666A_ABST
Patent Text Reader

Abstract

The present invention discloses a small file aggregation transmission method, device, equipment and storage medium. Its features include: traversing the local memory at a preset time interval to obtain the small file information in the local memory; if the small file information meets the preset upload conditions, the small files in the local memory are aggregated into a small file compressed file; and the small file compressed file is uploaded to the target server. The file upload efficiency is effectively improved, the overall progress of the transmission is accelerated, the situation where small files are not uploaded for a long time is avoided, and the user experience of the client is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software management, and in particular to a method, device, equipment and storage medium for aggregate transmission of small files. Background Art

[0002] In client programs, due to client business performance and management requirements, there will be a large number of small files in the program. Small files can be loaded into the client memory faster, reducing program startup time and response delay. When program functions are updated, small files can be updated to reduce update time and bandwidth consumption, which is convenient for program association and maintenance. However, with the increase of small files in the program, many small files need to be uploaded from the client to the server during the communication between the client and the server. The client program transfers multiple small files to the server one by one, and each small file upload requires the establishment of an HTTP (Hypertext Transfer Protocol) request. When a large number of small files are transmitted, the number of HTTP requests established is large, which is time-consuming and slow. In addition, when choosing to aggregate and upload small files, it is impossible to determine the timing of aggregating small files, resulting in the situation that small files have not been uploaded for a long time, affecting the performance of program services. Summary of the invention

[0003] The present invention provides a small file aggregation transmission method, device, equipment and storage medium to solve the technical problems of slow small file aggregation upload speed and long time consumption in the prior art.

[0004] According to one aspect of the present invention, a method for aggregate transmission of small files is provided, comprising:

[0005] Traversing the local memory at a preset time interval to obtain small file information in the local memory;

[0006] If the small file information meets the preset upload condition, the small files in the local memory are aggregated into a small file compressed file;

[0007] The small file is compressed and uploaded to the target server.

[0008] According to another aspect of the present invention, there is provided a small file aggregation transmission device, comprising:

[0009] A small file query module, used to traverse the local memory at a preset time interval to obtain small file information in the local memory;

[0010] A small file processing module, configured to aggregate the small files in the local memory into a small file compressed file if the small file information meets a preset upload condition;

[0011] The small file upload module is used to upload the small file compressed file to the target server.

[0012] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0013] at least one processor; and

[0014] a memory communicatively connected to the at least one processor; wherein,

[0015] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the small file aggregation transmission method described in any embodiment of the present invention.

[0016] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the small file aggregation transmission method described in any embodiment of the present invention when executed.

[0017] The technical solution of the embodiment of the present invention traverses the local memory at a preset time interval to obtain the small file information in the local memory. When there are small files to be uploaded on the client, the small files are kept in the local memory, which can effectively reduce the number of uploads by the client; if the small file information meets the preset upload conditions, the small files in the local memory are aggregated into small file compressed files. When the small files meet the upload conditions, the small files can be directly aggregated into small file compressed files, and multiple small files can be uploaded at one time, which effectively improves the file upload efficiency and prevents the situation that small files have not been uploaded for a long time; uploading the small file compressed files to the target server can effectively reduce the time consumption of establishing multiple HTTP requests and speed up the overall progress of transmission. The technical problems of slow and time-consuming small file aggregation upload in the prior art are solved, the file upload efficiency is effectively improved, the overall progress of transmission is accelerated, the situation that small files have not been uploaded for a long time is avoided, and the user experience of the client is improved.

[0018] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 A flowchart of a method for aggregate transmission of small files is provided for an embodiment of the present invention;

[0021] Figure 2 A flowchart of another small file aggregation transmission method provided by an embodiment of the present invention;

[0022] Figure 3 A schematic diagram of the structure of a small file aggregation transmission device provided by an embodiment of the present invention;

[0023] Figure 4 A schematic structural diagram of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0024] 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.

[0025] 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.

[0026] Figure 1A flowchart of a small file aggregation transmission method is provided for an embodiment of the present invention. This embodiment is applicable to the case where small files on a client are aggregated and compressed into a compressed file, and the compressed file is uploaded to a server. The method can be executed by a small file aggregation transmission device, which can be implemented in the form of hardware and / or software, and can be configured in an electronic device. Figure 1 As shown, the method includes:

[0027] S110. Traverse the local memory at a preset time interval to obtain small file information in the local memory.

[0028] Among them, the preset time interval can be a time period pre-set for querying small files in the client's local memory; it should be noted that when the client generates a small file, the small file is temporarily stored in the client's local memory, and the client's local memory is traversed at every preset time interval to identify the temporarily stored small files.

[0029] The local memory can be a specific storage area in the client that can be used for small files. It should be noted that in the client, the memory is a storage area that can be used by specific applications or software. Since the memory capacity of the client is usually limited, in order to prevent small files from occupying a large amount of memory space, a specific size of space is divided in the memory as a local memory for storing small files.

[0030] Among them, the small file information can be the storage information corresponding to all small files stored in the local memory. Optionally, the small file information includes at least one small file and the file size and file timer of each of the small files; the file size can be the size of the storage space occupied by the small file, and the file timer can be the storage time of the small file in the local memory. It should be noted that in the present invention, each time a small file is generated, the small file will be temporarily stored in the local memory, the file size of the small file will be recorded, and a dedicated file timer will be set for the small file to record the time the small file is stored in the local memory.

[0031] Optionally, in the present invention, a file timer is set for small files to determine the retention time of small files in the local memory, so as to prevent the small files from staying in the local memory for too long, resulting in the small files not being uploaded to the server for a long time; the file timer can be used to identify small files that have been retained in the local memory for too long, and upload these small files to avoid affecting the user experience.

[0032] Specifically, at every preset time interval, the small files temporarily stored in the local memory are traversed, the file size and file timer of each small file are obtained, and the small file information is obtained.

[0033] S120: If the small file information meets a preset upload condition, the small files in the local memory are aggregated into a small file compression file.

[0034] The preset upload condition may be pre-set condition information for determining whether the small file information satisfies the small file aggregate upload. It should be noted that in the present invention, by pre-setting the upload condition of the small file in the local memory, when it is recognized that the small file satisfies the upload condition within the current time interval, all the small files in the local memory need to be uploaded.

[0035] The small file compressed file may be a file obtained by compressing multiple small files. It should be noted that the file format of the compressed file and the small file may be the same or different; for example, the format of the compressed file may be tar, zip, rar, and 7z.

[0036] Exemplarily, the present invention can select the tar tool to compress multiple small files, and the specific compression process is as follows: for each small file, the tar tool will read the metadata information of the small file, and then read the data information of the file, organize the data of the small file according to the continuous byte stream grid of the tar file, and store the metadata and data information of the small file respectively; store the data information of the small file into the tar file according to the metadata; after creating a tar file corresponding to a small file, write other small files into a tar file in the same way in turn.

[0037] Optionally, in an embodiment of the present invention, if the small file information meets a preset upload condition, aggregating the small files in the local memory into a small file compressed file includes:

[0038] The file sizes of all the small files are accumulated and calculated to determine the total space occupied by the small files in the local memory; if the total space occupied by the small files is greater than the preset storage space threshold, it is considered that the small file information meets the preset upload conditions, and the small files in the local memory are aggregated into small file compressed files.

[0039] Among them, the total space occupied by small files can be the space occupied by all small files in the local memory within the current time interval. It should be noted that since the local memory is a specific storage area for pre-storing small files, the total space occupied by small files can be directly counted in the local memory.

[0040] Optionally, in the present invention, based on the file size corresponding to each small file in the small file information, the file sizes of all small files are calculated by cumulative means to obtain the total occupied space of all small files in the local memory.

[0041] Among them, the preset storage space threshold can be a threshold information pre-set for determining whether small files need to be uploaded to the server; it should be noted that in order to prevent the local memory from being occupied too much and unable to store small files and small file compressed files, a storage space threshold is set to determine whether the small files in the local memory meet the upload conditions. If the total space occupied by small files is greater than the preset storage space threshold, it is considered that the small file information meets the preset upload conditions and the small file needs to be uploaded.

[0042] Optionally, in the present invention, in order to prevent a large number of small files from occupying the local memory in a short period of time, a storage space warning threshold can also be set. The storage space warning threshold is used to monitor the occupied situation of the local memory. If the occupied space of the local memory is greater than the storage space warning threshold, all the small files in the local memory are directly aggregated to obtain a small file compressed file. It can be understood that within a preset time interval, it is detected that the total occupied space of the small files in the local memory is greater than the preset storage space threshold, and it is considered that the small file information meets the preset upload conditions, and the small files in the local memory are aggregated into a small file compressed file for upload, and all the small files in the local memory are cleared. However, within the time interval, a large number of small files suddenly appear in the local memory, resulting in the occupied space of the local memory being greater than the storage space warning threshold, and all the small files in the local memory are directly aggregated to obtain a small file compressed file.

[0043] Specifically, within a preset time interval, it is detected that the total space occupied by small files in the local memory is greater than a preset storage space threshold, and it is considered that the small file information meets the preset upload conditions. The small files in the local memory are aggregated into a small file compressed file for upload, and all small files in the local memory are deleted.

[0044] S130: Upload the small file compression file to the target server.

[0045] The target server may be a server for providing services to the client. It should be noted that the server corresponding to the client runs in the target server.

[0046] Specifically, after obtaining the small file compressed file, directly upload the small file compressed file to the target server.

[0047] The technical solution of the embodiment of the present invention traverses the local memory at a preset time interval to obtain the small file information in the local memory. When there are small files to be uploaded on the client, the small files are kept in the local memory, which can effectively reduce the number of uploads by the client; if the small file information meets the preset upload conditions, the small files in the local memory are aggregated into small file compressed files. When the small files meet the upload conditions, the small files can be directly aggregated into small file compressed files, and multiple small files can be uploaded at one time, which effectively improves the file upload efficiency and prevents the situation that small files have not been uploaded for a long time; uploading the small file compressed files to the target server can effectively reduce the time consumption of establishing multiple HTTP requests and speed up the overall progress of transmission. The technical problems of slow and time-consuming small file aggregation upload in the prior art are solved, the file upload efficiency is effectively improved, the overall progress of transmission is accelerated, the situation that small files have not been uploaded for a long time is avoided, and the user experience of the client is improved.

[0048] Figure 2 This is a flowchart of another method for aggregate transmission of small files provided by an embodiment of the present invention. The relationship between this embodiment and the above embodiment is the specific implementation method for uploading small files in the client. Figure 2 As shown, the method includes:

[0049] S210. Traverse the local memory at a preset time interval to obtain small file information in the local memory.

[0050] S220: Accumulate the file sizes of all the small files to determine the total occupied space of the small files in the local memory.

[0051] S230: If the total space occupied by the small files is less than the storage space threshold, traverse the file timer of each small file.

[0052] Specifically, in the present invention, within a preset time interval, it is detected that the total space occupied by small files in the local memory is less than a preset storage space threshold, which means that the space occupied by the small files in the local memory is small, and it is necessary to identify whether there are small files in the local memory that have been stored for too long. The file timer of each small file is traversed to identify the time value in the file timer of each small file.

[0053] S240: If there is any one of the small files whose file timer is greater than a preset waiting threshold, it is considered that the small file information meets the preset upload condition, and the small files in the local memory are aggregated into a small file compressed file.

[0054] The preset waiting threshold may be threshold information pre-set for determining the waiting time of a small file in the local memory. Optionally, after the file timer of the small file is created, the file timer starts timing automatically, and the waiting time of the small file in the local memory can be obtained by reading the counter value of the file timer. The preset waiting threshold and the timer value of the file timer of the small file are used to determine the small file with a long waiting time, so as to identify the small file.

[0055] Optionally, in the present invention, when it is identified that the file timer of a small file exceeds a preset waiting threshold, it is considered that the waiting time of the small file is too long, and the small file can be selected to be uploaded.

[0056] Specifically, in the present invention, when it is recognized that the waiting time for a small file is too long, the file timers of other small files need to be identified in turn, which requires a certain identification time, and each time a small file is uploaded, the number of requests will increase. In order to improve efficiency, the present invention can choose to identify that the file timer of any small file exceeds a preset waiting threshold, then it is considered that the small file information meets the preset upload conditions, the small files in the local memory are aggregated into small file compressed files, and all the small files in the local memory are uploaded.

[0057] Optionally, in another optional embodiment of the present invention, aggregating the small files in the local memory into a small file compressed file includes:

[0058] The small files are time-sorted according to the file timer of each small file to determine an aggregation sequence list; each small file is aggregated in turn according to the aggregation sequence list to obtain the small file compressed file.

[0059] The aggregation order list may be used to indicate the file order of aggregated small files.

[0060] Optionally, a sequence identifier is assigned to each small file in the aggregated sequence list in turn, and a unique small file is corresponded to by the sequence identifier. It should be noted that the aggregated sequence list is obtained by identifying the file timer of each small file, sorting the file timer by time, and assigning a sequence identifier to each small file according to the time sorting result. The sequence identifier of each small file and the arrangement order of the sequence identifier are recorded in the aggregated sequence list. Exemplarily, the sequence identifiers can be 1, 2, 3, and 4; for the small files corresponding to each sequence identifier, the sequence identifiers are arranged from small to large, and the arrangement order is 1, 2, 3, and 4.

[0061] Specifically, the file timer of each small file is identified, and the small files are arranged according to the timer value corresponding to the file timer of each small file, with the small files with large timer values ​​being placed in front and the small files with small timer values ​​being placed in the back, a sequence identifier is assigned to each small file, and an aggregation sequence list is determined. When aggregating the small files, each small file is aggregated in sequence according to the aggregation sequence list to obtain a small file compressed file. Exemplarily, the present invention selects a tar tool to compress multiple small files, and stores the small files corresponding to the sequence identifiers in the tar file in sequence according to the aggregation sequence list.

[0062] Optionally, in another optional embodiment of the present invention, if there is no file timer of the small file that is greater than a preset waiting threshold, it is considered that the small file information does not meet the preset upload condition.

[0063] Specifically, in the present invention, within a preset time interval, it is detected that the total space occupied by small files in the local memory is less than the preset storage space threshold, which means that the space occupied by the small files in the local memory is small, and the file timer of each small file is traversed. If there is no small file whose file timer is greater than the preset waiting threshold, it is considered that the small file information does not meet the preset upload conditions, and the small file does not need to be uploaded, and the small file is not compressed.

[0064] S250: Upload the small file compression file to the target server.

[0065] Optionally, in another optional embodiment of the present invention, uploading the small file compressed file to the target server includes:

[0066] The communication address of the target server is obtained, and a request message is constructed according to the communication address and the small file compression file to obtain a file transfer message; and the file transfer message is uploaded to the target server.

[0067] The communication address may be a URL (Uniform Resource Locator) of a target server.

[0068] The file transfer message may be a message for submitting data to a small file compressed file of a target server. Exemplarily, the file transfer message includes a request line, a request header, and a request body; the request line includes the method, path, and protocol version of the request line; the Content-Type, target server Host, and User-Agent of the request header; and the request body is a small file compressed file.

[0069] Specifically, the communication address of the target server is obtained, a request message for submitting data is constructed based on the communication address and the small file compression file, a file transfer message is obtained, and the file transfer message is uploaded to the target server.

[0070] The technical solution of the embodiment of the present invention traverses the local memory at a preset time interval to obtain the small file information in the local memory. When there are small files to be uploaded on the client, the small files are kept in the local memory, which can effectively reduce the number of uploads by the client; if the small file information meets the preset upload conditions, the small files in the local memory are aggregated into small file compressed files. When the small files meet the upload conditions, the small files can be directly aggregated into small file compressed files, and multiple small files can be uploaded at one time, which effectively improves the file upload efficiency and prevents the situation that small files have not been uploaded for a long time; uploading the small file compressed files to the target server can effectively reduce the time consumption of establishing multiple HTTP requests and speed up the overall progress of transmission. The technical problems of slow and time-consuming small file aggregation upload in the prior art are solved, the file upload efficiency is effectively improved, the overall progress of transmission is accelerated, the situation that small files have not been uploaded for a long time is avoided, and the user experience of the client is improved.

[0071] Figure 3 A schematic diagram of the structure of a small file aggregation transmission device provided by an embodiment of the present invention. Figure 3 As shown, the device includes: a small file query module 310, a small file processing module 320 and a small file upload module 330, wherein;

[0072] A small file query module 310, configured to traverse the local memory at a preset time interval to obtain small file information in the local memory;

[0073] A small file processing module 320, configured to aggregate the small files in the local memory into a small file compression file if the small file information meets a preset upload condition;

[0074] The small file upload module 330 is used to upload the small file compression file to the target server.

[0075] The technical solution of the embodiment of the present invention traverses the local memory at a preset time interval to obtain the small file information in the local memory. When there are small files to be uploaded on the client, the small files are kept in the local memory, which can effectively reduce the number of uploads by the client; if the small file information meets the preset upload conditions, the small files in the local memory are aggregated into small file compressed files. When the small files meet the upload conditions, the small files can be directly aggregated into small file compressed files, and multiple small files can be uploaded at one time, which effectively improves the file upload efficiency and prevents the situation that small files have not been uploaded for a long time; uploading the small file compressed files to the target server can effectively reduce the time consumption of establishing multiple HTTP requests and speed up the overall progress of transmission. The technical problems of slow and time-consuming small file aggregation upload in the prior art are solved, the file upload efficiency is effectively improved, the overall progress of transmission is accelerated, the situation that small files have not been uploaded for a long time is avoided, and the user experience of the client is improved.

[0076] Optionally, the small file information includes at least one small file and a file size and a file timer of each small file.

[0077] Optionally, the small file processing module 320 is specifically used to: accumulate the file sizes of all the small files to determine the total occupied space of the small files in the local memory;

[0078] If the total space occupied by the small files is greater than a preset storage space threshold, it is considered that the small file information meets the preset upload condition, and the small files in the local memory are aggregated into a small file compressed file.

[0079] Optionally, the small file processing module 320 is further configured to: if the total occupied space of the small files is less than the storage space threshold, traverse the file timer of each small file;

[0080] If there is any one of the small files whose file timer is greater than a preset waiting threshold, it is considered that the small file information meets the preset upload condition, and the small files in the local memory are aggregated into a small file compressed file.

[0081] Optionally, the small file processing module 320 is further specifically used for: if there is no file timer of the small file that is greater than a preset waiting threshold, it is considered that the small file information does not meet the preset upload condition.

[0082] Optionally, the small file processing module 320 is specifically used to: sort the small files by time according to the file timer of each small file to determine an aggregation order list;

[0083] Each of the small files is aggregated in sequence according to the aggregation order list to obtain the small file compressed file.

[0084] Optionally, the small file upload module 330 is specifically used to: obtain the communication address of the target server, construct a request message according to the communication address and the small file compression file, and obtain a file transfer message;

[0085] The file transfer message is uploaded to the target server.

[0086] The small file aggregation transmission device provided in the embodiment of the present invention can execute the small file aggregation transmission method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0087] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their modes are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0088] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0089] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer grid such as the Internet and / or various telecommunication grids.

[0090] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the aggregation transmission method of small files.

[0091] In some embodiments, the aggregate transmission method of small files can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the aggregate transmission method of small files described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the aggregate transmission method of small files in any other appropriate manner (for example, by means of firmware).

[0092] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0093] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the modes / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0094] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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 of the foregoing.

[0095] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0096] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a grid browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication grid). Examples of communication grids include: a local area network (LAN), a wide area network (WAN), a blockchain grid, and the Internet.

[0097] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication grid. The client and server relationship is generated by computer programs running on the respective computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0098] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0099] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the steps of the small file aggregation transmission method provided in any embodiment of the present invention are implemented. The method includes:

[0100] Traversing the local memory at a preset time interval to obtain small file information in the local memory;

[0101] If the small file information meets the preset upload condition, the small files in the local memory are aggregated into a small file compressed file;

[0102] The small file is compressed and uploaded to the target server.

[0103] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media 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 of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0104] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry 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.

[0105] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0106] Computer program code for performing the operation of the present invention may 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" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of grid, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0107] It should be understood by those skilled in the art that the above modules or steps of the present invention can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a grid composed of multiple computing devices, optionally, they can be implemented by a program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0108] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0109] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A small file aggregation transmission method, characterized in that: include: Traversing the local memory at a preset time interval to obtain small file information in the local memory; If the small file information meets the preset upload condition, the small files in the local memory are aggregated into a small file compressed file; The small file is compressed and uploaded to the target server.

2. The method according to claim 1, characterized in that The small file information includes at least one small file and a file size and a file timer of each small file.

3. The method according to claim 2, characterized in that If the small file information meets the preset upload condition, the small files in the local memory are aggregated into a small file compressed file, including: The file sizes of all the small files are cumulatively calculated to determine the total occupied space of the small files in the local memory; If the total space occupied by the small files is greater than a preset storage space threshold, it is considered that the small file information meets the preset upload condition, and the small files in the local memory are aggregated into a small file compressed file.

4. The method according to claim 3, characterized in that The step of accumulating the file sizes of all the small files to determine the total occupied space of the small files in the local memory further includes: If the total space occupied by the small files is less than the storage space threshold, traverse the file timer of each small file; If there is any one of the small files whose file timer is greater than a preset waiting threshold, it is considered that the small file information meets the preset upload condition, and the small files in the local memory are aggregated into a small file compressed file.

5. The method according to claim 4, characterized in that After traversing the file timer of each small file if the total occupied space of the small files is less than the storage space threshold, the method further includes: If there is no file timer of the small file whose time is greater than the preset waiting threshold, it is considered that the small file information does not meet the preset upload condition.

6. The method according to claim 4, characterized in that The step of aggregating the small files in the local memory into a small file compressed file includes: Sort the small files by time according to the file timer of each small file to determine an aggregation order list; Each of the small files is aggregated in sequence according to the aggregation order list to obtain the small file compressed file.

7. The method according to claim 1, characterized in that The step of uploading the compressed small file to the target server includes: Obtaining the communication address of the target server, constructing a request message according to the communication address and the small file compression file, and obtaining a file transfer message; The file transfer message is uploaded to the target server.

8. A small file aggregation transmission device, characterized in that: include: A small file query module, used to traverse the local memory at a preset time interval to obtain small file information in the local memory; A small file processing module, configured to aggregate the small files in the local memory into a small file compressed file if the small file information meets a preset upload condition; The small file upload module is used to upload the small file compressed file to the target server.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the small file aggregation transmission method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the small file aggregation transmission method described in any one of claims 1-7 when executed.