CN108810070B - Resource sharing method and device, intelligent equipment and storage medium - Google Patents

Resource sharing method and device, intelligent equipment and storage medium Download PDF

Info

Publication number
CN108810070B
CN108810070B CN201810264452.9A CN201810264452A CN108810070B CN 108810070 B CN108810070 B CN 108810070B CN 201810264452 A CN201810264452 A CN 201810264452A CN 108810070 B CN108810070 B CN 108810070B
Authority
CN
China
Prior art keywords
resource
terminal
request information
requested
acquired
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
CN201810264452.9A
Other languages
Chinese (zh)
Other versions
CN108810070A (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.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics 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 Guangzhou Shiyuan Electronics Thecnology Co Ltd, Guangzhou Shirui Electronics Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN201810264452.9A priority Critical patent/CN108810070B/en
Publication of CN108810070A publication Critical patent/CN108810070A/en
Application granted granted Critical
Publication of CN108810070B publication Critical patent/CN108810070B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • 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/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • 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]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a resource sharing method, a resource sharing device, intelligent equipment and a storage medium. The method comprises the following steps: intercepting resource request information sent by a first terminal; if the requested resource corresponding to the resource request information is acquired from the non-browser kernel folder of the first terminal, responding to the resource request information according to the acquired requested resource; otherwise, the requested resource corresponding to the resource request information is obtained from the network where the first terminal is located, and the requested resource is distributed to other terminals in the local area network where the first terminal is located. By the method, the computers in the same local area network can realize cache sharing, and when the computers in the same local area network access the same static resource or streaming media resource, the downloading time of the resource is greatly shortened, the downloading times of the whole local area network to a certain resource are reduced, and the utilization efficiency of the network is improved.

Description

Resource sharing method and device, intelligent equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of network communication, in particular to a resource sharing method, a resource sharing device, intelligent equipment and a storage medium.
Background
The rapid development of the network brings great convenience to the work and life of people. Meanwhile, the requirements on the service quality and the access speed of the network are higher and higher, although the bandwidth is continuously increased, the number of users and the corresponding bandwidth demand are also continuously increased, and the problem of slow response speed is still frequently complained and troubled by the factors of the bandwidth, the transmission distance and the like.
A common practice in the prior art to improve the quality of service of a lan network is to limit the bandwidth of a user. By configuring the router, the upper and lower limit bandwidths which can be occupied by the client can be set on the router. This method is relatively simple, but does not make good use of network resources. Within a corporate lan, certain resources are constantly being accessed due to the strong cooperation and high concentration of areas of work. Or in more typical lan, such as in a lan-based computer network environment such as an internet cafe, a large number of resources are repeatedly downloaded.
In the existing technical solution, the service quality of the lan network is generally improved by increasing the bandwidth, limiting the user bandwidth, and limiting a certain application bandwidth. However, some large file data of World Wide Web (Web) in the lan are repeatedly downloaded, which seriously affects the performance of the network data link, and meanwhile, the service provider of the network application program may break through the network limitation in thousands of ways and affect the performance of the lan.
Disclosure of Invention
The invention provides a resource sharing method, a resource sharing device, intelligent equipment and a storage medium, which are used for realizing the technical effects that the resource sharing of computers in the same local area network is realized, and resources obtained from the network are locally stored in each terminal.
In a first aspect, an embodiment of the present invention provides a resource sharing method, including:
intercepting resource request information sent by a first terminal;
if the requested resource corresponding to the resource request information is acquired from the non-browser kernel folder of the first terminal, responding to the resource request information according to the acquired requested resource;
if the requested resource corresponding to the resource request information is not acquired from the non-browser kernel folder of the first terminal, acquiring the requested resource corresponding to the resource request information from the network where the first terminal is located;
and if the requested resource corresponding to the resource request information is acquired from the network where the first terminal is located, distributing the requested resource to other terminals in the local area network where the first terminal is located.
In a second aspect, an embodiment of the present invention further provides a resource sharing apparatus, including:
the resource request intercepting module is used for intercepting resource request information sent by a first terminal;
the terminal self response module is used for responding the resource request information according to the acquired requested resource if the requested resource corresponding to the resource request information is acquired from the first terminal non-browser kernel folder;
the network terminal response module is used for acquiring the requested resource corresponding to the resource request information from the network where the first terminal is located if the requested resource corresponding to the resource request information is not acquired from the non-browser kernel folder of the first terminal;
and the request resource distribution module is used for distributing the requested resource to other terminals in the local area network where the first terminal is located if the requested resource corresponding to the resource request information is obtained from the network where the first terminal is located.
In a third aspect, an embodiment of the present invention further provides an intelligent terminal, where the intelligent terminal includes:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a resource sharing method as in any one of the embodiments.
In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the resource sharing method according to any one of the embodiments.
The invention realizes resource sharing through computers in the same local area network, solves the technical problems that the downloading resources of all computers are relatively independent, can not be shared and the utilization efficiency of the network is not high, and realizes that when computers in the same local area network access the same static resource or streaming media resource, the downloading time of the resource can be greatly shortened, the downloading times of the whole local area network to a certain resource can be reduced, thereby improving the utilization efficiency of the network.
Drawings
Fig. 1 is a flowchart of a resource sharing method according to an embodiment of the present invention;
fig. 2 is a flowchart of searching for resources in a resource sharing method according to a second embodiment of the present invention;
fig. 3 is a flowchart illustrating resource sharing in a local area network after resources are acquired through the network in a resource sharing method according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a resource sharing apparatus according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of an intelligent device according to a fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a resource sharing method according to an embodiment of the present invention, where the embodiment is suitable for a situation where a certain terminal accesses a web page using a browser in a local area network (lan) established using a Peer-to-Peer network (P2P). The method can be executed by a resource sharing apparatus, which is implemented by software and/or hardware and integrated in the intelligent device.
The peer-to-peer network, i.e. the peer-to-peer computer network, is a distributed application architecture for distributing tasks and workloads among peers, and is a networking or network form formed by the peer-to-peer computing model in the application layer. In a P2P network environment, multiple computers connected to each other are in a peer-to-peer relationship, each computer has the same functionality, without a master-slave relationship, and a computer can serve as both a server, setting shared resources for use by other computers in the network, and a workstation, and the overall network generally does not rely on a dedicated centralized server, nor does it have a dedicated workstation. Each computer in the network can both act as a requester of network services and provide resources, services and content in response to requests from other computers.
A browser refers to a piece of software that can display HyperText Markup Language (HTML) contents of a web server or a file system and allow a user to interact with the files. It is used to display text, images and other information within the internet or local area network, etc. These words or images can be hyperlinks to other web sites, and the user can browse various information quickly and easily.
The browser wants to obtain a Web page and goes through the following processes: the browser first needs to perform domain name resolution on a server name included in a Uniform Resource Locator (URL); the browser establishes a Transmission Control Protocol (TCP) connection to the Internet Protocol Address (IP Address); the browser sends a HyperText Transfer Protocol request (HTTP) over the TCP connection; after the browser obtains the complete response message, the transmission of the basic page is finished, and the browser needs to analyze the obtained page and extract the URL of the resource object contained in the page; after all embedded resources are available, the browser interprets them according to a specific format (HTML, sound, pictures, animation, etc.) and delivers them to the user.
The method of the embodiment specifically comprises the following steps:
s110, intercepting the resource request information sent by the first terminal.
The first terminal can be any computer in the local area network, and because the computers connected with each other are in the equal position, all the computers have the same function and have no master-slave division. The first terminal is therefore only provided for distinguishing the status of the originator of the request message from the status of the recipient during a particular request. The description is not particularly limited to a computer in a local area network. The resource request information is information that a browser requests to acquire a certain resource, and may be information that a browser of a certain computer in the local area network triggers a certain URL.
Specifically, when the resource sharing device detects that a certain computer browser in the local area network triggers information of a certain URL, the information is intercepted.
And S120, judging whether the requested resource corresponding to the resource request information can be acquired from the non-browser core folder of the first terminal. If yes, executing S130; if not, S140 is executed.
The requested resource is an object pointed by the URL, that is, when the user clicks a connection on the Web page, the resource, such as HTML, sound, picture, animation, etc., is finally presented to the user. Taking an example of accessing a certain Web page, in order to accelerate browsing, the browser creates a folder (browser kernel folder) in the user hard disk, stores the requested document in the folder (the browser defaults to find resources from the path of the folder), and when the visitor requests the page again, the browser can display the document from the local hard disk. When the contents of the folder are deleted, the browser cannot display the document from the local hard disk. Or some resources in the browser kernel folder are cut into other files, the browser cannot display the document from the local hard disk. A non-browser kernel folder refers to a folder as opposed to a browser kernel folder. In general, a non-browser kernel folder will not be available to a browser even if resources are stored in the non-browser kernel folder.
Specifically, after resource request information sent by the first terminal is intercepted, whether a requested resource exists is searched from a non-browser kernel folder.
And S130, responding the resource request information according to the acquired requested resource.
Specifically, when it is checked that the requested resource corresponding to the first terminal resource request information exists in the non-browser kernel file, the requested resource is transmitted to the first terminal.
S140, obtaining the requested resource corresponding to the resource request information from the network where the first terminal is located.
The network where the first terminal is located may be a local area network where the first terminal is located, or may be the internet. The method requires that the hard disks of other terminals in the local area network are searched first, and the resources are requested from the Internet after the requested resources cannot be obtained in the local area network.
Specifically, when it is checked that the requested resource corresponding to the first terminal resource request information does not exist in the non-browser kernel file, the requested resource corresponding to the resource request information is acquired from the local area network where the first terminal is located, and if the requested resource cannot be acquired, the resource is requested from the internet.
S150, distributing the requested resource to other terminals in the local area network where the first terminal is located.
The other terminals in the local area network refer to other terminals in the local area network except the terminal sending the resource request information. The requested resource refers to a complete resource obtained by the first terminal. The resources obtained by the first terminal from the network in which it is located are not exactly identical to the requested resources. Taking the example that the first terminal requests four large graphs, if the first terminal requests A, B, C, D four large graphs and the first terminal itself has cached the graph A, B, the first terminal needs to acquire the graph C, D through its network. In this case, the requested resource (A, B, C, D) is not identical to the resource C, D that the first terminal actually obtained through the network in which it is located.
Specifically, if the requested resource corresponding to the resource request information needs to be acquired from the network where the first terminal is located, the first terminal integrates the resource information acquired from various places into a complete requested resource, and distributes the complete requested resource to other terminals in the local area network where the first terminal is located.
The embodiment provides a resource sharing method, which is implemented by setting a resource searching mode that when any terminal in a built P2P local area network sends out resource request information, a local non-browser kernel folder of a first terminal is searched first, then other terminal hard disks in the local area network are searched, and finally resources are requested to the internet, so that mutual association of each terminal resource in the local area network is realized, the number of times of downloading a certain resource by the whole local area network is reduced, and the utilization efficiency of the network is improved.
Example two
Fig. 2 is a flowchart of searching for resources in a resource sharing method according to a second embodiment of the present invention. In this embodiment, on the basis of the first embodiment, how to search for the resource request information sent by the first terminal in the first terminal hard disk and the network is specifically described.
Specifically, after intercepting the resource request information sent by the first terminal, the method further includes: if the requested resource corresponding to the resource request information is acquired from the first terminal browser kernel folder, responding to the resource request information according to the acquired requested resource;
and if the requested resource corresponding to the resource request information is not acquired from the first terminal browser kernel folder, acquiring the requested resource corresponding to the resource request information from the first terminal non-browser kernel folder.
Further, the acquiring the requested resource corresponding to the resource request information from the network where the first terminal is located specifically includes:
if the requested resource corresponding to the resource request is acquired from other terminals in the local area network where the first terminal is located, responding to the resource request information according to the acquired requested resource;
and if the requested resource corresponding to the resource request information is not acquired from other terminals in the local area network where the first terminal is located, releasing the resource request information to acquire the requested resource from an original request address corresponding to the resource request information.
Further, before sending the resource sharing request based on the requested resource to the other terminals in the local area network where the first terminal is located, the method further includes:
and confirming that the network of the first terminal is in an idle state currently.
Further, a resource sharing method provided by the present application further includes: and sequencing the acquired requested resources according to a preset mode, and deleting the requested resources at the tail of sequencing under a preset condition.
Referring to fig. 2, the method provided in this embodiment specifically includes:
s210, intercepting the resource request information sent by the first terminal.
And S220, judging whether the requested resource corresponding to the resource request information can be acquired from the first terminal browser kernel folder. If yes, executing S260; if not, S230 is executed.
The browser kernel folder is a file which is newly built on a user hard disk by the browser in order to improve the speed of the browser (the browser can be newly built through a default address of the browser, and can also be newly built on a path designated by a user).
Specifically, after intercepting the resource request message sent by the first terminal, the resource sharing device first searches whether there is a requested resource in a browser kernel folder of the first terminal.
And S260, responding the resource request information according to the acquired requested resource.
Specifically, when the requested resource is found in the browser kernel folder of the first terminal, the requested resource is transferred to the browser of the first terminal.
And S230, judging whether the requested resource corresponding to the resource request information can be acquired from the non-browser kernel folder of the first terminal. If yes, executing S260; if not, S240 is executed.
Specifically, if the requested resource corresponding to the resource request information cannot be acquired from the first terminal browser kernel folder, the requested resource corresponding to the resource request information is acquired from the first terminal non-browser kernel folder.
And S260, responding the resource request information according to the acquired requested resource.
Specifically, if the requested resource corresponding to the resource request information is acquired from the non-browser kernel folder of the first terminal, the requested resource is transmitted to the first terminal browser.
S240, judging whether the requested resource corresponding to the resource request information can be acquired from the network where the first terminal is located. If yes, executing S260; if not, S250 is executed.
The network where the first terminal is located includes a local area network where the first terminal is located and also includes the internet where the first terminal is located. The access to the two networks has a sequence, firstly, the requested resource corresponding to the resource request is tried to be obtained from other terminals in the local area network where the first terminal is located, and if the requested resource can be obtained, the resource request information is responded according to the obtained requested resource; and if the requested resource corresponding to the resource request information is not acquired from other terminals in the local area network where the first terminal is located, releasing the resource request information to acquire the requested resource from an original request address corresponding to the resource request information. The resource release request information corresponds to the first step of the method of "intercepting the resource request information sent by the first terminal". The original request address refers to address information obtained by the browser after performing domain name resolution on the server name included in the URL.
Specifically, if the requested resource corresponding to the resource request information cannot be acquired from the non-browser kernel folder of the first terminal, other terminals in the local area network search whether the requested resource exists, and if the requested resource does not exist in the local area network, the resource sharing device releases the intercepted resource request information sent by the first terminal, and the browser seeks the resource according to the original address.
And S250, error reporting processing.
Specifically, if a certain resource cannot be found in the internet, the Web page performs error reporting processing.
And S260, responding the resource request information according to the acquired requested resource.
Specifically, if the requested resource exists in the local area network, the requested resource in the local area network is returned; if the resources are not requested in the local area network, the resource sharing device releases the intercepted resource request information sent by the first terminal, the browser seeks the resources according to the original address, and the resources to be found are returned to the first terminal.
Optionally, before sending the resource sharing request based on the requested resource to the other terminals in the local area network where the first terminal is located, the method further includes: and confirming that the network of the first terminal is in an idle state currently.
The network being in the idle state means that although the terminal is in the networking state, data transmission is not performed through the network, or it is detected that the uploading and downloading speeds of the terminal are lower than a certain preset value.
Specifically, when the network of the first terminal is currently in an idle state, the first terminal sends a resource sharing request to other terminals in the local area network where the first terminal is located.
Optionally, the resource sharing method provided by the present application further includes: and sequencing the acquired requested resources according to a preset mode, and deleting the requested resources at the tail of sequencing under a preset condition.
The sorting is performed according to a preset mode, and may be performed according to the use frequency or the last use time. The sorting according to the preset mode may be sorting after local resources are retrieved each time, or sorting under a preset condition. The preset condition is a preset certain judgment condition, and when the condition is met, certain operation of deleting the resource is triggered. In this embodiment, the triggering condition for deleting the resource may be set to delete part of the resource file when the local cache file reaches or approaches to reach the physical hard disk capacity or the preset maximum configuration capacity; of course, it may be set to delete part of the resource files at regular intervals (e.g., 30 days).
Specifically, when a local cache file of a certain terminal in the local area network reaches or approaches to reach the physical hard disk capacity or the preset configuration maximum capacity, the terminal sorts the cached resource files according to the use frequency, and deletes the resource files positioned in the second half of the sequence after the sorting.
The embodiment provides a resource sharing method, which expands the range of resources retrieved by a browser, realizes the mutual association of various terminal resources in a local area network, and reduces the download times of a certain resource in the whole local area network, thereby improving the utilization efficiency of the network by specifically describing the interception and release processing of the resource request information by a resource sharing device after the resource request information is sent by the certain terminal in the local area network.
EXAMPLE III
Fig. 3 is a flowchart illustrating resource sharing performed in a local area network after resources are acquired through the network in a resource sharing method according to a third embodiment of the present invention. The present embodiment is embodied on the basis of the first embodiment.
Specifically, the distributing the requested resource to other terminals in the local area network where the first terminal is located includes:
sending a resource sharing request based on the requested resource to other terminals in the local area network where the first terminal is located;
acquiring reply information returned by the other terminals and confirming the part to be transmitted in the corresponding requested resource according to the reply information;
and extracting the confirmed part to be transmitted from the requested resource and distributing the part to other corresponding terminals.
Referring to fig. 3, the method provided in this embodiment specifically includes:
s310, judging whether the requested resource corresponding to the resource request information can be acquired from the network where the first terminal is located. If yes, executing S330; if not, S320 is executed.
And S320, error reporting processing.
And S330, responding the resource request information according to the acquired requested resource.
Specifically, if the requested resource exists in the local area network, the requested resource in the local area network is returned; if the resources are not requested in the local area network, the resource sharing device releases the intercepted resource request information sent by the first terminal, the browser seeks the resources according to the original address, and the resources to be found are returned to the first terminal. Whether the requested resource is obtained from the local area network or the internet, S340 is performed.
S340, sending a resource sharing request based on the requested resource to other terminals in the local area network where the first terminal is located.
The requested resource is the complete requested resource integrated by the terminal. The sharing request may be made by a local area network broadcasting technique. Namely, the first terminal integrates the resources and then sends information to each other terminal in the local area network, and the information content includes the content included in the resources shared this time and other related information. Of course, the sharing request may also be implemented in other ways, such as a pop-up dialog box, which is determined by the shared party to be received or not; or not pop up dialog boxes and receive by default.
Specifically, when a terminal in the local area network acquires a requested resource through a network mode (i.e., a mode other than a mode of a terminal local browser kernel folder and a mode of a terminal local non-browser kernel folder), the terminal integrates the resource into a complete requested resource and sends information of the complete requested resource to other terminals in the local area network.
S350, obtaining reply information returned by the other terminals and confirming the part to be transmitted in the corresponding requested resource according to the reply information.
The reply information returned by the other terminals refers to information returned to the sharing initiating terminal by the other terminals after comparing the information of the shared resource with the resource possessed by the other terminals. The information includes contents such as partial resources required by the shared terminal (i.e. a part of the existing resources of the shared terminal different from the complete requested resources). Because the local information of each terminal in the lan may be different, the reply information sent by different terminals in the lan may also be different.
Specifically, the terminal sending the resource sharing request receives reply information sent back by other terminals in the local area network, and confirms different required parts of the complete resource by other terminals in the local area network according to the reply information.
S360, extracting the confirmed part to be transmitted from the requested resource and distributing the part to other corresponding terminals.
Specifically, the terminal sending the resource sharing request sends the resource information packaged respectively to the corresponding terminals according to different requirements of other terminals in the local area network for the complete resources.
In the following, the method provided by the present embodiment is exemplarily described:
the description will be given taking an example in which a user accesses a web page having many picture resources in a browser of a first terminal (computer a). The user enters a web site address on the browser using computer a, and the browser sends a request to the web server and retrieves HTML content. The HTML content contains a plurality of picture elements, and the browser starts to download pictures according to the addresses on the picture elements after the HTML content is analyzed.
Suppose there are thirty picture requests, each corresponding to 30 different large pictures.
The resource sharing device in the computer A intercepts the request of picture downloading, and inquires the computers in the same local area network according to the information of picture name, address and the like in the request. The computer B in the same local area network just has the cache resource of 10 pictures and responds to the computer A. The computer C in the same local area network just has the cache resources of 10 pictures and responds to the computer A. The resource request information of the remaining 10 pictures is not responded in the local area network. The computer A initiates a connection request to the computer B and the computer C, receives the data of 20 pictures and downloads the data of the remaining 10 pictures to the server. The computer A successfully acquires the data resources of 30 pictures and stores the data resources locally.
When the user closes the browser, the resource sharing device in the computer A detects that the network of the computer A is in an idle state, and the computer A initiates an active sharing request to the local area network. After receiving the message, the computers B and C check their local cache conditions, calculate their respective missing resources and respond to the computer A. And after receiving the response, the computer A encapsulates the corresponding resources according to the response and then sends the encapsulated resources to the computers B and C. And after receiving the data, the computer B and the computer C store the data in respective local hard disks.
The user uses the computer B to visit the same website on the browser, the HTML content is unchanged, and 30 large pictures still exist, at the moment, the browser of the computer B checks the local resource condition, and when the data of the 30 pictures are found, the resources of the 30 pictures are directly obtained and displayed to the user.
The embodiment provides a resource sharing method, which describes a process of resource sharing in a local area network after a certain terminal acquires resources through the network, and the method can enable computers in the local area network to share more and more resources, so that the efficiency of downloading a certain static resource in the local area network is greatly improved. The method and the device expand the resource retrieval range of the browser, realize the mutual correlation of all terminal resources in the local area network, reduce the downloading times of the whole local area network to a certain resource, and further improve the utilization efficiency of the network.
Example four
Fig. 4 is a schematic structural diagram of a resource sharing apparatus according to a fourth embodiment of the present invention. The device specifically includes: a resource request interception module 41, a terminal self response module 42, a network terminal response module 43 and a request resource distribution module 44.
The resource request intercepting module 41 is configured to intercept resource request information sent by a first terminal; a terminal self-response module 42, configured to, if a requested resource corresponding to the resource request information is acquired from the first terminal non-browser kernel folder, respond to the resource request information according to the acquired requested resource; a network terminal response module 43, configured to, if a requested resource corresponding to the resource request information is not obtained from the non-browser kernel folder of the first terminal, obtain a requested resource corresponding to the resource request information from a network where the first terminal is located; a request resource distribution module 44, configured to, if the requested resource corresponding to the resource request information is obtained from the network where the first terminal is located, distribute the requested resource to other terminals in the local area network where the first terminal is located.
The embodiment provides a resource sharing device, which is characterized in that when any terminal in a built P2P local area network is set to send out resource request information, a resource searching mode that a local non-browser kernel folder of a first terminal is searched first, then other terminal hard disks in the local area network are searched, and finally resources are requested to the internet is performed, so that mutual association of each terminal resource in the local area network is realized, the number of times of downloading a certain resource by the whole local area network is reduced, and the utilization efficiency of the network is improved.
On the basis of the above embodiment, the method further comprises the following steps:
the kernel folder request module is used for responding to the resource request information according to the acquired requested resource if the requested resource corresponding to the resource request information is acquired from the first terminal browser kernel folder;
and the non-kernel folder request module is used for acquiring the requested resource corresponding to the resource request information from the first terminal non-browser kernel folder if the requested resource corresponding to the resource request information is not acquired from the first terminal browser kernel folder.
And the idle state confirmation module is used for confirming that the network of the first terminal is in an idle state currently.
And the resource deleting module is used for sequencing the acquired requested resources according to a preset mode and deleting the requested resources at the tail of sequencing under a preset condition.
Wherein, the network terminal response module comprises:
a local area network response unit, configured to, if a requested resource corresponding to the resource request is acquired from another terminal in the local area network where the first terminal is located, respond to the resource request information according to the acquired requested resource;
and the original address response unit is used for releasing the resource request information to acquire the requested resource from the original request address corresponding to the resource request information if the requested resource corresponding to the resource request information is not acquired from other terminals in the local area network where the first terminal is located.
Wherein the request resource distribution module comprises:
a resource sharing request unit, configured to send a resource sharing request based on the requested resource to another terminal in a local area network where the first terminal is located;
the reply information confirmation unit is used for acquiring reply information returned by the other terminals and confirming the part to be transmitted in the corresponding requested resource according to the reply information;
and the resource distribution unit is used for extracting the confirmed part to be transmitted from the requested resource and distributing the part to other corresponding terminals.
The resource sharing apparatus provided in this embodiment may be configured to execute the resource sharing method provided in any of the above embodiments, and has corresponding functions and advantages.
EXAMPLE five
Fig. 5 is a schematic structural diagram of an intelligent device according to a fifth embodiment of the present invention. As shown in fig. 5, the smart device includes a processor 50, a memory 51, an input device 52, a communication module 53, and an output device 54; the number of the processors 50 in the intelligent device may be one or more, and one processor 50 is taken as an example in fig. 5; the processor 50, the memory 51, the input device 52, the communication module 53 and the output device 54 in the smart device may be connected by a bus or other means, and fig. 5 illustrates an example of connection by a bus.
The memory 51 is used as a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as modules corresponding to a resource sharing method in the present embodiment (for example, a resource request intercepting module 41, a terminal self-response module 42, a network terminal response module 43, and a request resource distributing module 44 in a resource sharing device). The processor 50 executes various functional applications of the smart device and data processing by executing software programs, instructions and modules stored in the memory 51, namely, implements the above-mentioned resource sharing method.
The memory 51 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the smart device, and the like. Further, the memory 51 may include high speed random access memory, and may also include non-volatile memory, such as at least one hard disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 51 may further include memory located remotely from processor 50, which may be connected to the smart device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
And the communication module 53 is used for establishing connection with the laser projection equipment and realizing data interaction with the laser projection equipment. The input device 52 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function controls of the smart device. The output device 54 may include a display device such as a display screen, and may also include other devices for output.
The intelligent device provided in this embodiment of the present invention may execute the resource sharing method provided in any embodiment of the present invention, and has corresponding functions and advantages.
EXAMPLE six
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, perform a method for resource sharing, the method including:
intercepting resource request information sent by a first terminal;
if the requested resource corresponding to the resource request information is acquired from the non-browser kernel folder of the first terminal, responding to the resource request information according to the acquired requested resource;
if the requested resource corresponding to the resource request information is not acquired from the non-browser kernel folder of the first terminal, acquiring the requested resource corresponding to the resource request information from the network where the first terminal is located;
and if the requested resource corresponding to the resource request information is acquired from the network where the first terminal is located, distributing the requested resource to other terminals in the local area network where the first terminal is located.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the method operations described above, and may also perform related operations in the resource sharing method provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the resource sharing apparatus, the included units and modules are only divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for resource sharing, comprising:
intercepting resource request information sent by a first terminal browser;
if the requested resource corresponding to the resource request information is acquired from the non-browser kernel folder of the first terminal, responding to the resource request information according to the acquired requested resource;
if the requested resource corresponding to the resource request information is not acquired from the non-browser kernel folder of the first terminal, acquiring the requested resource corresponding to the resource request information from the network where the first terminal is located;
the first terminal non-browser kernel folder is a folder established by a non-browser on a user hard disk;
and if the requested resource corresponding to the resource request information is acquired from the network where the first terminal is located, distributing the requested resource to other terminals in the local area network where the first terminal is located.
2. The method according to claim 1, wherein after said intercepting the resource request information sent by the first terminal, further comprising:
if the requested resource corresponding to the resource request information is acquired from the first terminal browser kernel folder, responding to the resource request information according to the acquired requested resource;
and if the requested resource corresponding to the resource request information is not acquired from the first terminal browser kernel folder, acquiring the requested resource corresponding to the resource request information from the first terminal non-browser kernel folder.
3. The method according to claim 1, wherein the acquiring the requested resource corresponding to the resource request information from the network where the first terminal is located specifically includes:
if the requested resource corresponding to the resource request is acquired from other terminals in the local area network where the first terminal is located, responding to the resource request information according to the acquired requested resource;
and if the requested resource corresponding to the resource request information is not acquired from other terminals in the local area network where the first terminal is located, releasing the resource request information to acquire the requested resource from an original request address corresponding to the resource request information.
4. The method of claim 1, wherein said distributing the requested resource to other terminals within a local area network in which the first terminal is located comprises:
sending a resource sharing request based on the requested resource to other terminals in the local area network where the first terminal is located;
acquiring reply information returned by the other terminals and confirming the part to be transmitted in the corresponding requested resource according to the reply information;
and extracting the confirmed part to be transmitted from the requested resource and distributing the part to other corresponding terminals.
5. The method according to claim 4, wherein before sending the resource sharing request based on the requested resource to the other terminals in the local area network where the first terminal is located, the method further includes:
and confirming that the network of the first terminal is in an idle state currently.
6. The method of claim 1, further comprising:
and sequencing the acquired requested resources according to a preset mode, and deleting the requested resources at the tail of sequencing under a preset condition.
7. A resource sharing apparatus, comprising:
the resource request intercepting module is used for intercepting resource request information sent by a first terminal browser;
the terminal self response module is used for responding the resource request information according to the acquired requested resource if the requested resource corresponding to the resource request information is acquired from the first terminal non-browser kernel folder;
the network terminal response module is used for acquiring the requested resource corresponding to the resource request information from the network where the first terminal is located if the requested resource corresponding to the resource request information is not acquired from the non-browser kernel folder of the first terminal;
the first terminal non-browser kernel folder is a folder established by a non-browser on a user hard disk;
and the request resource distribution module is used for distributing the requested resource to other terminals in the local area network where the first terminal is located if the requested resource corresponding to the resource request information is obtained from the network where the first terminal is located.
8. The apparatus of claim 7, wherein the network termination response module comprises:
a local area network response unit, configured to, if a requested resource corresponding to the resource request is acquired from another terminal in the local area network where the first terminal is located, respond to the resource request information according to the acquired requested resource;
and the original address response unit is used for releasing the resource request information to acquire the requested resource from the original request address corresponding to the resource request information if the requested resource corresponding to the resource request information is not acquired from other terminals in the local area network where the first terminal is located.
9. An intelligent terminal, characterized in that, intelligent terminal includes:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the resource sharing method of any one of claims 1-6.
10. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the method of resource sharing according to any one of claims 1 to 6.
CN201810264452.9A 2018-03-28 2018-03-28 Resource sharing method and device, intelligent equipment and storage medium Active CN108810070B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810264452.9A CN108810070B (en) 2018-03-28 2018-03-28 Resource sharing method and device, intelligent equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810264452.9A CN108810070B (en) 2018-03-28 2018-03-28 Resource sharing method and device, intelligent equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108810070A CN108810070A (en) 2018-11-13
CN108810070B true CN108810070B (en) 2021-06-15

Family

ID=64094669

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810264452.9A Active CN108810070B (en) 2018-03-28 2018-03-28 Resource sharing method and device, intelligent equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108810070B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110535977B (en) * 2019-09-29 2022-04-01 深圳市网心科技有限公司 File distribution method and device, computer device and storage medium
CN112104741B (en) * 2020-09-21 2024-02-02 北京指掌易科技有限公司 Resource sharing method, device and system and gateway controller

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101902346A (en) * 2009-05-31 2010-12-01 国际商业机器公司 P2P (Point to Point) content caching system and method
CN102045403A (en) * 2010-12-29 2011-05-04 成都市华为赛门铁克科技有限公司 Method, device and system for processing data of distributed network
CN102447688A (en) * 2010-10-15 2012-05-09 盛绩信息技术(上海)有限公司 Webpage game resource accelerator and acceleration method
CN103312776A (en) * 2013-05-08 2013-09-18 青岛海信传媒网络技术有限公司 Method and device for caching contents of videos by edge node server
CN103699595A (en) * 2013-12-11 2014-04-02 小米科技有限责任公司 Method and device for webpage caching of terminal browser and terminal
CN104519081A (en) * 2013-09-27 2015-04-15 阿里巴巴集团控股有限公司 Page access method and device
CN104967685A (en) * 2015-06-25 2015-10-07 广东德诚网络科技有限公司 Streaming media multi-level cache network acceleration method based on Flash P2P

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140097924A (en) * 2013-01-30 2014-08-07 한국전자통신연구원 Method for prioritized dual caching and apparatus therefor

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101902346A (en) * 2009-05-31 2010-12-01 国际商业机器公司 P2P (Point to Point) content caching system and method
CN102447688A (en) * 2010-10-15 2012-05-09 盛绩信息技术(上海)有限公司 Webpage game resource accelerator and acceleration method
CN102045403A (en) * 2010-12-29 2011-05-04 成都市华为赛门铁克科技有限公司 Method, device and system for processing data of distributed network
CN103312776A (en) * 2013-05-08 2013-09-18 青岛海信传媒网络技术有限公司 Method and device for caching contents of videos by edge node server
CN104519081A (en) * 2013-09-27 2015-04-15 阿里巴巴集团控股有限公司 Page access method and device
CN103699595A (en) * 2013-12-11 2014-04-02 小米科技有限责任公司 Method and device for webpage caching of terminal browser and terminal
CN104967685A (en) * 2015-06-25 2015-10-07 广东德诚网络科技有限公司 Streaming media multi-level cache network acceleration method based on Flash P2P

Also Published As

Publication number Publication date
CN108810070A (en) 2018-11-13

Similar Documents

Publication Publication Date Title
CN108052675B (en) Log management method, system and computer readable storage medium
WO2017190641A1 (en) Crawler interception method and device, server terminal and computer readable medium
CN107025234B (en) Information pushing method and cache server
US8527862B2 (en) Methods for making ajax web applications bookmarkable and crawlable and devices thereof
US20150237113A1 (en) Method and system for file transmission
CN107786621B (en) User information management method, access processing method, device and system
WO2017167050A1 (en) Configuration information generation and transmission method, and resource loading method, apparatus and system
CN107391664A (en) Page data processing method and system based on WEB
US8868638B2 (en) Methods for reducing latency in network connections using automatic redirects and systems thereof
WO2013060210A1 (en) Sharing control system and method for network resources download information
CN112769671B (en) Message processing method, device and system
WO2021007752A1 (en) Return-to-source method and related device in content delivery network
US11281511B2 (en) Predictive microservice systems and methods
CN109600385B (en) Access control method and device
CN107105336A (en) Data processing method and data processing equipment
CN103873597A (en) Distributed webpage downloading method and system
CN108810070B (en) Resource sharing method and device, intelligent equipment and storage medium
CN110413846B (en) Data processing method and device for webpage mirror image and computer readable storage medium
CN111475761B (en) Client, server and content sharing control method
CN112165449B (en) Control method of real-time authority of web application, electronic device and storage medium
CN113079210A (en) Cross-region data automatic synchronization configuration method, terminal equipment and storage medium
CN111600755B (en) Internet access behavior management system and method
CN112926002A (en) Service request processing method and device
CN111130900A (en) Data acquisition method and device based on distributed interconnection of coordination services
CN113285920B (en) Service access method, device, equipment and storage medium

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