An intelligent file uploading method, device and system
By employing an intelligent file upload method that leverages the collaborative work of the first and second information processing terminals, file chunking for reading and writing is achieved. This solves the problems of memory overflow and network transmission speed limitations in large file uploads, improving upload efficiency and stability while reducing memory consumption.
Patent Information
- Application Number
- CN202411992427.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2044-12-30
AI Technical Summary
Existing file upload methods are prone to memory overflow when uploading large files, and network transmission speed is limited, resulting in low upload efficiency and stability.
An intelligent file upload method is adopted, which involves the first and second information processing terminals working together to perform file mapping, block reading and writing operations. Data is read and uploaded using a data cache area to avoid loading large files into memory at once, and the upload process is optimized through parameter adjustment.
It improves the efficiency, stability, and accuracy of file uploads, reduces memory consumption, provides flexibility and platform compatibility, and optimizes memory usage and network transmission.
Smart Images

Figure CN119966979B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of network file transmission, and in particular to an intelligent file uploading method, device and system. BACKGROUND
[0002] In modern information society, file data has become an important asset indispensable to various organizations and individuals, and the entire economy and society rely on data and information, so uploading and transmitting file data becomes particularly frequent and important.
[0003] Currently, the file uploading method is to read the entire file into memory at one time during the uploading process, and when uploading a large file, the phenomenon of memory overflow is prone to occur. In addition, the current file uploading system controls the file read-write speed, and when the network state is in a certain target network speed transmission environment, the system will limit the memory usage of the virtual machine and reduce the CPU frequency, resulting in limited network transmission speed, low file uploading efficiency and uploading stability. Therefore, it is particularly important to provide a method capable of improving the uploading efficiency and stability of files. SUMMARY
[0004] The present application provides an intelligent file uploading method, device and system, which can improve the uploading efficiency and stability of files, and further improve the accuracy and reliability of uploaded files.
[0005] To solve the above technical problems, the first aspect of the present application discloses an intelligent file uploading method, which is applied to a file uploading device, the file uploading device is in communication connection with a network attached storage device, and the file uploading device comprises a first information processing end and a second information processing end, and the method comprises:
[0006] The first information processing end determines the file uploading demand information of the to-be-uploaded file, and sends the file uploading demand information to the second information processing end, wherein the file uploading demand information at least comprises file descriptor information and target device address information of the to-be-uploaded file, and the target device comprises the network attached storage device;
[0007] The second information processing end performs corresponding file mapping operation on the to-be-uploaded file according to the file descriptor information, and obtains the file content mapping result of the to-be-uploaded file;
[0008] The second information processing end performs corresponding block reading and writing to a preset data cache area on the file content mapping result, and performs corresponding data reading and uploading operations on the block data in the data cache area according to the target device address information, obtains a file uploading result of the file to be uploaded, and sends the file uploading result to the first information processing end. The file uploading result includes real-time uploading progress information and / or file uploading completion information of the file to be uploaded.
[0009] As an optional implementation, in the first aspect of the application, the second information processing end performs corresponding block reading and writing to a preset data cache area on the file content mapping result, and performs corresponding data reading and uploading operations on the block data in the data cache area according to the target device address information, obtains a file uploading result of the file to be uploaded, and sends the file uploading result to the first information processing end. The file uploading result includes real-time uploading progress information and / or file uploading completion information of the file to be uploaded.
[0010] The second information processing end performs corresponding data block reading operations on the file content mapping result according to a preset file size block unit, obtains 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.
[0011] According to the target device address information and the determined uploading order information corresponding to all the second block data, the second information processing end performs corresponding content reading and file uploading operations on each second block data in the data cache area.
[0012] During the execution of the content reading and file uploading operations, the second information processing end determines real-time uploading progress information of the file to be uploaded according to the content reading and file uploading operations.
[0013] After the execution of the content reading and file uploading operations, the second information processing end determines file uploading completion information of the file to be uploaded according to the content reading and file uploading operations. The file uploading completion information indicates file uploading success information and / or file uploading failure information.
[0014] As an optional implementation, in the first aspect of the application, the method further includes:
[0015] During the execution of the content reading and file uploading operations, the second information processing end calculates a first real-time uploading speed according to the determined data size information and time information of the file to be uploaded written to the target server.
[0016] According to the determined uploading demand information, it is judged whether the first real-time uploading speed meets a preset abnormal reading and uploading condition.
[0017] When it is determined that the first real-time uploading speed meets the abnormal reading uploading condition, corresponding first buffer parameter and reading parameter regulation operations are performed based on the data cache area.
[0018] As an optional implementation, in the first aspect of the present application, after the corresponding first buffer parameter and reading parameter regulation operations are performed based on the data cache area, the method further comprises:
[0019] The second information processing end determines a second real-time uploading speed corresponding to the data cache area and the file to be uploaded;
[0020] According to the uploading demand information, it is determined whether the second real-time uploading speed meets a preset effective uploading recovery condition;
[0021] When it is determined that the second real-time uploading speed meets the effective uploading recovery condition, corresponding second buffer parameter and reading parameter regulation operations are performed based on the data cache area.
[0022] As an optional implementation, in the first aspect of the present application, the second information processing end determines whether the first real-time uploading speed meets a preset abnormal reading uploading condition according to the determined uploading demand information, comprising:
[0023] The second information processing end determines a first expected uploading speed threshold according to the determined uploading demand information;
[0024] It is determined whether the first real-time uploading speed is greater than or equal to the first expected uploading speed threshold;
[0025] When it is determined that the first real-time uploading speed is greater than or equal to the first expected uploading speed threshold, it is determined that the first real-time uploading speed does not meet the preset abnormal reading uploading condition;
[0026] When it is determined that the first real-time uploading speed is less than the first expected uploading speed threshold, it is determined that the first real-time uploading speed meets the preset abnormal reading uploading condition.
[0027] As an optional implementation, in the first aspect of the present application, the second information processing end determines whether the second real-time uploading speed meets a preset effective uploading recovery condition according to the uploading demand information, comprising:
[0028] The second information processing end determines a second expected uploading speed threshold according to the uploading demand information;
[0029] It is determined whether the second real-time uploading speed is greater than or equal to a preset second expected uploading speed threshold;
[0030] when it is judged that the second real-time uploading speed is greater than or equal to the second expected uploading speed threshold, it is determined that the second real-time uploading speed meets a preset effective uploading recovery condition;
[0031] when it is judged that the second real-time uploading speed is less than the second expected uploading speed threshold, it is determined that the second real-time uploading speed does not meet a preset effective uploading recovery condition.
[0032] As an optional implementation, in the first aspect of the present application, the first information processing end determines the file uploading demand information of the file to be uploaded, comprising:
[0033] the first information processing end determines a file uploading request for the file to be uploaded;
[0034] performing corresponding initialization operation on the file uploading request, obtaining file attribute information and target device address information of the file to be uploaded, the file attribute information comprising file path information and / or file uniform resource identifier information;
[0035] determining file descriptor information of the file to be uploaded according to the file attribute information;
[0036] determining the file uploading demand information of the file to be uploaded according to the file descriptor information and the target device address information.
[0037] The second aspect of the present application discloses an intelligent file uploading system, which comprises a file uploading device and a network attached storage device, the file uploading device and the network attached storage device being communicatively connected, the file uploading device comprising a first information processing end and a second information processing end, wherein the first information processing end comprises an uploading information determination module, and the second information processing end comprises a file mapping module and a file reading and uploading module, wherein:
[0038] the uploading information determination module is configured to determine file uploading demand information of a file to be uploaded and send the file uploading demand information to the second information processing end, the file uploading demand information at least comprising file descriptor information and target device address information of the file to be uploaded, the target device comprising the network attached storage device;
[0039] the file mapping module is configured to perform corresponding file mapping operation on the file to be uploaded according to the file descriptor information, obtaining file content mapping result of the file to be uploaded;
[0040] The file reading and uploading module is configured to perform corresponding block reading and writing to a preset data cache area on the file content mapping result, perform corresponding data reading and uploading on the block data in the data cache area according to the target device address information, obtain a file uploading result of the file to be uploaded, and send the file uploading result to the first information processing end. The file uploading result includes real-time uploading progress information and / or file uploading completion information of the file to be uploaded.
[0041] As an optional implementation, in the second aspect of the present application, the file reading and uploading module performs corresponding block reading and writing to a preset data cache area on the file content mapping result, performs corresponding data reading and uploading on the block data in the data cache area according to the target device address information, and obtains a file uploading result of the file to be uploaded. The manner specifically includes:
[0042] According to a preset file size block unit, the file reading and uploading module performs corresponding data block reading on the file content mapping result 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.
[0043] According to the target device address information and the determined uploading sequence information corresponding to all the second block data, the file reading and uploading module performs corresponding content reading and file uploading on each second block data in the data cache area.
[0044] During the execution of the content reading and file uploading operation, the file reading and uploading module determines real-time uploading progress information of the file to be uploaded according to the content reading and file uploading operation.
[0045] After the execution of the content reading and file uploading operation, the file reading and uploading module determines file uploading completion information of the file to be uploaded according to the content reading and file uploading operation. The file uploading completion information is used to represent file uploading success related information and / or file uploading failure related information.
[0046] As an optional implementation, in the second aspect of the present application, the second information processing end further includes a parameter control module, wherein:
[0047] The parameter regulation module is configured to, during the content reading and file uploading operation performed by the file reading and uploading module, calculate a first real-time uploading speed according to the determined data size information and time information for writing the file to be uploaded to a target server, determine whether the first real-time uploading speed meets a preset abnormal reading and uploading condition according to the determined uploading demand information, and perform a corresponding first buffering parameter and reading parameter regulation operation based on the data cache area when it is determined that the first real-time uploading speed meets the abnormal reading and uploading condition.
[0048] As an optional implementation, in the second aspect of the present application, the parameter regulation module is further configured to, after performing the corresponding first buffering parameter and reading parameter regulation operation based on the data cache area, determine a second real-time uploading speed corresponding to the file to be uploaded and the data cache area, determine whether the second real-time uploading speed meets a preset effective uploading recovery condition according to the uploading demand information, and perform a corresponding second buffering parameter and reading parameter regulation operation based on the data cache area when it is determined that the second real-time uploading speed meets the effective uploading recovery condition.
[0049] As an optional implementation, in the second aspect of the present application, the manner in which the parameter regulation module determines whether the first real-time uploading speed meets a preset abnormal reading and uploading condition according to the determined uploading demand information specifically includes:
[0050] determining a first expected uploading speed threshold according to the determined uploading demand information;
[0051] determining whether the first real-time uploading speed is greater than or equal to the first expected uploading speed threshold;
[0052] determining that the first real-time uploading speed does not meet the preset abnormal reading and uploading condition when it is determined that the first real-time uploading speed is greater than or equal to the first expected uploading speed threshold;
[0053] determining that the first real-time uploading speed meets the preset abnormal reading and uploading condition when it is determined that the first real-time uploading speed is less than the first expected uploading speed threshold.
[0054] As an optional implementation, in the second aspect of the present application, the manner in which the parameter regulation module determines whether the second real-time uploading speed meets a preset effective uploading recovery condition according to the uploading demand information specifically includes:
[0055] determining a second expected uploading speed threshold according to the uploading demand information;
[0056] judging whether the second real-time uploading speed is greater than or equal to a preset second expected uploading speed threshold value;
[0057] when it is judged that the second real-time uploading speed is greater than or equal to the second expected uploading speed threshold value, determining that the second real-time uploading speed satisfies a preset effective uploading recovery condition;
[0058] when it is judged that the second real-time uploading speed is less than the second expected uploading speed threshold value, determining that the second real-time uploading speed does not satisfy the preset effective uploading recovery condition.
[0059] As an optional implementation, in the second aspect of the present application, the manner in which the uploading information determination module determines the file uploading demand information of the file to be uploaded specifically includes:
[0060] determining a file uploading request for the file to be uploaded;
[0061] performing corresponding initialization operation on the file uploading request to obtain file attribute information and target device address information of the file to be uploaded, the file attribute information including file path information and / or file uniform resource identifier information;
[0062] determining file descriptor information of the file to be uploaded according to the file attribute information;
[0063] determining the file uploading demand information of the file to be uploaded according to the file descriptor information and the target device address information.
[0064] The third aspect of the present application discloses another intelligent file uploading device, which is in communication connection with the network-attached storage device, and includes a first information processing end and a second information processing end, and each of the first information processing end and the second information processing end includes:
[0065] a memory in which executable program codes are stored;
[0066] a processor coupled with the memory;
[0067] the processor invokes the executable program codes stored in the memory to execute the intelligent file uploading method disclosed in the first aspect of the present application.
[0068] The fourth aspect of the present application discloses a computer storage medium, which stores computer instructions, and when the computer instructions are invoked, are used to execute the intelligent file uploading method disclosed in the first aspect of the present application.
[0069] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0070] In the embodiment of the present application, the file uploading device is applied to a network attached storage device, and the file uploading device comprises a first information processing end and a second information processing end. In addition, the first information processing end determines file uploading requirement information of a to-be-uploaded file, and sends the file uploading requirement information to the second information processing end. The file uploading requirement information at least comprises file descriptor information and target device address information of the to-be-uploaded file, and the target device comprises the network attached storage device. The second information processing end performs corresponding file mapping operation on the to-be-uploaded file according to the file descriptor information, and obtains file content mapping result of the to-be-uploaded file. The second information processing end performs corresponding block reading and writing operation to a preset data cache area on the file content mapping result, and performs corresponding data reading and uploading operation on the block data in the data cache area according to the target device address information, obtains file uploading result of the to-be-uploaded file, and sends the file uploading result to the first information processing end. The file uploading result comprises real-time uploading progress information and / or file uploading completion condition of the to-be-uploaded file. It can be seen that the present application can realize intelligent file uploading function through the first information processing end and the second information processing end performing corresponding file uploading requirement information determination operation, file mapping operation, data reading and uploading operation, information interaction operation and other links, which is beneficial to improve the comprehensiveness and integrity of the intelligent file uploading method, and is beneficial to improve the rationality and feasibility of the intelligent file uploading method. In addition, the block reading and writing operation is performed on the file content mapping result, and the block data in the data cache area is performed corresponding data reading and uploading operation, which reads and writes and uploads according to the block, avoids loading the large file into the memory at one time, and is beneficial to improve the efficiency, stability and accuracy of the file uploading, thereby improving the accuracy and reliability of the uploaded file, reducing the memory consumption and occupation, and providing flexibility and platform compatibility of the file uploading. BRIEF DESCRIPTION OF DRAWINGS
[0071] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0072] Figure 1 is a flow diagram of an intelligent file uploading method disclosed by the embodiment of the present application;
[0073] Figure 2 is a flow diagram of another intelligent file uploading method disclosed by the embodiment of the present application;
[0074] Figure 3 is a structural schematic diagram of an intelligent file uploading device disclosed by an embodiment of the present application;
[0075] Figure 4 is a structural schematic diagram of another intelligent file uploading device disclosed by an embodiment of the present application;
[0076] Figure 5 is a structural schematic diagram of a first information processing end disclosed by an embodiment of the present application;
[0077] Figure 6 is a structural schematic diagram of a second information processing end disclosed by an embodiment of the present application;
[0078] Figure 7 is a structural schematic diagram of an intelligent file uploading system disclosed by an embodiment of the present application;
[0079] Figure 8 is a system architecture schematic diagram of an intelligent file uploading method disclosed by an embodiment of the present application;
[0080] Figure 9 is a file uploading timing schematic diagram of an intelligent file uploading method disclosed by an embodiment of the present application;
[0081] Figure 10 is an MMAP schematic diagram and a ring buffer schematic diagram disclosed by an embodiment of the present application;
[0082] Figure 11 is a system architecture schematic diagram of another intelligent file uploading method disclosed by an embodiment of the present application. DETAILED DESCRIPTION
[0083] In order to enable persons skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by persons skilled in the art without creative labor fall within the scope of the present application.
[0084] The terms "first", "second", and the like in the description and in the claims of the present application and above-described drawings are used to distinguish different objects, and are not used to describe a particular order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, device, product, or end including a series of steps or units is not limited to the listed steps or units, but can optionally include steps or units not listed, or can optionally include other steps or units inherent to the process, method, product, or end.
[0085] Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment can be included in at least one embodiment of the application. The appearance of the phrase in various places in the specification does not necessarily all refer to the same embodiment, nor is it necessarily mutually exclusive of other embodiments. It is explicitly and implicitly understood that the embodiments described herein can be combined with other embodiments.
[0086] The application discloses an intelligent file uploading method, device and system, which can realize intelligent file uploading function through corresponding file uploading demand information determination operation, file mapping operation, data reading and uploading operation, information interaction operation and other links of first information processing end and second information processing end, is conducive to improving the comprehensiveness and integrity of an intelligent file uploading method, and is conducive to improving the rationality and feasibility of an intelligent file uploading method, in addition, the corresponding block reading and writing operation is performed on the file content mapping result, and the block data in the data cache area is subjected to corresponding data reading and uploading operation, reading, writing and uploading are performed according to the block, avoiding loading all large files into the memory at once, thereby being conducive to improving the efficiency, stability and accuracy of file transmission and uploading, so as to improve the accuracy and reliability of the uploaded file, reduce memory consumption and occupation, provide flexibility and platform compatibility of file uploading. The following will be described in detail.
[0087] Embodiment one
[0088] Please refer to Figure 1 , Figure 1 is a flowchart of an intelligent file uploading method disclosed by the embodiment of the application. Wherein, Figure 1 The method described can be in a file uploading device, the file uploading device is in communication connection with a network attached storage device, and the file uploading device includes a first information processing end and a second information processing end, and the embodiment of the application is not limited. As Figure 1 The intelligent file uploading method includes the following operations:
[0089] 101、The first information processing end determines file upload demand information of the to-be-uploaded file, and sends the file upload demand information to the second information processing end, wherein the file upload demand information at least includes file descriptor information of the to-be-uploaded file and target device address information, and the target device includes a network attached storage device.
[0090] Optionally, the intelligent file uploading method described in the embodiment of the application can be applied to an Android system, and can also be applied to other systems that need to upload files, and the embodiment of the application is not limited.
[0091] Optionally, the first information processing end can be a Java layer, or can be another device capable of achieving similar information processing functions, and the embodiment of the application is not limited.
[0092] Optionally, the second information processing end can be a native code module, or can be another device capable of achieving similar information processing functions, and the embodiment of the application is not limited.
[0093] Optionally, the file descriptor information can correspond to an FID, and the target device address information can correspond to a URL. In addition, the file is obtained by managing the file descriptor (FID) in the Java or Kotlin layer, which has stronger universality, reduces the privacy policy risk of operating the file by using the FID, and is suitable for various mobile application scenarios that need to upload large files, and the embodiment of the application is not limited.
[0094] Optionally, the first information processing end and the second information processing end can interact with each other through a JNI interface, and the embodiment of the application is not limited.
[0095] Optionally, when the first information processing end is a Java layer and the second information processing end is a native code module, a system architecture diagram of the intelligent file uploading method can be referred to the accompanying drawings Figure 8 of the specification, and the embodiment of the application is not limited.
[0096] Optionally, a file uploading timing diagram of the intelligent file uploading method can be referred to the accompanying drawings Figure 9 of the specification, and the embodiment of the application is not limited.
[0097] Optionally, a system architecture diagram of another intelligent file uploading method can be referred to the accompanying drawings Figure 11 of the specification, and the embodiment of the application is not limited.
[0098] 102、The second information processing end performs corresponding file mapping operations on the to-be-uploaded file according to the file descriptor information, and obtains a file content mapping result of the to-be-uploaded file.
[0099] Further, the second information processing terminal performs corresponding file mapping operation on the file to be uploaded according to the file descriptor information, and obtains a file content mapping result of the file to be uploaded. For example, a file delivered through the file descriptor information is directly mapped to the address space of the process by combining the MMAP technology to obtain the file content mapping result, that is, the file delivered through the FID is mapped to the memory space by using the MMAP to obtain the file content mapping result, so that the file content is accessed as the memory is accessed, without explicit file I / O operation, and the file reading efficiency is improved. The embodiments of the present application are not limited.
[0100] Optionally, the MMAP example diagram can be referred to the accompanying drawings Figure 10 of the present application, and the embodiments of the present application are not limited.
[0101] 103. The second information processing terminal performs corresponding block reading and writing operation on the file content mapping result to the preset data cache area, and performs corresponding data reading and uploading operation on the block data in the data cache area according to the target device address information, obtains a file uploading result of the file to be uploaded, and sends the file uploading result to the first information processing terminal. The file uploading result includes real-time uploading progress information and / or file uploading completion condition of the file to be uploaded.
[0102] Further, the method can further include the following operations:
[0103] After the uploading of the file to be uploaded is completed, the second information processing terminal releases the related resources (such as memory resources), and the embodiments of the present application are not limited.
[0104] Optionally, the present scheme can customize the uploading scheme according to the characteristics of different platforms, and provide a more efficient and controllable uploading solution, and the embodiments of the present application are not limited.
[0105] It can be seen that the intelligent file uploading method described in the embodiments of the present application can realize intelligent file uploading function through the first information processing terminal and the second information processing terminal performing corresponding file uploading demand information determination operation, file mapping operation, data reading and uploading operation, information interaction operation and other links, which is beneficial to improve the comprehensiveness and integrity of the intelligent file uploading method, and is beneficial to improve the rationality and feasibility of the intelligent file uploading method. In addition, the block reading and writing operation is performed on the file content mapping result, and the block data in the data cache area is read and uploaded, which avoids loading the large file into the memory at once, and is beneficial to improve the efficiency, stability and accuracy of the file transmission and uploading, thereby improving the accuracy and reliability of the uploaded file, reducing the memory consumption and occupation, and providing flexibility and platform compatibility of file uploading.
[0106] In an optional embodiment, the second information processing end performs corresponding block reading and writing to the preset data cache area on the file content mapping result, 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 a file uploading result of the file to be uploaded, which can include:
[0107] The second information processing end performs corresponding data block reading operations on the file content mapping result according to a 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.
[0108] According to the target device address information and the determined uploading order information corresponding to all the second block data, corresponding content reading and file uploading operations are performed on each second block data in the data cache area.
[0109] During the execution of the content reading and file uploading operations, real-time uploading progress information of the file to be uploaded is determined according to the content reading and file uploading operations.
[0110] After the content reading and file uploading operations are completed, file uploading completion information of the file to be uploaded is determined according to the content reading and file uploading operations, and the file uploading completion information is used to represent file uploading success related information and / or file uploading failure related information.
[0111] Optionally, a ring cache area (using a ring buffer algorithm to manage data) is used to operate the file data stream, a fixed size cache area is set, 64 kb is the block size of the cache area, block-by-block reading and writing is performed in the reading and writing order, and the reading and writing order is determined by the movement of the reading and writing pointers and the size of the cache area; the write pointer is responsible for writing data to the cache area, the read pointer is responsible for reading data from the cache area, and the two are ensured to correctly read and write data and avoid conflict or data overwrite errors through conditional judgment; the cache area data reading and writing are performed simultaneously; the read data is sequentially uploaded, and the embodiment of the present application is not limited.
[0112] Optionally, the uploading order information can be determined by reading and writing order, or can be determined by other information parameters, and the embodiment of the present application is not limited.
[0113] Optionally, the content reading and file uploading operation is performed on each second block data in the data cache area according to the target device address information and the uploading sequence information corresponding to the determined second block data, for example, each second block data in the data cache area is read and uploaded to the target server corresponding to the target device address information in sequence based on the uploading sequence information, and the embodiments of the present application are not limited in this regard.
[0114] Optionally, the data cache area can be a ring buffer or other type of buffer area, and further, the ring buffer can refer to the ring buffer shown in the accompanying drawings, and the embodiments of the present application are not limited in this regard. Figure 10
[0115] Optionally, each second block data can exist with corresponding first block data, and the embodiments of the present application are not limited in this regard.
[0116] Optionally, the real-time uploading progress information of the file to be uploaded is determined according to the content reading and file uploading operation, for example, the real-time uploading speed is calculated by the data size and time written to the target server, and the embodiments of the present application are not limited in this regard.
[0117] Optionally, the file uploading success related information can include one or more of information reflecting whether the file is successfully uploaded, information reflecting that the entire file is successfully uploaded or part of the file is successfully uploaded, information reflecting the specific successfully uploaded file part, information reflecting the specific unsuccessfully uploaded file part, information reflecting the reason for the unsuccessful uploading, and the like, and the embodiments of the present application are not limited in this regard.
[0118] Optionally, the file uploading failure related information can include one or more of information reflecting whether the file is unsuccessfully uploaded, information reflecting that the entire file is unsuccessfully uploaded or part of the file is unsuccessfully uploaded, information reflecting the specific unsuccessfully uploaded file part, information reflecting the specific successfully uploaded file part, information reflecting the reason for the unsuccessful uploading, and the like, and the embodiments of the present application are not limited in this regard.
[0119] Optionally, the present scheme can use a java layer to manage the uploading success and failure states, and compared with all C / C++ codes, the error handling mechanism is more flexible, the breakpoint resuming and automatic retry are supported in the JAVA layer, and the fault tolerance of the uploading process is improved, and the embodiments of the present application are not limited in this regard.
[0120] It can be seen that the optional embodiment can perform data chunk reading operation and writing to data cache area based on preset file size chunk unit, perform content reading and file uploading operation on chunk data based on uploading order information, and determine real-time uploading progress information and file uploading completion condition of the to-be-uploaded file according to the content reading and file uploading operation, which is beneficial to improving the comprehensiveness and rationality of the data reading and uploading method, reading, writing and uploading according to the chunk, effectively managing the memory usage, avoiding overflow, optimizing the memory usage, avoiding loading all the large files into the memory at once, reducing the memory consumption, being beneficial to improving the stability of file uploading and application running, improving the flexibility and orderliness of the chunk file, and being beneficial to improving the accuracy and efficiency of data reading and uploading of the to-be-uploaded file.
[0121] In another optional embodiment, the method can further include the following operations:
[0122] In the process of performing the content reading and file uploading operation, the second information processing end calculates the first real-time uploading speed according to the determined data size information and time information for writing the to-be-uploaded file to the target server.
[0123] According to the determined uploading demand information, it is judged whether the first real-time uploading speed meets the preset abnormal reading and uploading condition.
[0124] When it is judged that the first real-time uploading speed meets the abnormal reading and uploading condition, the corresponding first buffer parameter and reading parameter regulation operation is performed based on the data cache area.
[0125] Further optionally, the method can further include the following operations:
[0126] When it is judged that the first real-time uploading speed does not meet the abnormal reading and uploading condition, the step of calculating the first real-time uploading speed according to the determined data size information and time information for writing the to-be-uploaded file to the target server by the second information processing end is performed again.
[0127] Optionally, the above-mentioned performing the corresponding first buffer parameter and reading parameter regulation operation based on the data cache area is exemplified as: appropriately reducing the buffer value size and the reading size to reduce the network load, and the embodiment of the present application is not limited.
[0128] Optionally, the above-mentioned judging whether the first real-time uploading speed meets the preset abnormal reading and uploading condition according to the determined uploading demand information is exemplified as: judging whether the uploading speed is reduced, and the embodiment of the present application is not limited.
[0129] Further optionally, when uploading a file using the app, the real-time uploading speed is calculated by writing the data size and time to the target server, and a speed is recorded every second; an average value is taken every 30 seconds, and the average value is used to control the size of the corresponding uploading buffer value. The embodiments of the present application are not limited.
[0130] It can be seen that the optional embodiment can execute the corresponding first buffer parameter and reading parameter regulation operation when it is judged that the first real-time uploading speed meets the abnormal reading uploading condition, which is beneficial to improve the comprehensiveness, integrity and rationality of the intelligent file uploading method, and further beneficial to improve the regulation accuracy and reliability of the buffer parameter and reading parameter of the to-be-uploaded file, and beneficial to improve the regulation timeliness and efficiency of the buffer parameter and reading parameter of the to-be-uploaded file, thereby beneficial to relieve network congestion, reduce network load, and improve the reading uploading fluency of the to-be-uploaded file.
[0131] In yet another optional embodiment, after the above-mentioned operation of executing the corresponding first buffer parameter and reading parameter regulation operation based on the data cache area, the method can further include the following operations:
[0132] The second information processing end determines a second real-time uploading speed corresponding to the to-be-uploaded file and the data cache area;
[0133] According to the uploading demand information, it is judged whether the second real-time uploading speed meets a preset effective uploading recovery condition;
[0134] When it is judged that the second real-time uploading speed meets the effective uploading recovery condition, the corresponding second buffer parameter and reading parameter regulation operation is executed based on the data cache area.
[0135] Further optionally, the method can further include the following operations:
[0136] When it is judged that the second real-time uploading speed does not meet the effective uploading recovery condition, the corresponding third buffer parameter and reading parameter regulation operation is executed based on the data cache area, and / or the corresponding additional abnormal processing operation is executed until the real-time uploading speed meets the effective uploading recovery condition.
[0137] Optionally, the above-mentioned operation of executing the corresponding second buffer parameter and reading parameter regulation operation based on the data cache area is exemplified as increasing the buffer value and the reading data size to improve the transmission efficiency, and the embodiments of the present application are not limited.
[0138] Optionally, the above-mentioned operation of judging whether the second real-time uploading speed meets the preset effective uploading recovery condition according to the uploading demand information is exemplified as judging whether the uploading speed is recovered (increased), and the embodiments of the present application are not limited.
[0139] It can be seen that the optional embodiment can execute corresponding second buffer parameter and reading parameter regulation operation when it is judged that the second real-time uploading speed meets the effective uploading recovery condition, which is beneficial to improve the comprehensiveness, integrity and rationality of the intelligent file uploading method, and further beneficial to improve the regulation accuracy and reliability of the buffer parameter and reading parameter of the to-be-uploaded file, and beneficial to improve the regulation timeliness and efficiency of the buffer parameter and reading parameter of the to-be-uploaded file, thereby beneficial to improve the uploading transmission efficiency of the to-be-uploaded file.
[0140] In yet another optional embodiment, the second information processing end determines whether the first real-time uploading speed meets the preset abnormal reading uploading condition according to the determined uploading demand information, which can include:
[0141] The second information processing end determines the first expected uploading speed threshold according to the determined uploading demand information.
[0142] It is judged whether the first real-time uploading speed is greater than or equal to the first expected uploading speed threshold.
[0143] When it is judged that the first real-time uploading speed is greater than or equal to the first expected uploading speed threshold, it is determined that the first real-time uploading speed does not meet the preset abnormal reading uploading condition.
[0144] When it is judged that the first real-time uploading speed is less than the first expected uploading speed threshold, it is determined that the first real-time uploading speed meets the preset abnormal reading uploading condition.
[0145] Optionally, the uploading demand information can include but is not limited to one or more of uploading scene information, uploading time demand information, uploading efficiency demand information, uploading effect demand information, uploading energy consumption demand information, uploading network bandwidth configuration information, uploading network delay condition information, uploading server performance configuration information, uploading method and tool information, concurrent uploading quantity information and other information capable of determining the expected uploading speed, etc., and the embodiments of the present application are not limited thereto.
[0146] It can be seen that the optional embodiment can determine the abnormal reading uploading condition meeting result through the size comparison between the first real-time uploading speed and the determined first expected uploading speed threshold, which is beneficial to improve the comprehensiveness and rationality of the abnormal reading uploading condition meeting result determination method, and further beneficial to improve the accuracy and reliability of the determined abnormal reading uploading condition meeting result, thereby beneficial to improve the regulation timeliness, accuracy and reliability of the buffer and reading parameter based on the abnormal reading uploading condition meeting result.
[0147] In yet another optional embodiment, the second information processing end determines whether the second real-time uploading speed meets the preset effective uploading recovery condition according to the uploading demand information, which can include:
[0148] The second information processing end determines a second expected upload speed threshold according to the upload demand information.
[0149] It is judged whether the second real-time upload speed is greater than or equal to the preset second expected upload speed threshold.
[0150] When it is judged 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 condition.
[0151] When it is judged 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 effective upload recovery condition.
[0152] It can be seen that the optional embodiment can determine the effective upload recovery condition meeting result through the size comparison between the second real-time upload speed and the determined second expected upload speed threshold, which is beneficial to improve the comprehensiveness and rationality of the effective upload recovery condition meeting result determination method, and further beneficial to improve the accuracy and reliability of the determined effective upload recovery condition meeting result, thereby beneficial to improve the timeliness, accuracy and reliability of the buffer and reading parameter regulation based on the effective upload recovery condition meeting result.
[0153] Embodiment Two
[0154] Please refer to Figure 2 , Figure 2 is another flowchart of the intelligent file upload method disclosed by the embodiment of the application. Among them, Figure 2 The method described can be applied to a file upload device, the file upload device is in communication connection with a network attached storage device, and the file upload device includes a first information processing end and a second information processing end, which are not limited by the embodiment of the application. As Figure 2 The intelligent file upload method includes the following operations:
[0155] 201, the first information processing end determines a file upload request for a to-be-uploaded file.
[0156] Optionally, the file upload request can be transmitted by a user to the first information processing end, and the embodiment of the application is not limited.
[0157] 202, the first information processing end performs corresponding initialization operation on the file upload request, obtains file attribute information and target device address information of the to-be-uploaded file, 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.
[0158] Optionally, the file path information can correspond to a PATH, and the file uniform resource identifier information can correspond to a URI, and the embodiments of the present application are not limited in this regard.
[0159] 203. The first information processing terminal determines file descriptor information of the file to be uploaded according to the file attribute information.
[0160] Further optionally, the first information processing terminal determines file descriptor information of the file to be uploaded according to the file attribute information can include:
[0161] The first information processing terminal determines file descriptor information of the file to be uploaded through the file path information and / or the file uniform resource identifier information.
[0162] 204. The first information processing terminal determines file upload requirement information of the file to be uploaded according to the file descriptor information and the target device address information, and sends the file upload requirement information to the second information processing terminal.
[0163] 205. The second information processing terminal performs corresponding file mapping operations on the file to be uploaded according to the file descriptor information, and obtains file content mapping results of the file to be uploaded.
[0164] 206. The second information processing terminal performs corresponding block reading and writing operations to the preset data cache area on the file content mapping results, and performs corresponding data reading and uploading operations on the block data in the data cache area according to the target device address information, obtains file upload results of the file to be uploaded, and sends the file upload results to the first information processing terminal. The file upload results include real-time upload progress information and / or file upload completion information of the file to be uploaded.
[0165] In the embodiments of the present application, for other descriptions of steps 201-206, please refer to the detailed description of steps 101-103 in Embodiment 1, and the embodiments of the present application will not be repeated here.
[0166] It can be seen that the embodiment of the application can realize intelligent file uploading function through the first information processing end and the second information processing end to perform corresponding file uploading demand information determination operation, file mapping operation, data reading and uploading operation, information interaction operation and other links, which is beneficial to improve the comprehensiveness and integrity of the intelligent file uploading method, and is beneficial to improve the rationality and feasibility of the intelligent file uploading method, in addition, the corresponding block reading and writing operation is performed on the file content mapping result, and the block data in the data cache area is subjected to corresponding data reading and uploading operation, reading, writing and uploading are performed according to the block, avoiding loading all the large files into the memory at once, thereby being beneficial to improve the efficiency, stability and accuracy of file transmission and uploading, thereby being beneficial to improve the accuracy and reliability of the uploaded file, reducing memory consumption and occupation, providing flexibility and platform compatibility of file uploading; and the specific determination method of file uploading demand information can be provided, the corresponding initialization operation is performed on the file uploading request to obtain file attribute information and target device address information, and the file descriptor information is further determined according to the file attribute information, and then the file uploading demand information is obtained, which is beneficial to improve the comprehensiveness and rationality of the file uploading demand information determination method, thereby being beneficial to improve the accuracy and reliability of the determined file uploading demand information, thereby being beneficial to improve the file uploading accuracy and fitting based on the file uploading demand information.
[0167] Embodiment three
[0168] Please refer to Figure 3 , Figure 3 is a structural schematic diagram of an intelligent file uploading device disclosed by the embodiment of the application. Wherein, Figure 3 The file uploading device described includes a first information processing end and a second information processing end, wherein the first information processing end includes an uploading information determination module 301, and the second information processing end includes a file mapping module 302 and a file reading and uploading module 303, wherein:
[0169] The uploading information determination module 301 is used for determining file uploading demand information of a file to be uploaded, and sending the file uploading demand information to the second information processing end, the file uploading demand information at least including file descriptor information and target device address information of the file to be uploaded, and the target device including a network attached storage device.
[0170] The file mapping module 302 is used for performing corresponding file mapping operation on the file to be uploaded according to the file descriptor information, to obtain file content mapping result of the file to be uploaded.
[0171] The file reading and uploading module 303 is configured to perform corresponding block reading and writing operations on the file content mapping result to the preset data cache area, perform corresponding data reading and uploading operations on the block data in the data cache area according to the target device address information, obtain a file uploading result of the file to be uploaded, and send the file uploading result to the first information processing terminal. The file uploading result includes real-time uploading progress information and / or file uploading completion information of the file to be uploaded.
[0172] It can be seen that the implementation Figure 3 The described intelligent file uploading system can realize intelligent file uploading functions through corresponding file uploading demand information determination operations, file mapping operations, data reading and uploading operations, information interaction operations and other links of the first information processing terminal and the second information processing terminal. This is conducive to improving the comprehensiveness and integrity of the intelligent file uploading method, and improving the rationality and feasibility of the intelligent file uploading method. In addition, the block reading and writing operations are performed on the file content mapping result, and the block data in the data cache area is read and uploaded. Reading, writing and uploading are performed in blocks, which avoids loading large files into memory at once, thereby improving the efficiency, stability and accuracy of file transmission and uploading, and improving the accuracy and reliability of the uploaded file, reducing memory consumption and occupation, and providing flexibility and platform compatibility for file uploading.
[0173] In an optional embodiment, the file reading and uploading module 303 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 a file uploading result of the file to be uploaded. The specific implementation manner includes:
[0174] According to the preset file size block unit, perform corresponding data block reading operations on the file content mapping result to obtain at least one first block data, and write each first block data to the preset data cache area to obtain at least one second block data;
[0175] According to the target device address information and the determined uploading order information corresponding to all second block data, perform corresponding content reading and file uploading operations on each second block data in the data cache area;
[0176] During the content reading and file uploading operations, the real-time uploading progress information of the file to be uploaded is determined according to the content reading and file uploading operations;
[0177] After the content reading and file uploading operation is executed, the file uploading completion condition of the to-be-uploaded file is determined according to the content reading and file uploading operation, and the file uploading completion condition is used to represent file uploading success related information and / or file uploading failure related information.
[0178] It can be seen that the implementation Figure 4 The described file uploading system can perform data block reading operation and write to the data cache area based on the preset file size block unit, perform content reading and file uploading operation on the block data based on the uploading order information, and determine the real-time uploading progress information and the file uploading completion condition of the to-be-uploaded file according to the content reading and file uploading operation, which is beneficial to improve the comprehensiveness and rationality of the data reading and uploading method, read and write and upload according to the block, effectively manage the memory usage, avoid overflow, optimize the memory usage, avoid loading a large file into the memory at once, reduce the memory consumption, improve the stability of file uploading and application running, improve the flexibility and orderliness of the block file, and improve the accuracy and efficiency of data reading and uploading of the to-be-uploaded file.
[0179] In another optional embodiment, as Figure 4 shown, the second information processing end further includes a parameter regulation module 304, wherein:
[0180] The parameter regulation module 304 is configured to, during the execution of the content reading and file uploading operation by the file reading and uploading module 303, calculate a first real-time uploading speed according to the determined data size information and time information for writing the to-be-uploaded file to the target server; determine whether the first real-time uploading speed meets a preset abnormal reading and uploading condition according to the determined uploading demand information; and when it is determined that the first real-time uploading speed meets the abnormal reading and uploading condition, perform corresponding first buffer parameter and reading parameter regulation operation based on the data cache area.
[0181] It can be seen that the implementation Figure 4 The described file uploading system can also perform corresponding first buffer parameter and reading parameter regulation operation when it is determined that the first real-time uploading speed meets the abnormal reading and uploading condition, which is beneficial to improve the comprehensiveness, integrity and rationality of an intelligent file uploading method, and further improve the regulation accuracy and reliability of the buffer parameter and reading parameter of the to-be-uploaded file, and improve the regulation timeliness and efficiency of the buffer parameter and reading parameter of the to-be-uploaded file, thereby alleviating network congestion, reducing network load, and improving the reading and uploading fluency of the to-be-uploaded file.
[0182] In yet another optional embodiment, the parameter regulation module 304 is further configured to, after performing the corresponding first buffer parameter and reading parameter regulation operation based on the data cache area, determine a second real-time uploading speed corresponding to the data cache area and the file to be uploaded; determine whether the second real-time uploading speed meets a preset effective uploading recovery condition according to the uploading demand information; and perform a corresponding second buffer parameter and reading parameter regulation operation based on the data cache area when it is determined that the second real-time uploading speed meets the effective uploading recovery condition.
[0183] It can be seen that the implementation Figure 4 The described file uploading system can also perform a corresponding second buffer parameter and reading parameter regulation operation when it is determined that the second real-time uploading speed meets the effective uploading recovery condition, which is conducive to improving the comprehensiveness, integrity and rationality of an intelligent file uploading method, and further conducive to improving the regulation accuracy and reliability of the buffer parameter and reading parameter of the file to be uploaded, and conducive to improving the regulation timeliness and efficiency of the buffer parameter and reading parameter of the file to be uploaded, thereby conducive to improving the uploading transmission efficiency of the file to be uploaded.
[0184] In yet another optional embodiment, the parameter regulation module 304 determines whether the first real-time uploading speed meets the preset abnormal reading uploading condition according to the determined uploading demand information in the following manner:
[0185] determining a first expected uploading speed threshold according to the determined uploading demand information;
[0186] determining whether the first real-time uploading speed is greater than or equal to the first expected uploading speed threshold;
[0187] determining that the first real-time uploading speed does not meet the preset abnormal reading uploading condition when it is determined that the first real-time uploading speed is greater than or equal to the first expected uploading speed threshold;
[0188] determining that the first real-time uploading speed meets the preset abnormal reading uploading condition when it is determined that the first real-time uploading speed is less than the first expected uploading speed threshold.
[0189] It can be seen that the implementation Figure 4 The described file uploading system can also determine the abnormal reading uploading condition meeting result through a size comparison between the first real-time uploading speed and the determined first expected uploading speed threshold, which is conducive to improving the comprehensiveness and rationality of the abnormal reading uploading condition meeting result determination manner, and further conducive to improving the accuracy and reliability of the determined abnormal reading uploading condition meeting result, thereby conducive to improving the regulation timeliness, accuracy and reliability of the buffer and reading parameter based on the abnormal reading uploading condition meeting result.
[0190] In still another optional embodiment, the parameter regulation module 304 determines whether the second real-time uploading speed satisfies the preset effective uploading recovery condition according to the uploading demand information in the following manner:
[0191] According to the uploading demand information, a second expected uploading speed threshold is determined;
[0192] It is determined whether the second real-time uploading speed is greater than or equal to the preset second expected uploading speed threshold;
[0193] When it is determined that the second real-time uploading speed is greater than or equal to the second expected uploading speed threshold, it is determined that the second real-time uploading speed satisfies the preset effective uploading recovery condition;
[0194] When it is determined that the second real-time uploading speed is less than the second expected uploading speed threshold, it is determined that the second real-time uploading speed does not satisfy the preset effective uploading recovery condition.
[0195] It can be seen that, in the embodiments Figure 4 The described file uploading system can also determine the effective uploading recovery condition satisfaction result through a size comparison between the second real-time uploading speed and the determined second expected uploading speed threshold, which is beneficial to improving the comprehensiveness and rationality of the effective uploading recovery condition satisfaction result determination manner, and further beneficial to improving the accuracy and reliability of the determined effective uploading recovery condition satisfaction result, thereby being beneficial to improving the timeliness, accuracy and reliability of the buffer and reading parameter regulation based on the effective uploading recovery condition satisfaction result.
[0196] In still another optional embodiment, the uploading information determination module 301 determines the file uploading demand information of the file to be uploaded in the following manner:
[0197] A file uploading request for the file to be uploaded is determined;
[0198] A corresponding initialization operation is performed on the file uploading request, and file attribute information and target device address information of the file to be uploaded are obtained, the file attribute information including file path information and / or file uniform resource identifier information;
[0199] According to the file attribute information, file descriptor information of the file to be uploaded is determined;
[0200] According to the file descriptor information and the target device address information, the file uploading demand information of the file to be uploaded is determined.
[0201] It can be seen that, in the embodiments Figure 4The described file uploading system can also provide a specific determination manner of file uploading requirement information, perform corresponding initialization operation on the file uploading request to obtain file attribute information and target device address information, further determine file descriptor information according to the file attribute information, and then obtain the file uploading requirement information, which is beneficial to improving the comprehensiveness and rationality of the determination manner of the file uploading requirement information, and further improving the accuracy and reliability of the determined file uploading requirement information, thereby improving the accuracy and fittingness of subsequent file uploading based on the file uploading requirement information.
[0202] Embodiment four
[0203] Please refer to Figure 5 , Figure 5 is a structural schematic diagram of a first information processing end disclosed by an embodiment of the application. As shown in Figure 5 , the first information processing end can include:
[0204] a memory 401 storing executable program codes;
[0205] a processor 402 coupled with the memory 401;
[0206] The processor 402 invokes the executable program codes stored in the memory 401, and is configured to execute the steps in the intelligent file uploading method described in Embodiment One or Embodiment Two.
[0207] Embodiment five
[0208] Please refer to Figure 6 , Figure 6 is a structural schematic diagram of a second information processing end disclosed by an embodiment of the application. As shown in Figure 6 , the second information processing end can include:
[0209] a memory 501 storing executable program codes;
[0210] a processor 502 coupled with the memory 501;
[0211] The processor 502 invokes the executable program codes stored in the memory 501, and is configured to execute the steps in the intelligent file uploading method described in Embodiment One or Embodiment Two.
[0212] Embodiment six
[0213] Please refer to Figure 7 , Figure 7 is a structural schematic diagram of another intelligent file uploading device disclosed by an embodiment of the application. The file uploading device is in communication connection with a network attached storage device, and the file uploading device includes a first information processing end and a second information processing end. As shown in Figure 7As shown, the file uploading device can include:
[0214] a memory 601 storing executable program code;
[0215] a processor 602 coupled with the memory 601;
[0216] Further, an input interface 603 and an output interface 604 coupled with the processor 602 can be further included.
[0217] The processor 602 invokes the executable program code stored in the memory 601 to execute the steps in the intelligent file uploading method described in embodiment one or embodiment two.
[0218] Embodiment seven
[0219] The embodiment of the present application discloses a computer storage medium storing a computer program for electronic data exchange, wherein the computer program causes a computer to execute the steps in the intelligent file uploading method described in embodiment one or embodiment two.
[0220] Embodiment eight
[0221] The embodiment of the present application discloses a computer program product including a non-transitory computer readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute the steps in the intelligent file uploading method described in embodiment one or embodiment two.
[0222] The above-described device embodiments are only schematic, wherein the modules illustrated as separate components can or can not be physically separate, and the components illustrated as modules can or can not be physical modules, i.e., can be located in one place, or can be distributed on multiple network modules. Part or all of the modules can be selected according to actual needs to achieve the purpose of the present embodiment scheme. Those skilled in the art can understand and implement without creative labor.
[0223] Those skilled in the art can clearly understand the implementation of the various embodiments by means of software and the necessary general hardware platform through the above specific description of the embodiments, and of course, the embodiments can also be implemented by hardware. Based on such understanding, the above technical solutions, essentially or in other words, the part of the prior art that contributes to the present application can be embodied in the form of a software product. The computer software product can be stored in a computer readable storage medium, including a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disk storage, a magnetic disk storage, a magnetic tape storage, or any other computer readable medium that can be used to carry or store data.
[0224] Finally, it should be noted that: the intelligent file uploading method, device and system disclosed by the embodiments of the present application are only the preferred embodiments of the present application, and are used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that; the technical solutions recorded in the foregoing embodiments can still be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. An intelligent file uploading method, characterized in that, The method is applied to a file uploading device, the file uploading device is connected with a network attached storage device, and the file uploading device comprises a first information processing end and a second information processing end, and the method comprises the following steps of: The first information processing end determines file uploading demand information of a to-be-uploaded file, and sends the file uploading demand information to the second information processing end, wherein the file uploading demand information at least comprises file descriptor information and target device address information of the to-be-uploaded file, and the target device comprises the network attached storage device; The second information processing end performs corresponding file mapping operation on the to-be-uploaded file according to the file descriptor information, and obtains file content mapping result of the to-be-uploaded file; The second information processing end performs corresponding block reading and writing operation to a preset data cache area on the file content mapping result, and performs corresponding data reading and uploading operation on the block data in the data cache area according to the target device address information, obtains file uploading result of the to-be-uploaded file, and sends the file uploading result to the first information processing end, wherein the file uploading result comprises real-time uploading progress information and / or file uploading completion condition of the to-be-uploaded file.
2. The intelligent file uploading method of claim 1, wherein, The second information processing end performs corresponding block reading and writing operation to a preset data cache area on the file content mapping result, and performs corresponding data reading and uploading operation on the block data in the data cache area according to the target device address information, obtains file uploading result of the to-be-uploaded file, comprising: The second information processing end performs corresponding data block reading operation on the file content mapping result according to a preset file size block unit, obtains at least one first block data, and writes each first block data into a preset data cache area to obtain at least one second block data; According to the target device address information and the determined uploading sequence information corresponding to all the second block data, the second information processing end performs corresponding content reading and file uploading operation on each second block data in the data cache area; During the execution of the content reading and file uploading operation, the real-time uploading progress information of the to-be-uploaded file is determined according to the content reading and file uploading operation; After the content reading and file uploading operation is executed, the file uploading completion condition of the to-be-uploaded file is determined according to the content reading and file uploading operation, and the file uploading completion condition is used to represent file uploading success related information and / or file uploading failure related information.
3. The intelligent file uploading method of claim 2, wherein, The method further comprises: During the execution of the content reading and file uploading operation, the second information processing end calculates a first real-time uploading speed according to the determined data size information and time information of the to-be-uploaded file written into the target server; According to the determined uploading demand information, it is judged whether the first real-time uploading speed meets a preset abnormal reading and uploading condition; When it is judged that the first real-time uploading speed meets the abnormal reading uploading condition, corresponding first buffer parameter and reading parameter regulation operations are performed based on the data cache area.
4. The intelligent file uploading method of claim 3, wherein, After the corresponding first buffer parameter and reading parameter regulation operations are performed based on the data cache area, the method further comprises: The second information processing end determines a second real-time uploading speed corresponding to the data cache area and the file to be uploaded; According to the uploading demand information, it is judged whether the second real-time uploading speed meets a preset effective uploading recovery condition; When it is judged that the second real-time uploading speed meets the effective uploading recovery condition, corresponding second buffer parameter and reading parameter regulation operations are performed based on the data cache area.
5. The intelligent file uploading method of claim 3, wherein, The second information processing end judges whether the first real-time uploading speed meets a preset abnormal reading uploading condition according to the determined uploading demand information, comprising: The second information processing end determines a first expected uploading speed threshold according to the determined uploading demand information; It is judged whether the first real-time uploading speed is greater than or equal to the first expected uploading speed threshold; When it is judged that the first real-time uploading speed is greater than or equal to the first expected uploading speed threshold, it is determined that the first real-time uploading speed does not meet the preset abnormal reading uploading condition; When it is judged that the first real-time uploading speed is less than the first expected uploading speed threshold, it is determined that the first real-time uploading speed meets the preset abnormal reading uploading condition.
6. The intelligent file uploading method of claim 4, wherein, The second information processing end judges whether the second real-time uploading speed meets a preset effective uploading recovery condition according to the uploading demand information, comprising: The second information processing end determines a second expected uploading speed threshold according to the uploading demand information; It is judged whether the second real-time uploading speed is greater than or equal to the preset second expected uploading speed threshold; When it is judged that the second real-time uploading speed is greater than or equal to the second expected uploading speed threshold, it is determined that the second real-time uploading speed meets the preset effective uploading recovery condition; When it is judged that the second real-time uploading speed is less than the second expected uploading speed threshold, it is determined that the second real-time uploading speed does not meet the preset effective uploading recovery condition.
7. The intelligent file uploading method according to any one of claims 1-6, wherein, The first information processing end determines file uploading demand information of a file to be uploaded, comprising: The first information processing end determines a file uploading request for a file to be uploaded; Corresponding initialization operations are performed on the file uploading request to obtain file attribute information and target device address information of the file to be uploaded, and the file attribute information comprises file path information and / or file uniform resource identifier information; According to the file attribute information, file descriptor information of the file to be uploaded is determined; According to the file descriptor information and the target device address information, file uploading demand information of the file to be uploaded is determined.
8. An intelligent file upload system characterized by, The file uploading system comprises a file uploading device and a network attached storage device, the file uploading device is communicatively connected with the network attached storage device, the file uploading device comprises a first information processing end and a second information processing end, wherein the first information processing end comprises an uploading information determining module, and the second information processing end comprises a file mapping module and a file reading and uploading module, wherein: The uploading information determining module is configured to determine file uploading requirement information of a to-be-uploaded file, and send the file uploading requirement information to the second information processing end, the file uploading requirement information at least comprises file descriptor information and target device address information of the to-be-uploaded file, and the target device comprises the network attached storage device. The file mapping module is configured to perform a corresponding file mapping operation on the to-be-uploaded file according to the file descriptor information, and obtain a file content mapping result of the to-be-uploaded file. The file reading and uploading module is configured to perform a corresponding block reading and writing operation on the file content mapping result to a preset data cache area, perform a corresponding data reading and uploading operation on the block data in the data cache area according to the target device address information, obtain a file uploading result of the to-be-uploaded file, and send the file uploading result to the first information processing end, the file uploading result comprises real-time uploading progress information and / or file uploading completion information of the to-be-uploaded file.
9. An intelligent file upload device, characterized by, The file uploading device is communicatively connected with the network attached storage device, the file uploading device comprises a first information processing end and a second information processing end, and the first information processing end and the second information processing end both comprise: A memory storing executable program codes; A processor coupled with the memory; The processor invokes the executable program codes stored in the memory to execute the intelligent file uploading method according to any one of claims 1-7.
10. A computer storage medium, characterized in that, The computer storage medium stores computer instructions, when the computer instructions are invoked, are configured to execute the intelligent file uploading method according to any one of claims 1-7.
Citation Information
Patent Citations
Log data display method and device and electronic equipment
CN115905154A
Data read-write device and method for dynamic efficient buffer, electronic equipment and medium
CN119149451A