A data upload method, apparatus and electronic device

By obtaining the actual performance data of the upload nodes to calculate the node weights and selecting candidate nodes for file uploads, the problem of low node utilization in existing technologies is solved, and a more efficient file upload service is achieved.

CN119583535BActive Publication Date: 2026-05-26BEIJING QIYI CENTURY SCI & TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING QIYI CENTURY SCI & TECH CO LTD
Filing Date
2024-11-20
Publication Date
2026-05-26

Smart Images

  • Figure CN119583535B_ABST
    Figure CN119583535B_ABST
Patent Text Reader

Abstract

This disclosure relates to the field of cloud computing technology, and in particular to a data upload method, apparatus, and electronic device. The method includes: upon receiving a file upload request from a client for uploading a preset file, acquiring at least two upload nodes and actual performance data for each upload node; determining a node weight corresponding to each upload node based on the actual performance data; selecting upload nodes with a node weight greater than a preset weight as candidate nodes capable of processing the file upload request; and receiving the preset file through one or more of the candidate nodes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of cloud computing technology, and in particular to a data uploading method, apparatus, and electronic device. Background Technology

[0002] In modern internet applications, file upload service is a crucial function. Whether it's cloud storage services, file sharing platforms, content management systems, or social media platforms, they all need to provide users with an efficient and reliable file upload experience.

[0003] Currently, most file upload services allocate upload nodes based on static configuration or load balancing strategies (such as round-robin or random selection). These methods are relatively simple, but they cannot dynamically adapt to changes in the actual performance of upload nodes. For example, a node may be overloaded during peak hours, causing a decrease in upload speed or an increase in error rate, while other nodes may be idle and underutilized.

[0004] Therefore, how to improve the utilization rate of upload nodes has become an urgent problem to be solved. Summary of the Invention

[0005] To address the aforementioned technical problems, this disclosure provides a data uploading method, apparatus, and electronic device.

[0006] The technical solution disclosed herein is as follows:

[0007] In a first aspect, this disclosure provides a data upload method, comprising: upon receiving a file upload request from a client for uploading a preset file, acquiring at least two upload nodes and actual performance data for each upload node; determining the node weight corresponding to each upload node based on the actual performance data; wherein the node weight is inversely proportional to the node utilization rate corresponding to the actual performance data; selecting upload nodes with node weights greater than preset weights as candidate nodes capable of processing the file upload request; and receiving the preset file through one or more of the candidate nodes.

[0008] Secondly, this disclosure provides a data uploading device, comprising: a processing unit configured to, upon receiving a file upload request from a client for uploading a preset file, control a transceiver unit to acquire at least two upload nodes and actual performance data of each upload node; the processing unit is further configured to determine a node weight corresponding to each upload node based on the actual performance data acquired by the transceiver unit; wherein the node weight is inversely proportional to the node utilization rate corresponding to the actual performance data; the processing unit is further configured to select upload nodes with node weights greater than a preset weight as candidate nodes capable of processing the file upload request; and the processing unit is further configured to receive the preset file through one or more of the candidate nodes.

[0009] Thirdly, this disclosure provides an electronic device, including: a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to cause the electronic device to implement the data uploading method as provided in any of the second aspects when executing the computer program.

[0010] Fourthly, the present invention provides a computer-readable storage medium, comprising: storing a computer program on the computer-readable storage medium, wherein the computer program is executed by a processor using a data uploading method as provided in any of the second aspects.

[0011] Fifthly, the present invention provides a computer program product that, when run on a computer, causes the computer to perform a data uploading method as provided in any of the second aspects.

[0012] It should be noted that the aforementioned computer instructions may be stored, in whole or in part, on the first computer-readable storage medium. The first computer-readable storage medium may be packaged together with the processor of the electronic device, or it may be packaged separately from the processor of the electronic device; this disclosure does not impose any limitations on this.

[0013] The descriptions of the second, third, fourth, and fifth aspects in this disclosure can be referenced to the detailed description of the first aspect; and the beneficial effects of the descriptions of the second, third, fourth, and fifth aspects can be referenced to the analysis of the beneficial effects of the first aspect, which will not be repeated here.

[0014] In this disclosure, the names of the aforementioned electronic devices do not limit the devices or functional modules themselves. In actual implementation, these devices or functional modules may appear under other names. As long as the functions of each device or functional module are similar to those of this disclosure, they fall within the scope of the claims of this disclosure and their equivalents.

[0015] These or other aspects of this disclosure will become more readily apparent in the following description.

[0016] The technical solution provided in this disclosure has the following advantages compared with the prior art:

[0017] The data upload method disclosed herein, upon receiving a file upload request from a client for uploading a preset file, acquires at least one upload node and the actual performance data of each upload node. Then, based on the actual performance data, it determines the node weight corresponding to each upload node. Since the node weight is inversely proportional to the node utilization rate corresponding to the actual performance data, upload nodes can be filtered, such as selecting upload nodes with a node weight greater than a preset weight as candidate nodes. This allows upload nodes with low utilization rates to handle file upload requests, thereby improving the node utilization rate. Subsequently, an instruction message containing candidate nodes is sent to a preset user account; this instruction message instructs the client to upload the preset file through one or more upload nodes corresponding to the candidate nodes. By using node weights to filter out upload nodes with low utilization rates, the number of file upload requests processed by those upload nodes can be increased, thus improving the node utilization rate. Attached Figure Description

[0018] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0019] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 One of the flowcharts illustrating the data upload method provided in this embodiment of the disclosure;

[0021] Figure 2 A second schematic flowchart illustrating the data upload method provided in this embodiment of the disclosure;

[0022] Figure 3 The third schematic flowchart of the data upload method provided in this embodiment of the disclosure;

[0023] Figure 4 The fourth schematic flowchart of the data upload method provided in this embodiment of the disclosure;

[0024] Figure 5 Fifth flowchart illustrating the data upload method provided in this embodiment of the disclosure;

[0025] Figure 6 This is a schematic diagram of the structure of the data upload device provided in the embodiments of this disclosure;

[0026] Figure 7This is a schematic diagram of the server structure provided in an embodiment of the present disclosure;

[0027] Figure 8 This is a schematic diagram of the structure of a computer program product for a data uploading method provided in an embodiment of the present disclosure. Detailed Implementation

[0028] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.

[0029] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.

[0030] The display device provided in this application can have various implementation forms, such as a television, a smart television, a laser projection device, a monitor, an electronic bulletin board, an electronic table, etc. Figure 1 and Figure 2 This is one specific embodiment of the display device of this application.

[0031] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0032] For example, taking a server as the execution subject of the data upload method provided in the embodiments of this disclosure, the data upload method provided in the embodiments of this disclosure will be described.

[0033] Figure 1 This is a flowchart illustrating a data upload method according to an exemplary embodiment, such as... Figure 1 As shown, it includes: S11-S14.

[0034] S11. Upon receiving a file upload request from the client for uploading a preset file, obtain at least one upload node and the actual performance data of each upload node.

[0035] In some examples, users can install a client on their electronic devices to upload preset files. Once launched, the client establishes a communication connection with the server. Users can then upload preset files through this client. When a user needs to upload a preset file, they can perform a long upload operation on the client. In response, the client sends a file upload request to the server. Upon receiving the file upload request from the client, the server obtains at least one upload node capable of handling the request, along with the actual performance data of each upload node.

[0036] In some examples, at least one upload node capable of handling file upload requests is obtained, including:

[0037] At least one upload node capable of handling the file upload request can be determined based on the Internet Protocol (IP) address in the file upload request. For example, using the first coordinate (e.g., longitude and latitude) corresponding to the IP address as the center, the distance between the second coordinate (e.g., longitude and latitude) corresponding to the upload node and the first coordinate is calculated. Upload nodes with a distance less than or equal to a preset distance are selected as at least one upload node capable of handling the file upload request.

[0038] Alternatively, the server's memory may have a pre-configured table mapping preset coordinate intervals to node intervals, where each node interval contains at least one upload node. The server can query this table based on a first coordinate to determine the preset coordinate interval into which the first coordinate falls, and then use the upload node in the corresponding node interval as at least one upload node capable of processing file upload requests.

[0039] S12. Based on actual performance data, determine the node weight corresponding to each upload node. The node weight is inversely proportional to the node utilization rate corresponding to the actual performance data.

[0040] In some examples, actual performance data includes total upload traffic, average upload speed, upload error rate, average CPU utilization, and average memory utilization.

[0041] In some examples, the actual performance data of the currently calculated upload node can be input into the weight calculation formula to obtain the node weight corresponding to the currently calculated upload node; the weight calculation formula is obtained based on historical performance data. The process of obtaining the weight calculation formula is as follows:

[0042] Obtain historical performance data for at least one upload node capable of uploading files within each historical period; wherein, the historical performance data includes total upload traffic, average upload rate, upload error rate, average CPU utilization, and average memory utilization;

[0043] Based on the ratios of total upload traffic, average upload speed, upload error rate, average CPU utilization, and average memory utilization from all historical performance data, a first coefficient for total upload traffic, a second coefficient for average upload speed, a third coefficient for upload error rate, a fourth coefficient for average CPU utilization, and a fifth coefficient for average memory utilization are determined. For example, if the total upload traffic is 1500MB, the average upload speed is 1.5MB / s, the upload error rate is 0.1%, the average CPU utilization is 30%, and the average memory utilization is 25%, then the ratio of these five factors is 1500000:1500:1:300:250, meaning the first coefficient is 1500000, the second coefficient is 1500, the third coefficient is 1, the fourth coefficient is 300, and the fifth coefficient is 250.

[0044] The weight calculation formula is obtained by fitting the first, second, third, fourth, and fifth coefficients.

[0045] For example, the formula for calculating weights can be:

[0046] node w = -α1×traffic+α2×errorRate+α3×speed±α4×cpuUtil+α5×memoryUtil.

[0047] Among them, node w α represents the node weight, α1 represents the first coefficient, α2 represents the second coefficient, α3 represents the third coefficient, α4 represents the fourth coefficient, α5 represents the fifth coefficient, trafffc represents the total upload traffic in the actual performance data, errorRate represents the upload error rate in the actual performance data, speed represents the average upload speed in the actual performance data, cpuUtil represents the average CPU utilization in the actual performance data, and memoryUtil represents the average memory utilization in the actual performance data.

[0048] In this way, the actual performance data of the currently calculated upload node can be input into the weight calculation formula to calculate the weight and obtain the node weight corresponding to the currently calculated upload node.

[0049] In some examples, the total upload traffic equals the sum of the upload traffic within the current period.

[0050] In some examples, the average upload rate is equal to the ratio of total upload traffic to the duration of the current period.

[0051] In some examples, the upload error rate is equal to the ratio of the number of preset files that were not uploaded correctly in the current period to the number of preset files that were uploaded in the current period.

[0052] In some examples, the average CPU utilization is equal to the ratio of the CPU utilization acquired at each moment in the current period to the total number of moments contained in the current period.

[0053] In some examples, average memory utilization is equal to the ratio of memory utilization at each moment in the current period to the total number of moments in the current period.

[0054] It should be noted that the node weight is inversely proportional to the total number of file upload requests currently being processed by the upload node. That is, the larger the total number of file upload requests currently being processed by the upload node, the smaller the corresponding node weight, and thus the lower the probability that the upload node will be selected as a candidate node. This can optimize the node utilization of upload nodes.

[0055] In some examples, the actual performance data of the upload node can be input into a weight analysis model to determine the node weight corresponding to that upload node. The training process of the weight analysis model is as follows:

[0056] Obtain training sample data and the labeling results of the training sample data; wherein, the training sample data includes at least one historical performance data, and the labeling results include the node weights corresponding to the historical performance data.

[0057] The training sample data is input into the neural network model for learning, and the prediction results of the neural network model on the training sample data are obtained.

[0058] Based on the prediction and labeling results, the network parameters of the neural network model are adjusted until the neural network model converges, thus obtaining the weight analysis model.

[0059] In some examples, the node utilization of an upload node is equal to the number of file upload requests processed within a preset period.

[0060] S13. Select upload nodes with a weight greater than the preset weight as candidate nodes that can process file upload requests.

[0061] S14. Receive the preset file through one or more candidate nodes.

[0062] In some examples, after identifying candidate nodes, the server needs to send an instruction message containing the candidate nodes to a preset user account. This instruction message directs the client to upload a preset file through one or more upload nodes corresponding to the candidate nodes. When a candidate node contains multiple upload nodes, the client can upload the preset file in parallel through these multiple upload nodes. For example, the client can split the preset file into a target number of parts, where the target number of parts equals the total number of upload nodes in the candidate node. Then, the client uploads one copy of the split preset file to each upload node.

[0063] For example, if the candidate nodes include three upload nodes, namely upload node 1, upload node 2, and upload node 3, then the target number of parts is determined to be 3. The client needs to split the preset file into 3 parts, namely split file 1, split file 2, and split file 3. At this time, the client can upload split file 1 to upload node 1, split file 2 to upload node 2, and split file 3 to upload node 3.

[0064] Subsequently, when a user needs to download the preset file, they can perform the download operation on the client. In response, the client sends a download request to the server. Upon receiving the download request, the server determines the upload nodes storing the preset file (e.g., upload node 1, upload node 2, and upload node 3). The server then sends the list of these upload nodes to the client. After receiving the upload nodes from the server, the client downloads segment 1 (upload node 1), segment 2 (upload node 2), and segment 3 (upload node 3), thus completing the download of the preset file.

[0065] As described above, the data upload method provided in this embodiment, upon receiving a file upload request from a client for uploading a preset file, acquires at least one upload node and the actual performance data of each upload node. Then, based on the actual performance data, it determines the node weight corresponding to each upload node. Since the node weight is inversely proportional to the node utilization rate corresponding to the actual performance data, the higher the node utilization rate of an upload node, the lower its corresponding node weight, and vice versa. This allows for the filtering of upload nodes, such as selecting upload nodes with node weights greater than a preset weight as candidate nodes. This allows upload nodes with lower utilization rates to handle file upload requests, thereby improving the node utilization rate of upload nodes. Subsequently, an instruction message containing candidate nodes is sent to a preset user account; this instruction message instructs the client to upload the preset file through one or more upload nodes corresponding to the candidate nodes. By using node weights to filter out upload nodes with lower utilization rates, the number of file upload requests processed by that upload node can be increased, thereby improving the node utilization rate of the upload node.

[0066] In some feasible examples, the file upload request includes an Internet Protocol address; combined with Figure 1 ,like Figure 2 As shown, the above S11 can be implemented by the following S110 and S111.

[0067] S110. Upon receiving a file upload request from the client for uploading a preset file, obtain the Internet Protocol address from the file upload request.

[0068] S111. Based on the Internet Protocol address, obtain the actual performance data of each upload node in the service area corresponding to the Internet Protocol address within the current period.

[0069] In some feasible examples, combining Figure 1 ,like Figure 3 As shown, the above S12 can be implemented by the following S120 and S121.

[0070] S120: Send the actual performance data to the preset message queue.

[0071] In some examples, to reduce the consumption of computing resources, the actual performance data is sent to a preset message queue after it is obtained, thereby improving the system's response speed.

[0072] In some examples, the default message queue can be a Kafka message queue.

[0073] S121. Use a preset stream processing framework to process the actual performance data in the preset message queue according to a preset period, and determine the node weight corresponding to each upload node.

[0074] In some examples, the default stream processing framework can be the Flink stream processing framework.

[0075] In some examples, the preset period can be 10 minutes.

[0076] In some feasible examples, combining Figure 1 ,like Figure 4 As shown, the above S12 can be implemented in the following S122.

[0077] S122. For each upload node, perform the following operation: input the actual performance data of the upload node into the weight calculation formula to calculate the weight, and obtain the node weight corresponding to the currently calculated upload node; wherein, the weight calculation formula is obtained by fitting historical performance data.

[0078] In some feasible examples, combining Figure 1 ,like Figure 5 As shown, before executing S11, the data upload method provided in this embodiment of the disclosure further includes S15-S17.

[0079] S15. Obtain historical performance data of at least one upload node for each period of historical file upload requests; wherein, the historical performance data includes total upload traffic, average upload rate, upload error rate, average CPU utilization and average memory utilization.

[0080] S16. Based on the ratios of total upload traffic, average upload speed, upload error rate, average CPU utilization, and average memory utilization in all historical performance data, determine the first coefficient for total upload traffic, the second coefficient for average upload speed, the third coefficient for upload error rate, the fourth coefficient for average CPU utilization, and the fifth coefficient for average memory utilization.

[0081] S17. Fit the first, second, third, fourth, and fifth coefficients to obtain the weight calculation formula.

[0082] In some feasible examples, actual performance data includes total upload traffic, average upload rate, upload error rate, average CPU utilization, and average memory utilization.

[0083] The foregoing primarily describes the solutions provided by the embodiments of the present invention from a methodological perspective. To achieve the aforementioned functions, it includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments disclosed herein, the present invention can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.

[0084] In this embodiment of the invention, the data uploading device can be divided into functional modules according to the above method example. For example, each function can be divided into its own functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division; in actual implementation, there may be other division methods.

[0085] like Figure 6 As shown in the diagram, an embodiment of the present invention provides a structural schematic of a data uploading device 10. The data uploading device 10 includes a processing unit 101 and a transceiver unit 102.

[0086] The processing unit 101 is configured to, upon receiving a file upload request from a client for uploading a preset file, control the transceiver unit 102 to acquire at least one upload node and the actual performance data of each upload node; the processing unit 101 is further configured to, based on the actual performance data acquired by the transceiver unit 102, determine the node weight corresponding to each upload node; wherein the node weight is inversely proportional to the node utilization rate corresponding to the actual performance data; the processing unit 101 is further configured to, as upload nodes with node weights greater than preset weights, use them as candidate nodes for processing file upload requests; the processing unit 101 is further configured to, through one or more candidate nodes, receive the preset file.

[0087] In some feasible examples, the file upload request includes an Internet Protocol address; transceiver unit 102 is specifically used to obtain the Internet Protocol address in the file upload request; and processing unit 101 is specifically used to obtain the actual performance data of each upload node in the service area corresponding to the Internet Protocol address in the current period based on the Internet Protocol address obtained by transceiver unit 102.

[0088] In some feasible examples, processing unit 101 is specifically used to send actual performance data to a preset message queue; processing unit 101 is specifically used to process the actual performance data in the preset message queue according to a preset period using a preset stream processing framework, and determine the node weight corresponding to each upload node.

[0089] In some feasible examples, the processing unit 101 is specifically used to perform the following operation for each upload node: inputting the actual performance data of the upload node into the weight calculation formula to calculate the weight, thereby obtaining the node weight corresponding to the currently calculated upload node; wherein, the weight calculation formula is obtained by fitting historical performance data.

[0090] In some implementable examples, the transceiver unit 102 is further configured to acquire historical performance data of at least one upload node for historically processable file upload requests within each period; wherein, the historical performance data includes total upload traffic, average upload rate, upload error rate, average CPU utilization, and average memory utilization; the processing unit 101 is further configured to determine a first coefficient for total upload traffic, a second coefficient for average upload rate, a third coefficient for upload error rate, a fourth coefficient for average CPU utilization, and a fifth coefficient for average memory utilization based on the ratios of the five factors (total upload traffic, average upload rate, upload error rate, average CPU utilization, and average memory utilization) in all historical performance data; the processing unit 101 is further configured to fit the first, second, third, fourth, and fifth coefficients to obtain a weight calculation formula.

[0091] In some feasible examples, actual performance data includes total upload traffic, average upload rate, upload error rate, average CPU utilization, and average memory utilization.

[0092] Of course, the data uploading device 10 provided in this embodiment of the invention includes, but is not limited to, the modules described above. For example, the data uploading device 10 may also include a storage unit 103. The storage unit 103 may be used to store the program code of the data uploading device 10, and may also be used to store data generated by the data uploading device 10 during operation, such as data in write requests.

[0093] Figure 7 This is a schematic diagram of the structure of a server provided in an embodiment of the present invention, such as... Figure 7 As shown, the server may include: at least one processor 51, a memory 52, a communication interface 53, a communication bus 54, and a display screen 55. The following is in conjunction with... Figure 7 A detailed introduction to each component of the server:

[0094] The processor 51 is the control center of the server and can be a single processor or a collective term for multiple processing elements. For example, the processor 51 can be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention, such as one or more DSPs, or one or more field-programmable gate arrays (FPGAs).

[0095] In a specific implementation, as one example, processor 51 may include one or more CPUs, for example... Figure 7 CPU0 and CPU1 are shown in the diagram. Furthermore, as one embodiment, the server may include multiple processors, for example... Figure 7 The processors 51 and 56 shown are illustrated. Each of these processors can be a single-core processor (Single-CPU) or a multi-core processor (Multi-CPU). Here, "processor" can refer to one or more devices, circuits, and / or processing cores used to process data (e.g., computer program instructions).

[0096] The memory 52 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or it may be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto. The memory 52 may exist independently and be connected to the processor 51 via a communication bus 54. The memory 52 may also be integrated with the processor 51.

[0097] In a specific implementation, memory 52 is used to store data from this invention and the software program for executing this invention. Processor 51 can perform various functions of the air conditioner by running or executing the software program stored in memory 52 and by calling the data stored in memory 52.

[0098] Communication interface 53, using any transceiver-like device, is used to communicate with other devices or communication networks, such as Radio Access Network (RAN), Wireless Local Area Networks (WLAN), terminals, and the cloud. Communication interface 53 may include a transceiver unit to implement acquisition functions.

[0099] The communication bus 54 can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0100] As an example, combined Figure 6 The transceiver unit 102 in the data upload device 10 performs the same functions as... Figure 7 The communication interface 53 in the data upload device 10 has the same function as the data upload device 10. The processing unit 101 in the data upload device 10 has the same function as the data upload device 10. Figure 7 The processor 51 in the data upload device 10 has the same function as the storage unit 103 in the data upload device 10. Figure 7 The memory 52 in it has the same function.

[0101] Another embodiment of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a computing device, causes the computing device to implement any of the data processing methods provided in the above examples.

[0102] In some embodiments, the disclosed method may be implemented as computer program instructions encoded in a machine-readable format on a computer-readable storage medium or on other non-transitory media or articles of art.

[0103] Figure 8A conceptual partial view of a computer program product provided in an embodiment of the present invention is shown schematically. The computer program product includes a computer program for executing computer processes on a computing device.

[0104] In one embodiment, a computer program product is provided using a signal bearer medium 410. The signal bearer medium 410 may include one or more program instructions that, when executed by one or more processors, can provide the above-mentioned... Figure 1 The described function or part of the function. Therefore, for example, refer to... Figure 1 In the embodiment shown, one or more features of S11-S14 can be provided by one or more instructions associated with the signal carrying medium 410. Furthermore, Figure 8 The program instructions in the document also describe example instructions.

[0105] In some examples, the signal carrying medium 410 may include a computer-readable medium 411, such as, but not limited to, a hard disk drive, a compact disc (CD), a digital video disc (DVD), a digital magnetic tape, a memory, a read-only memory (ROM), or a random access memory (RAM), etc.

[0106] In some implementations, the signal carrying medium 410 may include a computer recordable medium 412, such as, but not limited to, a memory, a read / write (R / W) CD, a R / W DVD, and so on.

[0107] In some implementations, the signal carrying medium 410 may include a communication medium 413, such as, but not limited to, digital and / or analog communication media (e.g., fiber optic cables, waveguides, wired communication links, wireless communication links, etc.).

[0108] The signal-bearing medium 410 can be transmitted by a wireless communication medium 413 (e.g., a wireless communication medium conforming to the IEEE 802.41 standard or other transmission protocols). One or more program instructions can be, for example, computer-executable instructions or logical implementation instructions.

[0109] In some examples, such as targeting Figure 7 The described data uploading device can be configured to provide various operations, functions, or actions in response to one or more program instructions in a computer-readable medium 411, a computer-recordable medium 412, and / or a communication medium 413.

[0110] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0111] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0112] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0113] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0114] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiments of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.

[0115] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A data uploading method, characterized in that, include: Upon receiving a file upload request from a client for uploading a preset file, obtain at least two upload nodes and the actual performance data of each upload node; Based on the actual performance data, the node weight corresponding to each upload node is determined; wherein, the node weight is inversely proportional to the node utilization rate corresponding to the actual performance data; Upload nodes with a node weight greater than a preset weight are selected as candidate nodes that can process the file upload request. The preset file is received through one or more of the candidate nodes and used to send the preset file to the server; The process of determining the node weight corresponding to each upload node based on the actual performance data includes: Send the actual performance data to a preset message queue; The actual performance data in the preset message queue is processed using a preset stream processing framework according to a preset period to determine the node weight corresponding to each upload node; wherein... For each upload node, the following operation is performed: the actual performance data of the upload node is input into the weight calculation formula to calculate the weight, thereby obtaining the node weight corresponding to the currently calculated upload node; wherein, the process of obtaining the weight calculation formula includes: Obtain historical performance data for at least one upload node that can process file upload requests in each period; wherein, the historical performance data includes total upload traffic, average upload rate, upload error rate, average CPU utilization, and average memory utilization. Based on the ratios of total upload traffic, average upload speed, upload error rate, average CPU utilization, and average memory utilization in all the historical performance data, the first coefficient for total upload traffic, the second coefficient for average upload speed, the third coefficient for upload error rate, the fourth coefficient for average CPU utilization, and the fifth coefficient for average memory utilization are determined. The weight calculation formula is obtained by fitting the first coefficient, the second coefficient, the third coefficient, the fourth coefficient, and the fifth coefficient.

2. The data upload method according to claim 1, characterized in that, The file upload request includes an Internet Protocol address; The acquisition of at least two upload nodes, and the actual performance data of each upload node, includes: Obtain the Internet Protocol address from the file upload request; Based on the Internet Protocol address, obtain the actual performance data of each upload node within the service area corresponding to the Internet Protocol address in the current period.

3. The data upload method according to claim 1, characterized in that, The weight calculation formula includes: ; in, Indicates the node weight, This represents the first coefficient. This represents the second coefficient. This refers to the third coefficient. This represents the fourth coefficient. This refers to the fifth coefficient. This represents the total upload traffic in the actual performance data. This represents the upload error rate in the actual performance data. This represents the average upload rate in the actual performance data. This represents the average CPU utilization rate in the actual performance data. This represents the average memory usage in the actual performance data.

4. The data uploading method according to any one of claims 1-3, characterized in that, The actual performance data includes total upload traffic, average upload speed, upload error rate, average CPU utilization, and average memory utilization.

5. A data uploading device, characterized in that, include: The processing unit is configured to, upon receiving a file upload request from a client for uploading a preset file, control the transceiver unit to obtain at least two upload nodes and the actual performance data of each upload node. The processing unit is further configured to determine the node weight corresponding to each upload node based on the actual performance data obtained by the transceiver unit; wherein the node weight is inversely proportional to the node utilization rate corresponding to the actual performance data; The processing unit is further configured to select upload nodes with a node weight greater than a preset weight as candidate nodes that can process the file upload request; The processing unit is further configured to receive the preset file through one or more of the candidate nodes, and to send the preset file to the archive server; The processing unit is specifically used to send the actual performance data to a preset message queue; The processing unit is specifically used to process the actual performance data in the preset message queue according to a preset period using a preset stream processing framework, and to determine the node weight corresponding to each upload node; wherein... For each upload node, the following operation is performed: the actual performance data of the upload node is input into the weight calculation formula to calculate the weight, thereby obtaining the node weight corresponding to the currently calculated upload node; wherein, the process of obtaining the weight calculation formula includes: Obtain historical performance data for at least one upload node that can process file upload requests in each period; wherein, the historical performance data includes total upload traffic, average upload rate, upload error rate, average CPU utilization, and average memory utilization. Based on the ratios of total upload traffic, average upload speed, upload error rate, average CPU utilization, and average memory utilization in all the historical performance data, the first coefficient for total upload traffic, the second coefficient for average upload speed, the third coefficient for upload error rate, the fourth coefficient for average CPU utilization, and the fifth coefficient for average memory utilization are determined. The weight calculation formula is obtained by fitting the first coefficient, the second coefficient, the third coefficient, the fourth coefficient, and the fifth coefficient.

6. The data uploading device according to claim 5, characterized in that, The file upload request includes an Internet Protocol address; The transceiver unit is specifically used to obtain the Internet Protocol address in the file upload request; The processing unit is specifically used to obtain the actual performance data of each upload node in the current period within the service area corresponding to the Internet Protocol address, based on the Internet Protocol address obtained by the transceiver unit.

7. An electronic device, characterized in that, include: A memory and a processor, the memory being used to store a computer program; the processor being used to cause the electronic device to implement the data uploading method according to any one of claims 1-4 when executing the computer program.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a computing device, causes the computing device to implement the data upload method according to any one of claims 1-4.