CN112104741B - Resource sharing method, device and system and gateway controller - Google Patents

Resource sharing method, device and system and gateway controller Download PDF

Info

Publication number
CN112104741B
CN112104741B CN202010994834.4A CN202010994834A CN112104741B CN 112104741 B CN112104741 B CN 112104741B CN 202010994834 A CN202010994834 A CN 202010994834A CN 112104741 B CN112104741 B CN 112104741B
Authority
CN
China
Prior art keywords
terminal
target resource
downloading
resource
download
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.)
Active
Application number
CN202010994834.4A
Other languages
Chinese (zh)
Other versions
CN112104741A (en
Inventor
陈明相
王伟
陈电波
桂艳峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zhizhangyi Technology Co ltd
Original Assignee
Beijing Zhizhangyi Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Zhizhangyi Technology Co ltd filed Critical Beijing Zhizhangyi Technology Co ltd
Priority to CN202010994834.4A priority Critical patent/CN112104741B/en
Publication of CN112104741A publication Critical patent/CN112104741A/en
Application granted granted Critical
Publication of CN112104741B publication Critical patent/CN112104741B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
    • H04L67/1078Resource delivery mechanisms
    • H04L67/1085Resource delivery mechanisms involving dynamic management of active down- or uploading connections
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Abstract

The application relates to the technical field of computer networks, in particular to a resource sharing method, a device, a system and a gateway controller. The embodiment of the application provides a resource sharing method, which is applied to a gateway controller and comprises the following steps: after a first resource downloading request for requesting to download a target resource, which is sent by a first terminal, is received, detecting whether a historical downloading record aiming at the target resource exists in a gateway controller; if the gateway controller has a history downloading record aiming at the target resource, determining a second terminal downloading the target resource according to the history downloading record; generating first download instruction information for instructing to request the second terminal to share the target resource; and sending the first download instruction information to the first terminal so that the first terminal requests the second terminal to share the target resource. The resource sharing method, the device and the gateway controller provided by the embodiment of the invention can improve the downloading speed of the target resource.

Description

Resource sharing method, device and system and gateway controller
Technical Field
The application relates to the technical field of computer networks, in particular to a resource sharing method, a device, a system and a gateway controller.
Background
The functions of the virtual private network (Virtual Private Network, VPN) are: a private network is established over a public network for encrypted communications, e.g., distribution of target resources, which is widely used in enterprise networks. In the prior art, the target resource distribution through VPN has at least the following two disadvantages:
1. all downloading requests trace to a downloading server, and the bandwidth of the downloading server is easy to become a bottleneck;
2. all download requests trace back to the download server, and the performance of the download server is likely to become a bottleneck.
The above two drawbacks reduce the speed of downloading the target resource by the download server, that is, reduce the speed of downloading the target resource by the electronic terminal.
Disclosure of Invention
The present application aims to provide a method, an apparatus, a system and a gateway controller for resource sharing, so as to solve the above problems.
In a first aspect, a resource sharing method provided by an embodiment of the present application is applied to a gateway controller, and the resource sharing method includes:
after a first resource downloading request for requesting to download a target resource, which is sent by a first terminal, is received, detecting whether a historical downloading record aiming at the target resource exists in a gateway controller;
If the gateway controller has a history downloading record aiming at the target resource, determining a second terminal downloading the target resource according to the history downloading record;
generating first download instruction information for instructing to request the second terminal to share the target resource;
and sending the first download instruction information to the first terminal so that the first terminal requests the second terminal to share the target resource.
With reference to the first aspect, an embodiment of the present application further provides a first optional implementation manner of the first aspect, determining, according to a history download record, a second terminal downloading a target resource, where the second terminal includes:
according to the historical download records, determining a plurality of terminal devices downloading target resources;
and determining the terminal equipment with a corresponding relation with the first terminal equipment from the plurality of terminal equipment as second terminal equipment.
With reference to the first aspect, the embodiments of the present application further provide a second optional implementation manner of the first aspect, and after determining, according to the history download record, the second terminal downloading the target resource, the resource sharing method further includes:
generating sharing indication information for indicating permission to send the target resource to the first terminal;
And sending the sharing indication information to the second terminal so that the second terminal can send the target resource to the first terminal after receiving the resource sharing request sent by the first terminal.
With reference to the first aspect, the embodiment of the present application further provides a third optional implementation manner of the first aspect, after detecting whether there is a history download record for the target resource in the gateway controller, a resource sharing method further includes:
if the historical download record aiming at the target resource does not exist in the gateway controller, generating second download instruction information for instructing a download server to request to download the target resource;
and sending the second download instruction information to the first terminal, so that the first terminal requests the download server to download the target resource after receiving the second download instruction information.
With reference to the third optional implementation manner of the first aspect, the embodiment of the present application further provides a fourth optional implementation manner of the first aspect, and the method further includes sending the second download instruction information to the first terminal, so that after the first terminal receives the second download instruction information, requesting, by the download server, a resource sharing method after downloading the target resource, where the method further includes:
Receiving feedback information generated after the first terminal successfully downloads the target resource from the download server and verifies that the target resource has integrity;
and updating the history downloading record according to the feedback information.
In a second aspect, an embodiment of the present application further provides a resource sharing method, which is applied to a resource sharing system, where the resource sharing system includes a first terminal and a gateway controller, and the resource sharing method includes:
the first terminal generates a first resource downloading request and sends the first resource downloading request to the gateway controller, wherein the first resource downloading request is used for requesting a downloading target resource;
the gateway controller receives a first resource downloading request, detects whether a history downloading record aiming at a target resource exists in the gateway controller, determines a second terminal downloading the target resource according to the history downloading record when the history downloading record exists in the gateway controller, generates first downloading indication information for indicating to request the second terminal to share the target resource, and sends the first downloading indication information to the first terminal;
the first terminal receives the first download indication information and requests the second terminal to share the target resource according to the first terminal.
In a third aspect, an embodiment of the present application further provides a resource sharing device, which is applied to a gateway controller, where the resource sharing device includes:
the detection module is used for detecting whether a historical download record aiming at the target resource exists in the gateway controller after receiving a first resource download request which is sent by the first terminal and used for requesting to download the target resource;
the terminal determining module is used for determining a second terminal downloading the target resource according to the history downloading record when the history downloading record aiming at the target resource exists in the gateway controller;
a first information generating module for generating first download instruction information for instructing to request the second terminal for sharing the target resource;
and the first information sending module is used for sending the first download instruction information to the first terminal so that the first terminal requests the second terminal to share the target resource.
In a fourth aspect, an embodiment of the present application further provides a resource sharing system, including a first terminal and a gateway controller;
the first terminal is used for generating a first resource downloading request and sending the first resource downloading request to the gateway controller, wherein the first resource downloading request is used for requesting to download the target resource;
The gateway controller is used for receiving a first resource downloading request, detecting whether a historical downloading record aiming at a target resource exists in the gateway controller, determining a second terminal downloading the target resource according to the historical downloading record when the historical downloading record exists in the gateway controller, generating first downloading indication information for indicating to request the second terminal to share the target resource, and sending the first downloading indication information to the first terminal;
the first terminal is further configured to receive the first download instruction information, and request the second terminal to share the target resource according to the first terminal.
In a fifth aspect, an embodiment of the present application further provides a gateway controller, including a controller and a memory, where the memory stores a computer program, and the controller is configured to execute the computer program, where the method is provided by the foregoing first aspect, or any optional implementation manner of the first aspect.
In a sixth aspect, embodiments of the present application further provide a computer readable storage medium, where a computer program is stored, where the computer program is executed to implement the resource sharing method provided in the first aspect, or any optional implementation manner of the first aspect.
In the resource sharing method, device and system and the gateway controller provided by the embodiment of the invention, after receiving a first resource downloading request sent by a first terminal and used for requesting to download a target resource, the gateway controller detects whether a historical downloading record aiming at the target resource exists in the gateway controller, if the historical downloading record aiming at the target resource exists in the gateway controller, a second terminal downloading the target resource is determined according to the historical downloading record, first downloading instruction information used for instructing to request to share the target resource to the second terminal is generated, and then the first downloading instruction information is sent to the first terminal, so that the first terminal requests to share the target resource to the second terminal. Because the gateway controller determines the second terminal downloading the target resource according to the history downloading record when the history downloading record aiming at the target resource exists, generates the first downloading indication information for indicating the second terminal to request the second terminal to share the target resource, and then sends the first downloading indication information to the first terminal so as to enable the first terminal to request the second terminal to share the target resource, thereby avoiding the first terminal to directly request the downloading server for downloading the target resource, avoiding the bandwidth and performance of the downloading server from influencing the downloading speed of the target resource, and finally, compared with the prior art, achieving the aim of improving the downloading speed of the target resource.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic block diagram of a resource sharing system according to an embodiment of the present application.
Fig. 2 is a schematic block diagram of a gateway controller according to an embodiment of the present application.
Fig. 3 is another schematic block diagram of a resource sharing system according to an embodiment of the present application.
Fig. 4 is a workflow diagram of a resource sharing system according to an embodiment of the present application.
Fig. 5 is a flowchart of steps of a method for sharing resources according to an embodiment of the present application.
Fig. 6 is a flowchart of steps of another method for sharing resources according to an embodiment of the present application.
Fig. 7 is a flowchart of steps of a resource sharing device according to an embodiment of the present application.
Reference numerals: 100-a resource sharing system; 110-a first terminal; 120-gateway controller; 121-a processor; 122-memory; 130-a second terminal; 140-SDP gateway; 150-a download server; 200-a resource sharing device; 210-a detection module; 220-a terminal determination module; 230-a first information generation module; 240-a first information sending module.
Detailed Description
For the purposes, technical solutions and advantages of the embodiments of the present application, the technical solutions of the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. Furthermore, it should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
First embodiment:
referring to fig. 1, an embodiment of the present application provides a resource sharing system 100, including a first terminal 110 and a gateway controller 120.
The first terminal 110 is configured to generate a first resource download request, and send the first resource download request to the gateway controller 120, where the first resource download request is used to request a download target resource.
In this embodiment of the present application, the first terminal 110 may be, but is not limited to, a computer, a personal digital assistant (Personal Digital Assistant, PAD), a mobile internet access device (Mobile Internet Device, MID), etc., and the gateway controller 120 may be a terminal device such as a computer, a PAD, a MID, etc., or may be a server, however, it should be noted that in this embodiment of the present application, the gateway controller 120 may be disposed (Software Defined Perimeter, SDP) to control, according to identity information of the terminal device, the terminal device to access a target resource stored in the download server 150, and in this embodiment of the present application, the specifically related terminal device includes the first terminal 110 and the second terminal 130.
Referring to fig. 2, for gateway controller 120, in this embodiment, as an alternative implementation, it may structurally include a processor 121 and a memory 122.
The processor 121 and the memory 122 are electrically connected directly or indirectly to enable data transmission or interaction, and for example, the components may be electrically connected to each other through one or more communication buses or signal lines. The gateway controller 120-related portion of the resource sharing device includes at least one software module that may be stored in the memory 122 in the form of software or Firmware (Firmware) or cured in an Operating System (OS) of the gateway controller 120100. The processor 121 is configured to execute executable modules stored in the memory 122, for example, software functional modules and computer programs included in relevant parts of the gateway controller 120 in the resource sharing device, so as to implement part of the steps included in the resource sharing method.
The processor 121 may execute the computer program after receiving the execution instruction. The processor 121 may be an integrated circuit chip with signal processing capability. The processor 121 may also be a general-purpose processor, for example, a digital signal processor (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), discrete gate or transistor logic, discrete hardware components, may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present application, and further, a general-purpose processor may be a microprocessor or any conventional processor, etc.
The Memory 122 may be, but is not limited to, random access Memory (Random Access Memory, RAM), read Only Memory (ROM), programmable Read Only Memory (Programmable Read-Only Memory, PROM), erasable programmable Read Only Memory (Erasable Programmable Read-Only Memory, EPROM), and electrically erasable programmable Read Only Memory (Electric Erasable Programmable Read-Only Memory, EEPROM). The memory 122 is used for storing a program, and the processor 121 executes the program after receiving an execution instruction.
It should be understood that the configuration shown in fig. 1 is merely illustrative, and the gateway controller 120100 provided in the embodiments of the present application may also have fewer or more components than those shown in fig. 1, or may have a different configuration than that shown in fig. 1. In addition, the components shown in fig. 1 may be implemented by software, hardware, or a combination thereof. In addition, in the embodiment of the present application, the terminal device (including the first terminal 110 and the second terminal 130) has a similar structure to the gateway controller 120, which is not described in detail in the embodiment of the present application.
In this embodiment, the gateway controller 120 is configured to receive the first resource downloading request, detect whether a history downloading record for the target resource exists in the gateway controller 120, determine, according to the history downloading record, the second terminal 130 downloading the target resource when the history downloading record exists in the gateway controller 120, regenerate first downloading indication information for indicating to request to share the target resource from the second terminal 130, and send the first downloading indication information to the first terminal 110.
The first terminal 110 is further configured to receive the first download instruction information, and request the second terminal 130 to share the target resource according to the first terminal 110.
Further, in the embodiment of the present application, the process of determining, by the gateway controller 120, the second terminal 130 downloading the target resource according to the history download record may include: first, the gateway controller 120 may determine a plurality of terminal devices downloading the target resource according to the history download record, and then determine a terminal device having a correspondence relationship with the first terminal 110 device from the plurality of terminal devices as the second terminal 130 device.
For example, the gateway controller 120 may determine, as the terminal device having a correspondence with the first terminal 110 device, an effective terminal device having the latest download time, that is, an effective terminal device having the download time closest to the current time point, according to the history download record.
For another example, in the history download record, when N1 effective terminal devices are added, according to the sequence of download time, a corresponding relationship between N2 first terminals 110 and N1 effective terminal devices requesting for downloading the target resource later is established, where N1 is greater than or equal to an integer, N2 is greater than or equal to 1, and is an integer. Assuming that N1 is 5 and N2 is 5, the order of the N1 effective terminal devices is the order of the terminal device N11, the terminal device N12, the terminal device N13, the terminal device N14, and the terminal device N15, and the order of the N2 first terminal devices 110 is the order of the first terminal N21, the first terminal N22, the first terminal N23, the first terminal N24, and the first terminal N25 according to the downloading time order, then when the first resource downloading request sent by the first terminal N21 is received, the first resource downloading request can be sent to the terminal device N11, that is, the terminal device N11 is used as the second terminal 130, when the first resource downloading request sent by the first terminal N22 is received, the first resource downloading request can be sent to the terminal device N12, that is, the terminal device N12 is used as the second terminal 130, when the first resource downloading request sent by the first terminal N23 is received, the first terminal device N13, that is used as the first terminal device N13, that is, the first terminal device N130, and when the first resource downloading request is received by the first terminal device N14, the first terminal device N14 is received, the first terminal device N130, that is used as the first terminal device N130, and when the first resource downloading request is received by the first terminal device N14, the first terminal device N14 is received.
Further, it should be noted that, in the embodiment of the present application, after receiving the first download instruction information and requesting to share the target resource from the second terminal 130 according to the first terminal 110, if the target resource is not successfully obtained from the second terminal 130 device, the first terminal may send the first resource download request to the electronic terminal again, and after receiving the first resource download request sent again by the first terminal 110, the electronic terminal will re-determine the third terminal downloading the target resource according to the history download record, and then regenerate the first download instruction information for instructing to request to share the target resource to the third terminal, and send the first download instruction information to the third terminal. In this embodiment, the third terminal may be an active terminal device whose download time is located after the download time of the second terminal 130.
In the embodiment of the present application, the effective terminal device may be understood as a terminal device that downloads the target resource and deletes the target resource. Based on this, it can be understood that in the embodiment of the present application, for each terminal device that downloads the target resource, after deleting the target resource, deletion notification information is generated and sent to the gateway controller 120, and when receiving the deletion notification instruction, the gateway controller 120 updates the historical download record, where the update manner may specifically be that, from the historical download record, the corresponding download record for the terminal device is deleted from the historical download record.
In order to ensure the security of information sharing, in this embodiment of the present application, after determining, according to the history download record, the second terminal 130 that downloads the target resource, the gateway controller 120 may further generate sharing indication information for indicating that the target resource is allowed to be sent to the first terminal 110, and send the sharing indication information to the second terminal 130, so that the second terminal 130 sends the target resource to the first terminal 110 after receiving the resource sharing request sent by the first terminal 110.
In this embodiment of the present application, the sharing indication information may include identity information of the first terminal 110 and identity information of the target resource, after receiving a resource sharing request sent by the first terminal 110, the second terminal 130 needs to verify the identity information of the first terminal 110, and verify the identity information of the target resource that the first terminal 110 requests to share, where the target resource is sent to the first terminal 110 only when the verification passes.
Further, in this embodiment of the present application, after detecting whether there is a history download record for the target resource in the gateway controller 120, if the detection result is that there is no history download record for the target resource in the gateway controller 120, the gateway controller generates second download instruction information for instructing to request to download the target resource from the download server 150, and sends the second download instruction information to the first terminal 110, so that after receiving the second download instruction information, the first terminal 110 requests to download the target resource from the download server 150. In this embodiment of the present application, after receiving the second download instruction, the first terminal 110 may generate a second resource download request and send the second resource download request to the SDP gateway 140, where after receiving the second resource download request and determining that the gateway controller 120 allows the first terminal 110 to download the target resource, the SDP gateway 140 downloads the target resource from the download server 150 and returns the downloaded target resource to the first terminal 110. It should also be understood that the resource sharing system 100 provided in the embodiment of the present application further includes an SDP gateway 140 and a download server 150, as shown in fig. 3.
In order to ensure reliability of the downloading result, in the embodiment of the present application, after the gateway controller 120 sends the second downloading indication information to the first terminal 110, so that after the first terminal 110 receives the second downloading indication information and requests the downloading server 150 to download the target resource, it is further required to receive feedback information generated by the first terminal 110 after the first terminal successfully downloads the target resource from the downloading server 150 and verifies that the target resource has integrity, and update the historical downloading record according to the feedback information, that is, the gateway controller 120 only performs the step of updating the historical downloading record after determining that the target resource has integrity according to the feedback information, and adds the downloading record of the first terminal 110 successfully downloaded the target resource to the historical downloading record.
The workflow of the resource sharing system 100 provided in the embodiment of the present application will be described below with reference to fig. 4.
The second terminal 130 finishes sending a registration request to the gateway server, finishes registering with the gateway controller 120, obtains the right to access the target resource, and then returns a registration success result to the second terminal 130. The second terminal 130 sends a resource download request for requesting to download the target resource to the gateway server, if there is no history download record for the target resource in the gateway server, download instruction information for instructing to request to download the target resource to the download server 150 through the SDP gateway 140 is generated, the first terminal 110 sends a resource download request for requesting to download the target resource to the SDP gateway 140 after receiving the download instruction information, the SDP gateway 140 downloads the target resource from the download server 150 after determining that the gateway controller 120 allows the second terminal 130 to download the target resource, and the download server 150 returns the target resource to the SDP gateway 140 and then continues to return the target resource to the second terminal 130. After verifying that the target resource has integrity, the second terminal 130 generates feedback information, and sends the feedback information to the gateway server to inform the gateway server that the target resource is already stored in the second terminal 130, and then the gateway server updates the history download record according to the feedback information.
The first terminal 110 finishes sending a registration request to the gateway server, finishes registering with the gateway controller 120, obtains the right to access the target resource, and then returns a registration success result to the first terminal 110. After the target resource has been stored in the second terminal 130 device, the first terminal 110 transmits a resource download request for requesting to download the target resource to the gateway server, and since the target resource has been stored in the second terminal 130 device, the gateway controller 120 determines the second terminal 130 downloading the target resource according to the history download record, thereafter generates sharing instruction information for instructing to allow the target resource to be transmitted to the first terminal 110 and transmits the sharing instruction information to the second terminal 130, and at the same time generates first download instruction information for instructing to request to the second terminal 130 for sharing the target resource and transmits the first download instruction information to the first terminal 110, and after receiving the first download instruction, the first terminal 110 requests to the second terminal 130 for sharing the target resource, and the second terminal 130 returns the target resource to the first terminal 110.
As can be understood from the above arrangement, in the embodiment of the present application, when there is a history download record for the target resource in the gateway controller 120, the second terminal 130 downloading the target resource is determined according to the history download record, and first download instruction information for instructing to request to the second terminal 130 to share the target resource is generated, and then the first download instruction information is sent to the first terminal 110, so that the first terminal 110 requests to the second terminal 130 to share the target resource, thereby avoiding that the first terminal 110 directly requests to download the target resource to the download server 150, and avoiding that the bandwidth and performance of the download server 150 affect the download speed of the target resource.
For example, there are 1000 users who need to download 100MB of software installation packages from the download server 150 through 1000 first terminals 110 respectively, in the prior art, if the bandwidth of the VPN gateway is 100Mbps and the bandwidth is full, 2h and 13min are required, if after 20 users use the resource sharing system 100 provided in the embodiment of the present application to successfully download the software installation packages through 20 first terminals 110 respectively, a one-to-one sharing (about 160S in time) manner is adopted, that is, one first device corresponds to one second device, and assuming that the average bandwidth of one-to-one sharing is 2Mbps, the bandwidth is increased to 40 Mbps, the bandwidth is increased to 80 to 400S, the bandwidth is increased to 160 to 400S, the bandwidth is increased to 320 to 400S, the bandwidth is increased to 640S, the bandwidth is increased to 1280 to 400S, the total bandwidth is required to 42min, and the downloading time is saved by 70%.
For another example, there are 1000 users who need to download 100MB of software installation packages from the download server 150 through 1000 first terminals 110, in the prior art, if the bandwidth of the VPN gateway is 100Mbps and the bandwidth is full, 2h and 13min are required, if the resource sharing system 100 provided in the embodiment of the present application is adopted, after 20 users respectively 20 first terminals 110 successfully download the software installation packages, a one-to-two sharing (about 160S in time) manner is adopted, that is, two first devices correspond to one second device, and assuming that the average bandwidth of one-to-two sharing is 2Mbps, the number of the first devices is increased to 40 and the number of the second devices is increased to 200S, the number of the first devices is increased to 80 and the number of the second devices is increased to 200S, the number of the first devices is increased to 160S, the number of the first devices is increased to 320S and the number of the second devices is increased to 640S, the number of the first devices is increased to 1280S and the total number of the second devices is required to 23min, and 83% of downloading time is saved.
Second embodiment:
the embodiment of the application provides a resource sharing method which is applied to a resource sharing system provided by a first embodiment, wherein the resource sharing system comprises a first terminal and a gateway controller. Referring to fig. 5, the resource sharing method provided in the embodiment of the present application includes step S110, step S120, and step S130.
Step S110, the first terminal generates a first resource downloading request and sends the first resource downloading request to the gateway controller, wherein the first resource downloading request is used for requesting a downloading target resource.
Step S120, the gateway controller receives the first resource downloading request, detects whether a history downloading record aiming at the target resource exists in the gateway controller, determines a second terminal downloading the target resource according to the history downloading record when the history downloading record exists in the gateway controller, generates first downloading indication information for indicating to request to share the target resource from the second terminal, and sends the first downloading indication information to the first terminal.
In step S130, the first terminal receives the first download instruction information, and requests the second terminal to share the target resource according to the first terminal.
Since the resource sharing method provided in the embodiment of the present application is applied to the resource sharing system provided in the first embodiment, the same inventive concept as the resource sharing system provided in the first embodiment is provided, that is, in the resource sharing method provided in the embodiment of the present application, the specific flow of each step may refer to the relevant description of the corresponding part in the first embodiment, and details are not repeated here.
Third embodiment:
the embodiment of the application provides a resource sharing method which is applied to a gateway controller. Referring to fig. 6, the resource sharing method provided in the embodiment of the present application includes step S210, step S220, step S230, and step S240.
Step S210, after receiving a first resource downloading request sent by a first terminal and used for requesting to download a target resource, detecting whether a historical downloading record aiming at the target resource exists in a gateway controller.
Step S220, if the historical download record aiming at the target resource exists in the gateway controller, determining a second terminal downloading the target resource according to the historical download record.
Step S230, generating first download instruction information for instructing to request the second terminal for sharing the target resource.
Step S240, the first download instruction information is sent to the first terminal, so that the first terminal requests the second terminal to share the target resource.
In the embodiment of the present application, step S220 may include step S221 and step S222.
Step S221, determining a plurality of terminal devices downloading the target resources according to the historical downloading record.
Step S222, determining a terminal device having a correspondence relationship with the first terminal device from the plurality of terminal devices as the second terminal device.
After executing step S220, the resource sharing method provided in the embodiment of the present application may further include step S250 and step S260.
Step S250, generating sharing indication information for indicating permission to transmit the target resource to the first terminal.
Step S260, the sharing indication information is sent to the second terminal, so that the second terminal sends the target resource to the first terminal after receiving the resource sharing request sent by the first terminal.
After executing step S210, the resource sharing method provided in the embodiment of the present application may further include step S270 and step S280.
In step S270, if there is no history download record for the target resource in the gateway controller, second download instruction information for instructing the download server to request the download of the target resource is generated.
Step S280, the second download instruction information is sent to the first terminal, so that the first terminal requests the download server for the download target resource after receiving the second download instruction information.
After performing step S280, the resource sharing method provided in the embodiment of the present application may further include step S290 and step S300.
Step S290, receiving feedback information generated by the first terminal after the first terminal successfully downloads the target resource from the download server and verifies that the target resource has integrity.
Step S300, updating the history downloading record according to the feedback information.
Since the resource sharing method provided in the embodiment of the present application is applied to the gateway server included in the resource sharing system provided in the first embodiment, the same inventive concept as the gateway server included in the resource sharing system provided in the first embodiment is provided, that is, in the resource sharing method provided in the embodiment of the present application, the specific flow of each step may refer to the related description of the corresponding part of the gateway server included in the first embodiment, which is not repeated herein.
Fourth embodiment:
the embodiment of the present application also provides a resource sharing device 200, which is applied to a gateway controller, based on the same inventive concept as the resource sharing method provided in the third embodiment. Referring to fig. 7, the resource sharing device 200 provided in the embodiment of the present application includes a detection module 210, a terminal determination module 220, a first information generation module 230, and a first information transmission module 240.
A detection module 210, configured to detect whether a historical download record for the target resource exists in the gateway controller after receiving a first resource download request sent by the first terminal and used for requesting to download the target resource;
The terminal determining module 220 is configured to determine, when there is a history download record for the target resource in the gateway controller, a second terminal downloading the target resource according to the history download record;
a first information generating module 230 for generating first download instruction information for instructing to request the second terminal for sharing the target resource;
the first information transmitting module 240 transmits the first download instruction information to the first terminal so that the first terminal requests the second terminal for sharing the target resource.
In the embodiment of the present application, the terminal determining module 220 may include a first determining unit and a second determining unit.
And the first determining unit is used for determining a plurality of terminal devices downloading the target resources according to the historical downloading record.
And the second determining unit is used for determining the terminal equipment with the corresponding relation with the first terminal equipment from the plurality of terminal equipment as second terminal equipment.
The resource sharing device 200 provided in the embodiment of the present application may further include a shared first information generating module 230 and a shared first information sending module 240.
The first information generating module 230 is configured to generate sharing indication information for indicating permission to send the target resource to the first terminal.
The first information sending module 240 is configured to send the sharing indication information to the second terminal, so that the second terminal sends the target resource to the first terminal after receiving the resource sharing request sent by the first terminal.
The resource sharing device 200 provided in the embodiment of the present application may further include a second information generating module and a second information sending module.
And the second information generation module is used for generating second download instruction information for instructing the download server to request to download the target resource if the historical download record for the target resource does not exist in the gateway controller.
And the second information sending module is used for sending the second download instruction information to the first terminal so that the first terminal can request the download target resource from the download server after receiving the second download instruction information.
The resource sharing device 200 provided in the embodiment of the present application may further include an integrity detection module 210 and a record update module.
The integrity detection module 210 is configured to receive feedback information generated by the first terminal after the first terminal successfully downloads the target resource from the download server and verifies that the target resource has integrity.
And the record updating module is used for updating the history downloading record according to the feedback information.
Since the resource sharing device 200 provided in the embodiment of the present application is implemented based on the same inventive concept as the resource sharing method provided in the third embodiment, the specific description of each software module in the resource sharing device 200 can be referred to the relevant description of the corresponding step in the resource sharing method provided in the third embodiment, which is not repeated here.
Fifth embodiment:
the embodiment of the present application provides a gateway server, and specific structure and function of the gateway server may be referred to in the first embodiment and related description of the gateway server will not be repeated in the embodiment of the present application.
Sixth embodiment:
the embodiment of the present application provides a computer readable storage medium, on which a computer program is stored, and when the computer program is executed, the method for sharing resources provided in the third embodiment is implemented, and in particular, reference may be made to the third embodiment, which is not described in detail in the embodiment of the present application.
In summary, in the method, the device, the system and the gateway controller for sharing resources provided in the embodiments of the present application, after receiving a first resource downloading request sent by a first terminal and used for requesting to download a target resource, the gateway controller detects whether a history downloading record for the target resource exists in the gateway controller, if the history downloading record for the target resource exists in the gateway controller, determines, according to the history downloading record, a second terminal downloading the target resource, generates first downloading instruction information for instructing to request to share the target resource to the second terminal, and then sends the first downloading instruction information to the first terminal, so that the first terminal requests to share the target resource to the second terminal. Because the gateway controller determines the second terminal downloading the target resource according to the history downloading record when the history downloading record aiming at the target resource exists, generates the first downloading indication information for indicating the second terminal to request the second terminal to share the target resource, and then sends the first downloading indication information to the first terminal so as to enable the first terminal to request the second terminal to share the target resource, thereby avoiding the first terminal to directly request the downloading server for downloading the target resource, avoiding the bandwidth and performance of the downloading server from influencing the downloading speed of the target resource, and finally, compared with the prior art, achieving the aim of improving the downloading speed of the target resource.
In the several embodiments provided in the present application, it should be understood that the disclosed methods and apparatus may be implemented in other manners. The apparatus embodiments described above are merely illustrative, for example, flow diagrams and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. In addition, the functional modules in each embodiment of the present application may be integrated together to form a single part, or each module may exist alone, or two or more modules may be integrated to form a single part.
Furthermore, the functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a gateway controller, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk, etc.
Furthermore, it should be noted that in the description of the present application, relational terms such as "first," "second," "third," and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, 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.

Claims (9)

1. A method for sharing resources, applied to a gateway controller, the method comprising:
after receiving a first resource downloading request sent by a first terminal and used for requesting to download a target resource, detecting whether a historical downloading record aiming at the target resource exists in the gateway controller or not;
if the gateway controller has a history downloading record aiming at the target resource, determining a second terminal downloaded with the target resource according to the history downloading record;
generating first download instruction information for instructing to request sharing of the target resource to the second terminal;
transmitting the first download indication information to the first terminal so that the first terminal requests the second terminal to share the target resource;
the determining, according to the history download record, the second terminal downloaded with the target resource includes: determining a plurality of terminal devices downloaded with the target resource according to the history downloading record; determining, from the plurality of terminal devices, a terminal device having a correspondence relationship with the first terminal as the second terminal, including: determining the terminal equipment with the latest downloading time as the second terminal; or establishing the corresponding relation between a plurality of first terminals and a plurality of terminal devices according to the sequence of downloading time so as to determine the second terminal corresponding to each first terminal;
If the first terminal does not acquire the target resource from the second terminal, determining a third terminal in the plurality of terminal devices based on the first resource downloading request, wherein the downloading time of the third terminal is after the downloading time of the second terminal; generating the first download instruction information for instructing to request sharing of the target resource to the third terminal; and sending the first downloading indication information to the first terminal so that the first terminal requests the third terminal to share the target resource.
2. The resource sharing method according to claim 1, wherein after determining the second terminal downloaded the target resource according to the history download record, the resource sharing method further comprises:
generating sharing indication information for indicating permission to send the target resource to the first terminal;
and sending the sharing indication information to the second terminal, so that the second terminal sends the target resource to the first terminal after receiving the resource sharing request sent by the first terminal.
3. The resource sharing method according to claim 1, wherein after said detecting whether there is a history download record for the target resource in the gateway controller, the resource sharing method further comprises:
If the historical download record aiming at the target resource does not exist in the gateway controller, generating second download instruction information for instructing a download server to request to download the target resource;
and sending the second download instruction information to the first terminal, so that the first terminal requests the download server to download the target resource after receiving the second download instruction information.
4. The resource sharing method according to claim 3, wherein the sending the second download instruction information to the first terminal, so that the first terminal requests the download server to download the target resource after receiving the second download instruction information, further comprises:
receiving feedback information generated by the first terminal after the first terminal successfully downloads the target resource from the download server and verifies that the target resource has integrity;
and updating the history downloading record according to the feedback information.
5. A resource sharing method, which is applied to a resource sharing system, wherein the resource sharing system comprises a first terminal and a gateway controller, the resource sharing method comprises:
The method comprises the steps that a first terminal generates a first resource downloading request and sends the first resource downloading request to a gateway controller, wherein the first resource downloading request is used for requesting a downloading target resource;
the gateway controller receives the first resource downloading request, detects whether a history downloading record aiming at the target resource exists in the gateway controller, and determines a plurality of terminal devices downloaded with the target resource according to the history downloading record when the history downloading record exists in the gateway controller; determining, from the plurality of terminal devices, a terminal device having a correspondence relationship with the first terminal as a second terminal, including: determining the terminal equipment with the latest downloading time as the second terminal; or establishing the corresponding relation between a plurality of first terminals and a plurality of terminal devices according to the sequence of downloading time so as to determine the second terminal corresponding to each first terminal; generating first download indication information for indicating to request to share the target resource from the second terminal, and transmitting the first download indication information to the first terminal;
The first terminal receives the first download indication information and requests the second terminal to share the target resource according to the first terminal;
if the first terminal does not acquire the target resource from the second terminal, determining a third terminal in the plurality of terminal devices based on the first resource downloading request, wherein the downloading time of the third terminal is after the downloading time of the second terminal; generating the first download instruction information for instructing to request sharing of the target resource to the third terminal; transmitting the first download indication information to the first terminal; and the first terminal receives the first download indication information and requests the third terminal to share the target resource according to the first terminal.
6. A resource sharing device, applied to a gateway controller, comprising:
the detection module is used for detecting whether a historical download record aiming at the target resource exists in the gateway controller after receiving a first resource download request which is sent by a first terminal and used for requesting to download the target resource;
the terminal determining module is used for determining a second terminal downloaded with the target resource according to the history downloading record when the history downloading record aiming at the target resource exists in the gateway controller;
A first information generating module for generating first download instruction information for instructing to request sharing of the target resource to the second terminal;
a first information sending module, configured to send the first download instruction information to the first terminal, so that the first terminal requests to share the target resource from the second terminal;
the terminal determining module comprises: a first determination unit and a second determination unit; the first determining unit is used for determining a plurality of terminal devices downloaded with the target resource according to the history downloading record; the second determining unit is configured to determine, from the plurality of terminal devices, a terminal device having a correspondence relationship with the first terminal, as the second terminal, and includes: determining the terminal equipment with the latest downloading time as the second terminal; or establishing the corresponding relation between a plurality of first terminals and a plurality of terminal devices according to the sequence of downloading time so as to determine the second terminal corresponding to each first terminal;
the terminal determining module is further configured to: if the first terminal does not acquire the target resource from the second terminal, determining a third terminal in the plurality of terminal devices based on the first resource downloading request, wherein the downloading time of the third terminal is after the downloading time of the second terminal; the first information generation module is further configured to: generating the first download instruction information for instructing to request sharing of the target resource to the third terminal; the first information sending module is further configured to: and sending the first downloading indication information to the first terminal so that the first terminal requests the third terminal to share the target resource.
7. The resource sharing system is characterized by comprising a first terminal and a gateway controller;
the first terminal is used for generating a first resource downloading request and sending the first resource downloading request to the gateway controller, wherein the first resource downloading request is used for requesting a downloading target resource;
the gateway controller is used for receiving the first resource downloading request, detecting whether a history downloading record exists in the gateway controller, and determining a plurality of terminal devices downloaded with the target resource according to the history downloading record when the history downloading record aiming at the target resource exists in the gateway controller; determining, from the plurality of terminal devices, a terminal device having a correspondence relationship with the first terminal as a second terminal, including: determining the terminal equipment with the latest downloading time as the second terminal; or establishing the corresponding relation between a plurality of first terminals and a plurality of terminal devices according to the sequence of downloading time so as to determine the second terminal corresponding to each first terminal; generating first download indication information for indicating to request to share the target resource from the second terminal, and transmitting the first download indication information to the first terminal;
The first terminal is further configured to receive the first download instruction information, and request the second terminal to share the target resource according to the first terminal;
if the first terminal does not acquire the target resource from the second terminal, the gateway controller is further configured to: determining a third terminal in the plurality of terminal devices based on the first resource downloading request, wherein the downloading time of the third terminal is positioned after the downloading time of the second terminal; generating the first download instruction information for instructing to request sharing of the target resource to the third terminal; transmitting the first download indication information to the first terminal; the first terminal is further configured to: and receiving the first download indication information, and requesting the third terminal to share the target resource according to the first terminal.
8. A gateway controller, comprising a controller and a memory, wherein the memory stores a computer program, and the controller is configured to execute the computer program to implement the resource sharing method according to any one of claims 1 to 4.
9. A computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and when the computer program is executed, the resource sharing method according to any one of claims 1 to 4 is implemented.
CN202010994834.4A 2020-09-21 2020-09-21 Resource sharing method, device and system and gateway controller Active CN112104741B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010994834.4A CN112104741B (en) 2020-09-21 2020-09-21 Resource sharing method, device and system and gateway controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010994834.4A CN112104741B (en) 2020-09-21 2020-09-21 Resource sharing method, device and system and gateway controller

Publications (2)

Publication Number Publication Date
CN112104741A CN112104741A (en) 2020-12-18
CN112104741B true CN112104741B (en) 2024-02-02

Family

ID=73755056

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010994834.4A Active CN112104741B (en) 2020-09-21 2020-09-21 Resource sharing method, device and system and gateway controller

Country Status (1)

Country Link
CN (1) CN112104741B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1528079A (en) * 2001-07-06 2004-09-08 ض� Method and apparatus for peer-to-peer services
CN101488974A (en) * 2009-02-25 2009-07-22 深圳创维数字技术股份有限公司 P2P resource providing method, system and P2P directory server
CN103702235A (en) * 2013-12-24 2014-04-02 乐视网信息技术(北京)股份有限公司 Data processing method and system for content delivery network
CN104836827A (en) * 2014-06-25 2015-08-12 腾讯科技(北京)有限公司 Data processing method based on asymmetric P2P network, and system
WO2017004894A1 (en) * 2015-07-06 2017-01-12 中兴通讯股份有限公司 Resource sharing method, terminal device, application server and system
CN106776917A (en) * 2016-11-30 2017-05-31 北京小米移动软件有限公司 A kind of method and apparatus for obtaining resource file
CN108810070A (en) * 2018-03-28 2018-11-13 广州视源电子科技股份有限公司 A kind of resource share method, device, smart machine and storage medium
CN109698851A (en) * 2017-10-24 2019-04-30 华为技术有限公司 The method and apparatus for transmitting data
CN109803022A (en) * 2019-01-30 2019-05-24 浙江蓝鸽科技有限公司 A kind of digitalization resource shared system and its method of servicing
CN110366047A (en) * 2019-06-04 2019-10-22 北京奇艺世纪科技有限公司 A kind of video sharing method and device and computer readable storage medium
CN111200622A (en) * 2018-11-16 2020-05-26 腾讯科技(深圳)有限公司 Resource transmission method and device and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104333599B (en) * 2014-11-06 2017-10-13 北京奇虎科技有限公司 Share the method and system and application service platform of application

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1528079A (en) * 2001-07-06 2004-09-08 ض� Method and apparatus for peer-to-peer services
CN101488974A (en) * 2009-02-25 2009-07-22 深圳创维数字技术股份有限公司 P2P resource providing method, system and P2P directory server
CN103702235A (en) * 2013-12-24 2014-04-02 乐视网信息技术(北京)股份有限公司 Data processing method and system for content delivery network
CN104836827A (en) * 2014-06-25 2015-08-12 腾讯科技(北京)有限公司 Data processing method based on asymmetric P2P network, and system
WO2017004894A1 (en) * 2015-07-06 2017-01-12 中兴通讯股份有限公司 Resource sharing method, terminal device, application server and system
CN106776917A (en) * 2016-11-30 2017-05-31 北京小米移动软件有限公司 A kind of method and apparatus for obtaining resource file
CN109698851A (en) * 2017-10-24 2019-04-30 华为技术有限公司 The method and apparatus for transmitting data
CN108810070A (en) * 2018-03-28 2018-11-13 广州视源电子科技股份有限公司 A kind of resource share method, device, smart machine and storage medium
CN111200622A (en) * 2018-11-16 2020-05-26 腾讯科技(深圳)有限公司 Resource transmission method and device and storage medium
CN109803022A (en) * 2019-01-30 2019-05-24 浙江蓝鸽科技有限公司 A kind of digitalization resource shared system and its method of servicing
CN110366047A (en) * 2019-06-04 2019-10-22 北京奇艺世纪科技有限公司 A kind of video sharing method and device and computer readable storage medium

Also Published As

Publication number Publication date
CN112104741A (en) 2020-12-18

Similar Documents

Publication Publication Date Title
CN108923908B (en) Authorization processing method, device, equipment and storage medium
US8490183B2 (en) Security ensuring by program analysis on information device and transmission path
CN110766408A (en) Cross-chain transaction verification method, engine, equipment and storage medium for heterogeneous block chain
US8195124B2 (en) Apparatus and methods for managing time sensitive application privileges on a wireless device
CN111991813B (en) Method and device for logging in game, electronic equipment and storage medium
EP2102745A1 (en) Apparatus and methods for client-driven server-side installation
CN110022345B (en) Method, system, device and equipment for processing request in alliance chain
CN114465998B (en) Multi-device file transmission method and device, terminal device and readable storage medium
JP2024505692A (en) Data processing methods, devices and computer equipment based on blockchain networks
US20200014696A1 (en) Secure confirmation exchange for offline industrial machine
JP2004013608A (en) Control for execution and transfer of program
CN113709530B (en) Resource downloading method, system, electronic equipment and storage medium
WO2011023122A1 (en) Method, device and system for routing service
CN111917856A (en) Mirror image file delivery method and related equipment
CN111666745A (en) File downloading method, device, server and medium
CN112104741B (en) Resource sharing method, device and system and gateway controller
CN112087475B (en) Message pushing method and device for cloud platform component application and message server
US10904746B2 (en) Implementation method, apparatus and system for remote access
CN111937013A (en) Electronic device management
CN110809004A (en) Safety protection method and device, electronic equipment and storage medium
CN114221965A (en) Method and device for accessing block chain and electronic equipment
CN116208346A (en) Resource scheduling method, device, terminal, platform manager and orchestrator
CN111931210A (en) Access control method, device, equipment and computer storage medium
US20130137461A1 (en) Method and apparatus for inserting location data into messages at a communication gateway
CN115168872B (en) Decentralized trust-based method for protecting TEE state continuity under public cloud

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
GR01 Patent grant
GR01 Patent grant