Intelligent file uploading method, device and system
By performing chunked file upload operations through a collaborative information processing terminal, the problems of memory overflow and limited network transmission speed during file upload are solved, achieving efficient, stable and flexible file upload and improving the accuracy and reliability of file upload.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- SHENZHEN GREEN CONNECTION TECH CO LTD
- Filing Date
- 2025-11-06
- Publication Date
- 2026-07-09
AI Technical Summary
Existing technologies are prone to memory overflow during file uploads, and network transmission speeds are limited, resulting in low upload efficiency and stability.
By having the first and second information processing terminals work together, the system performs tasks such as determining file upload requirements, mapping files, reading and writing in chunks, mapping file content using MMAP technology, and reading and uploading chunked data from the data cache area in sequence to avoid loading large files into memory all at once.
It improves the efficiency, stability, and accuracy of file uploads, reduces memory consumption, provides flexibility and platform compatibility, and enhances the comprehensiveness and rationality of file uploads.
Smart Images

Figure CN2025132951_09072026_PF_FP_ABST
Abstract
Description
An intelligent file upload method, device and system
[0001] Technical Field
[0002] This application relates to the field of network file transfer technology, and in particular to an intelligent file upload method, device and system. Background Technology
[0003] In modern information society, file data has become an indispensable asset for various organizations and individuals. The entire economy and society rely on data and information, making the uploading and transmission of file data particularly frequent and important.
[0004] Currently, most file upload methods read the entire file into memory at once during the upload process. This is particularly prone to memory overflow when uploading large files. Furthermore, current file upload systems control file read / write speeds. When the network is operating at a specific speed, the system limits virtual machine memory usage and reduces CPU frequency, resulting in limited network transmission speed and low upload efficiency and stability. Therefore, providing a method to improve file upload efficiency and stability is of paramount importance. Summary of the Invention
[0005] This application provides an intelligent file upload method, device, and system that can improve the efficiency and stability of file uploads, thereby improving the accuracy and reliability of uploaded files.
[0006] To address the aforementioned technical problems, the first aspect of this application discloses an intelligent file upload method. This method is applied to a file upload device, which is communicatively connected to a network attached storage device (LAN). The file upload device includes a first information processing terminal and a second information processing terminal. The method includes:
[0007] The first information processing terminal determines the file upload request information of the file to be uploaded and sends the file upload request information to the second information processing terminal. The file upload request information includes at least the file descriptor information of the file to be uploaded and the target device address information. The target device includes the network attached storage device.
[0008] The second information processing terminal performs a corresponding file mapping operation on the file to be uploaded based on the file descriptor information, and obtains the file content mapping result of the file to be uploaded;
[0009] The second information processing terminal performs corresponding block reading and writing operations on the file content mapping result to a preset data cache area, and performs corresponding data reading and uploading operations on the block data in the data cache area according to the target device address information to obtain the file upload result of the file to be uploaded, and sends the file upload result to the first information processing terminal. The file upload result includes the real-time upload progress information of the file to be uploaded and / or the file upload completion status.
[0010] A second aspect of this application discloses another intelligent file upload device, which is communicatively connected to the network attached storage device. The file upload device includes a first information processing terminal and a second information processing terminal, both of which include:
[0011] Memory containing executable program code;
[0012] A processor coupled to the memory;
[0013] The processor calls the executable program code stored in the memory to execute an intelligent file upload method disclosed in the first aspect of this application.
[0014] Compared with the prior art, the embodiments of this application have the following beneficial effects:
[0015] This application enables intelligent file upload functionality by executing multiple steps, including determining file upload request information, file mapping, data reading and uploading, and information interaction, through a first and a second information processing terminal. This improves the comprehensiveness and overall effectiveness of the intelligent file upload method, as well as its rationality and feasibility. Furthermore, it performs corresponding block reading and writing operations on the file content mapping results and performs corresponding data reading and uploading operations on the block data in the data cache area. By reading, writing, and uploading in blocks, it avoids loading large files into memory all at once, thereby improving the efficiency, stability, and accuracy of file transmission and upload. This, in turn, enhances the accuracy and reliability of uploaded files, reduces memory consumption and usage, and provides flexibility and platform compatibility for file uploads. Attached Figure Description
[0016] Figure 1 is a flowchart illustrating an intelligent file upload method disclosed in an embodiment of this application;
[0017] Figure 2 is a flowchart illustrating another intelligent file upload method disclosed in an embodiment of this application;
[0018] Figure 3 is a schematic diagram of the structure of a first information processing terminal disclosed in an embodiment of this application;
[0019] Figure 4 is a schematic diagram of the structure of a second information processing terminal disclosed in an embodiment of this application;
[0020] Figure 5 is a schematic diagram of the structure of an intelligent file upload system disclosed in an embodiment of this application;
[0021] Figure 6 is a schematic diagram of the system architecture of an intelligent file upload method disclosed in an embodiment of this application;
[0022] Figure 7 is a schematic diagram of the file upload timing of an intelligent file upload method disclosed in an embodiment of this application;
[0023] Figure 8(a) is a schematic diagram of an MMAP disclosed in an embodiment of this application;
[0024] Figure 8(b) is a schematic diagram of a circular buffer disclosed in an embodiment of this application;
[0025] Figure 9 is a schematic diagram of the system architecture of another intelligent file upload method disclosed in the embodiments of this application. Embodiments of the present invention
[0026] This application discloses an intelligent file upload method, device, and system. It enables intelligent file upload functionality through multiple stages, including determining file upload request information, file mapping, data reading and uploading, and information interaction, performed by a first and second information processing terminal. This improves the comprehensiveness and overall effectiveness of the intelligent file upload method, as well as its rationality and feasibility. Furthermore, it performs block-based reading and writing operations on the file content mapping results and reads and uploads block data from the data cache area, avoiding loading large files entirely into memory at once. This improves the efficiency, stability, and accuracy of file transmission and upload, thereby enhancing the accuracy and reliability of uploaded files, reducing memory consumption and usage, and providing flexibility and platform compatibility for file uploads. Detailed descriptions follow.
[0027] Example 1
[0028] Please refer to Figure 1, which is a flowchart illustrating an intelligent file upload method disclosed in an embodiment of this application. The method described in Figure 1 can be implemented in a file upload device that is communicatively connected to a network attached storage device. The file upload device includes a first information processing terminal and a second information processing terminal, which are not limited in this embodiment. As shown in Figure 1, this intelligent file upload method includes the following operations:
[0029] 101. The first information processing terminal determines the file upload request information of the file to be uploaded and sends the file upload request information to the second information processing terminal. The file upload request information includes at least the file descriptor information of the file to be uploaded and the target device address information. The target device includes network attached storage devices.
[0030] Optionally, the intelligent file upload method described in this application embodiment can be applied to the Android system, or to other systems that require file uploads. This application embodiment does not limit the application.
[0031] Optionally, the first information processing end can be a Java layer or other devices that can implement similar information processing functions; this application does not limit the specific devices.
[0032] Optionally, the second information processing terminal can be a local code module or other devices that can perform similar information processing functions; this application does not limit the specific device.
[0033] Optionally, the file descriptor information can correspond to an FID; the target device address information can correspond to a URL; in addition, by managing the file descriptor (FID) to obtain the file in the Java or Kotlin layer, it has stronger versatility, and using FID to operate on files reduces privacy policy risks. It is suitable for various mobile application scenarios that require large file uploads, and this application embodiment does not limit it.
[0034] Optionally, the first information processing terminal and the second information processing terminal can interact through the JNI interface, which is not limited in this embodiment.
[0035] Optionally, when the first information processing end is a Java layer and the second information processing end is a local code module, a schematic diagram of the system architecture of an intelligent file upload method can be found in Figure 6 of the specification, and the embodiments of this application are not limited thereto.
[0036] Optionally, a schematic diagram of the file upload timing for an intelligent file upload method can be found in Figure 7 of the specification, but this application does not limit the scope of the embodiments.
[0037] Optionally, a schematic diagram of the system architecture for another intelligent file upload method can be found in Figure 9 of the specification, but this application does not limit the specific implementation.
[0038] 102. The second information processing end performs the corresponding file mapping operation on the file to be uploaded based on the file descriptor information, and obtains the file content mapping result of the file to be uploaded.
[0039] Optionally, the second information processing terminal performs corresponding file mapping operations on the file to be uploaded based on the file descriptor information to obtain the file content mapping result of the file to be uploaded. For example, by combining MMAP technology, the file transmitted through the file descriptor information is directly mapped to the address space of the process to obtain the file content mapping result. That is, MMAP is used to map the file transmitted through the FID to the memory space to obtain the file content mapping result, thereby allowing access to file content as if accessing memory, without the need for explicit file I / O operations, thus improving file reading efficiency. This application embodiment does not limit this.
[0040] Optionally, the MMAP schematic diagram can be referred to as shown in Figure 8(a) of the specification, but the embodiments of this application are not limited.
[0041] 103. The second information processing terminal performs corresponding block reading and writing operations on the file content mapping result to the preset data cache area, and performs corresponding data reading and uploading operations on the block data in the data cache area according to the target device address information to obtain the file upload result of the file to be uploaded, and sends the file upload result to the first information processing terminal. The file upload result includes the real-time upload progress information of the file to be uploaded and / or the file upload completion status.
[0042] Alternatively, the method may further include the following operations:
[0043] After the file to be uploaded is uploaded, the second information processing terminal releases relevant resources (such as memory resources), which is not limited in this embodiment.
[0044] Optionally, this solution can be customized according to the characteristics of different platforms to provide a more efficient and controllable upload solution, which is not limited in the embodiments of this application.
[0045] As can be seen, the intelligent file upload method described in the embodiments of this application can realize intelligent file upload function by performing multiple steps such as determining file upload request information, file mapping operation, data reading and uploading operation, and information interaction operation through the first information processing terminal and the second information processing terminal. This is beneficial to improving the comprehensiveness and integrity of an intelligent file upload method, as well as its rationality and feasibility. In addition, by performing corresponding block reading and writing operations on the file content mapping results and performing corresponding data reading and uploading operations on the block data in the data cache area, reading, writing and uploading are performed according to blocks, avoiding loading large files into memory all at once. This is beneficial to improving the efficiency, stability and accuracy of file transmission and upload, thereby improving the accuracy and reliability of uploaded files, reducing memory consumption and occupation, and providing flexibility and platform compatibility for file upload.
[0046] In an optional embodiment, the second information processing terminal performs corresponding block reading and writing operations on the file content mapping result to a preset data cache area, and performs corresponding data reading and uploading operations on the block data in the data cache area according to the target device address information to obtain the file upload result of the file to be uploaded, which may include:
[0047] The second information processing end performs corresponding data block reading operations on the file content mapping result according to the preset file size block unit, obtains at least one first block data, and writes each first block data to the preset data cache area to obtain at least one second block data;
[0048] Based on the target device address information and the upload sorting information corresponding to all the second block data, perform corresponding content reading and file upload operations on each second block data in the data cache area;
[0049] During the content reading and file upload operations, the real-time upload progress information of the file to be uploaded is determined based on the content reading and file upload operations.
[0050] After the content reading and file upload operations are completed, the file upload completion status of the file to be uploaded is determined based on the content reading and file upload operations. The file upload completion status is used to indicate information related to successful file upload and / or information related to file upload failure.
[0051] Optionally, a circular buffer (a method of managing data using a circular buffer algorithm) is used to operate on the file data stream. A fixed-size buffer is set, with 64kb as the block size of the buffer. The read and write order is performed block by block (i.e., reading and writing are performed one block at a time). The read and write order is determined by the movement of the read and write pointers and the size of the buffer. The write pointer is responsible for writing data to the buffer, and the read pointer is responsible for reading data from the buffer. Both are used to ensure correct data reading and writing and to avoid conflicts or data overwriting errors. Data reading and writing in the buffer are performed simultaneously. The read data is uploaded in sequence. This application embodiment does not limit this.
[0052] Optionally, the upload sorting information can be determined by the read and write order, or by other information parameters; this application embodiment does not limit this.
[0053] Optionally, based on the target device address information and the upload sorting information corresponding to all the second block data determined above, the corresponding content reading and file upload operations are performed on each second block data in the data cache area. For example, each second block data in the data cache area is read in order based on the upload sorting information and uploaded to the target server corresponding to the target device address information. This application embodiment does not limit this.
[0054] Optionally, the data buffer area can be a circular buffer or other types of buffer areas; furthermore, the circular buffer can be as shown in Figure 8(b) of the specification, but the embodiments of this application are not limited thereto.
[0055] Optionally, each second block of data may exist in a corresponding first block of data; this application embodiment does not impose any limitation on this.
[0056] Optionally, the above-mentioned determination of the real-time upload progress information of the file to be uploaded based on the content reading and file upload operations is illustrated by, for example, the real-time upload speed is calculated by the size and time of the data written to the target server. This application embodiment does not limit this.
[0057] Optionally, the information related to successful file upload may include, but is not limited to, one or more of the following: information reflecting whether the file was uploaded successfully; information reflecting whether the entire file or part of the file was uploaded successfully; information reflecting the specific part of the file that was uploaded successfully; information reflecting the specific part of the file that was not uploaded successfully; and information reflecting the reason for the failure to upload successfully. This application embodiment does not limit the information.
[0058] Optionally, the information related to file upload failure may include, but is not limited to, one or more of the following: information reflecting whether the file upload failed; information reflecting the failure of the entire file upload or the failure of part of the file upload; information reflecting the specific file portion that failed to upload; information reflecting the specific file portion that did not fail to upload; and information reflecting the reason for the upload failure. This application embodiment does not limit the information.
[0059] Optionally, this solution can use the Java layer to manage the success and failure status of the upload. Compared with all the code in C / C++, it has a more flexible error handling mechanism. The Java layer supports breakpoint resumption and automatic retry, which improves the fault tolerance of the upload process. This application does not limit the implementation.
[0060] As can be seen, this optional embodiment can perform data block reading operations and write to the data cache area based on preset file size block units, perform content reading and file upload operations on block data based on upload sorting information, and determine the real-time upload progress information and file upload completion status of the file to be uploaded based on content reading and file upload operations. This is beneficial to improving the comprehensiveness and rationality of data reading and upload methods. Reading, writing and uploading according to blocks can effectively manage memory usage, avoid overflow, optimize memory usage, avoid loading large files into memory all at once, reduce memory consumption, improve the stability of file upload and application operation, improve the flexibility and orderliness of block files, and improve the accuracy and efficiency of data reading and uploading of the file to be uploaded.
[0061] In another alternative embodiment, the method may further include the following operations:
[0062] During the content reading and file upload operations, the second information processing terminal calculates the first real-time upload speed based on the determined data size and time information of the file to be uploaded to the target server;
[0063] Based on the determined upload requirements, determine whether the first real-time upload speed meets the preset abnormal read upload conditions;
[0064] When it is determined that the first real-time upload speed meets the abnormal read upload conditions, the corresponding first buffer parameter and read parameter adjustment operations are performed based on the data cache area.
[0065] Alternatively, the method may further include the following operations:
[0066] When it is determined that the first real-time upload speed does not meet the abnormal read upload conditions, the second information processing end is executed again to calculate the first real-time upload speed based on the determined data size and time information of the file to be uploaded to the target server.
[0067] Optionally, the above-mentioned adjustment operations of the first buffer parameter and read parameter based on the data cache area are performed. For example, the buffer value and read size are appropriately reduced to reduce network load. This application embodiment does not limit this.
[0068] Optionally, based on the determined upload demand information, it is determined whether the first real-time upload speed meets the preset abnormal read upload conditions. For example, it is determined whether the upload speed has decreased. This application embodiment does not limit this.
[0069] Further optionally, when uploading files using the app, the real-time upload speed is calculated based on the size and time of the data written to the target server, and a speed is recorded every second; an average value is taken every 30 seconds, and the size of the corresponding upload buffer value is controlled by this average value. This application embodiment does not limit this.
[0070] As can be seen, this optional embodiment can perform corresponding first buffer parameter and read parameter adjustment operations when it is determined that the first real-time upload speed meets the abnormal read upload conditions. This is beneficial to improving the comprehensiveness, integrity and rationality of an intelligent file upload method, thereby improving the accuracy and reliability of the adjustment of the buffer parameters and read parameters of the file to be uploaded, as well as the timeliness and efficiency of the adjustment of the buffer parameters and read parameters of the file to be uploaded. This helps to alleviate network congestion, reduce network load and improve the smoothness of reading and uploading the file to be uploaded.
[0071] In yet another optional embodiment, after performing the corresponding first buffer parameter and read parameter adjustment operations based on the data cache region, the method may further include the following operations:
[0072] The second information processing end determines the second real-time upload speed corresponding to the file to be uploaded and the data cache area;
[0073] Based on the upload request information, determine whether the second real-time upload speed meets the preset valid upload recovery conditions;
[0074] When it is determined that the second real-time upload speed meets the conditions for effective upload recovery, the corresponding second buffer parameters and read parameters are adjusted based on the data cache area.
[0075] Alternatively, the method may further include the following operations:
[0076] When it is determined that the second real-time upload speed does not meet the effective upload recovery conditions, the corresponding third buffer parameter and read parameter adjustment operation is performed based on the data cache area, and / or the corresponding additional exception handling operation is performed until the real-time upload speed meets the effective upload recovery conditions.
[0077] Optionally, the above-mentioned second buffer parameter and read parameter adjustment operations are performed based on the data cache area. For example, increasing the buffer value and the read data size can improve the transmission efficiency. This application embodiment does not limit this.
[0078] Optionally, the above-mentioned determination of whether the second real-time upload speed meets the preset valid upload recovery conditions based on the upload demand information is illustrated by, for example, determining whether the upload speed has recovered (increased). This application embodiment does not limit this.
[0079] As can be seen, this optional embodiment can perform corresponding second buffer parameter and read parameter adjustment operations when it is determined that the second real-time upload speed meets the effective upload recovery conditions. This is beneficial to improving the comprehensiveness, integrity and rationality of an intelligent file upload method, thereby improving the accuracy and reliability of the adjustment of the buffer parameters and read parameters of the file to be uploaded, as well as the timeliness and efficiency of the adjustment of the buffer parameters and read parameters of the file to be uploaded, thus improving the upload transmission efficiency of the file to be uploaded.
[0080] In another optional embodiment, the second information processing terminal determines whether the first real-time upload speed meets the preset abnormal read upload conditions based on the determined upload demand information, which may include:
[0081] The second information processing terminal determines the first expected upload speed threshold based on the determined upload demand information;
[0082] Determine whether the first real-time upload speed is greater than or equal to the first expected upload speed threshold;
[0083] When it is determined that the first real-time upload speed is greater than or equal to the first expected upload speed threshold, it is determined that the first real-time upload speed does not meet the preset abnormal read upload conditions.
[0084] When it is determined that the first real-time upload speed is less than the first expected upload speed threshold, the first real-time upload speed is determined to meet the preset abnormal read upload conditions.
[0085] Optionally, the upload requirement information may include, but is not limited to, one or more of the following: upload scenario information, upload time requirement information, upload efficiency requirement information, upload effect requirement information, upload energy consumption requirement information, upload network bandwidth configuration information, upload network latency information, upload server performance configuration information, upload method and tool information, concurrent upload quantity information, and other information that can be used to determine the expected upload speed. This application embodiment does not limit the information.
[0086] As can be seen, this optional embodiment can determine the result of abnormal read upload conditions being met by comparing the size of the first real-time upload speed with the determined first expected upload speed threshold. This is beneficial to improving the comprehensiveness and rationality of the method for determining the result of abnormal read upload conditions being met, and thus beneficial to improving the accuracy and reliability of the determined result of abnormal read upload conditions being met. In this way, it is beneficial to improve the timeliness, accuracy and reliability of buffering and read parameter adjustment based on the result of abnormal read upload conditions being met.
[0087] In another optional embodiment, the second information processing terminal determines whether the second real-time upload speed meets the preset valid upload recovery conditions based on the upload demand information, which may include:
[0088] The second information processing terminal determines the second expected upload speed threshold based on the upload demand information;
[0089] Determine whether the second real-time upload speed is greater than or equal to the preset second expected upload speed threshold;
[0090] When it is determined that the second real-time upload speed is greater than or equal to the second expected upload speed threshold, it is determined that the second real-time upload speed meets the preset effective upload recovery conditions.
[0091] When it is determined that the second real-time upload speed is less than the second expected upload speed threshold, it is determined that the second real-time upload speed does not meet the preset valid upload recovery conditions.
[0092] As can be seen, this optional embodiment can determine the result of effective upload recovery condition satisfaction by comparing the second real-time upload speed with the determined second expected upload speed threshold. This is beneficial to improving the comprehensiveness and rationality of the method for determining the result of effective upload recovery condition satisfaction, and thus to improving the accuracy and reliability of the determined result of effective upload recovery condition satisfaction. In turn, it is beneficial to improve the timeliness, accuracy and reliability of buffer and read parameter adjustment based on the result of effective upload recovery condition satisfaction.
[0093] Example 2
[0094] Please refer to Figure 2, which is a flowchart illustrating another intelligent file upload method disclosed in this application. The method described in Figure 2 can be applied to a file upload device, which is communicatively connected to a network attached storage device. The file upload device includes a first information processing terminal and a second information processing terminal, which are not limited in this application embodiment. As shown in Figure 2, this intelligent file upload method includes the following operations:
[0095] 201. The first information processing terminal determines the file upload request for the file to be uploaded.
[0096] Optionally, the file upload request may be sent by the user to the first information processing terminal, and this embodiment of the application does not limit it.
[0097] 202. The first information processing terminal performs the corresponding initialization operation on the file upload request to obtain the file attribute information and target device address information of the file to be uploaded. The target device includes the network attached storage device, and the file attribute information includes file path information and / or file Uniform Resource Identifier information.
[0098] Optionally, the file path information can correspond to PATH; the file Uniform Resource Identifier information can correspond to URI, but this application embodiment does not limit this.
[0099] 203. The first information processing terminal determines the file descriptor information of the file to be uploaded based on the file attribute information.
[0100] Further optionally, the first information processing terminal, based on the file attribute information, determines the file descriptor information of the file to be uploaded, which may include:
[0101] The first information processing terminal determines the file descriptor information of the file to be uploaded by using the file path information and / or file Uniform Resource Identifier information.
[0102] 204. The first information processing terminal determines the file upload request information of the file to be uploaded based on the file descriptor information and the target device address information, and sends the file upload request information to the second information processing terminal.
[0103] 205. The second information processing end performs the corresponding file mapping operation on the file to be uploaded based on the file descriptor information, and obtains the file content mapping result of the file to be uploaded.
[0104] 206. The second information processing terminal performs corresponding block reading and writing operations on the file content mapping result to the preset data cache area, and performs corresponding data reading and uploading operations on the block data in the data cache area according to the target device address information to obtain the file upload result of the file to be uploaded, and sends the file upload result to the first information processing terminal. The file upload result includes the real-time upload progress information of the file to be uploaded and / or the file upload completion status.
[0105] For other descriptions of steps 201-206 in this embodiment, please refer to the detailed description of steps 101-103 in Embodiment 1. These descriptions will not be repeated in this embodiment.
[0106] As can be seen, the embodiments of this application can realize intelligent file upload functionality by performing multiple steps, such as determining file upload request information, file mapping, data reading and uploading, and information interaction, through the first and second information processing terminals. This is beneficial for improving the comprehensiveness and integrity of an intelligent file upload method, as well as its rationality and feasibility. Furthermore, by performing corresponding block reading and writing operations on the file content mapping results and performing corresponding data reading and uploading operations on the block data in the data cache area, reading, writing, and uploading are performed according to blocks, avoiding loading large files entirely into memory at once, thereby improving file transfer speed. This improves the efficiency, stability, and accuracy of file transmission, thereby enhancing the accuracy and reliability of uploaded files, reducing memory consumption and usage, and providing flexibility and platform compatibility for file uploads. Furthermore, it provides a specific method for determining file upload request information. By performing corresponding initialization operations on the file upload request to obtain file attribute information and target device address information, and further determining file descriptor information based on the file attribute information, the file upload request information is obtained. This improves the comprehensiveness and rationality of the method for determining file upload request information, thereby enhancing the accuracy and reliability of the determined file upload request information, and ultimately improving the accuracy and relevance of subsequent file uploads based on this information.
[0107] Example 3
[0108] Please refer to Figure 3, which is a schematic diagram of the structure of a first information processing terminal disclosed in an embodiment of this application. As shown in Figure 3, the first information processing terminal may include:
[0109] Memory 401 storing executable program code;
[0110] Processor 402 coupled to memory 401;
[0111] The processor 402 calls the executable program code stored in the memory 401 to execute the steps in the intelligent file upload method described in Embodiment 1 or Embodiment 2.
[0112] Example 4
[0113] Please refer to Figure 4, which is a schematic diagram of the structure of a second information processing terminal disclosed in an embodiment of this application. As shown in Figure 4, the second information processing terminal may include:
[0114] Memory 501 storing executable program code;
[0115] Processor 502 coupled to memory 501;
[0116] The processor 502 calls the executable program code stored in the memory 501 to execute the steps in the intelligent file upload method described in Embodiment 1 or Embodiment 2.
[0117] Example 5
[0118] Please refer to Figure 5, which is a schematic diagram of another intelligent file upload device disclosed in this application embodiment. The file upload device is communicatively connected to a network attached storage device and includes a first information processing end and a second information processing end. As shown in Figure 5, the file upload device may include:
[0119] Memory 601 storing executable program code;
[0120] Processor 602 coupled to memory 601;
[0121] Furthermore, it may also include an input interface 603 coupled to the processor 602 and an output interface 604;
[0122] The processor 602 calls the executable program code stored in the memory 601 to execute the steps in the intelligent file upload method described in Embodiment 1 or Embodiment 2.
Claims
1. An intelligent file upload method, the method being applied in a file upload device, the file upload device being communicatively connected to a network attached storage device, and the file upload device including a first information processing end and a second information processing end, the method comprising: The first information processing terminal determines the file upload request information of the file to be uploaded and sends the file upload request information to the second information processing terminal. The file upload request information includes at least the file descriptor information of the file to be uploaded and the target device address information. The target device includes the network attached storage device. The second information processing terminal performs a corresponding file mapping operation on the file to be uploaded based on the file descriptor information to obtain the file content mapping result of the file to be uploaded; The second information processing terminal performs corresponding block reading and writing operations on the file content mapping result to a preset data cache area, and performs corresponding data reading and uploading operations on the block data in the data cache area according to the target device address information to obtain the file upload result of the file to be uploaded, and sends the file upload result to the first information processing terminal. The file upload result includes the real-time upload progress information of the file to be uploaded and / or the file upload completion status.
2. The intelligent file upload method according to claim 1, wherein, The second information processing terminal performs corresponding block reading and writing operations on the file content mapping result to a preset data cache area, and performs corresponding data reading and uploading operations on the block data in the data cache area according to the target device address information, to obtain the file upload result of the file to be uploaded, including: The second information processing terminal performs corresponding data block reading operations on the file content mapping result according to the preset file size block unit, to obtain at least one first block data, and writes each first block data to a preset data cache area to obtain at least one second block data; Based on the target device address information and the upload sorting information corresponding to all the second block data, perform corresponding content reading and file upload operations on each second block data in the data cache area; During the execution of the content reading and file upload operations, the real-time upload progress information of the file to be uploaded is determined based on the content reading and file upload operations. After the content reading and file upload operations are completed, the file upload completion status of the file to be uploaded is determined based on the content reading and file upload operations. The file upload completion status is used to indicate information related to successful file upload and / or information related to failed file upload.
3. The intelligent file upload method according to claim 2, further comprising: During the execution of the content reading and file upload operations, the second information processing terminal calculates the first real-time upload speed based on the determined data size and time information of the data to be uploaded to the target server; Based on the determined upload demand information, determine whether the first real-time upload speed meets the preset abnormal read upload conditions; When it is determined that the first real-time upload speed meets the abnormal read upload condition, the corresponding first buffer parameter and read parameter adjustment operation is performed based on the data cache area.
4. The intelligent file upload method according to claim 3, wherein, After performing the corresponding first buffer parameter and read parameter adjustment operations based on the data cache area, the method further includes: The second information processing terminal determines the second real-time upload speed corresponding to the file to be uploaded and the data cache area; Based on the upload request information, determine whether the second real-time upload speed meets the preset valid upload recovery conditions; When it is determined that the second real-time upload speed meets the effective upload recovery conditions, the corresponding second buffer parameter and read parameter adjustment operations are performed based on the data cache area.
5. The intelligent file upload method according to claim 3, wherein, The second information processing terminal, based on the determined upload demand information, determines whether the first real-time upload speed meets the preset abnormal read upload conditions, including: The second information processing terminal determines the first expected upload speed threshold based on the determined upload demand information; Determine whether the first real-time upload speed is greater than or equal to the first expected upload speed threshold; When it is determined that the first real-time upload speed is greater than or equal to the first expected upload speed threshold, it is determined that the first real-time upload speed does not meet the preset abnormal read upload conditions. When it is determined that the first real-time upload speed is less than the first expected upload speed threshold, the first real-time upload speed is determined to meet the preset abnormal read upload conditions.
6. The intelligent file upload method according to claim 4, wherein, The second information processing terminal determines, based on the upload request information, whether the second real-time upload speed meets the preset valid upload recovery conditions, including: The second information processing terminal determines the second expected upload speed threshold based on the upload request information; Determine whether the second real-time upload speed is greater than or equal to the preset second expected upload speed threshold; When it is determined that the second real-time upload speed is greater than or equal to the second expected upload speed threshold, it is determined that the second real-time upload speed meets the preset effective upload recovery conditions; When it is determined that the second real-time upload speed is less than the second expected upload speed threshold, it is determined that the second real-time upload speed does not meet the preset valid upload recovery conditions.
7. The intelligent file upload method according to claim 1, wherein, The first information processing terminal determines the file upload request information for the file to be uploaded, including: The first information processing terminal determines the file upload request for the file to be uploaded; Perform corresponding initialization operations on the file upload request to obtain the file attribute information and target device address information of the file to be uploaded. The file attribute information includes file path information and / or file Uniform Resource Identifier information. Based on the file attribute information, determine the file descriptor information of the file to be uploaded; Based on the file descriptor information and the target device address information, the file upload requirement information of the file to be uploaded is determined.
8. The intelligent file upload method according to claim 3, further comprising: When it is determined that the first real-time upload speed does not meet the abnormal read upload condition, the step of calculating the first real-time upload speed based on the determined data size and time information of the file to be uploaded written to the target server is executed again.
9. The intelligent file upload method according to claim 4, the method further comprising: When it is determined that the second real-time upload speed does not meet the effective upload recovery conditions, the corresponding third buffer parameter and read parameter adjustment operation is performed based on the data cache area, and / or the corresponding additional exception handling operation is performed until the real-time upload speed meets the effective upload recovery conditions.
10. An intelligent file upload device, the file upload device being communicatively connected to the network attached storage device, the file upload device comprising a first information processing terminal and a second information processing terminal, both the first information processing terminal and the second information processing terminal comprising: Memory containing executable program code; A processor coupled to the memory; The processor calls the executable program code stored in the memory to execute an intelligent file upload method as described in any one of claims 1-9.