CN112448984A - Resource transmission method, electronic device and computer storage medium - Google Patents
Resource transmission method, electronic device and computer storage medium Download PDFInfo
- Publication number
- CN112448984A CN112448984A CN201910823478.7A CN201910823478A CN112448984A CN 112448984 A CN112448984 A CN 112448984A CN 201910823478 A CN201910823478 A CN 201910823478A CN 112448984 A CN112448984 A CN 112448984A
- Authority
- CN
- China
- Prior art keywords
- node
- resource
- access
- request
- access request
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
- H04L67/1074—Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/12—Avoiding congestion; Recovering from congestion
- H04L47/125—Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The embodiment of the application provides a resource transmission method, electronic equipment and a storage medium, wherein the resource transmission method comprises the following steps: the first node acquires an access request sent by a resource request node, and determines a second node storing the hot resource according to the information of the node to be accessed and the information of the resource to be accessed, which are carried in the access request; the first node acquires the hot spot resources on the second node and stores the hot spot resources to the local so as to provide the locally stored hot spot resources for the resource request node which requests to access the hot spot resources. The electronic equipment on the first access path directly transmits the hot spot resource to the resource request node, so that the workload of the second node is reduced, the resource access and load balance are realized more conveniently, and the bottleneck problem of the node where the hot spot resource is located is also effectively solved.
Description
Technical Field
The embodiment of the application relates to the technical field of networks, in particular to a resource transmission method, electronic equipment and a computer storage medium.
Background
With the development of communication technology, users have more and more demands on resource sharing. In many network structures, different types of resources have different requirements, and taking a Peer-to-Peer network (P2P) as an example, the Peer-to-Peer network is a distributed application architecture for distributing tasks and workloads among peers (peers), and is a network formed by Peer-to-Peer computing models in an application layer.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a resource transmission method, an electronic device and a computer storage medium, which overcome the above-mentioned shortcomings in the prior art.
In a first aspect, an embodiment of the present application provides a resource transmission method, which is applied to an electronic device, and includes:
the first node acquires an access request sent by a resource request node, and determines a second node storing the hot resource according to the information of the node to be accessed and the information of the resource to be accessed, which are carried in the access request;
the first node acquires the hot spot resources on the second node and stores the hot spot resources to the local so as to provide the locally stored hot spot resources for the resource request node which requests to access the hot spot resources.
Optionally, in an embodiment of the present application, providing a locally stored hotspot resource to a resource request node that requests to access the hotspot resource, includes:
the first node judges whether the received access request carries information for accessing the hot spot resource in the second node;
if so, intercepting the access request and transmitting the hotspot resource to the resource request node sending the access request.
Optionally, in an embodiment of the present application, the method further includes:
receiving a resource allocation request sent by a second node, wherein the resource allocation request is used for requesting the first node to process an access request received by the second node, and an access path corresponding to the access request received by the second node does not include the first node;
and acquiring an access request from the resource allocation request sent by the second node, allocating hotspot resources for the access request from locally stored hotspot resources according to the access request, and sending the allocated hotspot resources to the resource request node sending the access request.
Optionally, in an embodiment of the present application, the method further includes:
and if the first node determines that the load balancing needs to be carried out on the locally stored hot spot resources, the received new access request is sent to the second node, so that the hot spot resources are transmitted to the resource request node sending the new access request through the second node.
Optionally, in an embodiment of the present application, the first node determines whether load balancing needs to be performed on the locally stored hot spot resources according to at least one of the following:
the method comprises the following steps of the CPU frequency of a first node, the memory occupancy rate of the first node, the network bandwidth load of the first node and the number of access requests in an access queue of the first node.
Optionally, in an embodiment of the present application, before the first node acquires the access request node sent by the resource request node, the method further includes:
counting the information of the nodes to be accessed and the information of the resources to be accessed, which are carried in the received historical access requests with the set number;
and according to the statistical result, determining the resources on the nodes with the access times exceeding the preset times in the preset time period as the hot spot resources.
Optionally, in an embodiment of the present application, the first node and the second node are both nodes in a peer-to-peer network P2P, and the access request is sent to the first node and/or the second node according to a distributed hash table DHT routing rule of the P2P network.
In a second aspect, an embodiment of the present application provides an electronic device, including: a processor, a memory, and a communication module; the processor is configured to communicate with other devices via the communication module, and the processor is configured to execute the program stored in the memory to implement the method as described in the first aspect or any one of the embodiments of the first aspect.
In a third aspect, the present application provides a storage medium storing a computer program, and when the computer program is executed by a processor, the method described in the first aspect or any one of the embodiments of the first aspect is implemented.
In the embodiment of the application, when the workload of the second node is too large, the first node on the first access path directly transmits the hot resource to the resource request node, the workload of the second node is reduced, the hardware resource and the network resource of the first node are fully utilized, the load balance of the whole network is realized, the resource request node can acquire the hot resource more quickly, and the resource access and the load balance are realized more conveniently because the hot resource is acquired through the electronic equipment on the first access path without modifying the path, and the bottleneck problem of the node where the hot resource is located is also effectively solved.
Drawings
Some specific embodiments of the present application will be described in detail hereinafter by way of illustration and not limitation with reference to the accompanying drawings. The same reference numbers in the drawings identify the same or similar elements or components. Those skilled in the art will appreciate that the drawings are not necessarily drawn to scale. In the drawings:
fig. 1 is a flowchart of a resource transmission method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a peer-to-peer network according to a second embodiment of the present application;
fig. 3 is a schematic information interaction diagram of a resource transmission method according to a second embodiment of the present application;
fig. 4 is a structural diagram of an electronic device according to a third embodiment of the present application.
Detailed Description
The following further describes specific implementations of embodiments of the present application with reference to the drawings of the embodiments of the present application.
Example one
Fig. 1 shows a flowchart of a resource transmission method provided in an embodiment of the present application, where fig. 1 is a flowchart of a resource transmission method provided in an embodiment of the present application. The resource transmission method comprises the following steps:
In this embodiment, the node to be accessed is a first node, and the resource to be accessed is a hotspot resource stored on a second node. The first node and the second node may both be P2P network nodes in a P2P (Peer-to-Peer) network.
Optionally, in an embodiment of the present application, before the first node acquires the access request node sent by the resource request node, the method further includes:
counting the information of the nodes to be accessed and the information of the resources to be accessed, which are carried in the received historical access requests with the set number; and according to the statistical result, determining the resources on the nodes with the access times exceeding the preset times in the preset time period as the hot spot resources.
Optionally, in an embodiment of the present application, the first node and the second node are both nodes in a peer-to-peer network P2P, and the access request is sent to the first node and/or the second node according to a DHT (Distributed Hash Table) routing rule of the P2P network.
And 102, the first node acquires the hot spot resource on the second node and stores the hot spot resource to the local so as to provide the locally stored hot spot resource for the resource request node which requests to access the hot spot resource.
The access request sent by the resource request node can be sent to the second node through the first node, when the access request passes through the first node, the first node intercepts the access request, directly responds to the resource request node according to the access request, and transmits the hot resource, so that the load of the second node which originally should respond to the access request is reduced.
Here, two specific application scenarios are listed to illustrate how to provide locally stored hot resources to a resource requesting node that requests access to the hot resources.
In a first application scenario, a first node actively acquires a hotspot resource from a second node in response to an access request, for example, providing a locally stored hotspot resource to a resource request node requesting access to the hotspot resource, includes:
the first node judges whether the received access request carries information for accessing the hot spot resource in the second node; if so, intercepting the access request and transmitting the hotspot resource to the resource request node sending the access request.
In a second application scenario, after receiving an access request, a second node sends the access request to a first node, so as to reduce the load of the second node itself, for example, the method further includes: receiving a resource allocation request sent by a second node, wherein the resource allocation request is used for requesting the first node to process an access request received by the second node, and an access path corresponding to the access request received by the second node does not include the first node; and acquiring an access request from the resource allocation request sent by the second node, allocating hotspot resources for the access request from locally stored hotspot resources according to the access request, and sending the allocated hotspot resources to the resource request node sending the access request.
It should be noted that, if the workload of the first node itself is large due to the first node sharing too many access requests for the second node, load balancing needs to be performed on the first node.
Optionally, in an embodiment of the present application, the method further includes:
and if the first node determines that the load balancing needs to be carried out on the locally stored hot spot resources, the received new access request is sent to the second node, so that the hot spot resources are transmitted to the resource request node sending the new access request through the second node.
Optionally, in an embodiment of the present application, the first node determines whether load balancing needs to be performed on the locally stored hot spot resources according to at least one of the following:
the number of access requests in the access queue of the first node is determined according to the number of access requests in the access queue of the first node, and the number of CPU (Central Processing Unit) frequencies of the first node.
For example, when the CPU frequency of the first node is greater than or equal to the preset frequency, the memory occupancy rate of the first node is greater than or equal to the preset proportion, the network bandwidth of the first node is greater than or equal to the preset bandwidth, and the number of access requests in the access queue of the first node exceeds the preset number, it may be determined that the first node needs to perform load balancing on locally stored hot spot resources. Of course, one of the conditions may be satisfied, or when a plurality of conditions are satisfied at the same time, it is determined that the workload of the first node satisfies the second preset condition.
In the embodiment of the application, when the workload of the second node is too large, the first node on the first access path directly transmits the hot resource to the resource request node, the workload of the second node is reduced, the hardware resource and the network resource of the first node are fully utilized, the load balance of the whole network is realized, the resource request node can acquire the hot resource more quickly, and the resource access and the load balance are realized more conveniently because the hot resource is acquired through the electronic equipment on the first access path without modifying the path, and the bottleneck problem of the node where the hot resource is located is also effectively solved.
Example II,
The embodiment of the present application may be applied to various communication networks, for example, a 3G network, a 4G network, a local area network, a Peer-to-Peer network (P2P), etc., where the embodiment of the present application takes a Peer-to-Peer network as an example for description, as shown in fig. 2, fig. 2 is a schematic diagram of a Peer-to-Peer network structure provided by the second embodiment of the present application, and the Peer-to-Peer network shown in fig. 2 includes at least one node, and resources stored in each node may have the same resource and different resources, and resources on each node may be shared through the Peer-to-Peer network. Of course, this is merely an example, and the peer-to-peer network may have various structures, which are not limited in this application.
Based on the peer-to-peer network shown in fig. 2 and the resource transmission method described in the first embodiment, a second embodiment of the present invention provides a specific application scenario to explain the resource transmission method of the present application, as shown in fig. 3, fig. 3 is an information interaction schematic diagram of the resource transmission method provided in the second embodiment of the present application, the resource transmission method may be applied to a first node, a second node, and a resource request node, where the first node and the second node are nodes in the peer-to-peer network, and the resource request node may be a node in the peer-to-peer network or not, and of course, the present embodiment is only an exemplary illustration, and does not represent that the present application is limited thereto. The resource transmission method provided by the embodiment of the application comprises the following steps:
301. and the first node determines the resources on the nodes with the access times exceeding the preset times in the preset time period as the hot spot resources.
The first node can count the information of the nodes to be accessed and the information of the resources to be accessed, which are carried in the received historical access requests with the set number, and determine the resources on the nodes with the access times exceeding the preset times in the preset time period as the hot resources according to the counting result.
Step 301 may be performed by the first node, or may be performed by the second node or another node. Here, a specific example is given for explanation. For example, if a hotspot resource is on a second node and access to the hotspot resource needs to pass through a first node, the first node records the event of "accessing the second node", a list may be maintained, the number of times that at least one resource of the second node is accessed is recorded, whenever an access request requests to access the resource of the second node, the number of times that the resource is accessed in the record is added by 1, the first node queries the list every 5 seconds, and if the number of times that a certain resource is accessed is greater than a preset number of times, the resource is marked as the hotspot resource. Here, taking the time length of the preset time period as 5 seconds as an example, the number of times that each resource is accessed is periodically counted, and the time length of the preset time period may be adjusted according to the network access amount, for example, if the network access amount in a unit time is large, the time length of the preset time period may be reduced, and if the node scale is relatively stable in the P2P network, and the network computation performance of each node in the network is excellent, the time length of the preset time period may be increased. And after each period, clearing the accessed times of the resources and recalculating.
302. The first node acquires hotspot resources on the second node.
It should be noted that the first node may actively send a request to the second node to acquire the hotspot resource on the second node, or when the second node determines that load balancing needs to be performed on the locally stored hotspot resource, the second node sends the hotspot resource to the first node. When the first node finds that a certain resource corresponding to the second node is a hot resource, the first node is used as a temporary resource demander, and the hot resource is directly pulled to the second node to the local of the first node. The pull algorithm is the resource transmission algorithm established by the P2P network. For example, if the resource amount is too large and needs to be transmitted in blocks, the way for the first node to obtain the resource from the second node is still the block transmission acquisition. In addition, the second node maintains an array indicating that a resource is shared on the first node.
303. The resource requesting node sends an access request to the first node.
In this embodiment, the information of the node to be accessed in the access request indicates the second node, and the information of the resource to be accessed in the access request indicates the hot resource. The access request is used for requesting to access the hotspot resources on the second node through a plurality of first paths.
304. And when the first node determines that the received access request carries information for accessing the hot spot resource in the second node, the first node intercepts the access request and transmits the hot spot resource to the resource request node.
In another implementation, if the access request does not pass through the first node but passes through other paths without being intermediately intercepted and transmitted to the second node, the second node determines whether to share the access request to the first node according to the current load condition. Specific judgment means include, but are not limited to, the second node maintaining an access request queue, and if the queue is full, the load is considered to be too high, and the new access request needs load balancing.
305. And when the first node determines that the load balancing needs to be carried out on the locally stored hot spot resources, the first node sends the received new access request to the second node.
If the load of the second node is too heavy, the second node is shared to the first node, and similarly, when the load of the first node is too heavy, the access request is jumped back to the second node and the "deny load balancing" is identified, and the second node selects the load to other known shared nodes. If all the known shared nodes can not be in load balance, the second node solely bears the access burden and no longer carries out load balance.
The resource transmission method described in this embodiment is only an exemplary one, and does not represent that the present application is limited thereto.
Example III,
Based on the resource transmission method described in the first embodiment, an embodiment of the present application provides an electronic device, configured to execute the resource transmission method described in the first embodiment, as shown in fig. 4, where the electronic device 40 includes: at least one processor (processor)402, memory 404, bus 406, and communication Interface 408.
Wherein: the processor 402, communication interface 408, and memory 404 communicate with each other via a communication bus 406.
A communication interface 408 for communicating with other devices.
The processor 402 is configured to execute the program 410, and may specifically perform the relevant steps in the resource transmission method described in the first embodiment.
In particular, program 410 may include program code comprising computer operating instructions.
The processor 402 may be a central processing unit CPU or an application Specific Integrated circuit asic or one or more Integrated circuits configured to implement embodiments of the present invention. The electronic device comprises one or more processors, which can be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
And a memory 404 for storing a program 410. The memory 404 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The execution of the program 410 by the processor 402 may specifically implement: the first node acquires an access request sent by a resource request node, and determines a second node storing the hot resource according to the information of the node to be accessed and the information of the resource to be accessed, which are carried in the access request; the first node acquires the hot spot resources on the second node and stores the hot spot resources to the local so as to provide the locally stored hot spot resources for the resource request node which requests to access the hot spot resources.
Optionally, in an embodiment of the present application, the processor 402 executing the program 410 may further implement: the first node judges whether the received access request carries information for accessing the hot spot resource in the second node; if so, intercepting the access request and transmitting the hotspot resource to the resource request node sending the access request.
Optionally, in an embodiment of the present application, the processor 402 executing the program 410 may further implement: receiving a resource allocation request sent by a second node, wherein the resource allocation request is used for requesting the first node to process an access request received by the second node, and an access path corresponding to the access request received by the second node does not include the first node; and acquiring an access request from the resource allocation request sent by the second node, allocating hotspot resources for the access request from locally stored hotspot resources according to the access request, and sending the allocated hotspot resources to the resource request node sending the access request.
Optionally, in an embodiment of the present application, the processor 402 executing the program 410 may further implement: and if the first node determines that the load balancing needs to be carried out on the locally stored hot spot resources, the received new access request is sent to the second node, so that the hot spot resources are transmitted to the resource request node sending the new access request through the second node.
Optionally, in an embodiment of the present application, the processor 402 executing the program 410 may further implement: the first node determines whether load balancing needs to be performed on the locally stored hot spot resources according to at least one of the following conditions: the method comprises the following steps of the CPU frequency of a first node, the memory occupancy rate of the first node, the network bandwidth load of the first node and the number of access requests in an access queue of the first node.
Optionally, in an embodiment of the present application, the processor 402 executing the program 410 may further implement: counting the information of the nodes to be accessed and the information of the resources to be accessed, which are carried in the received historical access requests with the set number; and according to the statistical result, determining the resources on the nodes with the access times exceeding the preset times in the preset time period as the hot spot resources.
Optionally, in an embodiment of the present application, the first node and the second node are both nodes in a peer-to-peer network P2P, and the access request is sent to the first node and/or the second node according to a distributed hash table DHT routing rule of the P2P network.
Example four,
The embodiment of the present application provides a storage medium, which stores a computer program, and when a processor executes the computer program, the method described in the first embodiment is implemented.
The electronic device of the embodiments of the present application exists in various forms, including but not limited to:
(1) a mobile communication device: such devices are characterized by mobile communications capabilities and are primarily targeted at providing voice, data communications. Such terminals include: smart phones (e.g., iphones), multimedia phones, functional phones, and low-end phones, among others.
(2) Ultra-mobile personal computer device: the device belongs to the category of personal computers, has calculation and processing functions, and generally has the characteristic of mobile internet access. Such terminals include: PDA, MID, and UMPC devices, etc., such as ipads.
(3) A portable entertainment device: such devices can display and play multimedia content. This type of device includes: audio, video players (e.g., ipods), handheld game consoles, electronic books, and smart toys and portable car navigation devices.
(4) And other electronic devices with data interaction functions.
Thus, particular embodiments of the present subject matter have been described. Other embodiments are within the scope of the following claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may be advantageous.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular transactions or implement particular abstract data types. The application may also be practiced in distributed computing environments where transactions are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims (9)
1. A method for resource transmission, comprising:
the method comprises the steps that a first node obtains an access request sent by a resource request node, and determines a second node storing hot resources according to information of a node to be accessed and information of the resource to be accessed, wherein the information of the node to be accessed and the information of the resource to be accessed are carried in the access request;
and the first node acquires the hot spot resource on the second node and stores the hot spot resource to the local so as to provide the locally stored hot spot resource for the resource request node which requests to access the hot spot resource.
2. The method of claim 1, wherein providing the locally stored hotspot resource to a resource requesting node requesting access to the hotspot resource comprises:
the first node judges whether the received access request carries information for accessing the hot spot resource in the second node;
if so, intercepting the access request and transmitting the hotspot resource to a resource request node sending the access request.
3. The method of claim 1, further comprising:
receiving a resource allocation request sent by the second node, wherein the resource allocation request is used for requesting the first node to process an access request received by the second node, and an access path corresponding to the access request received by the second node does not include the first node;
and acquiring the access request from the resource allocation request sent by the second node, allocating hotspot resources for the access request from locally stored hotspot resources according to the access request, and sending the allocated hotspot resources to a resource request node sending the access request.
4. The method of claim 1, further comprising:
and if the first node determines that the locally stored hot spot resources need to be subjected to load balancing, sending the received new access request to the second node, so that the hot spot resources are transmitted to a resource request node sending the new access request through the second node.
5. The method of claim 4, wherein the first node determines whether the locally stored hotspot resources need to be load balanced based on at least one of:
the CPU frequency of the first node, the memory occupancy rate of the first node, the network bandwidth load of the first node, and the number of access requests in the access queue of the first node.
6. The method according to claim 1, wherein before the first node obtains the access requesting node sent by the resource requesting node, the method further comprises:
counting the information of the nodes to be accessed and the information of the resources to be accessed, which are carried in the received historical access requests with the set number;
and according to the statistical result, determining the resources on the nodes with the access times exceeding the preset times in the preset time period as the hot spot resources.
7. The method according to any of claims 1-6, wherein the first node and the second node are both nodes in a peer-to-peer network P2P, and the access request is sent to the first node and/or the second node according to a DHT routing rule of the P2P network.
8. An electronic device, comprising: a processor, a memory, and a communication module; the processor communicates with other devices through the communication module, and the processor is used for executing the program stored in the memory to realize the method of any one of claims 1 to 7.
9. A computer storage medium, characterized in that it stores a computer program which, when executed by a processor, implements the method according to any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910823478.7A CN112448984A (en) | 2019-09-02 | 2019-09-02 | Resource transmission method, electronic device and computer storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910823478.7A CN112448984A (en) | 2019-09-02 | 2019-09-02 | Resource transmission method, electronic device and computer storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112448984A true CN112448984A (en) | 2021-03-05 |
Family
ID=74734832
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910823478.7A Pending CN112448984A (en) | 2019-09-02 | 2019-09-02 | Resource transmission method, electronic device and computer storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112448984A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113542420A (en) * | 2021-07-19 | 2021-10-22 | 北京金山云网络技术有限公司 | Hotspot file processing method and device, electronic equipment and medium |
CN113810461A (en) * | 2021-08-04 | 2021-12-17 | 网宿科技股份有限公司 | Bandwidth control method, device, equipment and readable storage medium |
CN114785794A (en) * | 2022-03-29 | 2022-07-22 | 北京字节跳动网络技术有限公司 | Resource allocation method, device, equipment, medium, program product and system |
CN115857837A (en) * | 2023-02-27 | 2023-03-28 | 中国华能集团清洁能源技术研究院有限公司 | Data distribution method, device, equipment and medium in big data environment |
CN116382922A (en) * | 2023-05-10 | 2023-07-04 | 深圳高灯计算机科技有限公司 | Resource monitoring method, device, computer equipment, storage medium and product |
WO2023198128A1 (en) * | 2022-04-15 | 2023-10-19 | 华为技术有限公司 | Distributed resource sharing method and related apparatus |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101902488A (en) * | 2009-05-26 | 2010-12-01 | 北京风格九州文化传播有限公司 | Load balancing method based on hot spot resource routing cache |
CN103107944A (en) * | 2011-11-14 | 2013-05-15 | ***通信集团公司 | Content locating method and route equipment |
CN105100174A (en) * | 2014-05-22 | 2015-11-25 | ***通信集团公司 | Method, device and system for scheduling Internet resource |
CN108696895A (en) * | 2017-04-07 | 2018-10-23 | 华为技术有限公司 | Resource acquiring method, apparatus and system |
CN109167828A (en) * | 2018-08-22 | 2019-01-08 | 杭州领智云画科技有限公司 | CDN caching method and system |
CN109819039A (en) * | 2019-01-31 | 2019-05-28 | 网宿科技股份有限公司 | A kind of file acquisition method, file memory method, server and storage medium |
-
2019
- 2019-09-02 CN CN201910823478.7A patent/CN112448984A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101902488A (en) * | 2009-05-26 | 2010-12-01 | 北京风格九州文化传播有限公司 | Load balancing method based on hot spot resource routing cache |
CN103107944A (en) * | 2011-11-14 | 2013-05-15 | ***通信集团公司 | Content locating method and route equipment |
CN105100174A (en) * | 2014-05-22 | 2015-11-25 | ***通信集团公司 | Method, device and system for scheduling Internet resource |
CN108696895A (en) * | 2017-04-07 | 2018-10-23 | 华为技术有限公司 | Resource acquiring method, apparatus and system |
CN109167828A (en) * | 2018-08-22 | 2019-01-08 | 杭州领智云画科技有限公司 | CDN caching method and system |
CN109819039A (en) * | 2019-01-31 | 2019-05-28 | 网宿科技股份有限公司 | A kind of file acquisition method, file memory method, server and storage medium |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113542420A (en) * | 2021-07-19 | 2021-10-22 | 北京金山云网络技术有限公司 | Hotspot file processing method and device, electronic equipment and medium |
CN113810461A (en) * | 2021-08-04 | 2021-12-17 | 网宿科技股份有限公司 | Bandwidth control method, device, equipment and readable storage medium |
CN113810461B (en) * | 2021-08-04 | 2023-04-18 | 网宿科技股份有限公司 | Bandwidth control method, device and equipment and readable storage medium |
CN114785794A (en) * | 2022-03-29 | 2022-07-22 | 北京字节跳动网络技术有限公司 | Resource allocation method, device, equipment, medium, program product and system |
WO2023198128A1 (en) * | 2022-04-15 | 2023-10-19 | 华为技术有限公司 | Distributed resource sharing method and related apparatus |
CN115857837A (en) * | 2023-02-27 | 2023-03-28 | 中国华能集团清洁能源技术研究院有限公司 | Data distribution method, device, equipment and medium in big data environment |
CN116382922A (en) * | 2023-05-10 | 2023-07-04 | 深圳高灯计算机科技有限公司 | Resource monitoring method, device, computer equipment, storage medium and product |
CN116382922B (en) * | 2023-05-10 | 2023-10-17 | 深圳高灯计算机科技有限公司 | Resource monitoring method, device, computer equipment, storage medium and product |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112448984A (en) | Resource transmission method, electronic device and computer storage medium | |
TWI743458B (en) | Method, device and system for parallel execution of blockchain transactions | |
US9158576B2 (en) | Systems and methods of processing events having an attribute and value pair | |
CN111552945B (en) | Resource processing method, device and equipment | |
CN113535721B (en) | Data writing method and device | |
CN107645520B (en) | Load balancing method, device and system | |
CN107528885B (en) | Service request processing method and device | |
CN110875935A (en) | Message publishing, processing and subscribing method, device and system | |
CN110046187B (en) | Data processing system, method and device | |
CN114416360A (en) | Resource allocation method and device and Internet of things system | |
CN109639747B (en) | Data request processing method, data request processing device, query message processing method, query message processing device and equipment | |
CN111913807B (en) | Event processing method, system and device based on multiple storage areas | |
CN116933886B (en) | Quantum computing execution method, quantum computing execution system, electronic equipment and storage medium | |
CN112565210A (en) | CDN node recommendation method, system, electronic device and storage medium | |
US20160352817A1 (en) | Predictive Peer Determination For Peer-to-Peer Digital Content Download | |
CN112689153A (en) | CDN node recommendation method and device, electronic equipment and storage medium | |
CN109862069B (en) | Message processing method and device | |
US20210382644A1 (en) | Method and device for dividing storage devices into device groups | |
CN112689152B (en) | Scheduling method, scheduling device, electronic equipment and storage medium | |
CN111930724B (en) | Data migration method and device, storage medium and electronic equipment | |
CN114296869A (en) | Server node service method and device based on TCP long connection | |
CN113126884B (en) | Data migration method, data migration device, electronic equipment and computer storage medium | |
CN112839071A (en) | Training system, training data access method and device, electronic device and medium | |
CN111427682A (en) | Task allocation method, system, device and equipment | |
US20200192596A1 (en) | Blockchain data storage method and apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210305 |